Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/build_and_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Python 3.9
- name: Set up Python 3.10
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: 3.9
python-version: 3.10

- name: Install wheel package
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
persist-credentials: false
- uses: opensafely-core/setup-action@5b3030fbbcf069c94e352b4f0a94100fae4dbd82 # v1.6.1
with:
python-version: 3.9
python-version: "3.10"
cache-dependency-path: requirements.*.txt
install-just: true
- name: Check formatting, linting and import sorting
Expand All @@ -31,7 +31,7 @@ jobs:

strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand Down
14 changes: 4 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
default_language_version:
python: python3.9
python: python3.10

repos:
- repo: local
hooks:
- id: black
name: black
entry: just black
language: system
types: [python]
require_serial: true
- id: ruff
name: ruff
entry: just ruff
- id: check
name: check
entry: just check
language: system
types: [python]
require_serial: true
Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.9
3.10
24 changes: 11 additions & 13 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export PIP := BIN + if os_family() == "unix" { "/python -m pip" } else { "/pytho
# enforce our chosen pip compile flags
export COMPILE := BIN + "/pip-compile --allow-unsafe --generate-hashes"

export DEFAULT_PYTHON := if os_family() == "unix" { "python3.9" } else { "python" }
export DEFAULT_PYTHON := if os_family() == "unix" { "python3.10" } else { "python" }


# list available commands
Expand Down Expand Up @@ -88,28 +88,26 @@ upgrade env package="": virtualenv
FORCE=true "{{ just_executable() }}" requirements-{{ env }} $opts


# *ARGS is variadic, 0 or more. This allows us to do `just test -k match`, for example.
# *args is variadic, 0 or more. This allows us to do `just test -k match`, for example.
# Run the tests
test *ARGS: devenv
$BIN/python -m pytest --cov=. --cov-report html --cov-report term-missing:skip-covered {{ ARGS }}
test *args: devenv
$BIN/python -m pytest --cov=. --cov-report html --cov-report term-missing:skip-covered {{ args }}

format *args=".": devenv
$BIN/ruff format --check {{ args }}

black *args=".": devenv
$BIN/black --check {{ args }}


ruff *args=".": devenv
$BIN/ruff check {{ args }}
lint *args=".": devenv
$BIN/ruff check --output-format=full {{ args }}


# run the various dev checks but does not change any files
check: black ruff
check: format lint


# fix formatting and import sort ordering
fix: devenv
$BIN/black .
$BIN/ruff --fix .
$BIN/ruff check --fix .
$BIN/ruff format .

# Run the dev project
run: devenv
Expand Down
1 change: 0 additions & 1 deletion requirements.dev.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# To generate a requirements file that includes both prod and dev requirements, run:
# pip-compile --generate-hashes --output-file=requirements.dev.txt requirements.dev.in

black
httpretty
pip-tools
pre-commit
Expand Down
409 changes: 153 additions & 256 deletions requirements.dev.txt

Large diffs are not rendered by default.

44 changes: 22 additions & 22 deletions requirements.prod.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.9
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --allow-unsafe --generate-hashes --output-file=requirements.prod.txt requirements.prod.in
Expand All @@ -10,13 +10,13 @@ attrs==26.1.0 \
# via
# cattrs
# requests-cache
cattrs==25.3.0 \
--hash=sha256:1ac88d9e5eda10436c4517e390a4142d88638fe682c436c93db7ce4a277b884a \
--hash=sha256:9896e84e0a5bf723bc7b4b68f4481785367ce07a8a02e7e9ee6eb2819bc306ff
cattrs==26.1.0 \
--hash=sha256:d1e0804c42639494d469d08d4f26d6b9de9b8ab26b446db7b5f8c2e97f7c3096 \
--hash=sha256:fa239e0f0ec0715ba34852ce813986dfed1e12117e209b816ab87401271cdd40
# via requests-cache
certifi==2026.5.20 \
--hash=sha256:3c52e209ba0a4ad7aebe60436a4ab349c39e1e602e8c134221e546902ad25897 \
--hash=sha256:69dea482ab64caa7b9f6aba1c6bf48bb6a5448d1c0f1b17ab42ad8c763a5344d
certifi==2026.6.17 \
--hash=sha256:024c88eeec92ca068db80f02b8b07c9cef7b9fe261d1d535abfd5abd6f6af432 \
--hash=sha256:2227dcbaafe0d2f59279d1762ddddc37783ed4354594f194ffc31d20f41fc3db
# via requests
charset-normalizer==3.4.7 \
--hash=sha256:007d05ec7321d12a40227aae9e2bc6dca73f3cb21058999a1df9e193555a9dcc \
Expand Down Expand Up @@ -157,23 +157,23 @@ furl==2.1.4 \
--hash=sha256:877657501266c929269739fb5f5980534a41abd6bbabcb367c136d1d3b2a6015 \
--hash=sha256:da34d0b34e53ffe2d2e6851a7085a05d96922b5b578620a37377ff1dbeeb11c8
# via -r requirements.prod.in
idna==3.15 \
--hash=sha256:048adeaf8c2d788c40fee287673ccaa74c24ffd8dcf09ffa555a2fbb59f10ac8 \
--hash=sha256:ca962446ea538f7092a95e057da437618e886f4d349216d2b1e294abfdb65fdc
idna==3.18 \
--hash=sha256:7f952cbe720b688055e3f87de14f5c3e5fdaa8bc3928985c4077ca689de849a2 \
--hash=sha256:ffb385a7e039654cef1ab9ef32c6fafe283c0c0467bba1d9029738ce4a14a848
# via
# requests
# url-normalize
orderedmultidict==1.0.2 \
--hash=sha256:16a7ae8432e02cc987d2d6d5af2df5938258f87c870675c73ee77a0920e6f4a6 \
--hash=sha256:ab5044c1dca4226ae4c28524cfc5cc4c939f0b49e978efa46a6ad6468049f79b
# via furl
platformdirs==4.4.0 \
--hash=sha256:abd01743f24e5287cd7a5db3752faf1a2d65353f38ec26d98e25a6db65958c85 \
--hash=sha256:ca753cf4d81dc309bc67b0ea38fd15dc97bc30ce419a7f58d13eb3bf14c4febf
platformdirs==4.10.0 \
--hash=sha256:31e761a6a0ca04faf7353ea759bdba55652be214725111e5aac52dfa29d4bef7 \
--hash=sha256:fb516cdb12eb0d857d0cd85a7c57cea4d060bee4578d6cf5a14dfdf8cbf8784a
# via requests-cache
requests==2.32.5 \
--hash=sha256:2462f94637a34fd532264295e186976db0f5d453d1cdd31473c85a6a161affb6 \
--hash=sha256:dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf
requests==2.34.2 \
--hash=sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0 \
--hash=sha256:f288924cae4e29463698d6d60bc6a4da69c89185ad1e0bcc4104f584e960b9ed
# via
# -r requirements.prod.in
# requests-cache
Expand All @@ -193,13 +193,13 @@ typing-extensions==4.15.0 \
# via
# cattrs
# exceptiongroup
url-normalize==2.2.1 \
--hash=sha256:3deb687587dc91f7b25c9ae5162ffc0f057ae85d22b1e15cf5698311247f567b \
--hash=sha256:74a540a3b6eba1d95bdc610c24f2c0141639f3ba903501e61a52a8730247ff37
url-normalize==3.0.0 \
--hash=sha256:0552cbf2831a32a28994a13d29bca58a60e10ff6c0380e343ec6d1c2a0d232d8 \
--hash=sha256:95234bd359f86831c1fd87c248877f2a6887db2f3b5087120083f2fffcba4889
# via requests-cache
urllib3==2.6.3 \
--hash=sha256:1b62b6884944a57dbe321509ab94fd4d3b307075e0c2eae991ac71ee15ad38ed \
--hash=sha256:bf272323e553dfb2e87d9bfd225ca7b0f467b919d7bbd355436d3fd37cb0acd4
urllib3==2.7.0 \
--hash=sha256:231e0ec3b63ceb14667c67be60f2f2c40a518cb38b03af60abc813da26505f4c \
--hash=sha256:9fb4c81ebbb1ce9531cce37674bbc6f1360472bc18ca9a553ede278ef7276897
# via
# requests
# requests-cache
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
url="https://github.com/opensafely-core/osgithub",
author="OpenSAFELY",
author_email="tech@opensafely.org",
python_requires=">=3.9",
python_requires=">=3.10",
install_requires=["requests", "requests-cache", "furl"],
entry_points={},
include_package_data=True,
Expand Down