Skip to content

Commit

Permalink
Merge pull request pybamm-team#3556 from agriyakhetarpal/remove-versi…
Browse files Browse the repository at this point in the history
…ons.json

Remove `versions.json` and related configuration
  • Loading branch information
Saransh-cpp authored Nov 25, 2023
2 parents d7d6262 + 6ed478b commit d8f3b73
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 202 deletions.
4 changes: 0 additions & 4 deletions .github/release_workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ This file contains the workflow required to make a `PyBaMM` release on GitHub, P
- `CITATION.cff`
- `pyproject.toml`
- `vcpkg.json`
- `docs/_static/versions.json`
- `CHANGELOG.md`

These changes will be automatically pushed to a new branch `vYY.MM` and a PR from `vvYY.MM` to `develop` will be created (to sync the branches).
Expand All @@ -35,7 +34,6 @@ If a new release candidate is required after the release of `rc0` -
- `CITATION.cff`
- `pyproject.toml`
- `vcpkg.json`
- `docs/_static/versions.json`
- `CHANGELOG.md`

These changes will be automatically pushed to the existing `vYY.MM` branch and a PR from `vvYY.MM` to `develop` will be created (to sync the branches).
Expand All @@ -57,7 +55,6 @@ Once satisfied with the release candidates -
- `CITATION.cff`
- `pyproject.toml`
- `vcpkg.json`
- `docs/_static/versions.json`
- `CHANGELOG.md`

These changes will be automatically pushed to the existing `vYY.MM` branch and a PR from `vvYY.MM` to `develop` will be created (to sync the branches).
Expand All @@ -74,7 +71,6 @@ Some other essential things to check throughout the release process -

- If updating our custom vcpkg registory entries [pybamm-team/sundials-vcpkg-registry](https://github.com/pybamm-team/sundials-vcpkg-registry) or [pybamm-team/casadi-vcpkg-registry](https://github.com/pybamm-team/casadi-vcpkg-registry) (used to build Windows wheels), make sure to update the baseline of the registories in vcpkg-configuration.json to the latest commit id.
- Update jax and jaxlib to the latest version in `pybamm.util` and `pyproject.toml`, fixing any bugs that arise
- Make sure the URLs in `docs/_static/versions.json` are valid
- As the release workflow is initiated by the `release` event, it's important to note that the default `GITHUB_REF` used by `actions/checkout` during the checkout process will correspond to the tag created during the release process. Consequently, the workflows will consistently build PyBaMM based on the commit associated with this tag. Should new commits be introduced to the `vYY.MM` branch, such as those addressing build issues, it becomes necessary to manually update this tag to point to the most recent commit -
```
git tag -f <tag_name> <commit_hash>
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ results/
# do not ignore images in _static folder in docs
!docs/_static/favicon/favicon.png
!docs/_static/pybamm_logo.png
!docs/_static/pybamm_logo_whitetext.png

# tests
test_callback.log
Binary file added docs/_static/pybamm_logo_whitetext.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
172 changes: 0 additions & 172 deletions docs/_static/versions.json

This file was deleted.

7 changes: 1 addition & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
html_theme_options = {
"logo": {
"image_light": "pybamm_logo.png",
"image_dark": "pybamm_logo.png",
"image_dark": "pybamm_log_whitetext.png",
},
"icon_links": [
{
Expand All @@ -142,11 +142,6 @@
},
],
"collapse_navigation": True,
# should be kept versioned to use for the version warning bar
"switcher": {
"version_match": version,
"json_url": "https://docs.pybamm.org/en/latest/_static/versions.json",
},
# turn to False to not fail build if json_url is not found
"check_switcher": True,
# for dark mode toggle and social media links
Expand Down
20 changes: 0 additions & 20 deletions scripts/update_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,26 +48,6 @@ def update_version():
file.seek(0)
file.write(replace_version)

# docs/_static/versions.json for readthedocs build
if "rc" not in release_version:
with open(
os.path.join(pybamm.root_dir(), "docs", "_static", "versions.json"),
"r+",
) as file:
output = file.read()
json_data = json.loads(output)
json_data.insert(
2,
{
"name": f"v{release_version}",
"version": f"{release_version}",
"url": f"https://docs.pybamm.org/en/v{release_version}/",
},
)
file.truncate(0)
file.seek(0)
file.write(json.dumps(json_data, indent=4))

# vcpkg.json
with open(os.path.join(pybamm.root_dir(), "vcpkg.json"), "r+") as file:
output = file.read()
Expand Down

0 comments on commit d8f3b73

Please sign in to comment.