Skip to content

Commit

Permalink
Merge pull request #1908 from priyanshuone6/docs_build
Browse files Browse the repository at this point in the history
Fix failing build
  • Loading branch information
valentinsulzer authored Jan 21, 2022
2 parents 4e01c25 + ced6174 commit b86b0c7
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/release_checklist.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
- Run `scripts/update_version.py` to
- Increment version number in
- `pybamm/version.py`
- `docs/conf.py`
- `CITATION.cff`
- `vcpkg.json`
- Update baseline of registries in `vcpkg-configuration.json` as the latest commit id from [pybamm-team/sundials-vcpkg-registry](https://github.com/pybamm-team/sundials-vcpkg-registry)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/url_checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
retry_count: 5

# A comma separated patterns to exclude during URL checks
exclude_patterns: https://www.datacamp.com/community/tutorials/fuzzy-string-python,http://127.0.0.1
exclude_patterns: https://www.datacamp.com/community/tutorials/fuzzy-string-python,http://127.0.0.1,https://github.com/pybamm-team/PyBaMM/tree/v

# A comma separated list of file patterns (direct paths work as well) to exclude
exclude_files: CHANGELOG.md


5 changes: 2 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import sys

import guzzle_sphinx_theme
from pybamm import __version__

sys.path.insert(0, os.path.abspath("../"))

Expand All @@ -28,9 +27,9 @@
author = "The PyBaMM Team"

# The short X.Y version
version = __version__
version = "21.12"
# The full version, including alpha/beta/rc tags
release = __version__
release = version


# -- General configuration ---------------------------------------------------
Expand Down
8 changes: 8 additions & 0 deletions scripts/update_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ def update_version():
file.seek(0)
file.write(replace_version)

# docs/conf.py
with open(os.path.join(pybamm.root_dir(), "docs", "conf.py"), "r+") as file:
output = file.read()
replace_version = re.sub('(?<=version = ")(.+)(?=")', release_version, output)
file.truncate(0)
file.seek(0)
file.write(replace_version)

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

0 comments on commit b86b0c7

Please sign in to comment.