MAINT: Renamed requirements.txt to requirements_locked.txt

since it's the generated lockfile
This commit is contained in:
Richard Frank 2020-02-11 10:58:03 -05:00
parent 555d1df93c
commit 23f1580bf9
7 changed files with 30 additions and 30 deletions

View file

@ -80,12 +80,12 @@ install:
# this installs the appropriate Miniconda (Py2/Py3, 32/64 bit), # this installs the appropriate Miniconda (Py2/Py3, 32/64 bit),
- powershell .\ci\appveyor\install.ps1 - powershell .\ci\appveyor\install.ps1
- SET PATH=%PYTHON%;%PYTHON%\Scripts;%PATH% - SET PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%
- sed -i "s/numpy==.*/numpy==%NUMPY_VERSION%/" etc/requirements.txt - sed -i "s/numpy==.*/numpy==%NUMPY_VERSION%/" etc/requirements_locked.txt
- sed -i "s/pandas==.*/pandas==%PANDAS_VERSION%/" etc/requirements.txt - sed -i "s/pandas==.*/pandas==%PANDAS_VERSION%/" etc/requirements_locked.txt
- sed -i "s/scipy==.*/scipy==%SCIPY_VERSION%/" etc/requirements.txt - sed -i "s/scipy==.*/scipy==%SCIPY_VERSION%/" etc/requirements_locked.txt
- IF NOT "%PANDAS_DATAREADER_VERSION%"=="" sed -i "s/pandas-datareader==.*/pandas-datareader==%PANDAS_DATAREADER_VERSION%/" etc/requirements.txt - IF NOT "%PANDAS_DATAREADER_VERSION%"=="" sed -i "s/pandas-datareader==.*/pandas-datareader==%PANDAS_DATAREADER_VERSION%/" etc/requirements_locked.txt
- IF NOT "%DASK_VERSION%"=="" sed -i "s/dask\[dataframe\]==.*/dask\[dataframe\]==%DASK_VERSION%/" etc/requirements.txt - IF NOT "%DASK_VERSION%"=="" sed -i "s/dask\[dataframe\]==.*/dask\[dataframe\]==%DASK_VERSION%/" etc/requirements_locked.txt
- cat etc/requirements.txt - cat etc/requirements_locked.txt
- conda info -a - conda info -a
- conda install conda=4.3.30 conda-build=3.0.28 anaconda-client=1.6.3 --yes -q - conda install conda=4.3.30 conda-build=3.0.28 anaconda-client=1.6.3 --yes -q
- conda list - conda list
@ -97,15 +97,15 @@ install:
# test that we can conda install zipline in a new env # test that we can conda install zipline in a new env
- conda create -n installenv --yes -q --use-local python=%PYTHON_VERSION% numpy=%NUMPY_VERSION% zipline -c quantopian -c https://conda.anaconda.org/quantopian/label/ci - conda create -n installenv --yes -q --use-local python=%PYTHON_VERSION% numpy=%NUMPY_VERSION% zipline -c quantopian -c https://conda.anaconda.org/quantopian/label/ci
- ps: $env:BCOLZ_VERSION=(sls "bcolz==([^ ]*)" .\etc\requirements.txt -ca).matches.groups[1].value - ps: $env:BCOLZ_VERSION=(sls "bcolz==([^ ]*)" .\etc\requirements_locked.txt -ca).matches.groups[1].value
- ps: $env:NUMEXPR_VERSION=(sls "numexpr==([^ ]*)" .\etc\requirements.txt -ca).matches.groups[1].value - ps: $env:NUMEXPR_VERSION=(sls "numexpr==([^ ]*)" .\etc\requirements_locked.txt -ca).matches.groups[1].value
- ps: $env:PYTABLES_VERSION=(sls "tables==([^ ]*)" .\etc\requirements.txt -ca).matches.groups[1].value - ps: $env:PYTABLES_VERSION=(sls "tables==([^ ]*)" .\etc\requirements_locked.txt -ca).matches.groups[1].value
- ps: $env:H5PY_VERSION=(sls "h5py==([^ ]*)" .\etc\requirements.txt -ca).matches.groups[1].value - ps: $env:H5PY_VERSION=(sls "h5py==([^ ]*)" .\etc\requirements_locked.txt -ca).matches.groups[1].value
- ps: $env:TALIB_VERSION=(sls "ta-lib==([^ ]*)" .\etc\requirements.txt -ca).matches.groups[1].value - ps: $env:TALIB_VERSION=(sls "ta-lib==([^ ]*)" .\etc\requirements_locked.txt -ca).matches.groups[1].value
# We conda install certifi at the pinned exact version because it is a transitive dependency of zipline via requests and uses distutils for packaging. # We conda install certifi at the pinned exact version because it is a transitive dependency of zipline via requests and uses distutils for packaging.
# Since conda installs latest certifi by default, we would fail to uninstall that new version when trying to install the pinned version using pip later in the build: # Since conda installs latest certifi by default, we would fail to uninstall that new version when trying to install the pinned version using pip later in the build:
# "Cannot uninstall 'certifi'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall." # "Cannot uninstall 'certifi'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall."
- ps: $env:CERTIFI_VERSION=(sls "certifi==([^ ]*)" .\etc\requirements.txt -ca).matches.groups[1].value - ps: $env:CERTIFI_VERSION=(sls "certifi==([^ ]*)" .\etc\requirements_locked.txt -ca).matches.groups[1].value
- conda create -n testenv --yes -q --use-local "pip<19" python=%PYTHON_VERSION% numpy=%NUMPY_VERSION% pandas=%PANDAS_VERSION% scipy=%SCIPY_VERSION% ta-lib=%TALIB_VERSION% bcolz=%BCOLZ_VERSION% numexpr=%NUMEXPR_VERSION% pytables=%PYTABLES_VERSION% h5py=%H5PY_VERSION% certifi=%CERTIFI_VERSION% -c quantopian -c https://conda.anaconda.org/quantopian/label/ci - conda create -n testenv --yes -q --use-local "pip<19" python=%PYTHON_VERSION% numpy=%NUMPY_VERSION% pandas=%PANDAS_VERSION% scipy=%SCIPY_VERSION% ta-lib=%TALIB_VERSION% bcolz=%BCOLZ_VERSION% numexpr=%NUMEXPR_VERSION% pytables=%PYTABLES_VERSION% h5py=%H5PY_VERSION% certifi=%CERTIFI_VERSION% -c quantopian -c https://conda.anaconda.org/quantopian/label/ci
- activate testenv - activate testenv
- bash etc/dev-install --cache-dir=%LOCALAPPDATA%\pip\Cache\pip_np%CONDA_NPY%py%CONDA_PY% - bash etc/dev-install --cache-dir=%LOCALAPPDATA%\pip\Cache\pip_np%CONDA_NPY%py%CONDA_PY%

