Skip to content

Improve the build system and project setup

Benjamin Thomas Schwertfeger requested to merge bts-improve-project-setup into master

General

This MR addresses several topics and brings improvements by:

  • fixing the misconfigured git LFS configuration (.nc files are binaries, not text)
  • removing the poetry stuff completely
  • using setuptools build system
  • making the project support Python>=3.9
  • update and simplify README.md

... the setup should be sufficient now.

Please check if everything still works as expected!

Git LFS fix

Usually one can install a package from a git repository via:

pip install git+https://codebase.helmholtz.cloud/awi_paleodyn/growth-model-atlantic-cod.git

or for a specific branch (also works for tags/releases):

pip install git+https://codebase.helmholtz.cloud/awi_paleodyn/growth-model-atlantic-cod.git@bts-improve-project-setup

... but that does not work at this moment, since the git LFS configuration of this project is wrong. This will work as soon as the .gitattributes are adjusted properly. This MR also addresses this.

To demonstrate how that works, I forked the repository including this branch and fixed it there: https://codebase.helmholtz.cloud/benjamin.schwertfeger/growth-model-atlantic-cod

To confirm that pip is capable to install the package after the changes I proposed, I checked it within my fork, where the git LFS settings are already fixed on the master branch. You can validate the behavior by running the following command in a Python environment that supports at least Python 3.9:

pip install git+https://codebase.helmholtz.cloud/benjamin.schwertfeger/growth-model-atlantic-cod.git@bts-improve-project-setup

I'll delete my fork after this MR is accepted and merged.

Next steps

I recommend creating a new tag, version 2.0.0, as the current setup will be incompatible with past environments.

Space for improvements

There are lots of more things that can be done:

  • adding pre-commit including linting and formatting using ruff, and other QA tools
  • this package does not provide any tests - just having that said, IDK if that is desired for this package.
Edited by Benjamin Thomas Schwertfeger

Merge request reports

Loading