-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dario/release_documentation' into develop
- Loading branch information
Showing
11 changed files
with
165 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,15 +12,17 @@ jobs: | |
github-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref }} | ||
- name: Exit if any RC release | ||
if: contains(${{ github.ref }}, 'rc') == false | ||
uses: everlytic/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
source_ref: ${{ github.ref }} | ||
target_branch: "latest" | ||
commit_message_template: 'RELEASE: :shipit: :boom: :tada: Merged {source_ref} into target {target_branch}' | ||
commit_message_template: ':tada: RELEASE: Merged {source_ref} into target {target_branch}' | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
|
@@ -30,7 +32,9 @@ jobs: | |
pypi-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref }} | ||
- uses: actions/setup-python@v2 | ||
- name: Install dependencies | ||
run: | | ||
|
@@ -43,3 +47,17 @@ jobs: | |
run: | | ||
python -m build | ||
python -m twine upload --repository pypi dist/* | ||
sync_to_develop: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: "latest" | ||
- name: Exit if any RC release | ||
if: contains(${{ github.ref }}, 'rc') == false | ||
uses: everlytic/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
source_ref: "latest" | ||
target_branch: "develop" | ||
commit_message_template: ':tada: RELEASE: Synced latest into develop' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Documentation Release | ||
--------------------- | ||
|
||
The `tidy3d-docs` repository automatically mirrors the `tidy3d` repository. Specifically, these branches are automatically synced. | ||
|
||
- main | ||
- latest | ||
- develop | ||
- 'pre/*' | ||
- 'v*' | ||
|
||
These branches are synced to the tidy3d-docs repo through the sync-readthedocs-repo Github action. | ||
You can read the latest versions synced in the action file. | ||
However, you need to configure how they appear in the documentation build in the readthedocs admin page. | ||
Only latest is the public version, others are private. | ||
|
||
The `latest` branch holds the state of the docs that we want to host in `latest` version on the website. These are the latest docs (including new notebooks, typo fixes, etc.) related to the last official release (not pre-release). | ||
|
||
The `stable` version of the docs on our website is built based on the last version tag which is not a pre-release tag (no `rc` ending). | ||
|
||
Hot Fix & Submodule Updates | ||
''''''''''''''''''''''''''' | ||
|
||
To make a “hot fix” (eg fix a typo, add a notebook, update the release FAQ), just update the ``latest`` branch in ``tidy3d`` repo. This should automatically sync to `tidy3d-docs`, and trigger a docs rebuild. **However, we should avoid this as this will cause the ``develop`` and ``latest branches`` to diverge.** Ideally, these hot fixes could wait until the next pre/post-release to be propagated through. | ||
|
||
NOTE: To avoid conflicts, ideally we should only update ``latest`` by merging ``develop`` in it, or at the very least we should make sure changes are propagated to both branches. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,12 @@ | ||
Version Release | ||
---------------- | ||
Releasing a new ``tidy3d`` version | ||
---------------------------------- | ||
|
||
There's a really nice tool to manage the releases which is called ``bump-my-version``, which has already been configured. | ||
It's really easy to use. | ||
This document contains the relevant information to create and publish a new tidy3d version. | ||
|
||
Docs of the tool available here https://callowayproject.github.io/bump-my-version/#create-a-default-configuration | ||
Version Information Management | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
You need to have installed the development installation of ``tidy3d``: | ||
The ``pyproject.toml`` is declarative (ie static) and provides information to the packaging tools like PyPi on what version is ``tidy3d``. However, we also have a ``version.py`` file so that we can dynamically query ``tidy3d.__version__`` within our python version. These two files need to be kept with the same version. This is achieved by using the ``bump-my-version`` utility as described in the following section. **These files should not be manually updated.** | ||
|
||
.. code-block:: bash | ||
poetry install -E dev | ||
Now, make sure the git index is clean, and you're ready to release. Test that the release would update the correct files: | ||
|
||
.. code-block:: bash | ||
poetry run bump-my-version show-bump | ||
When you want to bump the version, you only have to do: | ||
|
||
.. code-block:: bash | ||
poetry run bump-my-version bump <patch, or similar according to the show-bump commands> | ||
An example of the ``.bump-my-version.toml`` is as below, and just configures the files to be updated: | ||
|
||
.. code-block:: bash | ||
2024-03-20 16:58:02 ⌚ dxps in ~/flexcompute/tidy3d | ||
± |dario/2.6.2/fix_versioning S:1 U:3 ?:2 ✗| → poetry run bump-my-version show-bump | ||
Specified version (2.6.1) does not match last tagged version (2.6.0) | ||
2.6.1 ── bump ─┬─ major ─ 3.0.0 | ||
├─ minor ─ 2.7.0 | ||
├─ patch ─ 2.6.2 | ||
├─ pre_l ─ 2.6.1-rc0 | ||
╰─ pre_n ─ 2.6.1-dev1 | ||
The configuration of the way the version bumping occurs is described in the ``pyproject.toml``. | ||
|
Oops, something went wrong.