Skip to content

Commit

Permalink
[IMP] contribute section, taking into account reviewers remarks
Browse files Browse the repository at this point in the history
  • Loading branch information
legalsylvain committed Nov 16, 2023
1 parent d527b95 commit 2bc47f4
Showing 1 changed file with 44 additions and 12 deletions.
56 changes: 44 additions & 12 deletions docsource/090_contribute.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,57 @@ module from version 15.0 to version 16.0:

* As other OCA contribution, create a new branch, from an up to date OCA branch:

``git checkout -b 16.0-mig-account``
.. code-block:: shell
git checkout -b 16.0-mig-account
* Make a copy of the analysis file with the suffix ``_work``.

``cd ./openupgrade_scripts/scripts/account/16.0.1.2/``
``cp upgrade_analysis.txt upgrade_analysis_work.txt``
.. code-block:: shell
cd ./openupgrade_scripts/scripts/account/16.0.1.2/
cp upgrade_analysis.txt upgrade_analysis_work.txt
* Explain the changes to do in the ``upgrade_analysis_work.txt``.
Write ``pre-migration.py`` and / or ``post-migration.py`` scripts in the same folder.
Comment / uncomment lines in ``noupdate_changes.xml``.
(Read more in :doc:`080_migration_script_development`)
For each line, add a prefix, and explain your analysis:

* ``NOTHING TO DO``, and why it's nothing to do
* ``DONE``: pre-migration/post-migration: indicating the what and maybe the why.
* ``TODO``: This shouldn't be usually done.

**Note:**
You can reorder lines and group them together for including all of them
in a "logical" block for putting only one comment.
Examples: all the noupdate=0 new and del ir* records, or the NEW and DEL lines for a field that is renamed.

* Write ``pre-migration.py`` and / or ``post-migration.py`` scripts in the same folder.

* Comment / uncomment lines in ``noupdate_changes.xml``.

(Read more in :doc:`080_migration_script_development`)

* Finally, update the coverage file in ``docsource/modulesXX-YY.rst``, and mark the
module as ``done``, ``Nothing to do``, etc.

* Finally, commit your changes.
``git add . && git commit -am "[OU-ADD] account"``
(For a fix, use ``[OU-FIX]`` prefix)
(Read more in :doc:`coverage legend detail.<coverage_analysis/coverage_legend>`)

* Propose your changes to the community for review.
``git push MY_REMOTE 16.0-mig-account``
* Finally, commit and push your changes.

.. code-block:: shell
git add .
git commit -am "[OU-ADD] account"
git push MY_REMOTE 16.0-mig-account
**Note:**

* For a fix of an existing migration scripts, use ``[OU-FIX]``

* For an improvement of an existing migration scripts, use ``[OU-IMP]``

* Propose your changes to the community for review, opening a Pull Request on github.

Community involvement
---------------------
Expand Down Expand Up @@ -81,4 +114,3 @@ project covers the modules that you have in use, try and use the software
to upgrade a copy of your database and give us feedback.

Thank you!

0 comments on commit 2bc47f4

Please sign in to comment.