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
Show file tree
Hide file tree
Changes from 19 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions .travis.yml
Expand Up @@ -12,7 +12,7 @@ env:
matrix:
- TESTFILES="tests/test_experiment_rsmtool_1.py"
- TESTFILES="tests/test_comparer.py tests/test_configuration_parser.py tests/test_experiment_rsmtool_2.py"
- TESTFILES="tests/test_analyzer.py tests/test_experiment_rsmeval.py tests/test_fairness_utils.py tests/test_prmse_utils.py"
- TESTFILES="tests/test_analyzer.py tests/test_experiment_rsmeval.py tests/test_fairness_utils.py tests/test_prmse_utils.py tests/test_container.py"
- TESTFILES="tests/test_experiment_rsmcompare.py tests/test_experiment_rsmsummarize.py tests/test_modeler.py tests/test_preprocessor.py tests/test_writer.py tests/test_experiment_rsmtool_3.py"
- TESTFILES="tests/test_experiment_rsmpredict.py tests/test_reader.py tests/test_reporter.py tests/test_transformer.py tests/test_utils.py tests/test_experiment_rsmtool_4.py"
sudo: false
Expand All @@ -21,10 +21,10 @@ before_install:
- if [ -x ${HOME}/miniconda3/pkgs ]; then pushd ${HOME}/miniconda3/pkgs && find -maxdepth 1 -mindepth 1 -type d | xargs rm -rf && popd; fi
- chmod +x miniconda.sh
- ./miniconda.sh -b -f
- ${HOME}/miniconda3/bin/conda update --yes conda
- ${HOME}/miniconda3/bin/conda install -c anaconda --yes setuptools

install:
- ${HOME}/miniconda3/bin/conda create --name rsmenv -c defaults -c conda-forge -c desilinguist --file conda_requirements.txt --yes --quiet
- ${HOME}/miniconda3/bin/conda create --name rsmenv -c defaults -c conda-forge -c desilinguist --file requirements.txt --yes --quiet
- ${HOME}/miniconda3/envs/rsmenv/bin/pip install nose-cov python-coveralls
- ${HOME}/miniconda3/envs/rsmenv/bin/pip install -e .

