CWorthy-ocean / C-Star

C-Star is a python package for setting up and running ocean model simulations, with a particular focus on marine carbon dioxide removal (mCDR) applications.
https://c-star.readthedocs.io
10 stars 4 forks source link

Use pathlib and type hint return values #59

Closed dafyddstephenson closed 1 month ago

dafyddstephenson commented 1 month ago

Branched from #57 , do not merge until after merging #57.

This PR swaps out remaining instances of paths being handled using os.path and strings with pathlib.Path (closes #9). It also adds typehints to all return values of functions (closes #39).

In the ensuing fallout with pre-commit it became clear that it would be tidier to have any plural attributes, e.g. Case.components, Component.input_datasets always be lists (with a single entry if there is only one, or empty if there are none).

review-notebook-app[bot] commented 1 month ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB