Repository: openedx/taxonomy-connector (language: python)

Issue:
ENT-3382 | Added basic Skeleton.



Discussion / hints:

Fix patch:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 00000000..3109e175
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,43 @@
+name: Python CI
+
+on:
+  push:
+    branches: [master]
+  pull_request:
+    branches:
+    - '**'
+
+jobs:
+  run_tests:
+    name: Tests
+    runs-on: ${{ matrix.os }}
+    strategy:
+      matrix:
+        os: [ubuntu-20.04]
+        python-version: ['3.8']
+        toxenv: [django22, django30, django31, django32, quality, pii-annotations]
+
+    steps:
+    - uses: actions/checkout@v2
+    - name: setup python
+      uses: actions/setup-python@v2
+      with:
+        python-version: ${{ matrix.python-version }}
+
+    - name: Install pip
+      run: pip install -r requirements/pip.txt
+
+    - name: Install Dependencies
+      run: pip install -r requirements/ci.txt
+
+    - name: Run Tests
+      env:
+        TOXENV: ${{ matrix.toxenv }}
+      run: tox
+
+    - name: Run Coverage
+      if: matrix.python-version == '3.8' && matrix.toxenv=='django22'
+      uses: codecov/codecov-action@v1
+      with:
+        flags: unittests
+        fail_ci_if_error: true
diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml
new file mode 100644
index 00000000..a22e9e6a
--- /dev/null
+++ b/.github/workflows/pypi-publish.yml
@@ -0,0 +1,30 @@
+name: Publish package to PyPi
+
+on:
+  release:
+    types: [published]
+
+jobs:
+
+  push:
+    runs-on: ubuntu-20.04
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v2
+      - name: setup python
+        uses: actions/setup-python@v2
+        with:
+          python-version: 3.8
+
+      - name: Install pip
+        run: pip install -r requirements/pip.txt
+
+      - name: Build package
+        run: python setup.py sdist bdist_wheel
+
+      - name: Publish to PyPi
+        uses: pypa/gh-action-pypi-publish@master
+        with:
+          user: __token__
+          password: ${{ secrets.PYPI_UPLOAD_TOKEN }}
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index cb2bd504..00000000
--- a/.travis.yml
+++ /dev/null
@@ -1,30 +0,0 @@
-language: python
-python:
-- '3.8'
-env:
-- TOXENV=quality
-- TOXENV=pii-annotations
-- TOXENV=django22
-- TOXENV=django30
-- TOXENV=django31
-- TOXENV=django32
-cache:
-- pip
-before_install:
-- pip install --upgrade pip
-install:
-- pip install -r requirements/travis.txt
-script:
-- tox
-after_success:
-- codecov
-deploy:
-  provider: pypi
-  user: edx
-  distributions: sdist bdist_wheel
-  on:
-    tags: true
-    python: 3.8
-    condition: $TOXENV = quality
-  password:
-    secure: OQtkDTBmNcyGsR9aOOpjNHS7GUYLi+fj5KLtpU58/Ejy7lx0zG1kHF8vdoXy7hv8LtKiKaqpaWwOsK84UeoKtB0yHGq+POiYSowPD+vSRaM73zUyvmfJVUKRv1BNN7E/YImWmO1hP8a+azl69GLY1eVYQwhwTREBadttuUyDHU4nD0aZrfgnFTZDq8HhlfHQ0c97rbIh1Wnm/rAJ3icZFwdO+XGS0oK4OXSJYIaUyWg/RYHE3kj8AMSqY5nLXM8CyhPo2JkolAwQt54XKhpX+pTFnVGba/qJS4t1niWYAXFjo6f5XdqGzgi8BSHCF7VXTM4WJA9Qy8HE9HrWlHOg7HHk4/t+Kcw/CDo/LBKzKOv6SVLIdIrx3QkYReZxovR/F9eJvn9W7JB73eBn7vaxgM3nixmbvf8V+algTO4TRt9AEeBrZOKWamw+IBU7efm+0PlPQaaEhGzw77P0u5bUxANuX/DGuAiuQNrAR88XIkuG1J+GfgqfoBmv/hMDnsC51+VAZ6bbtOyeUJ7eQrzK8ASkBLshKSKj4ZonRzcr/P6ZYJ8zqIuIqOSxuePuG8KqcvF+OI3pQ3Q4A4w2RH9phcPT0vlmfDMZW6h5Q5JGEkY3iorvyFAzP4giBFelLo1AoMlvzYvx1PhdATtCD6zkrZoHngydY6rSa/cnMm8/LxE=
diff --git a/Makefile b/Makefile
index c88200bd..4f593c21 100644
--- a/Makefile
+++ b/Makefile
@@ -36,9 +36,10 @@ upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
 upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
 	pip install -qr requirements/pip-tools.txt
 	# Make sure to compile files after any other files they include!