View file

@ -51,15 +51,15 @@ before_install:
NUMPY_VERSION=1.14.1 PANDAS_VERSION=0.22.0 SCIPY_VERSION=1.0.0 PANDAS_DATAREADER_VERSION=0.4.0 DASK_VERSION=0.17.1 NUMPY_VERSION=1.14.1 PANDAS_VERSION=0.22.0 SCIPY_VERSION=1.0.0 PANDAS_DATAREADER_VERSION=0.4.0 DASK_VERSION=0.17.1
fi fi
- source ./ci/travis/overwrite_requirements.sh - source ./ci/travis/overwrite_requirements.sh
- cat etc/requirements.txt - cat etc/requirements_locked.txt
install: install:
- conda info -a - conda info -a
- conda install conda=4.3.30 conda-build=3.0.28 anaconda-client=1.6.3 --yes -q - conda install conda=4.3.30 conda-build=3.0.28 anaconda-client=1.6.3 --yes -q
- conda list - conda list
- TALIB_VERSION=$(cat ./etc/requirements.txt | grep "ta-lib" | sed "s/ta-lib==\([^ ]*\) *.*/\1/") - TALIB_VERSION=$(cat ./etc/requirements_locked.txt | grep "ta-lib" | sed "s/ta-lib==\([^ ]*\) *.*/\1/")
- CERTIFI_VERSION=$(cat ./etc/requirements.txt | grep "certifi" | sed "s/certifi==\([^ ]*\) *.*/\1/") - CERTIFI_VERSION=$(cat ./etc/requirements_locked.txt | grep "certifi" | sed "s/certifi==\([^ ]*\) *.*/\1/")
- IFS='.' read -r -a NPY_VERSION_ARR <<< "$NUMPY_VERSION" - IFS='.' read -r -a NPY_VERSION_ARR <<< "$NUMPY_VERSION"
- CONDA_NPY=${NPY_VERSION_ARR[0]}${NPY_VERSION_ARR[1]} - CONDA_NPY=${NPY_VERSION_ARR[0]}${NPY_VERSION_ARR[1]}
- CONDA_PY=$TRAVIS_PYTHON_VERSION - CONDA_PY=$TRAVIS_PYTHON_VERSION

