From 2fbc4f2f03ae4b9900e27ed0981251a480f18ea9 Mon Sep 17 00:00:00 2001 From: Eric Herrera Date: Sat, 9 May 2020 16:43:02 -0500 Subject: [PATCH] Add setup.py install_requirements definition. Update travis file using new requirements. Create requirements folder. create pip_tools, base, test and travis requirements files. Remove old requirements file. Add Makefile. Add makefile upgrade command. Include requirements files generated using upgrade command. Add openedx.yaml and include OEPs list. Add venv to gitignore. --- .gitignore | 1 + .travis.yml | 3 ++- Makefile | 7 +++++++ openedx.yaml | 4 ++++ requirements.txt | 7 ------- requirements/base.in | 10 ++++++++++ requirements/base.txt | 23 +++++++++++++++++++++++ requirements/constraints.txt | 9 +++++++++ requirements/pip_tools.in | 4 ++++ requirements/pip_tools.txt | 12 ++++++++++++ requirements/test.in | 6 ++++++ requirements/test.txt | 24 ++++++++++++++++++++++++ requirements/travis.in | 4 ++++ requirements/travis.txt | 24 ++++++++++++++++++++++++ 14 files changed, 130 insertions(+), 8 deletions(-) create mode 100644 Makefile create mode 100644 openedx.yaml delete mode 100644 requirements.txt create mode 100644 requirements/base.in create mode 100644 requirements/base.txt create mode 100644 requirements/constraints.txt create mode 100644 requirements/pip_tools.in create mode 100644 requirements/pip_tools.txt create mode 100644 requirements/test.in create mode 100644 requirements/test.txt create mode 100644 requirements/travis.in create mode 100644 requirements/travis.txt diff --git a/.gitignore b/.gitignore index 25837d1..d2eaca0 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ var/ *.egg-info/ .installed.cfg *.egg +venv/ # Installer logs pip-log.txt diff --git a/.travis.yml b/.travis.yml index 2c404c2..f48459e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,8 @@ dist: xenial # required for Python >= 3.7 (travis-ci/travis-ci#9069) python: - 3.5 - 3.8 -install: pip install -r requirements.txt +install: +- pip install -r requirements/travis.txt script: - pycodestyle . --max-line-length=419 # TODO 419 --> 120 deploy: diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..544c9bb --- /dev/null +++ b/Makefile @@ -0,0 +1,7 @@ +upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade +upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in + pip install -q -r requirements/pip_tools.txt + pip-compile --upgrade -o requirements/pip_tools.txt requirements/pip_tools.in + pip-compile --upgrade -o requirements/base.txt requirements/base.in + pip-compile --upgrade -o requirements/test.txt requirements/test.in + pip-compile --upgrade -o requirements/travis.txt requirements/travis.in diff --git a/openedx.yaml b/openedx.yaml new file mode 100644 index 0000000..aee85bb --- /dev/null +++ b/openedx.yaml @@ -0,0 +1,4 @@ +--- + +oeps: + oep-18: true diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index f5186a0..0000000 --- a/requirements.txt +++ /dev/null @@ -1,7 +0,0 @@ -bleach -boto -fs -mako -pycodestyle -simplejson -webob \ No newline at end of file diff --git a/requirements/base.in b/requirements/base.in new file mode 100644 index 0000000..7ab2fc8 --- /dev/null +++ b/requirements/base.in @@ -0,0 +1,10 @@ +# Core requirements for using this package +-c constraints.txt + + +bleach +boto +fs +mako +simplejson +webob diff --git a/requirements/base.txt b/requirements/base.txt new file mode 100644 index 0000000..3d2b582 --- /dev/null +++ b/requirements/base.txt @@ -0,0 +1,23 @@ +# +# This file is autogenerated by pip-compile +# To update, run: +# +# make upgrade +# +appdirs==1.4.3 # via fs +bleach==3.1.5 # via -r requirements/base.in +boto==2.49.0 # via -r requirements/base.in +fs==2.4.11 # via -r requirements/base.in +mako==1.1.2 # via -r requirements/base.in +markupsafe==1.1.1 # via mako +packaging==20.3 # via bleach +pyparsing==2.4.7 # via packaging +pytz==2020.1 # via fs +simplejson==3.17.0 # via -r requirements/base.in +six==1.14.0 # via bleach, fs, packaging +typing==3.7.4.1 # via fs +webencodings==0.5.1 # via bleach +webob==1.8.6 # via -r requirements/base.in + +# The following packages are considered to be unsafe in a requirements file: +# setuptools diff --git a/requirements/constraints.txt b/requirements/constraints.txt new file mode 100644 index 0000000..94595ab --- /dev/null +++ b/requirements/constraints.txt @@ -0,0 +1,9 @@ +# Version constraints for pip-installation. +# +# This file doesn't install any packages. It specifies version constraints +# that will be applied if a package is needed. +# +# When pinning something here, please provide an explanation of why. Ideally, +# link to other information that will help people in the future to remove the +# pin when possible. Writing an issue against the offending project and +# linking to it here is good. diff --git a/requirements/pip_tools.in b/requirements/pip_tools.in new file mode 100644 index 0000000..caf45a9 --- /dev/null +++ b/requirements/pip_tools.in @@ -0,0 +1,4 @@ + # Dependencies to run compile tools +-c constraints.txt + +pip-tools # Contains pip-compile, used to generate pip requirements files diff --git a/requirements/pip_tools.txt b/requirements/pip_tools.txt new file mode 100644 index 0000000..937f1d6 --- /dev/null +++ b/requirements/pip_tools.txt @@ -0,0 +1,12 @@ +# +# This file is autogenerated by pip-compile +# To update, run: +# +# make upgrade +# +click==7.1.2 # via pip-tools +pip-tools==5.1.2 # via -r requirements/pip_tools.in +six==1.14.0 # via pip-tools + +# The following packages are considered to be unsafe in a requirements file: +# pip diff --git a/requirements/test.in b/requirements/test.in new file mode 100644 index 0000000..1d8408d --- /dev/null +++ b/requirements/test.in @@ -0,0 +1,6 @@ +# Requirements for test runs +-c constraints.txt + +-r base.txt # Core dependencies for the cookiecutter + +pycodestyle diff --git a/requirements/test.txt b/requirements/test.txt new file mode 100644 index 0000000..4a768c9 --- /dev/null +++ b/requirements/test.txt @@ -0,0 +1,24 @@ +# +# This file is autogenerated by pip-compile +# To update, run: +# +# make upgrade +# +appdirs==1.4.3 # via -r requirements/base.txt, fs +bleach==3.1.5 # via -r requirements/base.txt +boto==2.49.0 # via -r requirements/base.txt +fs==2.4.11 # via -r requirements/base.txt +mako==1.1.2 # via -r requirements/base.txt +markupsafe==1.1.1 # via -r requirements/base.txt, mako +packaging==20.3 # via -r requirements/base.txt, bleach +pycodestyle==2.5.0 # via -r requirements/test.in +pyparsing==2.4.7 # via -r requirements/base.txt, packaging +pytz==2020.1 # via -r requirements/base.txt, fs +simplejson==3.17.0 # via -r requirements/base.txt +six==1.14.0 # via -r requirements/base.txt, bleach, fs, packaging +typing==3.7.4.1 # via -r requirements/base.txt, fs +webencodings==0.5.1 # via -r requirements/base.txt, bleach +webob==1.8.6 # via -r requirements/base.txt + +# The following packages are considered to be unsafe in a requirements file: +# setuptools diff --git a/requirements/travis.in b/requirements/travis.in new file mode 100644 index 0000000..d981755 --- /dev/null +++ b/requirements/travis.in @@ -0,0 +1,4 @@ +# Requirements for running tests in Travis +-c constraints.txt + +-r test.txt diff --git a/requirements/travis.txt b/requirements/travis.txt new file mode 100644 index 0000000..9bd555f --- /dev/null +++ b/requirements/travis.txt @@ -0,0 +1,24 @@ +# +# This file is autogenerated by pip-compile +# To update, run: +# +# make upgrade +# +appdirs==1.4.3 # via -r requirements/test.txt, fs +bleach==3.1.5 # via -r requirements/test.txt +boto==2.49.0 # via -r requirements/test.txt +fs==2.4.11 # via -r requirements/test.txt +mako==1.1.2 # via -r requirements/test.txt +markupsafe==1.1.1 # via -r requirements/test.txt, mako +packaging==20.3 # via -r requirements/test.txt, bleach +pycodestyle==2.5.0 # via -r requirements/test.txt +pyparsing==2.4.7 # via -r requirements/test.txt, packaging +pytz==2020.1 # via -r requirements/test.txt, fs +simplejson==3.17.0 # via -r requirements/test.txt +six==1.14.0 # via -r requirements/test.txt, bleach, fs, packaging +typing==3.7.4.1 # via -r requirements/test.txt, fs +webencodings==0.5.1 # via -r requirements/test.txt, bleach +webob==1.8.6 # via -r requirements/test.txt + +# The following packages are considered to be unsafe in a requirements file: +# setuptools