Expand Down
1 change: 1 addition & 0 deletions DistributeTests.ps1
Expand Up @@ -35,6 +35,7 @@ elseif ($agentNumber -eq 2) {
$testsToRun = $testsToRun + "tests/test_comparer.py"
$testsToRun = $testsToRun + "tests/test_configuration_parser.py"
$testsToRun = $testsToRun + "tests/test_experiment_rsmtool_2.py"
$testsToRun = $testsToRun + "tests/test_container.py"
}
elseif ($agentNumber -eq 3) {
$testsToRun = $testsToRun + "tests/test_analyzer.py"
Expand Down
5 changes: 4 additions & 1 deletion MANIFEST.in
@@ -1,8 +1,11 @@
include LICENSE
include *.rst
include requirements.txt
recursive-exclude doc *
recursive-exclude tests *
recursive-exclude examples *
recursive-include rsmtool/notebooks *
recursive-include doc *
prune test_outputs
prune rsmtool/rsmtool.egg-info
prune rsmtool/notebooks/.ipynb_checkpoints
prune rsmtool/notebooks/comparison/.ipynb_checkpoints
64 changes: 16 additions & 48 deletions conda-recipe/rsmtool/meta.yaml
@@ -1,15 +1,18 @@
{% set data = load_setup_py_data() %}

package:
name: rsmtool
version: 6.1.0
version: {{data.get('version')}}

source:
path: ../../../rsmtool

build:
number: 0
noarch: python
script:
- cd $SRC_DIR
- $PYTHON setup.py install
- "{{ PYTHON }} -m pip install . --no-deps -vv"
entry_points:
- rsmtool = rsmtool.rsmtool:main
- rsmcompare = rsmtool.rsmcompare:main
Expand All @@ -19,55 +22,19 @@ build:
- render_notebook = rsmtool.reporter:main
- convert_feature_json = rsmtool.convert_feature_json:main

{% block requirements -%}
requirements:
build:
- python
- numpy>=1.14.0,<1.15
- scipy>=1.1.0,<1.2.0
- ipython>=6.5.0,<6.5.1
- jupyter>=1.0.0,<1.1
- joblib>=0.11,<0.12
- matplotlib>=2.1.2,<2.2
- nose>=1.3.7,<1.4
- notebook>=5.7.2,<5.8
- pandas>=0.23.4,<0.23.5
- scikit-learn>=0.19.1,<0.19.2
- seaborn>=0.9.0,<0.10.0
- skll>=1.5,<1.6
- statsmodels>=0.9.0,<0.9.1
- sphinx
- sphinx_rtd_theme
- zeromq
- coverage
- parameterized
- setuptools
- openpyxl
- xlrd
- xlwt

- python >=3.6
{% for req in data.get('install_requires', []) -%}
- {{req.replace(">", " >").replace("<", " <").replace("==", " ")}}
{% endfor %}
run:
- python
- numpy>=1.14.0,<1.15
- scipy>=1.1.0,<1.2.0
- ipython>=6.5.0,<6.5.1
- jupyter>=1.0.0,<1.1
- joblib>=0.11,<0.12
- matplotlib>=2.1.2,<2.2
- nose>=1.3.7,<1.4
- notebook>=5.7.2,<5.8
- pandas>=0.23.4,<0.23.5
- scikit-learn>=0.19.1,<0.19.2
- seaborn>=0.9.0,<0.10.0
- skll>=1.5,<1.6
- statsmodels>=0.9.0,<0.9.1
- sphinx
- sphinx_rtd_theme
- zeromq
- coverage
- parameterized
- openpyxl
- xlrd
- xlwt
- python >=3.6
{% for req in data.get('install_requires', []) -%}
- {{req.replace(">", " >").replace("<", " <").replace("==", " ")}}
{% endfor %}
{%- endblock %}

test:
# Python imports
Expand Down Expand Up @@ -99,3 +66,4 @@ test:
about:
home: https://github.com/EducationalTestingService/rsmtool
license: Apache 2.0
license_file: LICENSE
25 changes: 0 additions & 25 deletions conda_requirements.txt

This file was deleted.

4 changes: 2 additions & 2 deletions doc/contributing.rst
Expand Up @@ -12,9 +12,9 @@ To set up a local development environment, follow the steps below:

2. If you already have the ``conda`` package manager installed, skip to the next step. If you do not, follow the instructions on `this page <https://conda.io/docs/user-guide/install/index.html>`_ to install conda.

3. Create a new conda environment (say, ``rsmtool``) and install the packages specified in the ``conda_requirements.txt`` file by running::
3. Create a new conda environment (say, ``rsmtool``) and install the packages specified in the ``requirements.txt`` file by running::

conda create -n rsmtool -c defaults -c conda-forge -c desilinguist --file conda_requirements.txt
conda create -n rsmtool -c defaults -c conda-forge -c desilinguist --file requirements.txt

4. Activate the environment using ``source activate rsmtool`` (use ``activate rsmtool`` if you are on Windows).

Expand Down
43 changes: 20 additions & 23 deletions environment.yml
Expand Up @@ -3,26 +3,23 @@ channels:
- conda-forge
- desilinguist
dependencies:
- python==3.6.3
- ipython=6.3.1
- jupyter=1.0.0
- joblib=0.11
- matplotlib=2.1.2
- nose=1.3.7
- notebook=5.4.1
- numpy=1.13.3
- pandas=0.22.0
- scikit-learn=0.19.1
- scipy=1.0.0
- seaborn=0.9.0
- skll=1.5.2
- statsmodels=0.9.0
- parameterized
- zeromq
- sphinx
- sphinx_rtd_theme
- coverage
- setuptools
- openpyxl
- xlrd
- xlwt
- python
- ipython=6.5.0
- jupyter=1.0.0
- joblib=0.11
- matplotlib=2.1.2
- nose=1.3.7
- notebook=5.7.2
- numpy
- pandas
- scipy
- seaborn
- skll=1.5.2
- statsmodels
- coverage
- openpyxl
- parameterized
- sphinx
- sphinx_rtd_theme
- xlrd
- xlwt
26 changes: 10 additions & 16 deletions requirements.txt
@@ -1,21 +1,15 @@
ipython==6.5.0
jupyter==1.0.0
joblib==0.11
matplotlib==2.1.2
nose==1.3.7
notebook==5.7.2
numpy==1.14.*
jupyter
nose
notebook
numpy==1.14.6
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.

scikit-learn==0.19.1
scipy==1.1.0
seaborn==0.9.0
seaborn
skll==1.5.2
statsmodels==0.9.0
statsmodels
coverage
openpyxl
xlrd
xlwt
parameterized
sphinx
sphinx_rtd_theme
coverage
parameterized
setuptools
xlrd
xlwt
9 changes: 4 additions & 5 deletions rsmtool/notebooks/feature_descriptives.ipynb
Expand Up @@ -84,12 +84,11 @@
" legend.legendHandles[0].set_color(colors[0])\n",
" legend.legendHandles[1].set_color(colors[1])\n",
"\n",
" # we want to try to force `tight_layout()`, but if this fails\n",
" # we don't want the entire notebook to fail\n",
" try:\n",
" # we want to try to force `tight_layout()`, but if this \n",
" # raises a warning, we don't want the entire notebook to fail\n",
" with warnings.catch_warnings():\n",
" warnings.simplefilter('ignore')\n",
" plt.tight_layout(h_pad=1.0)\n",
" except ValueError:\n",
" pass\n",
"\n",
" imgfile = join(figure_dir, '{}_outliers.svg'.format(experiment_id))\n",
" plt.savefig(imgfile)\n",
Expand Down
7 changes: 6 additions & 1 deletion rsmtool/notebooks/preprocessed_features.ipynb
Expand Up @@ -56,7 +56,12 @@
" ax.set_xticklabels(labels, rotation=90)\n",
" ax.set_title(cname)\n",
"\n",
" plt.tight_layout(h_pad=1.0)\n",
" # we want to try to force `tight_layout()`, but if this \n",
" # raises a warning, we don't want the entire notebook to fail\n",
" with warnings.catch_warnings():\n",
" warnings.simplefilter('ignore')\n",
" plt.tight_layout(h_pad=1.0)\n",
"\n",
" imgfile = join(figure_dir, '{}_distrib.svg'.format(experiment_id))\n",
" plt.savefig(imgfile)\n",
" if use_thumbnails:\n",
Expand Down
2 changes: 1 addition & 1 deletion rsmtool/version.py
Expand Up @@ -3,5 +3,5 @@
in one place. Based on the suggestion `here. <http://bit.ly/16LbuJF>`_
"""

__version__ = '6.1.0'
__version__ = '7.0.0'
VERSION = tuple(int(x) for x in __version__.split('.'))