NCAR / wrf-python

A collection of diagnostic and interpolation routines for use with output from the Weather Research and Forecasting (WRF-ARW) Model.
https://wrf-python.readthedocs.io
Apache License 2.0
402 stars 152 forks source link

BLD: Add pyproject.toml #241

Open DWesl opened 4 months ago

DWesl commented 4 months ago

This might close #237 by specifying NumPy as a build dependency before starting the setup script.

I moved as much configuration to pyproject.toml as I could as an initial step to converting the build to a system available on Python 3.12.

VascoSch92 commented 4 months ago

You could also deplace the requirements.txt inside the pyproject ;)

DWesl commented 4 months ago

As in, delete line 55 of pyproject.toml and move the contents of requirements.txt into `[project].dependencies?

https://github.com/NCAR/wrf-python/blob/cec1f70ceff9e4e051e4e0ed73104c60220ab0eb/setup.py#L61-L73 I meant to ask earlier how important installing only mock on RTD was. The specification doesn't seem to allow conditioning requirements on environment variables, and I'm not sure TOML does either, unless there's a way for wrf-python[rtd] to have fewer dependencies than wrf-python.

VascoSch92 commented 4 months ago

As in, delete line 55 of pyproject.toml and move the contents of requirements.txt into `[project].dependencies?

Yes, probably you should also change pip install -r requirements.txt in pip install -r . everywhere

DWesl commented 4 months ago

Yes, probably you should also change pip install -r requirements.txt in pip install -r . everywhere

It seems someone already did that: setup.py and MANIFEST.in were the only places to mention requirements.txt

kafitzgerald commented 2 months ago

Thanks for the PR!

I was hoping to get this updated and merged yesterday, but need to need to look into why the Ubuntu CI checks are failing. I'll try to take a deeper look later this week or next unless someone beats me to it.