Skip to content

Commit

Permalink
refactor: adapt dependency management for v24
Browse files Browse the repository at this point in the history
  • Loading branch information
nejch committed Feb 22, 2024
1 parent 3126836 commit 1959492
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 39 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"
- uses: psf/black@stable
with:
options: "--check ."
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"
- uses: abatilo/actions-poetry@v2
- uses: actions/setup-node@v3
with:
Expand All @@ -65,8 +65,6 @@ jobs:
run: yarn set version 1.22.21
- run: |
sudo apt-get update && sudo apt-get install -y libxmlsec1-dev libmaxminddb-dev
python3 -m venv venv
. venv/bin/activate
venv/bin/pip3 install -U wheel
make develop
make test
poetry install --with test
make deps
poetry run pytest
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ venv
.venv
.coverage
.vscode/
# Fetched from upstream
requirements-sentry.txt
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.10.13
3.11.8
15 changes: 4 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
SENTRY_VERSION := 24.2.0

.PHONY: clean develop test
.PHONY: clean deps

develop:
pip3 install -e git+https://github.com/getsentry/sentry.git@$(SENTRY_VERSION)#egg=sentry[dev]
poetry install -n --no-dev
poetry build && pip3 install -U dist/*.whl
pip3 install -U codecov pytest freezegun fixtures

test:
@echo "--> Running Python tests"
python -m pytest tests || exit 1
@echo ""
deps:
curl -L -o requirements-sentry.txt https://github.com/getsentry/sentry/raw/$(SENTRY_VERSION)/requirements-dev-frozen.txt
poetry run pip install -r requirements-sentry.txt

clean:
rm -rf *.egg-info src/*.egg-info
Expand Down
55 changes: 36 additions & 19 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@ packages = [
]

[tool.poetry.dependencies]
python = "^3.10"
python = "^3.11"

[tool.poetry.dev-dependencies]
black = "^22.8.0"
isort = "^5.7.0"
flake8 = "^3.8.4"

[tool.poetry.group.test.dependencies]
codecov = "^2.1.12"
pytest = "^7.1.3"
sentry = {git = "https://github.com/getsentry/sentry.git", rev = "24.2.0"}
fixtures = "^4.1.0"

[tool.isort]
profile = "black"
Expand Down

0 comments on commit 1959492

Please sign in to comment.