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

Update conda recipe and requirements #305

Merged
merged 20 commits into from Nov 21, 2019
Merged

Conversation

jbiggsets
Copy link
Contributor

@jbiggsets jbiggsets commented Oct 9, 2019

This PR is intended to address #297, but it includes several additional changes that should to be reviewed closely.

Here is a quick rundown of the changes:

  1. Removed conda_requirements.txt. Previously, we were maintaining two sets of requirements: requirements.txt and conda_requirements.txt. The second was being used to create conda environments (using conda create -n foo --file conda_requirements.txt). However, since these sets of requirements were virtually identical and both can be used to create conda environments, I discarded the conda_requirements.txt file. The one major difference between these files is that conda_requirements.txt had zeromq. This cannot be in the requirements.txt file, since it leads to an error when using pip install -e .. I think this is all right, since it's not entirely necessary (and may be installed by Jupyter anyway?), but we can add it to the meta.yaml separately, if it's a problem. (See below on the updates to meta.yaml.)

  2. Switched to requirements.txt in .travis.yml. Related to the above, our travis.yml file had previously used conda_requirements.txt to set up the conda environment for our builds. This has been changed to use requirements.txt in our Travis build.

  3. Updated requirements.txt. Some minor tweaks were also made to the requirements.txt file, mostly reordering the list of requirements. I also removed scikit-learn (since this is already a skll dependency).

  4. Updated meta.yaml to use setup.py. Previously, the meta.yaml file was listing all of the requirements manually, which meant we had to ensure these requirements were always up-to-date. I changed this configuration file to instead rely on the setup.py data, and pull the requirements directly from install_requires. This update takes advantage of Jinja templating. I tested this on my Mac, and it worked. I am going to test it on a Windows machine today, and it would probably be good to have others test it on their machines, as well.

  5. Re-generated environment.yml. Finally, I re-generated the environment.yml to ensure that it was consistent with our requirements.txt file.

  6. Add missing test file. Added test_container.py to .travis.yml and Azure, per test_container.py missing in both .travis.yml and azure-pipelines.yml #310.

jbiggsets added 6 commits September 25, 2019 15:57
…rted):

 - Clean up requirements.txt file
 - Clean up environment.yml file
 - Remove conda_requirements.txt file
 - Update travix.yml file to use requirements.txt
 - Update meta.yml to use setup.py
@coveralls
Copy link

coveralls commented Oct 9, 2019

Coverage Status

Coverage increased (+0.6%) to 91.643% when pulling 6b30388 on update-conda-recipe into a8f674f on master.

@jbiggsets jbiggsets requested a review from hlepp October 9, 2019 14:26
hlepp
hlepp previously requested changes Oct 9, 2019
Copy link
Contributor

@hlepp hlepp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should update the instructions for installation here:
doc/contributing.rst

Copy link
Member

@desilinguist desilinguist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure why come changes were made.

- xlrd
- xlwt

- python 3.6.8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be nice to build noarch packages that can still pin Python versions. For example, see here. Also, I don't think we want to pin to a specific version of Python 3.6. Any Python >= 3.6 should work fine, including Python 3.7 right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with everything, except I wasn't sure about 3.7. I've never tested anything with 3.7, and the old conda_requirements.txt had python>=3.6.3,<3.7.

- openpyxl
- xlrd
- xlwt
- python 3.6.8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

environment.yml Outdated
- openpyxl
- xlrd
- xlwt
- python=3.6.8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, let's not be too specific here.

environment.yml Outdated
- matplotlib=2.1.2
- nose=1.3.7
- notebook=5.7.2
- numpy=1.14.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to pin numpy? Since this is only used for readthedocs, using the latest version of numpy should be fine right? And same for pandas etc.?

requirements.txt Outdated
@@ -4,18 +4,17 @@ joblib==0.11
matplotlib==2.1.2
nose==1.3.7
notebook==5.7.2
numpy==1.14.*
numpy==1.14.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have strong feelings about this, but I'm always paranoid about differences in even minor version of numpy leading to small differences in results.

@@ -4,18 +4,17 @@ joblib==0.11
matplotlib==2.1.2
nose==1.3.7
notebook==5.7.2
numpy==1.14.*
numpy==1.14.0
pandas==0.23.4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do things break if we use the latest version of pandas?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure. I'll test it out. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, they do.

Copy link
Collaborator

@aloukina aloukina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good to me. I would probably concur with Nitin on not pinning to too specific versions to avoid conflicts with other tools since most of the computations we do are not too complex.

@desilinguist
Copy link
Member

@jbiggsets what's the status of this PR?

@jbiggsets
Copy link
Contributor Author

@jbiggsets what's the status of this PR?

Looks like I have a few minor comments to address still. I'll let you know when it's ready.

Copy link
Member

@desilinguist desilinguist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more minor change.

@@ -9,7 +11,7 @@ build:
number: 0
script:
- cd $SRC_DIR
- $PYTHON setup.py install
- $PYTHON setup.py install --single-version-externally-managed --record=record.txt
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you don't need to do this since its use is discouraged. See the SKLL recipe for a much easier alternative.

@desilinguist
Copy link
Member

We should also check that we aren't bundling test data (which tends to be large) into our conda or PyPI package.

@jbiggsets
Copy link
Contributor Author

We should also check that we aren't bundling test data (which tends to be large) into our conda or PyPI package.

Why would that be the case, and how would we check that?

@desilinguist
Copy link
Member

desilinguist commented Nov 1, 2019

Why would that be the case, and how would we check that?

In SKLL, when I just did python setup.py install, it included tests, test data, examples, and example data in the conda package. I think we prevented it in SKLL, through a combination of the MANIFEST.in file and through appropriate fields in setup.py.

@desilinguist desilinguist dismissed hlepp’s stale review November 21, 2019 00:34

The installation instructions will be updated in an upcoming PR.

@desilinguist
Copy link
Member

The conda package was tested and worked fine on both Linux and Windows as seen here. Therefore, I am now merging this PR.

@desilinguist desilinguist merged commit 852649c into master Nov 21, 2019
@delete-merged-branch delete-merged-branch bot deleted the update-conda-recipe branch November 21, 2019 00:37
srhrshr pushed a commit to srhrshr/rsmtool that referenced this pull request Oct 23, 2021
…ingService/update-conda-recipe

Update conda recipe and requirements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
v7.0 Release
  
Awaiting triage
Development

Successfully merging this pull request may close these issues.

None yet

5 participants