From fa4f5c3e007103f2d173ac5cba703aa852f360a7 Mon Sep 17 00:00:00 2001 From: Adriaan de Beer Date: Wed, 18 Mar 2020 12:01:45 +0200 Subject: [PATCH 1/7] replaced pipenv with pipdeptree in dependency stage --- .gitlab-ci.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7df5905..e34b2cd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,8 +10,8 @@ cache: # before_script is used to define the command that should be run before all jobs, including deploy jobs, but after the restoration of artifacts. # This can be an array or a multi-line string. before_script: - - pip install pipenv - - pipenv install + - pip install pipdeptree + stages: - test @@ -29,7 +29,8 @@ test: # tags: # - docker-executor script: - - pipenv run python setup.py test + # - pipenv run python setup.py test + - python setup.py test - mv coverage.xml ./build/reports/code-coverage.xml artifacts: paths: @@ -39,11 +40,14 @@ test: list_dependencies: stage: test script: - - pipenv graph >> pipenv_deps.txt + # - pipenv graph >> pipenv_deps.txt + - pipdeptree --json >> pip_deps.json + - pipdeptree >> pip_deps.txt - dpkg -l >> system_deps.txt - awk 'FNR>5 {print $2 ", " $3}' system_deps.txt >> system_deps.csv - mkdir .public - - cp pipenv_deps.txt .public/ + - cp pip_deps.txt .public/ + - cp pip_deps.json .public/ - cp system_deps.txt .public/ - cp system_deps.csv .public/ - mv .public public -- GitLab From 464707ce2733b51cb12008010df35a815d3521b7 Mon Sep 17 00:00:00 2001 From: Adriaan de Beer Date: Wed, 18 Mar 2020 12:05:30 +0200 Subject: [PATCH 2/7] pip3 instead of pip? --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e34b2cd..9fbe8ba 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,7 +10,7 @@ cache: # before_script is used to define the command that should be run before all jobs, including deploy jobs, but after the restoration of artifacts. # This can be an array or a multi-line string. before_script: - - pip install pipdeptree + - pip3 install pipdeptree stages: -- GitLab From a362a5ff5ded80b13f823bd46ec456c223e3cd2f Mon Sep 17 00:00:00 2001 From: Adriaan de Beer Date: Wed, 18 Mar 2020 12:12:09 +0200 Subject: [PATCH 3/7] python3 instead of python? --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9fbe8ba..be1e81d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,7 +30,7 @@ test: # - docker-executor script: # - pipenv run python setup.py test - - python setup.py test + - python3 setup.py test - mv coverage.xml ./build/reports/code-coverage.xml artifacts: paths: -- GitLab From 4c4cff156931332a95e3b517b8db4f8a38a3138e Mon Sep 17 00:00:00 2001 From: Adriaan de Beer Date: Wed, 18 Mar 2020 12:23:36 +0200 Subject: [PATCH 4/7] install docker-requirements.txt pre-script --- .gitlab-ci.yml | 3 ++- docker-requirements.txt | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index be1e81d..1cc74ff 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,7 +10,8 @@ cache: # before_script is used to define the command that should be run before all jobs, including deploy jobs, but after the restoration of artifacts. # This can be an array or a multi-line string. before_script: - - pip3 install pipdeptree + # - pip3 install pipdeptree + - pip3 install -r docker-requirements.txt stages: diff --git a/docker-requirements.txt b/docker-requirements.txt index 6d09930..367590c 100644 --- a/docker-requirements.txt +++ b/docker-requirements.txt @@ -11,4 +11,5 @@ sphinx sphinx_rtd_theme sphinx-autobuild sphinx-rtd-theme -sphinxcontrib-websupport \ No newline at end of file +sphinxcontrib-websupport +pipdeptree \ No newline at end of file -- GitLab From d05b9a74851d943abe559eb574050a0d0a37944d Mon Sep 17 00:00:00 2001 From: Adriaan de Beer Date: Wed, 18 Mar 2020 12:27:46 +0200 Subject: [PATCH 5/7] install pylint_junit --- docker-requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker-requirements.txt b/docker-requirements.txt index 367590c..040cecb 100644 --- a/docker-requirements.txt +++ b/docker-requirements.txt @@ -12,4 +12,5 @@ sphinx_rtd_theme sphinx-autobuild sphinx-rtd-theme sphinxcontrib-websupport -pipdeptree \ No newline at end of file +pipdeptree +pylint_junit \ No newline at end of file -- GitLab From f45481aae9e7bdb5416ce5017b073e7d73443362 Mon Sep 17 00:00:00 2001 From: Adriaan de Beer Date: Wed, 18 Mar 2020 12:34:07 +0200 Subject: [PATCH 6/7] best-practice small change --- .gitlab-ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1cc74ff..a39700f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,8 +10,7 @@ cache: # before_script is used to define the command that should be run before all jobs, including deploy jobs, but after the restoration of artifacts. # This can be an array or a multi-line string. before_script: - # - pip3 install pipdeptree - - pip3 install -r docker-requirements.txt + - python3 -m pip install -r docker-requirements.txt stages: -- GitLab From eb30a4399bf03052421230b8ec662b97c2f5b3bf Mon Sep 17 00:00:00 2001 From: Adriaan de Beer Date: Wed, 18 Mar 2020 12:39:00 +0200 Subject: [PATCH 7/7] Updated README to soften the requirement of using Pipenv a bit --- README.md | 4 ++-- docs/src/index.rst | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index fb51625..94e8728 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,9 @@ Install ------- **Always** use a virtual environment. [Pipenv](https://pipenv.readthedocs.io/en/latest/) is now Python's officially -recommended method and the one used by default in this repo. +recommended method, but we are not using it for installing requirements when building on the CI Pipeline. You are encouraged to use your preferred environment isolation (i.e. `pip`, `conda` or `pipenv` while developing locally. -Follow these steps at the project root: +For working with `Pipenv`, follow these steps at the project root: First, ensure that `~/.local/bin` is in your `PATH` with: ```bash diff --git a/docs/src/index.rst b/docs/src/index.rst index 3443f7b..3052688 100644 --- a/docs/src/index.rst +++ b/docs/src/index.rst @@ -22,7 +22,7 @@ :maxdepth: 2 :caption: Readme - README + ../../README .. COMMUNITY SECTION ================================================== @@ -30,14 +30,14 @@ .. toctree:: :maxdepth: 2 - :caption: Package-name + :caption: Package name :hidden: package/guide -Project-name documentation -========================== +Project-name documentation HEADING +================================== These are all the packages, functions and scripts that form part of the project. -- GitLab