-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
BUILD: Simplifying contributor dependencies #23522
Conversation
… locations, and create script to generate the pip file, and make sure in the CI they are always sync
Hello @datapythonista! Thanks for submitting the PR.
|
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.
LGTM at a glance. Could maybe bike shed whether we want these at the top level or not (I don't have a strong preference).
scripts/conda_to_pip.py
Outdated
True if the comparison fails, False otherwise | ||
""" | ||
with open(conda_fname) as conda_fd: | ||
deps = yaml.load(conda_fd)['dependencies'] |
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.
May as well do yaml.safe_load
, even though this is "trusted" input :)
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.
why are we resorting to a requirements.txt? is the environment.yaml not enough? you almost always want to simpy install via conda. having 2 ways to install is just confusing.
@jreback having just a I'm happy to remove |
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.
One drawback of installing the env in one go is that you end up with two pandas versions
My reasoning for the names of the files, is that I don't think anyone will install pandas from source unless it's for development. And when installing from pip or conda, the dependencies are obtained from Personally, I think it makes sense to have I'd really like to keep But let me know if you're not convinced, and you still prefer to make the changes. |
Codecov Report
@@ Coverage Diff @@
## master #23522 +/- ##
==========================================
- Coverage 92.24% 92.23% -0.01%
==========================================
Files 161 161
Lines 51278 51288 +10
==========================================
+ Hits 47299 47304 +5
- Misses 3979 3984 +5
Continue to review full report at Codecov.
|
I'd like to keep the requirements.txt around, but am not going to block things if others decide to remove it :) |
Made explicit the requirements file for conda in the docs. I think pip is not the primary anywhere (the script creates the pip file from the conda file already), and in the docs is already clear that conda should be installed, and pip instructions are provided as an extra. So, I think this should be all right now. |
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.
LGTM. Only outstanding question is I think whether to call it requirements.txt
vs. requirements-dev.txt
or whatever. I don't have a preference.
I think we should name |
requirements_dev.txt
Outdated
@@ -1,3 +1,17 @@ | |||
NumPy | |||
python-dateutil>=2.5.0 |
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.
see comment above
scripts/conda_to_pip.py
Outdated
conda_fname : str | ||
Path to the conda file with dependencies (e.g. `environment.yml`). | ||
pip_fname : str | ||
Path to the pip file with dependencies (e.g. `requirements.txt`). |
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.
change the default here
scripts/conda_to_pip.py
Outdated
@@ -0,0 +1,96 @@ | |||
#!/usr/bin/env python |
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.
maybe change this name to
generate_requirements-dev_from_environment
or some more meaningful name
scripts/conda_to_pip.py
Outdated
#!/usr/bin/env python | ||
""" | ||
Convert the conda environment.yml to the pip requirements.txt, | ||
or check that they have the same packages (for the CI) |
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.
is this script called anywhere right now? should add docs on how to do this in contributing.rst?
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.
@datapythonista if you want to add to contributing.rst at some point would be good (IOW how to run the script), but not necessary for now
…p.py to generate_pip_deps_from_conda.py
lgtm. ping on green. |
The script is called in I think the script is named I think at some point would be nice to have all the scripts explained in the documentation. But I'd leave that for another PR, as I think some clean up is needed, and personally I think we should merge the content of |
thanks! |
* upstream/master: BUILD: Simplifying contributor dependencies (pandas-dev#23522) BUG/REF: TimedeltaIndex.__new__ (pandas-dev#23539)
…fixed * upstream/master: DOC: Enhancing pivot / reshape docs (pandas-dev#21038) TST: Fix xfailing DataFrame arithmetic tests by transposing (pandas-dev#23620) BUILD: Simplifying contributor dependencies (pandas-dev#23522) BUG/REF: TimedeltaIndex.__new__ (pandas-dev#23539) BUG: Casting tz-aware DatetimeIndex to object-dtype ndarray/Index (pandas-dev#23524) BUG: Delegate more of Excel parsing to CSV (pandas-dev#23544) API: DataFrame.__getitem__ returns Series for sparse column (pandas-dev#23561) CLN: use float64_t consistently instead of double, double_t (pandas-dev#23583) DOC: Fix Order of parameters in docstrings (pandas-dev#23611) TST: Unskip some Categorical Tests (pandas-dev#23613) TST: Fix integer ops comparison test (pandas-dev#23619)
Unifying dev and optional dependencies, moving them to their standard locations, and create script to generate the pip file, and make sure in the CI they are always sync
git diff upstream/master -u -- "*.py" | flake8 --diff