View file

@ -11,12 +11,12 @@ else
} }
fi fi
sed_inplace "s/numpy==.*/numpy==$NUMPY_VERSION/" etc/requirements.txt sed_inplace "s/numpy==.*/numpy==$NUMPY_VERSION/" etc/requirements_locked.txt
sed_inplace "s/pandas==.*/pandas==$PANDAS_VERSION/" etc/requirements.txt sed_inplace "s/pandas==.*/pandas==$PANDAS_VERSION/" etc/requirements_locked.txt
sed_inplace "s/scipy==.*/scipy==$SCIPY_VERSION/" etc/requirements.txt sed_inplace "s/scipy==.*/scipy==$SCIPY_VERSION/" etc/requirements_locked.txt
if [ -n "$PANDAS_DATAREADER_VERSION" ]; then if [ -n "$PANDAS_DATAREADER_VERSION" ]; then
sed_inplace "s/pandas-datareader==.*/pandas-datareader==$PANDAS_DATAREADER_VERSION/" etc/requirements.txt sed_inplace "s/pandas-datareader==.*/pandas-datareader==$PANDAS_DATAREADER_VERSION/" etc/requirements_locked.txt
fi fi
if [ -n "$DASK_VERSION" ]; then if [ -n "$DASK_VERSION" ]; then
sed_inplace "s/dask\[dataframe\]==.*/dask\[dataframe\]==$DASK_VERSION/" etc/requirements.txt sed_inplace "s/dask\[dataframe\]==.*/dask\[dataframe\]==$DASK_VERSION/" etc/requirements_locked.txt
fi fi

View file

