Skip to content

Commit 080ee8c

Browse files
authored
chore: switch from Poetry to vanilla Pip (#180)
Updating the project to match my current style and to reduce dependencies.
1 parent 988ce82 commit 080ee8c

File tree

7 files changed

+53
-300
lines changed

7 files changed

+53
-300
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,31 +31,22 @@ jobs:
3131
include: ${{ fromJson(needs.prepare.outputs.matrix) }}
3232
name: "Python ${{ matrix.python-version }} + Django ${{ matrix.django-version }}"
3333
runs-on: ubuntu-latest
34-
env:
35-
POETRY_VIRTUALENVS_CREATE: false
3634
steps:
37-
- uses: actions/checkout@v3
38-
- uses: actions/setup-python@v4
35+
- uses: actions/checkout@v4
36+
- uses: actions/setup-python@v5
3937
with:
4038
python-version: ${{ matrix.python-version }}
41-
- run: pip install poetry
42-
- run: poetry install
43-
- run: poetry build --format wheel
44-
- name: Make sure tests use dist instead of source
45-
run: |
46-
rm -rf django_object_actions
47-
pip install --force-reinstall dist/*.whl
39+
- run: pip install -e '.[dev]'
4840
- run: pip install "Django==${{ matrix.django-version }}.*"
4941
- run: make test
5042

5143
lint:
5244
runs-on: ubuntu-latest
5345
steps:
54-
- uses: actions/checkout@v3
46+
- uses: actions/checkout@v4
5547
- name: Set up Python
56-
uses: actions/setup-python@v4
48+
uses: actions/setup-python@v5
5749
with:
58-
python-version: "3.12"
59-
- run: pip install poetry
60-
- run: poetry install --with=dev
50+
python-version: "3.13"
51+
- run: pip install -e '.[dev]'
6152
- run: make lint

.github/workflows/release.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# https://python-semantic-release.readthedocs.io/en/latest/automatic-releases/github-actions.html#examples
12
name: Release
23

34
on:
@@ -16,26 +17,31 @@ jobs:
1617
contents: write
1718

1819
steps:
19-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2021
with:
2122
fetch-depth: 0
23+
ref: ${{ github.ref_name }}
2224
persist-credentials: false
25+
- name: Setup | Force release branch to be at workflow sha
26+
run: |
27+
git reset --hard ${{ github.sha }}
2328
- name: Python Semantic Release
2429
id: release
2530
# https://github.com/python-semantic-release/python-semantic-release/releases
2631
# https://python-semantic-release.readthedocs.io/en/latest/github-action.html
27-
uses: python-semantic-release/python-semantic-release@v9.8.8
32+
uses: python-semantic-release/python-semantic-release@v9.21.0
2833
with:
2934
github_token: ${{ secrets.BOT_GITHUB_TOKEN }}
3035

31-
- name: Publish package distributions to PyPI
36+
- name: Publish | Upload package to PyPI
3237
uses: pypa/gh-action-pypi-publish@release/v1
3338
# NOTE: DO NOT wrap the conditional in ${{ }} as it will always evaluate to true.
3439
# See https://github.com/actions/runner/issues/1173
3540
if: steps.release.outputs.released == 'true'
3641

37-
- name: Publish package distributions to GitHub Releases
38-
uses: python-semantic-release/upload-to-gh-release@main
42+
- name: Publish | Upload to GitHub Release Assets
43+
uses: python-semantic-release/upload-to-gh-release@9.21.0
3944
if: steps.release.outputs.released == 'true'
4045
with:
4146
github_token: ${{ secrets.BOT_GITHUB_TOKEN }}
47+
tag: ${{ steps.release.outputs.tag }}

Makefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,23 @@ clean: ## Remove generated files
2424
find . -type d -name "__pycache__" -exec rm -rf {} \; || true
2525

2626
install: ## Install development dependencies
27-
poetry install
27+
pip install -e '.[build,dev]'
2828
pip install Django
2929

3030
lint: ## Check the project for lint errors
31-
poetry run ruff check .
32-
poetry run ruff format --diff .
31+
ruff check .
32+
ruff format --diff .
3333

3434
tdd: ## Run tests with a file watcher
35-
PYTHONPATH=. nodemon --ext py -x sh -c "poetry run python -W ignore::RuntimeWarning $(MANAGE) test --failfast django_object_actions || true"
35+
PYTHONPATH=. nodemon --ext py -x sh -c "python -W ignore::RuntimeWarning $(MANAGE) test --failfast django_object_actions || true"
3636

3737
test: ## Run test suite
38-
PYTHONPATH=. poetry run python -W ignore::RuntimeWarning $(MANAGE) test django_object_actions
38+
PYTHONPATH=. python -W ignore::RuntimeWarning $(MANAGE) test django_object_actions
3939

4040
coverage: ## Run and then display coverage report
41-
poetry run coverage erase
42-
PYTHONPATH=. poetry run coverage run $(MANAGE) test django_object_actions
43-
poetry run coverage report --show-missing
41+
coverage erase
42+
PYTHONPATH=. coverage run $(MANAGE) test django_object_actions
43+
coverage report --show-missing
4444

4545
resetdb: ## Delete and then recreate the dev sqlite database
4646
python $(MANAGE) reset_db --router=default --noinput

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,6 @@ make quickstart # runs 'make resetdb' and some extra steps
258258
Various helpers are available as make commands. Type `make help` and
259259
view the `Makefile` to see what other things you can do.
260260

261-
Some commands assume you are in the virtualenv. If you see
262-
"ModuleNotFoundError"s, try running `poetry shell` first.
263-
264261
## Similar Packages
265262

266263
[Django Modal Actions](https://github.com/Mng-dev-ai/django-modal-actions) can

0 commit comments

Comments
 (0)