Skip to content

Commit 48dace8

Browse files
committed
Update structure
1 parent 742927d commit 48dace8

43 files changed

Lines changed: 410 additions & 1003 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
File renamed without changes.
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,15 @@ repos:
88
- id: end-of-file-fixer
99
- id: check-ast
1010
- repo: https://github.com/astral-sh/ruff-pre-commit
11-
rev: v0.9.6
11+
rev: v0.9.10
1212
hooks:
1313
# Run the linter.
1414
- id: ruff
15-
args: [--config, .config/ruff.toml, --fix]
15+
args: [ --fix ]
1616
# Run the formatter.
1717
- id: ruff-format
18-
args: [--config, .config/ruff.toml]
1918
- repo: https://github.com/astral-sh/uv-pre-commit
20-
rev: 0.5.29
19+
rev: 0.6.5
2120
hooks:
2221
# Run the pip compile
2322
- id: pip-compile

documentation/.readthedocs.yaml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1+
# Required
12
version: 2
23

3-
mkdocs:
4-
configuration: docs/mkdocs.yml
5-
fail_on_warning: false
6-
4+
# Set the version of Python and other tools you might need
75
build:
8-
os: ubuntu-22.04
6+
os: ubuntu-24.04
97
tools:
10-
python: "3.11"
8+
python: "3.12"
119
jobs:
1210
pre_build:
13-
- pip install --upgrade mkdocs
14-
- pip install mkdocs-material
15-
- pip install pydoc-markdown
16-
- pydoc-markdown documentation/pydoc-markdown.yaml
11+
- pip install .[docs]
12+
13+
mkdocs:
14+
configuration: documentation/mkdocs.yaml
File renamed without changes.

documentation/mkdocs.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
site_name: HDX Python API
2+
repo_url: https://github.com/OCHA-DAP/hdx-python-api/
3+
repo_name: OCHA-DAP/hdx-python-api
4+
docs_dir: .
5+
site_dir: ../site
6+
theme:
7+
name: material
8+
highlightjs: true
9+
plugins:
10+
- search
11+
- mkapi
12+
nav:
13+
- Home: index.md
14+
- API Documentation:
15+
- Configuration: $src/hdx.api.configuration.*
16+
- Locations: $src/hdx.api.locations.*
17+
- Dataset: $src/hdx.data.dataset.*
18+
- Resource: $src/hdx.data.resource.*
19+
- Resource View: $src/hdx.data.resource_view.*
20+
- Showcase: $src/hdx.data.showcase.*
21+
- User: $src/hdx.data.user.*
22+
- Organization: $src/hdx.data.organization.*
23+
- Vocabulary: $src/hdx.data.vocabulary.*
24+
- Simple Facade: $src/hdx.facades.simple.*
25+
- Keyword Arguments Facade: $src/hdx.facades.keyword_arguments.*

documentation/pydoc-markdown.yaml

Lines changed: 0 additions & 58 deletions
This file was deleted.

hatch.toml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Build
2+
3+
[build.targets.wheel]
4+
packages = ["src/hdx"]
5+
6+
[build.hooks.vcs]
7+
version-file = "src/hdx/api/_version.py"
8+
9+
[metadata]
10+
allow-direct-references = true
11+
12+
# Versioning
13+
14+
[version]
15+
source = "vcs"
16+
17+
[version.raw-options]
18+
local_scheme = "no-local-version"
19+
version_scheme = "python-simplified-semver"
20+
21+
# Tests
22+
23+
[envs.hatch-test]
24+
features = ["test"]
25+
26+
[[envs.hatch-test.matrix]]
27+
python = ["3.12"]
28+
29+
[envs.hatch-test.scripts]
30+
run = """
31+
pytest --rootdir=. --junitxml=test-results.xml --cov --no-cov-on-fail \
32+
--cov-report=lcov --cov-report=term-missing
33+
"""
34+
35+
[envs.hatch-static-analysis]
36+
config-path = "none"
37+
dependencies = ["ruff==0.9.10"]

pyproject.toml

Lines changed: 3 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ dependencies = [
3737
"ckanapi>=4.8",
3838
"defopt>=6.4.0",
3939
"email_validator",
40-
"hdx-python-country>=3.8.8",
41-
"hdx-python-utilities>=3.8.3",
40+
"hdx-python-country>=3.9.2",
41+
"hdx-python-utilities>=3.8.6",
4242
"libhxl>=5.2.2",
4343
"makefun",
4444
"quantulum3",
@@ -56,52 +56,4 @@ Homepage = "https://github.com/OCHA-DAP/hdx-python-api"
5656
[project.optional-dependencies]
5757
test = ["pytest", "pytest-check", "pytest-cov", "gspread"]
5858
dev = ["pre-commit"]
59-
60-
61-
#########
62-
# Hatch #
63-
#########
64-
65-
# Build
66-
67-
[tool.hatch.build.targets.wheel]
68-
packages = ["src/hdx"]
69-
70-
[tool.hatch.build.hooks.vcs]
71-
version-file = "src/hdx/api/_version.py"
72-
73-
[tool.hatch.metadata]
74-
allow-direct-references = true
75-
76-
# Versioning
77-
78-
[tool.hatch.version]
79-
source = "vcs"
80-
81-
[tool.hatch.version.raw-options]
82-
local_scheme = "no-local-version"
83-
version_scheme = "python-simplified-semver"
84-
85-
# Tests
86-
87-
[tool.hatch.envs.hatch-test]
88-
features = ["test"]
89-
90-
[[tool.hatch.envs.hatch-test.matrix]]
91-
python = ["3.12"]
92-
93-
[tool.hatch.envs.hatch-test.scripts]
94-
run = """
95-
pytest -c .config/pytest.ini --rootdir=. --junitxml=test-results.xml \
96-
--cov --cov-config=.config/coveragerc --no-cov-on-fail \
97-
--cov-report=lcov --cov-report=term-missing
98-
"""
99-
100-
[tool.hatch.envs.hatch-static-analysis]
101-
dependencies = ["ruff==0.9.6"]
102-
103-
[tool.hatch.envs.hatch-static-analysis.scripts]
104-
format-check = ["ruff format --config .config/ruff.toml --check --diff {args:.}",]
105-
format-fix = ["ruff format --config .config/ruff.toml {args:.}",]
106-
lint-check = ["ruff check --config .config/ruff.toml {args:.}",]
107-
lint-fix = ["ruff check --config .config/ruff.toml --fix {args:.}",]
59+
docs = ["mkapi"]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[pytest]
2-
pythonpath = ../src
2+
pythonpath = src
33
addopts = "--color=yes"
44
log_cli = 1

0 commit comments

Comments
 (0)