Skip to content

Commit b6ce107

Browse files
authored
Support new api version 1.0 (#1)
* Refactor geoteknisk unders models and update API endpoints to latest published test API version 1.0 (2025-05-27). Bump version to 1.0-rc.2. * Add forgotten files.
1 parent 389c8f4 commit b6ce107

24 files changed

+4055
-377
lines changed

.github/workflows/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
python-version: ["3.12"]
14-
poetry-version: ["1.8.3"]
13+
python-version: ["3.13"]
14+
poetry-version: ["2.1.3"]
1515
os: [ubuntu-latest]
1616
runs-on: ${{ matrix.os }}
1717
steps:

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ cython_debug/
165165
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
166166
# and can be added to the global gitignore or merged into this file. For a more nuclear
167167
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
168-
#.idea/
168+
.idea/
169169

170170
# Ruff stuff:
171171
.ruff_cache/

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ help: ## Show this help message
33
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
44

55
# Variable for the OpenAPI specification path
6-
OPENAPI_SPEC=./openapi_specification/nadag-innmelding.json
7-
OPENAPI_SPEC_URL=https://ngu.github.io/mono/nadag-innmelding/openapi/nadag-innmelding.json
6+
OPENAPI_SPEC=./openapi_specification/nadag-innmelding.yaml
7+
# Please note that his is now a yaml file and not json as before (no file extension)
8+
OPENAPI_SPEC_URL=https://test.ngu.no/api/nadag/innmelding/openapi/v1
89

910
# Install the required library using pipx
1011
install: ## Install openapi-python-client using pipx
@@ -31,7 +32,7 @@ clear_log: ## Delete the log file if it exists
3132
# Download the OpenAPI specification
3233
download_openapi: ## Download the OpenAPI specification
3334
@echo "Downloading OpenAPI specification..."
34-
@curl -s $(OPENAPI_SPEC_URL) > $(OPENAPI_SPEC)
35+
@curl -s $(OPENAPI_SPEC_URL) > $(OPENAPI_SPEC).
3536

3637
format_openapi: download_openapi ## Format the OpenAPI specification
3738
@echo "Formatting OpenAPI specification..."

README.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1-
# Nadag Innmelding Python Client 🚀
1+
# NADAG innmelding python client 🚀
2+
3+
**A lightweight, Pythonic library for interacting with the
4+
[NADAG innmelding API](https://test.ngu.no/api/openapi-ui/)
5+
quickly sync ground investigation data, all from Python.**
6+
7+
8+
## Other resources
9+
- https://test.ngu.no/api/openapi-ui/ + Explore: /api/nadag/innmelding/openapi/v1
10+
- https://ngu.github.io/mono/
11+
12+
## Installation (end users)
13+
14+
```bash
15+
pip install nadag-innmelding-python-client
16+
```
17+
18+
## Usage
19+
20+
```python
21+
22+
```
23+
24+
## Developer installation
25+
26+
Clone the repository.
27+
28+
## Contributing
29+
30+
Please open an issue before submitting a pull request. We welcome contributions and suggestions!
31+
232

3-
**A lightweight, Pythonic library for interacting with the [Nadag Innmelding API](https://ngu.github.io/mono/nadag-innmelding/openapi/index.html) — quickly sync ground investigation data, all from Python.**

config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
project_name_override: nadag-innmelding-python-client
22
package_name_override: nadag_innmelding_python_client
3-
package_version_override: 1.0-rc.1
3+
package_version_override: 1.0-rc.2
44
post_hooks:
55
# - "bash -c 'cd field-manager-python-client && poetry install'"

nadag-innmelding-python-client/nadag_innmelding_python_client/api/default/delete_v_1_geoteknisk_unders_geoteknisk_unders_id.py renamed to nadag-innmelding-python-client/nadag_innmelding_python_client/api/default/delete_nadag_innmelding_v_1_geoteknisk_unders_geoteknisk_unders_id.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def _get_kwargs(
1313
) -> dict[str, Any]:
1414
_kwargs: dict[str, Any] = {
1515
"method": "delete",
16-
"url": f"/v1/GeotekniskUnders/{geoteknisk_unders_id}",
16+
"url": f"/nadag/innmelding/v1/GeotekniskUnders/{geoteknisk_unders_id}",
1717
}
1818

1919
return _kwargs

nadag-innmelding-python-client/nadag_innmelding_python_client/api/default/delete_v_1_geoteknisk_unders_geoteknisk_unders_id_geoteknisk_borehull_geoteknisk_borehull_id.py renamed to nadag-innmelding-python-client/nadag_innmelding_python_client/api/default/delete_nadag_innmelding_v_1_geoteknisk_unders_geoteknisk_unders_id_geoteknisk_borehull_geoteknisk_borehull_id.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def _get_kwargs(
1414
) -> dict[str, Any]:
1515
_kwargs: dict[str, Any] = {
1616
"method": "delete",
17-
"url": f"/v1/GeotekniskUnders/{geoteknisk_unders_id}/GeotekniskBorehull/{geoteknisk_borehull_id}",
17+
"url": f"/nadag/innmelding/v1/GeotekniskUnders/{geoteknisk_unders_id}/GeotekniskBorehull/{geoteknisk_borehull_id}",
1818
}
1919

2020
return _kwargs

nadag-innmelding-python-client/nadag_innmelding_python_client/api/default/get_v_1_geoteknisk_unders.py renamed to nadag-innmelding-python-client/nadag_innmelding_python_client/api/default/get_nadag_innmelding_v_1_geoteknisk_unders.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def _get_kwargs(
2424

2525
_kwargs: dict[str, Any] = {
2626
"method": "get",
27-
"url": "/v1/GeotekniskUnders",
27+
"url": "/nadag/innmelding/v1/GeotekniskUnders",
2828
"params": params,
2929
}
3030

nadag-innmelding-python-client/nadag_innmelding_python_client/api/default/get_v_1_geoteknisk_unders_geoteknisk_unders_id.py renamed to nadag-innmelding-python-client/nadag_innmelding_python_client/api/default/get_nadag_innmelding_v_1_geoteknisk_unders_geoteknisk_unders_id.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def _get_kwargs(
1414
) -> dict[str, Any]:
1515
_kwargs: dict[str, Any] = {
1616
"method": "get",
17-
"url": f"/v1/GeotekniskUnders/{geoteknisk_unders_id}",
17+
"url": f"/nadag/innmelding/v1/GeotekniskUnders/{geoteknisk_unders_id}",
1818
}
1919

2020
return _kwargs

nadag-innmelding-python-client/nadag_innmelding_python_client/api/default/post_v_1_geoteknisk_unders.py renamed to nadag-innmelding-python-client/nadag_innmelding_python_client/api/default/post_nadag_innmelding_v_1_geoteknisk_unders.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def _get_kwargs(
2727

2828
_kwargs: dict[str, Any] = {
2929
"method": "post",
30-
"url": "/v1/GeotekniskUnders",
30+
"url": "/nadag/innmelding/v1/GeotekniskUnders",
3131
"params": params,
3232
}
3333

0 commit comments

Comments
 (0)