+	pip-compile --upgrade --allow-unsafe --rebuild -o requirements/pip.txt requirements/pip.in
 	$(PIP_COMPILE) -o requirements/pip-tools.txt requirements/pip-tools.in
 	$(PIP_COMPILE) -o requirements/test.txt requirements/test.in
-	$(PIP_COMPILE) -o requirements/travis.txt requirements/travis.in
+	$(PIP_COMPILE) -o requirements/ci.txt requirements/ci.in
 	$(PIP_COMPILE) -o requirements/dev.txt requirements/dev.in
 	# Let tox control the Django version for tests
 	sed '/^[dD]jango==/d' requirements/test.txt > requirements/test.tmp
@@ -51,6 +52,7 @@ pii_check: ## check for PII annotations on all Django models
 	tox -e pii-annotations
 
 requirements: ## install development environment requirements
+	pip install -qr requirements/pip.txt
 	pip install -r requirements/pip-tools.txt
 	pip-sync requirements/dev.txt
 
diff --git a/README.rst b/README.rst
index 7c97d71a..a2d28b23 100644
--- a/README.rst
+++ b/README.rst
@@ -8,6 +8,10 @@ Taxonomy
 .. image:: http://codecov.io/github/edx/taxonomy-connector/coverage.svg?branch=master
     :target: http://codecov.io/github/edx/taxonomy-connector?branch=master
     :alt: Codecov
+    
+.. image:: https://github.com/edx/taxonomy-connector/workflows/Python%20CI/badge.svg?branch=master
+    :target: https://github.com/edx/taxonomy-connector/actions?query=workflow%3A%22Python+CI%22
+    :alt: CI
 
 The taxonomy service is a library that can be installed in other edX components
 that provides access to third party taxonomy vendors. EMSI is currently the
diff --git a/requirements/travis.in b/requirements/ci.in
similarity index 100%
rename from requirements/travis.in
rename to requirements/ci.in
diff --git a/requirements/travis.txt b/requirements/ci.txt
similarity index 67%
rename from requirements/travis.txt
rename to requirements/ci.txt
index 69cb91dd..be29c613 100644
--- a/requirements/travis.txt
+++ b/requirements/ci.txt
@@ -1,5 +1,5 @@
 #
-# This file is autogenerated by pip-compile with python 3.7
+# This file is autogenerated by pip-compile with python 3.8
 # To update, run:
 #
 #    make upgrade
@@ -11,7 +11,7 @@ certifi==2021.5.30
 charset-normalizer==2.0.4
     # via requests
 codecov==2.1.12
-    # via -r requirements/travis.in
+    # via -r requirements/ci.in
 coverage==5.5
     # via codecov
 distlib==0.3.2
@@ -22,11 +22,6 @@ filelock==3.0.12
     #   virtualenv
 idna==3.2
     # via requests
-importlib-metadata==4.6.3
-    # via
-    #   pluggy
-    #   tox
-    #   virtualenv
 packaging==21.0
     # via tox
 platformdirs==2.2.0
@@ -45,17 +40,13 @@ six==1.16.0
     #   virtualenv
 toml==0.10.2
     # via tox
-tox==3.24.1
+tox==3.24.3
     # via
-    #   -r requirements/travis.in
+    #   -r requirements/ci.in
     #   tox-battery
 tox-battery==0.6.1
-    # via -r requirements/travis.in
-typing-extensions==3.10.0.0
-    # via importlib-metadata
+    # via -r requirements/ci.in
 urllib3==1.26.6
     # via requests
 virtualenv==20.7.2
     # via tox
