-
Notifications
You must be signed in to change notification settings - Fork 283
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
Requirements re-haul #3812
Requirements re-haul #3812
Conversation
"all": pip_requirements("all"), | ||
"extensions": pip_requirements("extensions"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dropping the use of extensions
as cartopy
will now pull in gdal
, and iris-grib
is not used now with the conda
requirements, so mirroring that here... hence, no extensions
.
@@ -4,7 +4,7 @@ build: | |||
image: latest | |||
|
|||
conda: | |||
environment: ci/requirements/readthedocs.yml | |||
environment: requirements/ci/readthedocs.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tkknight This should be enough for readthedocs
to find the associated yml
file.
This is awesome + long overdue.
|
@pp-mo Yeah, I've been meaning to do this for a long, long time... but just never got around to it, but glad I finally did 🎉 I agree with everything in your comment above 👍 This definitely should be documented and it will. I've left this for @tkknight to do as a follow up task, as he's totally swarming all over the documentation (mucho ❤️), and this PR unblocks him. I suspect that my description detail above may serve as a strawman to some developer notes in the follow-up PR. Also, yeah, having the To be honest, I'm willing to live with this and it does give us the scope to have dependencies per Python version, and we can maintain those dependencies historically going forwards, which wasn't possible before... so there are benefits, and at the end of the day I think I can see past the 🤢 if you can? |
e9da0f0
to
a8cdf74
Compare
@pp-mo Also, I'm keen that we use |
I'm happy to merge this now. Any last comments @pp-mo ? |
* master: Add template collapsible markdown section (SciTools#3823) Requirements re-haul (SciTools#3812) Automate pull request labels (SciTools#3819) move whatsnew contributions (SciTools#3816) Parse with packaging version (SciTools#3815) Add "What's New" entries for unpinning Cartopy, Matplotlib, Proj (SciTools#3811) tidy issue templates (SciTools#3814) Legacy doc notice (SciTools#3813)
* master: Updated Iris install instructions (SciTools#3817) Delete labeler.yml Delete label.yml Create label.yml Delete labeler.yml Update labeler.yml Update labeler.yml Add template collapsible markdown section (SciTools#3823) Requirements re-haul (SciTools#3812) Automate pull request labels (SciTools#3819)
* master: (36 commits) Rework whatsnew into new scheme. (SciTools#3834) Lazy regridding with Linear, Nearest, and AreaWeighted (SciTools#3701) Iris readme minimal (SciTools#3833) Fix sphinx logger (SciTools#3832) whatsnew entry for dependencies (SciTools#3831) Added link to scitools.org.uk on the main index. (SciTools#3830) Updated Iris install instructions (SciTools#3817) Delete labeler.yml Delete label.yml Create label.yml Delete labeler.yml Update labeler.yml Update labeler.yml Add template collapsible markdown section (SciTools#3823) Requirements re-haul (SciTools#3812) Automate pull request labels (SciTools#3819) move whatsnew contributions (SciTools#3816) Parse with packaging version (SciTools#3815) Add "What's New" entries for unpinning Cartopy, Matplotlib, Proj (SciTools#3811) tidy issue templates (SciTools#3814) ...
This PR rationalises the dependencies of
iris
for usingconda
with the CItravis-ci
andreadthedocs
services, and also forPyPI
.Our current custom approach to manage both
conda
andPyPI
dependencies as one, in general is not intuitive, nor standard, and leads to confusion for both developers and users alike.Rather, this PR adopts standard community known approaches using self-contained
conda
environmentyml
files, andsetup.py
to managePyPI
dependencies foriris
.All the dependencies now live under the root directory
requirements
:For conda
As a developer, configuring
iris
with all the relevant dependencies that you need to code, test, and build the docs is now as simple as:Using
conda
overpip
is preferred, due to the superior package dependency management and package coverage. Note that, forconda
all packages are pulled fromconda-forge
and the associatedyml
files will create the named environment callediris-dev
.So it's one environment for all when it comes to coding, testing, and documentation (although now we can differentiate package content and package versions based on the Python version) which ensures (as far a possible without freezing the environment) that there is environment stability no matter what you are doing i.e., there are no package or package version differences for
travis-ci
,readthedocs
, coding, local testing or building the docs.The minor downside is that there is some duplication, but IMHO the simplicity and utility of this approach far outweighs the disadvantages of our current custom mechanisms to cherry-pick and manage package dependencies.
Note that, the
readthedocs.yml
is an alias for theiris.yml
file, which is an alias forpy37.yml
file. As we roll forwards with testingiris
with more modern versions ofpython
, we simple create those Python version specificyml
files e.g.,py38.yml
, re-pointiris.yml
topy38.py
, and update.travis-ci.yml
appropriately to update the test matrix.For pip
It's not possible to only use
pip
to installscitools-iris
(PyPI
name) due to all the dependencies not being available onPyPI
e.g.,proj
,udunits2
etc.However, we now host
pyke
asscitools-pyke
onPyPI
(but the hope is to purgepyke
as technical debt ASAP 🙏).This PR introduces the
pyproject.toml
file to support PEP517 and PEP518 building during installation, thus allowing thepyke
rules foriris
to be built when usingpip
- this wasn't possible before.Note that, all the
requirements/*.txt
files in conjunction with thesetup.py
file service installation ofscitools-iris
and it's extras, namely[all]
,[docs]
, and[test]
, pretty much as before.