Skip to content

Commit 4a0c2ac

Browse files
Fix: Standardize pyproject.toml and update CI to use pip
- Corrected the `[project.dependencies]` syntax in `pyproject.toml` to be a valid empty array, resolving the CI error. - Updated the `.github/workflows/ci-cd.yml` to remove Poetry and use a standard `pip` and `build` based workflow. - Replaced `poetry install` with `pip install -e .[dev]`. - Replaced `poetry build` with `python -m build`. - Adjusted the CI caching mechanism to work with `pip` instead of Poetry. This completes the migration to a fully PEP-compliant packaging setup and ensures the CI pipeline is aligned with the new tooling.
1 parent cf03f48 commit 4a0c2ac

2 files changed

Lines changed: 13 additions & 28 deletions

File tree

.github/workflows/ci-cd.yml

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -44,27 +44,20 @@ jobs:
4444
with:
4545
python-version: ${{ matrix.python-version }}
4646

47-
- name: Install Poetry
48-
uses: snok/install-poetry@ff8a7d7de27005376176819789742a2280cc35e2
49-
50-
- name: Configure Poetry
51-
run: poetry config virtualenvs.in-project true
52-
shell: bash
53-
5447
- name: Cache dependencies
5548
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
5649
with:
57-
path: .venv
58-
key: v1-${{ runner.os }}-python-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
50+
path: ~/.cache/pip
51+
key: v1-${{ runner.os }}-python-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }}
5952
restore-keys: |
6053
v1-${{ runner.os }}-python-${{ matrix.python-version }}-
6154
6255
- name: Install dependencies
63-
run: poetry install --no-interaction --no-root
56+
run: pip install -e ".[dev]"
6457
shell: bash
6558

6659
- name: Run tests
67-
run: poetry run pytest
60+
run: pytest
6861
shell: bash
6962

7063
- name: Upload coverage to Codecov
@@ -85,27 +78,20 @@ jobs:
8578
with:
8679
python-version: '3.12'
8780

88-
- name: Install Poetry
89-
uses: snok/install-poetry@ff8a7d7de27005376176819789742a2280cc35e2
90-
91-
- name: Configure Poetry
92-
run: poetry config virtualenvs.in-project true
93-
shell: bash
94-
9581
- name: Cache dependencies
9682
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
9783
with:
98-
path: .venv
99-
key: v1-${{ runner.os }}-python-3.12-${{ hashFiles('**/poetry.lock') }}
84+
path: ~/.cache/pip
85+
key: v1-${{ runner.os }}-python-3.12-${{ hashFiles('**/pyproject.toml') }}
10086
restore-keys: |
10187
v1-${{ runner.os }}-python-3.12-
10288
10389
- name: Install dependencies
104-
run: poetry install --no-interaction --no-root
90+
run: pip install -e ".[dev]"
10591
shell: bash
10692

10793
- name: Build documentation
108-
run: poetry run mkdocs build --strict
94+
run: mkdocs build --strict
10995
shell: bash
11096

11197
release:
@@ -121,10 +107,11 @@ jobs:
121107
with:
122108
python-version: '3.12'
123109

124-
- name: Install Poetry
125-
uses: snok/install-poetry@ff8a7d7de27005376176819789742a2280cc35e2
110+
- name: Install dependencies
111+
run: pip install build
112+
126113
- name: Build package
127-
run: poetry build
114+
run: python -m build
128115

129116
- name: Publish to PyPI
130117
uses: pypa/gh-action-pypi-publish@2f6f737ca5f74c637829c0f5c3acd0e29ea5e8bf

pyproject.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,13 @@ classifiers = [
1919
"Programming Language :: Python :: 3.12",
2020
]
2121
requires-python = ">=3.10"
22+
dependencies = []
2223

2324
[project.urls]
2425
Homepage = "https://github.com/[USERNAME]/[REPO_NAME]"
2526
Repository = "https://github.com/[USERNAME]/[REPO_NAME]"
2627
Documentation = "https://github.com/[USERNAME]/[REPO_NAME]"
2728

28-
[project.dependencies]
29-
python = ">=3.10"
30-
3129
[project.optional-dependencies]
3230
dev = [
3331
"pytest>=8.4.2",

0 commit comments

Comments
 (0)