Skip to content

Conversation

@eatyourpeas
Copy link
Member

@eatyourpeas eatyourpeas commented Aug 14, 2025

Overview

A feature some time waiting and implements two changes

  • transitions from setup.py to pyproject.toml
  • adds support for jupyter notebooks
    Note should bump minor version before merge

Code changes

  • pyproject.toml: this is the recommended way to publish python packages superceding setup.py (as of PEP62 in 2020). This removes the non-dev dependencies into pyproject.toml. This has had some implications for the github actions and dockerization
  • Dockerizing adds two new bash shortcuts - (s/dev and s/notebooks) to build containers, one for local dev and the other that launches the notebook in the browser
  • adds jupyter notebooks in a separate notebooks folder. The package can be pip installed without the notebooks, or with. The notebooks contain two examples - one for individual measurements, the other for batch calculation with csv and pandas

Documentation changes (done or required as a result of this PR)

Documentation will be added to the documentation site separately. Run scripts are added to the readme.

image

…, dependencies to requirements with flag ['notebook'], creates _version.py for single source of version inherited by setup.py and notebook, update bump2version to update this.
…pdates dockerfile to have a python environment with rcpchgrowth installed for development, the other which launches jupyter in the browser
…es jupyter in browser with hot reload. pulls version number from pyproject.yaml via extra snippet in `__init__.py`

Tidies the initialization steps in the notebooks to be less complicated and verbose
@eatyourpeas eatyourpeas merged commit d628f5c into live Aug 16, 2025
4 checks passed
@eatyourpeas eatyourpeas deleted the jupyter branch August 16, 2025 09:54
@pacharanero
Copy link
Member

Great stuff @eatyourpeas - the s/notebooks docker compose setup worked perfectly on my Linux machine.

@pacharanero
Copy link
Member

Documentation-wise, would you be up for recording a series of short screencasts that explain the Jupyter notebook functionality - who it's aimed at, how to set up and use, and the features?

@eatyourpeas
Copy link
Member Author

that is great marcus thank you - yes of course. i have hit a massive stumbling block though that i cant pull the notebooks into Binder which i think is a dealbreaker. They build but don't then deploy. I am in the process of breaking the notebooks out into their own repository for this reason. These are really only a form of documentation for the package and this way will pull the package from pypi rather than locally. what do you think?

@pacharanero
Copy link
Member

I don't know anything about Binder although a quick read of their site was interesting and I seethat using Binder might be very handy for users. Do we know any tame researchers that would help us to know how important it would be do have a Binder distribution? Essentially - are we building a feature (Binder compatibility) that is going to be used?

(Just noting we previously had the CLI and Google Sheets plugin which we built and documented but we weren't sure if they were particularly being used - so we need to ensure there is a user base for this work?)

Notebooks split out into their own repo might be a good solution, again as long as it is used and discoverable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants