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 b21e9a2
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 17 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
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 requirements-sentry.txt

clean:
rm -rf *.egg-info src/*.egg-info
Expand Down
47 changes: 46 additions & 1 deletion poetry.lock

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

4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@ python = "^3.10"
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 b21e9a2

Please sign in to comment.