Skip to content

Commit

Permalink
update version for pypi, combine dev and test dependencies, remove un…
Browse files Browse the repository at this point in the history
…needed files (#148)

* only publish to testPyPi when changing the tag since upload fails with duplicate name

* remove extra files

* fix SALib depreciation warning

* combine dev and test dependencies, update docs (#144)

* remove unused test_model.py file (#145)

* update tag version, consolidate test dependencies to dev (#147)

Co-authored-by: Travis Thurber <[email protected]>

---------

Co-authored-by: Travis Thurber <[email protected]>
  • Loading branch information
erexer and thurber authored Mar 3, 2025
1 parent d655f32 commit c06cf89
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 70 deletions.
1 change: 1 addition & 0 deletions .github/workflows/04_publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ jobs:
publish-to-testpypi:
name: Publish to TestPyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to test PyPI on tag pushes
needs:
- build
runs-on: ubuntu-latest
Expand Down
9 changes: 5 additions & 4 deletions docs/source/A2.2_saltelli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ walkthrough.
# Import relevant libraries
import matplotlib.pyplot as plt
from SALib.sample import saltelli
import SALib.sample.sobol as sobol_sample
from SALib.analyze import sobol
from SALib.test_functions import Ishigami
Expand Down Expand Up @@ -85,8 +85,9 @@ resulting Saltelli sample.

.. code:: ipython3
#Generate parmeter values using the saltelli.sample function
param_values = saltelli.sample(problem, 256)
# Generate parmeter values using the saltelli.sample function
param_values = sobol_sample.sample(problem, 256)
print(f"`param_values` shape: {param_values.shape}")
Expand All @@ -98,7 +99,7 @@ resulting Saltelli sample.
.. code:: ipython3
#Plot the 2048 samples of the parameters
# Plot the 2048 samples of the parameters
fig = plt.figure(figsize = (7, 5))
ax = plt.axes(projection ="3d")
Expand Down
22 changes: 13 additions & 9 deletions docs/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The following is the recommended workflow for contributing:
pre-commit install
1. Add your changes and commit them:
3. Add your changes and commit them:

.. code-block:: bash
Expand All @@ -57,18 +57,22 @@ The following is the recommended workflow for contributing:
git commit -m "<my short message>"
1. Ensure all tests pass:
4. Ensure all

Ensure your tests pass locally before pushing to your remote branch where GitHub actions will launch CI services to build the package, run the test suite, and evaluate code coverage. To do this, ensure that ``pytest`` has been installed then navigate to the root of your cloned directory (e.g., <my-path>/msd_uncertainty_ebook) and run ``pytest`` in the terminal.

.. code-block:: bash
s pass:

Ensure your tests pass locally before pushing to your remote branch where GitHub actions will launch CI services to build the package, run the test suite, and evaluate code coverage. To do this, ensure that ``pytest`` is installed then navigate to the root of your cloned directory (e.g., <my-path>/msd_uncertainty_ebook) and run ``pytest`` in the terminal.

pip install -e ".[test]"
.. code-block:: bash
pip install -e ".[dev]"
pytest
Changes to the documentation can be made in the ``msd_uncertainty_ebook/docs/source`` directory containing the RST files. To view your changes, ensure you have the development dependencies of **msd_uncertainty_ebook** installed and run the following from the ``msd_uncertainty_ebook/docs/source`` directory:
5. Update the Documentation:

Changes to the documentation can be made in the ``msd_uncertainty_ebook/docs/source`` directory containing the RST files. To view your changes, ensure you have the documentation dependencies of **msd_uncertainty_ebook** installed and run the following from the ``msd_uncertainty_ebook/docs/source`` directory:

.. code-block:: bash
Expand All @@ -79,13 +83,13 @@ The following is the recommended workflow for contributing:
This will generate your new documentation in a directory named ``msd_uncertainty_ebook/docs/build/html``. You can open the ``index.html`` in your browser to view the documentation site locally. If your changes are merged into the main branch of **msd_uncertainty_ebook**, changes in your documentation will go live on the `uc-ebook.org documentation <https://uc-ebook.org/docs/html/index.html>`_. If your changes are merged into the dev branch of **msd_uncertainty_ebook**, changes in your documentation will go live on the `dev site <https://uc-ebook.org/dev/docs/html/index.html>`_.

1. Push your changes to the remote
6. Push your changes to the remote

.. code-block:: bash
git push origin <my-branch-name>
4. Submit a pull request with the submission `template <https://github.com/IMMM-SFA/msd_uncertainty_ebook/blob/main/.github/PULL_REQUEST_TEMPLATE/contribution_checklist.md>`_ copied into the pull request description and filled out.
7. Submit a pull request with the submission `template <https://github.com/IMMM-SFA/msd_uncertainty_ebook/blob/main/.github/PULL_REQUEST_TEMPLATE/contribution_checklist.md>`_ copied into the pull request description and filled out.

5. If approved, your pull request will be merged first into the dev, and then into the main branch by a **msd_uncertainty_ebook** admin and a release will be conducted subsequently. **msd_uncertainty_ebook** uses `semantic naming <https://semver.org/>`_ for versioned releases. Each release receives a DOI via a linked Zenodo service automatically.
8. If approved, your pull request will be merged first into the dev, and then into the main branch by a **msd_uncertainty_ebook** admin and a release will be conducted subsequently. **msd_uncertainty_ebook** uses `semantic naming <https://semver.org/>`_ for versioned releases. Each release receives a DOI via a linked Zenodo service automatically.
11 changes: 0 additions & 11 deletions msdbook/model.py

This file was deleted.

18 changes: 0 additions & 18 deletions msdbook/tests/test_model.py

This file was deleted.

Empty file removed notebooks/functions/readme
Empty file.
34 changes: 13 additions & 21 deletions notebooks/sa_saltelli_sobol_ishigami.ipynb

Large diffs are not rendered by default.

12 changes: 5 additions & 7 deletions pyproject.toml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ msdbook = ["*.txt", "*.csv", "*.npy", "*.resultfile"]

[project]
name = "msdbook"
version = "0.1.5"
version = "0.1.6"
description = "Jupyter notebook support for the MSD uncertainty ebook."
readme = "README.md"
requires-python = ">=3.9, <3.13"
requires-python = ">=3.9"
keywords = ["uncertainty characterization", "MSD", "MultiSector Dynamics"]
authors = [
{ name="Chris R. Vernon", email="[email protected]" },
{ name="Travis Thurber", email="[email protected]" },
{ name="Em Rexer", email="[email protected]" },
]

Expand Down Expand Up @@ -48,6 +49,8 @@ dependencies = [
[project.optional-dependencies]
dev = [
"pre-commit>=3.7.1",
"pytest>=7.0.0",
"pytest-mock>=3.10",
]

docs = [
Expand All @@ -63,11 +66,6 @@ docs = [
"twine>=3.4.1",
]

test = [
"pytest>=7.0.0",
"pytest-mock>=3.10",
]

[project.urls]
Homepage = "https://uc-ebook.org/"
Repository = "https://github.com/IMMM-SFA/msd_uncertainty_ebook"
Expand Down

0 comments on commit c06cf89

Please sign in to comment.