|
| 1 | +Making a Pull Request |
| 2 | +===================== |
| 3 | + |
| 4 | +Actions to take on each PR that modifies the schema and does not prepare the schema for a public release |
| 5 | +(this is also in the `GitHub PR template`_): |
| 6 | + |
| 7 | +If the current schema version on "dev" is a public release, then: |
| 8 | + |
| 9 | +1. Update the version string in ``docs/format/source/conf.py`` and ``common/namespace.yaml`` to the next version with the |
| 10 | + suffix "-alpha" |
| 11 | +2. Add a new section in the release notes for the new version with the date "Upcoming" |
| 12 | + |
| 13 | +Always: |
| 14 | + |
| 15 | +1. Add release notes for the PR to ``docs/format/source/format_release_notes.rst`` |
| 16 | + |
| 17 | +Documentation or internal changes to the repo (i.e., changes that do not affect the schema files) |
| 18 | +do not need to be accompanied with a version bump or addition to the release notes. |
| 19 | + |
| 20 | +.. _`GitHub PR template`: https://github.com/NeurodataWithoutBorders/nwb-schema/blob/dev/.github/PULL_REQUEST_TEMPLATE.md |
| 21 | + |
| 22 | + |
| 23 | +Merging PRs and Making Releases |
| 24 | +=============================== |
| 25 | + |
| 26 | +**Public release**: a tagged release of the schema. The version string MUST NOT have a suffix indicating a pre-release, |
| 27 | +such as "-alpha". The current "dev" branch of PyNWB and all PyNWB releases MUST point to a public release of |
| 28 | +nwb-schema. All schema that use nwb-schema as a submodule MUST also point only to public releases. |
| 29 | + |
| 30 | +**Internal release**: a state of the schema "dev" branch where the version string ends with "-alpha". |
| 31 | + |
| 32 | +The default branch of nwb-schema is "dev". **The "dev" branch holds the bleeding edge version of |
| 33 | +the nwb-schema specification.** |
| 34 | + |
| 35 | +PRs should be made to "dev". Every PR should include an update to ``docs/format/source/format_release_notes.rst``. |
| 36 | +If the current version is a public release, then the PR should also update the version of the schema in two places: |
| 37 | +``docs/format/source/conf.py`` and ``core/nwb.namespace.yaml``. The new version should be the next bugfix/minor/major version |
| 38 | +of the schema with the suffix "-alpha". For example, if the current schema on "dev" has version "2.2.0", |
| 39 | +then a PR implementing a bug fix should update the schema version from "2.2.0" to "2.2.1-alpha". Appending the "-alpha" |
| 40 | +suffix ensures that any person or API accessing the default "dev" branch of the repo containing an internal release |
| 41 | +of the schema receives the schema with a version string that is distinct from public releases of the schema. If the |
| 42 | +current schema on "dev" is already an internal release, then the version string does not need to be updated unless |
| 43 | +the PR requires an upgrade in the version (e.g., from bugfix to minor). |
| 44 | + |
| 45 | +PyNWB should contain a branch and PR that tracks the "dev" branch of nwb-schema. Before |
| 46 | +a public release of nwb-schema is made, this PyNWB branch should be checked to ensure that when the new release |
| 47 | +is made, the branch can be merged without issue. |
| 48 | + |
| 49 | +Immediately prior to making a new public release, the version of the schema should be updated to remove the "-alpha" |
| 50 | +suffix and the documentation and release notes should be updated as needed (see next section). |
| 51 | + |
| 52 | +The current "dev" branch of PyNWB and all PyNWB releases MUST always point to a public release of nwb-schema. If |
| 53 | +a public release contains an internally released version of nwb-schema, e.g., from an untagged commit on the |
| 54 | +"dev" branch, then it will be difficult to find the version (commit) of nwb-schema that was used to create |
| 55 | +an NWB file when the schema is not cached. |
| 56 | + |
| 57 | +Making a Release Checklist |
| 58 | +========================== |
| 59 | + |
| 60 | +Before merging: |
| 61 | + |
| 62 | +1. Update requirements versions as needed |
| 63 | +2. Update legal file dates and information in ``Legal.txt``, ``license.txt``, ``README.md``, ``docs/format/source/conf.py``, |
| 64 | + and any other locations as needed |
| 65 | +3. Update ``README.rst`` as needed |
| 66 | +4. Update the version string in ``docs/format/source/conf.py``, ``core/nwb.namespace.yaml``, and ``/core/nwb.file.yaml`` |
| 67 | + (remove "-alpha" suffix) |
| 68 | +5. Update ``docs/format/source/conf.py`` as needed |
| 69 | +6. Update release notes (set release date) in ``docs/format/source/format_release_notes.rst`` and any other docs as needed |
| 70 | +7. Test docs locally (``cd docs/format; make fulldoc``) where the nwb-schema submodule in the local version of PyNWB |
| 71 | + is fully up-to-date with the head of the dev branch. |
| 72 | +8. Push changes to a new PR and make sure all PRs to be included in this release have been merged. Add |
| 73 | + ``?template=release.md`` to the PR URL to auto-populate the PR with this checklist. |
| 74 | +9. Check that the readthedocs build for this PR succeeds (build latest to pull the new branch, then activate and |
| 75 | + build docs for new branch): https://readthedocs.org/projects/nwb-schema/builds/ |
| 76 | + |
| 77 | +After merging: |
| 78 | + |
| 79 | +1. Create a new git tag. Pull the latest dev branch locally, run ``git tag [version] --sign``, copy and paste the |
| 80 | + release notes into the tag message, and run ``git push --tags``. |
| 81 | +2. On the `GitHub tags`_ page, click "..." -> "Create release" for the new tag on the right side of the page. |
| 82 | + Copy and paste the release notes into the release message, update the formatting if needed (reST to Markdown), |
| 83 | + and set the title to the version string. |
| 84 | +3. Check that the readthedocs "latest" and "stable" builds run and succeed. Delete the readthedocs build for the |
| 85 | + merged PR. https://readthedocs.org/projects/nwb-schema/builds/ |
| 86 | +4. Update the nwb-schema submodule in the PyNWB branch corresponding to this schema version to point to the tagged commit. |
| 87 | + |
| 88 | +This checklist can also be found in the `GitHub release PR template`_. |
| 89 | + |
| 90 | +The time between merging this PR and creating a new public release should be minimized. |
| 91 | + |
| 92 | +.. _`GitHub tags`: https://github.com/NeurodataWithoutBorders/nwb-schema/tags |
| 93 | +.. _`GitHub release PR template`: https://github.com/NeurodataWithoutBorders/nwb-schema/blob/dev/.github/PULL_REQUEST_TEMPLATE/release.md |
| 94 | + |
| 95 | + |
| 96 | + |
1 | 97 | The "dev" Branch and Releases |
2 | 98 | ============================= |
3 | 99 |
|
|
0 commit comments