@ -117,7 +117,7 @@ Then run ``pip install`` TA-lib:
.. code-block:: bash .. code-block:: bash
$ pip install -r ./etc/requirements_talib.in -c ./etc/requirements.txt $ pip install -r ./etc/requirements_talib.in -c ./etc/requirements_locked.txt
You should now be free to run tests: You should now be free to run tests:
@ -154,7 +154,7 @@ If you update the zipline codebase so that it now depends on a new version of a
then you should update the lower bound on that dependency in ``etc/requirements.in`` then you should update the lower bound on that dependency in ``etc/requirements.in``
(or ``etc/requirements_dev.in`` as appropriate). (or ``etc/requirements_dev.in`` as appropriate).
We use `pip-compile`__ to find mutually compatible versions of dependencies for the We use `pip-compile`__ to find mutually compatible versions of dependencies for the
``etc/requirements.txt`` lockfile used in our CI environments. ``etc/requirements_locked.txt`` lockfile used in our CI environments.
__ https://github.com/jazzband/pip-tools/ __ https://github.com/jazzband/pip-tools/
@ -163,7 +163,7 @@ you need to re-run the ``pip-compile`` command included in the header of `the lo
otherwise the lockfile will not meet the constraints specified to pip by zipline otherwise the lockfile will not meet the constraints specified to pip by zipline
at install time (via ``etc/requirements.in`` via ``setup.py``). at install time (via ``etc/requirements.in`` via ``setup.py``).
__ https://github.com/quantopian/zipline/tree/master/etc/requirements.txt __ https://github.com/quantopian/zipline/tree/master/etc/requirements_locked.txt
If the zipline codebase can still support an old version of a dependency, but you want If the zipline codebase can still support an old version of a dependency, but you want
to update to a newer version of that library in our CI environments, then only the to update to a newer version of that library in our CI environments, then only the
@ -194,7 +194,7 @@ __ http://www.sphinx-doc.org/en/stable/
.. code-block:: bash .. code-block:: bash
$ pip install -r ./etc/requirements_docs.txt $ pip install -r ./etc/requirements_docs.in -c ./etc/requirements_locked.txt
To build and view the docs locally, run: To build and view the docs locally, run:

View file

@ -5,7 +5,7 @@
# First installs a known-good version of pip, then any requirements # First installs a known-good version of pip, then any requirements
# specified in the EXTERNAL_REQUIREMENTS environment variable (e.g., # specified in the EXTERNAL_REQUIREMENTS environment variable (e.g.,
# coveralls); then installs the project requirements, constrained by # coveralls); then installs the project requirements, constrained by
# etc/requirements.txt; then editably installs zipline itself. # etc/requirements_locked.txt; then editably installs zipline itself.
# #
# Forwards positional arguments to all invocations of pip install. # Forwards positional arguments to all invocations of pip install.
@ -34,11 +34,11 @@ fi
# These have to be installed first so that the other requirements can be # These have to be installed first so that the other requirements can be
# compiled against the specific versions we use. # compiled against the specific versions we use.
python -m pip install -r etc/requirements_build.in -c etc/requirements.txt $@ python -m pip install -r etc/requirements_build.in -c etc/requirements_locked.txt $@
# XXX: bcolz has to be compiled against our specific version of numpy: # XXX: bcolz has to be compiled against our specific version of numpy:
# by default, it uses an incompatible pre-compiled binary. # by default, it uses an incompatible pre-compiled binary.
python -m pip install --no-binary=bcolz -e .[all] -r etc/requirements_blaze.in -c etc/requirements.txt $@ python -m pip install --no-binary=bcolz -e .[all] -r etc/requirements_blaze.in -c etc/requirements_locked.txt $@
# TODO: resolve these error messages: # TODO: resolve these error messages:
# flake8 3.6.0 has requirement setuptools>=30, but you'll have setuptools 28.8.0 which is incompatible. # flake8 3.6.0 has requirement setuptools>=30, but you'll have setuptools 28.8.0 which is incompatible.

View file

@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile # This file is autogenerated by pip-compile
# To update, run: # To update, run:
# #
# pip-compile --no-index --output-file=etc/requirements.txt etc/requirements.in etc/requirements_blaze.in etc/requirements_build.in etc/requirements_dev.in etc/requirements_docs.in etc/requirements_talib.in # pip-compile --no-index --output-file=etc/requirements_locked.txt etc/requirements.in etc/requirements_blaze.in etc/requirements_build.in etc/requirements_dev.in etc/requirements_docs.in etc/requirements_talib.in
# #
-e git+git://github.com/quantopian/blaze.git@f26375a6708eab85b7acc7869d6c518df2f974eb#egg=blaze -e git+git://github.com/quantopian/blaze.git@f26375a6708eab85b7acc7869d6c518df2f974eb#egg=blaze
-e git+git://github.com/quantopian/datashape.git@cae16a85406ca4302ff1f985b74a3809be0a83a1#egg=datashape -e git+git://github.com/quantopian/datashape.git@cae16a85406ca4302ff1f985b74a3809be0a83a1#egg=datashape

View file

@ -43,9 +43,9 @@ echo "Installing pip and setuptools..." | tee -a "$VAGRANT_LOG"
wget https://bootstrap.pypa.io/get-pip.py 2>&1 | tee -a "$VAGRANT_LOG" wget https://bootstrap.pypa.io/get-pip.py 2>&1 | tee -a "$VAGRANT_LOG"
python get-pip.py 2>&1 >> "$VAGRANT_LOG" | tee -a "$VAGRANT_LOG" python get-pip.py 2>&1 >> "$VAGRANT_LOG" | tee -a "$VAGRANT_LOG"
echo "Installing zipline python dependencies..." | tee -a "$VAGRANT_LOG" echo "Installing zipline python dependencies..." | tee -a "$VAGRANT_LOG"
pip install -r /vagrant/etc/requirements.in -r 2>&1 /vagrant/etc/requirements_dev.in -c /vagrant/etc/requirements.txt | tee -a "$VAGRANT_LOG" pip install -r /vagrant/etc/requirements.in -r 2>&1 /vagrant/etc/requirements_dev.in -c /vagrant/etc/requirements_locked.txt | tee -a "$VAGRANT_LOG"
echo "Installing zipline package itself..." | tee -a "$VAGRANT_LOG" echo "Installing zipline package itself..." | tee -a "$VAGRANT_LOG"
# Clean out any cython assets. The pip install re-builds them. # Clean out any cython assets. The pip install re-builds them.
find /vagrant/ -type f -name '*.c' -exec rm {} + find /vagrant/ -type f -name '*.c' -exec rm {} +
pip install -e /vagrant[all] -c /vagrant/etc/requirements.txt 2>&1 | tee -a "$VAGRANT_LOG" pip install -e /vagrant[all] -c /vagrant/etc/requirements_locked.txt 2>&1 | tee -a "$VAGRANT_LOG"
echo "Finished! zipline repo is in '/vagrant'." | tee -a "$VAGRANT_LOG" echo "Finished! zipline repo is in '/vagrant'." | tee -a "$VAGRANT_LOG"