Skip to content

Commit e8b2af7

Browse files
authored
Upgrade ruff, pre-commit hooks and GitHub Actions; fix new ruff lint violations (#128)
- actions/checkout v7.0.1, astral-sh/setup-uv v10.3.2 - ruff 0.17.3, uv-pre-commit 0.13.6 - hdx-python-utilities >= 4.2.6 - Fix violations from ruff 0.17's expanded default rules - Default today to None instead of now_utc() evaluated at import
1 parent 074ada5 commit e8b2af7

65 files changed

Lines changed: 245 additions & 255 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/publish.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ jobs:
1717
contents: read
1818

1919
steps:
20-
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
20+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2121

2222
- name: Get history and tags for versioning to work
2323
run: |
2424
git fetch --prune --unshallow
2525
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
2626
2727
- name: Install uv
28-
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
28+
uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
2929

3030
- name: Build with uv
3131
run: uv build

‎.github/workflows/run-python-tests.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
pull-requests: write
1717

1818
steps:
19-
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
19+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2020

2121
- name: Install uv
22-
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
22+
uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
2323
with:
2424
enable-cache: true
2525
python-version: "3.13"

‎.pre-commit-config.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ repos:
1212
- id: check-ast
1313

1414
- repo: https://github.com/astral-sh/ruff-pre-commit
15-
rev: v0.14.14
15+
rev: v0.17.3
1616
hooks:
1717
# Run the linter.
1818
- id: ruff-check
@@ -21,7 +21,7 @@ repos:
2121
- id: ruff-format
2222

2323
- repo: https://github.com/astral-sh/uv-pre-commit
24-
rev: 0.9.25
24+
rev: 0.13.6
2525
hooks:
2626
# Ensure the lockfile is up-to-date with pyproject.toml
2727
- id: uv-lock

‎documentation/explanation/facades.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ project configuration is used for any configuration specific to your project.
1111

1212
The default logging configuration reads a configuration file internal to the library
1313
that sets up an coloured console handler outputting at INFO level and a file handler
14-
writing to errors.log at ERROR level.
14+
writing to errors.log at ERROR level.

‎documentation/explanation/history.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ resolve issues as quickly as possible. Static metadata can be held in human read
1515
files so if it needs to be modified, it is straightforward.
1616

1717
The HDX Python library has expanded over time as needs have arisen and is used for a
18-
range of tasks involving interaction with the HDX platform.
18+
range of tasks involving interaction with the HDX platform.

‎documentation/explanation/information.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ This library is part of the [Humanitarian Data Exchange](https://data.humdata.or
88
HDX.
99

1010
The code for the library is [here](https://github.com/OCHA-DAP/hdx-python-api).
11-
The library has detailed API documentation which can be found in the menu at the top.
11+
The library has detailed API documentation which can be found in the menu at the top.

‎documentation/how-to/api-key.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ the drop down menu
2121
**.hdx_configuration.yaml** in the current user's home
2222
directory. Then put in the YAML file:
2323

24-
hdx_key: "HDX API KEY"
24+
hdx_key: "HDX API KEY"

‎documentation/how-to/docker.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
The library is also available set up and ready to go in a Docker image:
44

55
docker pull public.ecr.aws/unocha/hdx-scraper-baseimage:stable
6-
docker run -i -t public.ecr.aws/unocha/hdx-scraper-baseimage:stable python3
6+
docker run -i -t public.ecr.aws/unocha/hdx-scraper-baseimage:stable python3

‎documentation/how-to/framework.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ Create a file **my_code.py** and copy into it the code below:
5454
"""
5555
logger.debug("Generating dataset!")
5656

57-
You can then fill out the function **generate_dataset** as required.
57+
You can then fill out the function **generate_dataset** as required.

‎documentation/how-to/install.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ package that are missing eg. for Ubuntu: python-dev, libffi-dev and libssl-dev.
1515
If you get import or other errors, then please either recreate your virtualenv if you
1616
are using one or uninstall hdx-python-api, hdx-python-country and hdx-python-utilities
1717
using **pip uninstall**, then install hdx-python-api (which will pull in the other
18-
dependencies).
18+
dependencies).

0 commit comments

Comments
 (0)