Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix API documentation rendering, version switcher #398

Merged
merged 6 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/release_workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ To create a new release, follow these steps:
- Increment the following;
- The version number in the `pyproject.toml` and `CITATION.cff` files following CalVer versioning.
- The`CHANGELOG.md` version with the changes for the new version.
- Add a new entry for the documentation site version switcher located at `docs/_static/switcher.json`
- Open a PR to the `main` branch. Once the PR is merged, proceed to the next step.

2. **Tag the Release:**
Expand Down
4 changes: 1 addition & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ You now have everything you need to start making changes!
### C. Merging your changes with PyBOP

10. [Test your code!](#testing)
12. If you added a major new feature, perhaps it should be showcased in an [example notebook](#example-notebooks).
12. If you added a major new feature, perhaps it should be showcased in an [example notebook](https://github.com/pybop-team/PyBOP/tree/develop/examples/notebooks).
13. If you've added new functionality, please add additional tests to ensure ample code coverage in PyBOP.
13. When you feel your code is finished, or at least warrants serious discussion, create a [pull request](https://help.github.com/articles/about-pull-requests/) (PR) on [PyBOP's GitHub page](https://github.com/pybop-team/PyBOP).
14. Once a PR has been created, it will be reviewed by any member of the community. Changes might be suggested which you can make by simply adding new commits to the branch. When everything's finished, someone with the right GitHub permissions will merge your changes into PyBOP main repository.
Expand Down Expand Up @@ -314,8 +314,6 @@ Configuration files:
pyproject.toml
```

Note that this file must be kept in sync with the version number in [pybop/**init**.py](https://github.com/pybop-team/PyBOP/blob/develop/pybop/__init__.py).

### Continuous Integration using GitHub actions

Each change pushed to the PyBOP GitHub repository will trigger the test and benchmark suites to be run, using [GitHub actions](https://github.com/features/actions).
Expand Down
16 changes: 13 additions & 3 deletions docs/_static/switcher.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,19 @@
"url": "https://pybop-docs.readthedocs.io/en/latest/"
},
{
"name": "v23.12 (stable)",
"version": "v23.12",
"url": "https://pybop-docs.readthedocs.io/en/v23.12/",
"name": "v24.6 (stable)",
"version": "v24.6",
"url": "https://pybop-docs.readthedocs.io/en/v24.6/",
"preferred": true
},
{
"name": "v24.3",
"version": "v24.3",
"url": "https://pybop-docs.readthedocs.io/en/v24.3/"
},
{
"name": "v23.12",
"version": "v23.12",
"url": "https://pybop-docs.readthedocs.io/en/v23.12/"
}
]
2 changes: 2 additions & 0 deletions docs/_templates/autoapi/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ This page contains auto-generated API reference documentation [#f1]_.
{% endif %}
{% endfor %}

pybop/index

.. [#f1] Created with `sphinx-autoapi <https://github.com/readthedocs/sphinx-autoapi>`_
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
# -- Options for autoapi -------------------------------------------------------
autoapi_type = "python"
autoapi_dirs = ["../pybop"]
autoapi_keep_files = True
autoapi_keep_files = False
autoapi_root = "api"
autoapi_member_order = "groupwise"

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ html_theme.sidebar_secondary.remove: true

# PyBOP: Optimise and Parameterise Battery Models

Welcome to PyBOP, a Python package dedicated to the optimization and parameterization of battery models. PyBOP is designed to streamline your workflow, whether you are conducting academic research, working in industry, or simply interested in battery technology and modelling.
Welcome to PyBOP, a Python package dedicated to the optimisation and parameterisation of battery models. PyBOP is designed to streamline your workflow, whether you are conducting academic research, working in industry, or simply interested in battery technology and modelling.

```{gallery-grid}
:grid-columns: 1 2 2 2
Expand Down
6 changes: 3 additions & 3 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Installation
*****************************

PyBOP is a versatile Python package designed for optimization and parameterization of battery models. Follow the instructions below to install PyBOP and set up your environment to begin utilizing its capabilities.
PyBOP is a versatile Python package designed for optimisation and parameterisation of battery models. Follow the instructions below to install PyBOP and set up your environment to begin utilising its capabilities.

Installing PyBOP with pip
-------------------------
Expand Down Expand Up @@ -55,7 +55,7 @@ To verify that PyBOP has been installed successfully, try running one of the pro
For Developers
--------------

If you are installing PyBOP for development purposes, such as contributing to the project, please ensure that you follow the guidelines outlined in the `Contributing Guide <../Contributing.html>`_. It includes additional steps that might be necessary for setting up a development environment, including the installation of dependencies and setup of pre-commit hooks.
If you are installing PyBOP for development purposes, such as contributing to the project, please ensure that you follow the guidelines outlined in the `Contributing Guide <Contributing.html>`_. It includes additional steps that might be necessary for setting up a development environment, including the installation of dependencies and setup of pre-commit hooks.

Further Assistance
------------------
Expand All @@ -68,4 +68,4 @@ Next Steps
After installing PyBOP, you might want to:

* Explore the `Quick Start Guide <quick_start.html>`_ to begin using PyBOP.
* Check out the `API Reference <../api/index.html>`_ for detailed information on PyBOP's programming interface.
* Check out the `API Reference <api/index.html>`_ for detailed information on PyBOP's programming interface.
8 changes: 4 additions & 4 deletions docs/quick_start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Welcome to the Quick Start Guide for PyBOP. This guide will help you get up and
Getting Started with PyBOP
--------------------------

PyBOP is equipped with a series of robust tools that can help you optimize various parameters within your battery models to better match empirical data or to explore the effects of different parameters on battery behavior.
PyBOP is equipped with a series of robust tools that can help you optimise various parameters within your battery models to better match empirical data or to explore the effects of different parameters on battery behavior.

To begin using PyBOP:

Expand All @@ -24,14 +24,14 @@ To begin using PyBOP:

import pybop

Now you're ready to utilize PyBOP's functionality in your projects!
Now you're ready to utilise PyBOP's functionality in your projects!

Exploring Examples
------------------

To help you get acquainted with PyBOP's capabilities, we provide a collection of examples that demonstrate common use cases and features of the package:

- **Jupyter Notebooks**: Interactive notebooks that include detailed explanations alongside the live code, visualizations, and results. These are an excellent resource for learning and can be easily modified and executed to suit your needs.
- **Jupyter Notebooks**: Interactive notebooks that include detailed explanations alongside the live code, visualisations, and results. These are an excellent resource for learning and can be easily modified and executed to suit your needs.

- **Python Scripts**: For those who prefer working in a text editor, IDE, or for integrating into larger projects, we provide equivalent examples in plain Python script format.

Expand All @@ -55,4 +55,4 @@ If you encounter any issues or have questions as you start using PyBOP, don't he

- **GitHub Issues**: Report bugs or request new features by opening an `Issue <https://github.com/pybop-team/PyBOP/issues>`_
- **GitHub Discussions**: Post your questions or feedback on our `GitHub Discussions <https://github.com/pybop-team/PyBOP/discussions>`_
- **Contributions**: Interested in contributing to PyBOP? Check out our `Contributing Guide <../Contributing.html>`_ for guidelines.
- **Contributions**: Interested in contributing to PyBOP? Check out our `Contributing Guide <Contributing.html>`_ for guidelines.
Loading