-
Notifications
You must be signed in to change notification settings - Fork 277
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
maint: merge dependency specifications into setup.cfg #3236
Merged
Xarthisius
merged 3 commits into
yt-project:main
from
neutrinoceros:cleanup_test_requirement_files
Jun 11, 2021
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# cartopy and its dependencies are non trivial to install | ||
# so we can't easily put these specs into setup.cfg | ||
shapely | ||
--no-binary=shapely | ||
cartopy~=0.18.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,43 +36,34 @@ cp tests/matplotlibrc . | |
|
||
# Step 1: pre-install required packages | ||
if [[ "${RUNNER_OS}" == "Windows" ]] && [[ ${dependencies} != "minimal" ]]; then | ||
# Install some dependencies using conda (if not doing a minimal run) | ||
CYTHON=$(grep cython tests/test_prerequirements.txt) | ||
NUMPY=$(grep numpy tests/test_prerequirements.txt) | ||
|
||
CARTOPY=$(grep cartopy tests/test_requirements.txt) | ||
H5PY=$(grep h5py tests/test_requirements.txt) | ||
MATPLOTLIB=$(grep matplotlib tests/test_requirements.txt) | ||
SCIPY=$(grep scipy tests/test_requirements.txt) | ||
conda config --set always_yes yes | ||
conda info -a | ||
conda install --quiet --yes -c conda-forge \ | ||
$CYTHON $NUMPY $CARTOPY $H5PY $MATPLOTLIB $SCIPY | ||
# windows_conda_requirements.txt is a survivance of test_requirements.txt | ||
# keep in sync: setup.cfg | ||
while read requirement; do conda install --yes $requirement; done < tests/windows_conda_requirements.txt | ||
else | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade wheel | ||
python -m pip install --upgrade setuptools | ||
fi | ||
|
||
# Step 2: install required packages (depending on whether the build is minimal) | ||
# Step 2: install deps and yt | ||
if [[ ${dependencies} == "minimal" ]]; then | ||
# Ensure numpy and cython are installed so dependencies that need to be built | ||
# don't error out | ||
# The first numpy to support py3.6 is 1.12, but numpy 1.13 matches | ||
# unyt so we'll match it here. | ||
python -m pip install numpy==1.13.3 cython==0.26.1 | ||
python -m pip install -r tests/test_minimal_requirements.txt | ||
python -m pip install -e .[test,minimal] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So much better!! |
||
else | ||
# Getting cartopy installed requires getting cython and numpy installed | ||
# first; this is potentially going to be fixed with the inclusion of | ||
# pyproject.toml in cartopy. | ||
# These versions are pinned, so we will need to update/remove them when | ||
# the hack is no longer necessary. | ||
python -m pip install -r tests/test_prerequirements.txt | ||
CFLAGS="$CFLAGS -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H" python -m pip install -r tests/test_requirements.txt | ||
fi | ||
# Cython and numpy are build-time requirements to the following optional deps in yt | ||
# - cartopy | ||
# - netcdf4 | ||
# - pyqt5 | ||
# The build system is however not specified properly in these projects at the moment | ||
# which means we have to install the build-time requirements first. | ||
# It is possible that these problems will be fixed in the future if upstream projects | ||
# include a pyproject.toml file or use any pip-comptatible solution to remedy this. | ||
python -m pip install numpy>=1.19.4 cython>=0.29.21 | ||
|
||
# Step 3: install yt | ||
python -m pip install -e . | ||
# this is required for cartopy. It should normally be specified in our setup.cfg as | ||
# cartopy[plotting] | ||
# However it doesn't work on Ubuntu 18.04 (used in CI at the time of writing) | ||
pip install shapely --no-binary=shapely | ||
CFLAGS="$CFLAGS -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H" python -m pip install -e .[test,full] | ||
fi | ||
|
||
set +x |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
numpy>=1.19.4 | ||
cython>=0.29.21 | ||
cartopy~=0.18.0 | ||
h5py~=3.1.0 | ||
matplotlib<3.5 | ||
scipy~=1.5.0 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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.
I don't think it works unfortunately. To the best of my knowledge, Conda can only install an named environment from a yaml file, and I didn't want to invest any more effort in a temporary band aid