-zipp==3.5.0
-    # via importlib-metadata
diff --git a/requirements/dev.in b/requirements/dev.in
index a3642afb..a84566bf 100644
--- a/requirements/dev.in
+++ b/requirements/dev.in
@@ -2,7 +2,7 @@
 -c constraints.txt
 
 -r pip-tools.txt          # pip-tools and its dependencies, for managing requirements files
--r travis.txt             # tox and related dependencies
+-r ci.txt             # tox and related dependencies
 -r test.txt               # pytest and related dependencies
 
 edx-lint                  # edX pylint rules and plugins
diff --git a/requirements/dev.txt b/requirements/dev.txt
index 2bb85074..f173f175 100644
--- a/requirements/dev.txt
+++ b/requirements/dev.txt
@@ -1,5 +1,5 @@
 #
-# This file is autogenerated by pip-compile with python 3.7
+# This file is autogenerated by pip-compile with python 3.8
 # To update, run:
 #
 #    make upgrade
@@ -22,7 +22,7 @@ attrs==21.2.0
     #   pytest
 backports.entry-points-selectable==1.1.0
     # via
-    #   -r requirements/travis.txt
+    #   -r requirements/ci.txt
     #   virtualenv
 billiard==3.6.4.0
     # via
@@ -34,15 +34,15 @@ celery==4.4.7
     #   -r requirements/test.txt
 certifi==2021.5.30
     # via
+    #   -r requirements/ci.txt
     #   -r requirements/test.txt
-    #   -r requirements/travis.txt
     #   requests
 chardet==4.0.0
     # via diff-cover
 charset-normalizer==2.0.4
     # via
+    #   -r requirements/ci.txt
     #   -r requirements/test.txt
-    #   -r requirements/travis.txt
     #   requests
 click==8.0.1
     # via
@@ -57,20 +57,20 @@ click-log==0.3.2
 code-annotations==1.2.0
     # via -r requirements/test.txt
 codecov==2.1.12
-    # via -r requirements/travis.txt
+    # via -r requirements/ci.txt
 coverage==5.5
     # via
+    #   -r requirements/ci.txt
     #   -r requirements/test.txt
-    #   -r requirements/travis.txt
     #   codecov
     #   pytest-cov
 ddt==1.4.2
     # via -r requirements/test.txt
-diff-cover==6.2.2
+diff-cover==6.3.4
     # via -r requirements/dev.in
 distlib==0.3.2
     # via
-    #   -r requirements/travis.txt
+    #   -r requirements/ci.txt
     #   virtualenv
 django==2.2.24
     # via
@@ -95,7 +95,7 @@ django-waffle==2.2.1
     #   edx-django-utils
 djangorestframework==3.12.4
     # via -r requirements/test.txt
-edx-django-utils==4.2.0
+edx-django-utils==4.3.0
     # via
     #   -r requirements/test.txt
     #   edx-rest-api-client
@@ -109,35 +109,20 @@ edx-rest-api-client==5.4.0
     # via -r requirements/test.txt
 factory-boy==3.2.0
     # via -r requirements/test.txt
-faker==8.11.0
+faker==8.12.1
     # via
     #   -r requirements/test.txt
     #   factory-boy
 filelock==3.0.12
     # via
-    #   -r requirements/travis.txt
+    #   -r requirements/ci.txt
     #   tox
     #   virtualenv
 idna==3.2
     # via
+    #   -r requirements/ci.txt
     #   -r requirements/test.txt
-    #   -r requirements/travis.txt
     #   requests
-importlib-metadata==4.6.3
-    # via
-    #   -r requirements/pip-tools.txt
-    #   -r requirements/test.txt
-    #   -r requirements/travis.txt
-    #   backports.entry-points-selectable
-    #   click
-    #   kombu
-    #   path
-    #   pep517
-    #   pluggy
-    #   pytest
-    #   stevedore
-    #   tox
-    #   virtualenv
 inflect==5.3.0
     # via jinja2-pluralize
 iniconfig==1.1.1
@@ -170,14 +155,14 @@ mccabe==0.6.1
     # via pylint
 mock==4.0.3
     # via -r requirements/test.txt
-newrelic==6.8.0.163
+newrelic==6.8.1.164
     # via
     #   -r requirements/test.txt
     #   edx-django-utils
 packaging==21.0
     # via
+    #   -r requirements/ci.txt
     #   -r requirements/test.txt
-    #   -r requirements/travis.txt
     #   pytest
     #   tox
 path==13.1.0
