From e356a5e29b68fc17e5c75a4e01ed1db4ee480dc3 Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Thu, 17 Aug 2023 12:11:22 -0300 Subject: [PATCH 1/7] Testing only the linter in another branch --- .gitlab-ci.yml | 17 +++++++++++++++-- requirements.txt | 24 +++++++++++++++++++++++- 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f4cd620..38ce5a8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,20 @@ image: python:latest -run: - script: +deploy: + stage: deploy + only: + - master + before_script: - pip install build twine + script: - python -m build - TWINE_PASSWORD=$PYPI_PASSWORD TWINE_USERNAME=$PYPI_USERNAME python3 -m twine upload dist/* + +lint: + stage: lint + before_script: + - pip install black flake8 isort flake8-bugbear flake8-builtins flake8-comprehensions flake8-tidy-imports flake8-eradicate flake8-print flake8-return flake8-use-fstring git+https://github.com/derrix060/flake8-expression-complexity.git + script: + - black --check src/ + - flake8 src/ + - isort -c src/ diff --git a/requirements.txt b/requirements.txt index b1f0ddc..54d3ffc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,14 +1,36 @@ +astpretty==3.0.0 +attrs==23.1.0 +black==23.7.0 certifi==2023.7.22 cfgv==3.4.0 charset-normalizer==3.2.0 +click==8.1.6 distlib==0.3.7 +eradicate==2.3.0 filelock==3.12.2 +flake8==6.1.0 +flake8-bugbear==23.7.10 +flake8-builtins==2.1.0 +flake8-comprehensions==3.14.0 +flake8-eradicate==1.5.0 +flake8-expression-complexity @ git+https://github.com/derrix060/flake8-expression-complexity.git@f667ba943e502aa43b138dc28a678b0d3236a3b8 +flake8-plugin-utils==1.3.3 +flake8-print==5.0.0 +flake8-return==1.2.0 +flake8-tidy-imports==4.10.0 +flake8-use-fstring==1.4 identify==2.5.26 idna==3.4 +isort==5.12.0 +mccabe==0.7.0 +mypy-extensions==1.0.0 nodeenv==1.8.0 +packaging==23.1 +pathspec==0.11.2 platformdirs==3.10.0 pre-commit==3.3.3 -python-dotenv==1.0.0 +pycodestyle==2.11.0 +pyflakes==3.1.0 PyYAML==6.0.1 requests==2.31.0 urllib3==2.0.4 From 717a02ace55ad60219d61d110483c01c9c6591f2 Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Thu, 17 Aug 2023 12:14:29 -0300 Subject: [PATCH 2/7] Fixing gitlab-ci --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 38ce5a8..0a6054b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,7 +13,8 @@ deploy: lint: stage: lint before_script: - - pip install black flake8 isort flake8-bugbear flake8-builtins flake8-comprehensions flake8-tidy-imports flake8-eradicate flake8-print flake8-return flake8-use-fstring git+https://github.com/derrix060/flake8-expression-complexity.git + - pip install black flake8 isort + # - pip install flake8-bugbear flake8-builtins flake8-comprehensions flake8-tidy-imports flake8-eradicate flake8-print flake8-return flake8-use-fstring git+https://github.com/derrix060/flake8-expression-complexity.git script: - black --check src/ - flake8 src/ From 1217c182a3cd30b339a7da1030eec55d46aa9830 Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Thu, 17 Aug 2023 12:15:26 -0300 Subject: [PATCH 3/7] Changing stage to test on the linters --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0a6054b..fbc38d0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,8 +10,8 @@ deploy: - python -m build - TWINE_PASSWORD=$PYPI_PASSWORD TWINE_USERNAME=$PYPI_USERNAME python3 -m twine upload dist/* -lint: - stage: lint +test: + stage: test before_script: - pip install black flake8 isort # - pip install flake8-bugbear flake8-builtins flake8-comprehensions flake8-tidy-imports flake8-eradicate flake8-print flake8-return flake8-use-fstring git+https://github.com/derrix060/flake8-expression-complexity.git From e7505f2852451dc907d4680e8bb15abecb5b4941 Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Thu, 17 Aug 2023 12:19:11 -0300 Subject: [PATCH 4/7] Added all the packages for linting --- .gitlab-ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fbc38d0..d7c3e9f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,11 +10,10 @@ deploy: - python -m build - TWINE_PASSWORD=$PYPI_PASSWORD TWINE_USERNAME=$PYPI_USERNAME python3 -m twine upload dist/* -test: +lint: stage: test before_script: - - pip install black flake8 isort - # - pip install flake8-bugbear flake8-builtins flake8-comprehensions flake8-tidy-imports flake8-eradicate flake8-print flake8-return flake8-use-fstring git+https://github.com/derrix060/flake8-expression-complexity.git + - pip install black flake8 isort flake8-bugbear flake8-builtins flake8-comprehensions flake8-tidy-imports flake8-eradicate flake8-print flake8-return flake8-use-fstring git+https://github.com/derrix060/flake8-expression-complexity.git script: - black --check src/ - flake8 src/ From 374522358f12d339621c679d163033dab93166cd Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Thu, 17 Aug 2023 12:22:27 -0300 Subject: [PATCH 5/7] Separated gitlab-ci steps further --- .gitlab-ci.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d7c3e9f..5919ed8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,13 +1,21 @@ image: python:latest -deploy: +build_pypi_packages: + stage: build + only: + - master + before_script: + - pip install build + script: + - python -m build + +deploy_to_pypi: stage: deploy only: - master before_script: - - pip install build twine + - pip install twine script: - - python -m build - TWINE_PASSWORD=$PYPI_PASSWORD TWINE_USERNAME=$PYPI_USERNAME python3 -m twine upload dist/* lint: From 90ad8925f77cab003a7a72447fc44711e6ed40bb Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Thu, 17 Aug 2023 12:23:02 -0300 Subject: [PATCH 6/7] Upgraded version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 09c00ac..b6a8704 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,7 @@ build-backend = "hatchling.build" [project] name = "ute_wrapper" -version = "1.0.0" +version = "1.0.1" authors = [ { name="Roger Gonzalez", email="roger@rogs.me" }, ] From 35221e8a2e95508776bad60f70f22ad73ebb3c33 Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Thu, 17 Aug 2023 12:27:06 -0300 Subject: [PATCH 7/7] Going back to lint/deploy only --- .gitlab-ci.yml | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5919ed8..697c87d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,23 +1,5 @@ image: python:latest -build_pypi_packages: - stage: build - only: - - master - before_script: - - pip install build - script: - - python -m build - -deploy_to_pypi: - stage: deploy - only: - - master - before_script: - - pip install twine - script: - - TWINE_PASSWORD=$PYPI_PASSWORD TWINE_USERNAME=$PYPI_USERNAME python3 -m twine upload dist/* - lint: stage: test before_script: @@ -26,3 +8,13 @@ lint: - black --check src/ - flake8 src/ - isort -c src/ + +deploy_to_pypi: + stage: deploy + only: + - master + before_script: + - pip install build twine + script: + - python -m build + - TWINE_PASSWORD=$PYPI_PASSWORD TWINE_USERNAME=$PYPI_USERNAME python3 -m twine upload dist/*