Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved poetry configuration for keiko and octopoes #1186

Merged
merged 23 commits into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
957f7a3
Improve poetry flow for octopoes and keiko
Darwinkel Jun 14, 2023
ba5bd37
Update workflows and change requirements path trigger per ammar's sug…
Darwinkel Jun 14, 2023
b6d0258
Add dev dependencies for the root project
Darwinkel Jun 14, 2023
453c3d9
Upgrade opentelemetry
Darwinkel Jun 14, 2023
a10abbf
Export poetry
Darwinkel Jun 14, 2023
109d7cf
Fix merge conflicts
Darwinkel Jun 14, 2023
c8515d3
Merge branch 'main' into feature/unified-poetry-venv-2
Darwinkel Jun 14, 2023
a7ed20e
Merge branch 'main' into feature/unified-poetry-venv-2
Darwinkel Jun 15, 2023
12e2dad
Merge branch 'main' into feature/unified-poetry-venv-2
Darwinkel Jun 15, 2023
e361fc5
Merge branch 'main' into feature/unified-poetry-venv-2
Darwinkel Jun 15, 2023
23f1e58
Merge branch 'main' into feature/unified-poetry-venv-2
Darwinkel Jun 15, 2023
e12abba
Do not update the lockfile with point updates
Darwinkel Jun 15, 2023
d28b340
Replace wildcard with explicit file names for requirements files
Darwinkel Jun 15, 2023
c09b8d8
Change job name
Darwinkel Jun 15, 2023
36c1805
Merge branch 'main' into feature/unified-poetry-venv-2
praseodym Jun 16, 2023
2342e30
Merge branch 'main' into feature/unified-poetry-venv-2
ammar92 Jun 20, 2023
4d9adbf
Merge branch 'main' into feature/unified-poetry-venv-2
Darwinkel Jun 21, 2023
a9b36d7
Merge branch 'main' into feature/unified-poetry-venv-2
Darwinkel Jun 21, 2023
b723061
Merge branch 'main' into feature/unified-poetry-venv-2
praseodym Jun 21, 2023
d0ac052
Merge branch 'main' into feature/unified-poetry-venv-2
ammar92 Jun 22, 2023
c5004c8
Fix merge conflicts
Darwinkel Jun 27, 2023
49bdb5a
Fix merge conflicts
Darwinkel Jun 27, 2023
dbb7ea0
Merge branch 'main' into feature/unified-poetry-venv-2
Darwinkel Jun 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build_docs_on_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: 3.11
cache: 'pip' # caching pip dependencies

- name: Install pip dependencies
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/check_poetry_dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Check Poetry dependencies

on:
push:
paths:
- requirements.txt
- requirements-dev.txt
- pyproject.toml
- poetry.lock
pull_request:
paths:
- requirements.txt
- requirements-dev.txt
- pyproject.toml
- poetry.lock


jobs:
poetry-dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
id: py311
with:
python-version: 3.11
cache: pip

- name: Install pip dependencies
run: pip install poetry poetry-plugin-export

- name: Check, lock, and export Poetry dependencies
run: make poetry-dependencies

- name: Check if there are any changed files
run: git diff --exit-code
2 changes: 1 addition & 1 deletion .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: 3.11
cache: 'pip' # caching pip dependencies

- name: Install pip dependencies
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/pre_commit_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up Python 3.8
- name: Set up Python
uses: actions/setup-python@v4
id: py38
id: py311
with:
python-version: 3.8
python-version: 3.11
cache: pip

- name: Install pip dependencies
run: pip install -r requirements-precommit.txt
run: pip install -r requirements-dev.txt

- uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ steps.py38.outputs.python-version }}|${{ hashFiles('.pre-commit-config.yaml') }}
key: pre-commit|${{ steps.py311.outputs.python-version }}|${{ hashFiles('.pre-commit-config.yaml') }}

- name: Run pre-commit
run: pre-commit run --all-files --show-diff-on-failure --color always
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,13 @@ ubuntu22.04-build-image:

docs:
sphinx-build -b html docs/source docs/_build

poetry-dependencies:
for path in . keiko octopoes
do
echo $$path
poetry check -C $$path
poetry lock --check -C $$path
poetry export -C $$path --without=dev -f requirements.txt -o $$path/requirements.txt
poetry export -C $$path --with=dev -f requirements.txt -o $$path/requirements-dev.txt
done
5 changes: 0 additions & 5 deletions keiko/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,3 @@ clean:
rm -f debian/*.substvars
rm -f debian/*.debhelper.log
rm -f debian/changelog

export-requirements: ## Export the requirements to requirements.txt format
poetry export --output requirements.txt --without-hashes && \
poetry export --output requirements-dev.txt --with dev --without-hashes
poetry export --output requirements-check.txt --only dev --without-hashes
310 changes: 155 additions & 155 deletions keiko/poetry.lock

Large diffs are not rendered by default.

24 changes: 1 addition & 23 deletions keiko/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,32 +1,10 @@
[tool.poetry]
name = "keiko"
version = "0.1.0"
version = "0.0.1.dev1"
description = "KAT report engine using LateX to generate PDF"
authors = ["MinVWS <maintainer@openkat.nl>"]
license = "EUPL"


[tool.vulture]
min_confidence = 90
paths = ["keiko"]

[tool.pylint.format]
max-line-length = "120"

[tool.pylint."MESSAGES CONTROL"]
disable = ["R0914", "R0903"] # Ignore too-many-local-variables; too-few-public-methods
extension-pkg-whitelist = "pydantic"

[tool.black]
line-length = 119
target-version = ['py38']

[tool.pydocstyle]

[tool.mypy]
python_version = "3.8"
strict = true

[tool.poetry.dependencies]
python = "^3.8"
click = "^8.1.3"
Expand Down
649 changes: 577 additions & 72 deletions keiko/requirements-dev.txt

Large diffs are not rendered by default.

442 changes: 402 additions & 40 deletions keiko/requirements.txt

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions octopoes/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,3 @@ rtest-crux:
docker-compose -f docker-compose-base.yml -f .ci/docker-compose-crux.yml up -d --build octopoes_api octopoes_api_worker
sleep 2
robot -d reports --variablefile tests/robot/variables.py:crux tests/robot || :

export-requirements: ## Export the requirements to requirements.txt format
poetry export --output requirements.txt --without-hashes
poetry export --output requirements-dev.txt --with dev --without-hashes
Loading