@@ -196,12 +181,12 @@ pip-tools==6.2.0
     # via -r requirements/pip-tools.txt
 platformdirs==2.2.0
     # via
-    #   -r requirements/travis.txt
+    #   -r requirements/ci.txt
     #   virtualenv
 pluggy==0.13.1
     # via
+    #   -r requirements/ci.txt
     #   -r requirements/test.txt
-    #   -r requirements/travis.txt
     #   diff-cover
     #   pytest
     #   tox
@@ -213,15 +198,15 @@ psutil==5.8.0
     #   edx-django-utils
 py==1.10.0
     # via
+    #   -r requirements/ci.txt
     #   -r requirements/test.txt
-    #   -r requirements/travis.txt
     #   pytest
     #   tox
 pycodestyle==2.7.0
     # via -r requirements/dev.in
 pydocstyle==6.1.1
     # via -r requirements/dev.in
-pygments==2.9.0
+pygments==2.10.0
     # via diff-cover
 pyjwt==2.1.0
     # via
@@ -243,8 +228,8 @@ pylint-plugin-utils==0.6
     #   pylint-django
 pyparsing==2.4.7
     # via
+    #   -r requirements/ci.txt
     #   -r requirements/test.txt
-    #   -r requirements/travis.txt
     #   packaging
 pytest==6.2.4
     # via
@@ -275,8 +260,8 @@ pyyaml==5.4.1
     #   edx-i18n-tools
 requests==2.26.0
     # via
+    #   -r requirements/ci.txt
     #   -r requirements/test.txt
-    #   -r requirements/travis.txt
     #   algoliasearch
     #   codecov
     #   edx-rest-api-client
@@ -286,8 +271,8 @@ responses==0.13.4
     # via -r requirements/test.txt
 six==1.16.0
     # via
+    #   -r requirements/ci.txt
     #   -r requirements/test.txt
-    #   -r requirements/travis.txt
     #   astroid
     #   edx-i18n-tools
     #   edx-lint
@@ -305,12 +290,12 @@ sqlparse==0.4.1
     # via
     #   -r requirements/test.txt
     #   django
-stevedore==3.3.0
+stevedore==3.4.0
     # via
     #   -r requirements/test.txt
     #   code-annotations
     #   edx-django-utils
-testfixtures==6.18.0
+testfixtures==6.18.1
     # via -r requirements/test.txt
 text-unidecode==1.3
     # via
@@ -319,36 +304,27 @@ text-unidecode==1.3
     #   python-slugify
 toml==0.10.2
     # via
+    #   -r requirements/ci.txt
     #   -r requirements/test.txt
-    #   -r requirements/travis.txt
     #   pytest
     #   pytest-cov
     #   tox
 tomli==1.2.1
     # via
     #   -r requirements/pip-tools.txt
-    #   diff-cover
     #   pep517
-tox==3.24.1
+tox==3.24.3
     # via
-    #   -r requirements/travis.txt
+    #   -r requirements/ci.txt
     #   tox-battery
 tox-battery==0.6.1
     # via
+    #   -r requirements/ci.txt
     #   -r requirements/dev.in
-    #   -r requirements/travis.txt
-typed-ast==1.4.3
-    # via astroid
-typing-extensions==3.10.0.0
-    # via
-    #   -r requirements/pip-tools.txt
-    #   -r requirements/test.txt
-    #   -r requirements/travis.txt
-    #   importlib-metadata
 urllib3==1.26.6
     # via
+    #   -r requirements/ci.txt
     #   -r requirements/test.txt
-    #   -r requirements/travis.txt
     #   requests
     #   responses
 vine==1.3.0
@@ -358,7 +334,7 @@ vine==1.3.0
     #   celery
 virtualenv==20.7.2
     # via
-    #   -r requirements/travis.txt
+    #   -r requirements/ci.txt
     #   tox
 wheel==0.37.0
     # via
@@ -366,13 +342,6 @@ wheel==0.37.0
     #   pip-tools
 wrapt==1.11.2
     # via astroid
-zipp==3.5.0
-    # via
-    #   -r requirements/pip-tools.txt
-    #   -r requirements/test.txt
-    #   -r requirements/travis.txt
-    #   importlib-metadata
-    #   pep517
 
 # The following packages are considered to be unsafe in a requirements file:
 # pip
diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt
index 9e0c07ea..3a172bbf 100644
--- a/requirements/pip-tools.txt
+++ b/requirements/pip-tools.txt
@@ -1,29 +1,19 @@
 #
-# This file is autogenerated by pip-compile with python 3.7
+# This file is autogenerated by pip-compile with python 3.8
 # To update, run:
 #
 #    make upgrade
 #
 click==8.0.1
     # via pip-tools
-importlib-metadata==4.6.3
-    # via
-    #   click
-    #   pep517
 pep517==0.11.0
     # via pip-tools
 pip-tools==6.2.0
     # via -r requirements/pip-tools.in
 tomli==1.2.1
     # via pep517
-typing-extensions==3.10.0.0
-    # via importlib-metadata
 wheel==0.37.0
     # via pip-tools
-zipp==3.5.0
-    # via
-    #   importlib-metadata
-    #   pep517
 
 # The following packages are considered to be unsafe in a requirements file:
 # pip
diff --git a/requirements/pip.in b/requirements/pip.in
new file mode 100644
index 00000000..21ce8e9d
--- /dev/null
+++ b/requirements/pip.in
@@ -0,0 +1,5 @@
+# Core dependencies for installing other packages
+
+pip
+setuptools
+wheel
diff --git a/requirements/pip.txt b/requirements/pip.txt
new file mode 100644
index 00000000..36c04ed3
--- /dev/null
+++ b/requirements/pip.txt
@@ -0,0 +1,14 @@
+#
+# This file is autogenerated by pip-compile with python 3.8
+# To update, run:
+#
+#    make upgrade
+#
+wheel==0.37.0
+    # via -r requirements/pip.in
+
+# The following packages are considered to be unsafe in a requirements file:
+pip==21.2.4
+    # via -r requirements/pip.in
+setuptools==57.4.0
+    # via -r requirements/pip.in


Test patch:
diff --git a/requirements/test.txt b/requirements/test.txt
index b6582eb8..752ed134 100644
--- a/requirements/test.txt
+++ b/requirements/test.txt
@@ -1,5 +1,5 @@
 #
-# This file is autogenerated by pip-compile with python 3.7
+# This file is autogenerated by pip-compile with python 3.8
 # To update, run:
 #
 #    make upgrade
@@ -47,7 +47,7 @@ django-waffle==2.2.1
     # via edx-django-utils
 djangorestframework==3.12.4
     # via -r requirements/base.in
-edx-django-utils==4.2.0
+edx-django-utils==4.3.0
     # via
     #   -r requirements/base.in
     #   edx-rest-api-client
@@ -55,19 +55,12 @@ edx-rest-api-client==5.4.0
     # via -r requirements/base.in
 factory-boy==3.2.0
     # via -r requirements/test.in
-faker==8.11.0
+faker==8.12.1
     # via
     #   -r requirements/test.in
     #   factory-boy
 idna==3.2
     # via requests
-importlib-metadata==4.6.3
-    # via
-    #   click
-    #   kombu
-    #   pluggy
-    #   pytest
-    #   stevedore
 iniconfig==1.1.1
     # via pytest
 jinja2==3.0.1
@@ -78,7 +71,7 @@ markupsafe==2.0.1
     # via jinja2
 mock==4.0.3
     # via -r requirements/test.in
-newrelic==6.8.0.163
+newrelic==6.8.1.164
     # via edx-django-utils
 packaging==21.0
     # via pytest
@@ -129,11 +122,11 @@ slumber==0.7.1
     # via edx-rest-api-client
 sqlparse==0.4.1
     # via django
-stevedore==3.3.0
+stevedore==3.4.0
     # via
     #   code-annotations
     #   edx-django-utils
-testfixtures==6.18.0
+testfixtures==6.18.1
     # via -r requirements/test.in
 text-unidecode==1.3
     # via
@@ -143,8 +136,6 @@ toml==0.10.2
     # via
     #   pytest
     #   pytest-cov
-typing-extensions==3.10.0.0
-    # via importlib-metadata
 urllib3==1.26.6
     # via
     #   requests
@@ -153,5 +144,3 @@ vine==1.3.0
     # via
     #   amqp
     #   celery
-zipp==3.5.0
-    # via importlib-metadata