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

Upgrade installation & Create new release #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rwegener2
Copy link

Hi @ecjoliver, thanks for putting together such a great package! It's been very helpful in my research. This PR addresses a difficulty I was having while using the package, so hopefully the fix helps make it easier for others as well.

Overview of this PR

The setup method recommended in the installation instructions (python setup.py install) has been deprecated and no longer works, so I'm wondering if you would be willing to update to using pyproject.toml, a more modern installation method. This PR does adds the files for building with pyproject.toml. I included dependencies in the pyproject.toml, so as a bonus dependencies are automatically installed instead of needing to be installed manually.

What was done

  • remove old files associated with disutils and setup.py
  • update nan values to the numpy 2 nan format (to marineheatwaves compatible with other packages that may depend on numpy >=2.0)
  • add a pyproject.toml for the new config

These steps loosely follow this tutorial.

How to run it

The process to build the library with pyproject.toml is:

  1. install build: python -m pip install --upgrade build
  2. run: python -m build

That will create a .tar.gz file that can be used to pip install the library.

How to test the output

To test the .tar.gz file one can:

  1. create isolated environment
  2. install from the tar.gz file ex. pip install /path/to/file/marineHeatWaves/dist/marineheatwaves-0.0.30.tar.gz
  3. run example_synthetic.ipynb from docs folder

New Release & Distribution with PyPI

There have been lots of great fixes since the last official release in March 2016. It's great that there are so many fixes, but personally it took me a while to find out they existed because by default I installed the latest release.

Would you be willing to make a new release on github and add the lastest version to PyPI? Having that new release would also make it so that I could cite a specific version of this package in the paper I am getting ready to publish, as opposed to linking to a specific commit.

There are really nice steps for uploading to pypi here. The tutorial steps use a test version of pypi that the docs have setup for learning, but there is a summary of how to upload to the production version of pypi at the bottom of the tutorial.

Thanks for considering any of these changes, @ecjoliver. I hope they are helpful to you and the community!

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.

1 participant