Skip to content

Commit 3d218c8

Browse files
Merge pull request #17 from ESPRI-Mod/dev
Dev
2 parents 0507355 + 61282eb commit 3d218c8

File tree

8 files changed

+141
-144
lines changed

8 files changed

+141
-144
lines changed

.pre-commit-config.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,6 @@ repos:
2222
- id: ruff
2323
name: ruff-sort-imports
2424
args: [--select, I, --fix]
25-
- repo: local
26-
hooks:
27-
- id: wily
28-
name: wily
29-
entry: wily diff
30-
verbose: true
31-
language: python
32-
additional_dependencies: [wily]
3325
- repo: https://github.com/PyCQA/flake8
3426
rev: 7.1.2
3527
hooks:

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ pre-commit install
1616

1717
```bash
1818
uv sync
19-
uv run wily setup
2019
uv run pre-commit install
2120
```
2221

deployment/check_update.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ set -u
77
readonly BASE_DIR_PATH="$(pwd)"
88
SCRIPT_DIR_PATH="$(dirname $0)"; cd "${SCRIPT_DIR_PATH}"
99
readonly SCRIPT_DIR_PATH="$(pwd)"; cd "${BASE_DIR_PATH}"
10-
readonly DOCKER_PROD_SERVICE_NAME='prod'
11-
readonly DOCKER_UPDATE_SERVICE_NAME='update'
10+
readonly DOCKER_PROD_SERVICE_NAME='bprod'
11+
readonly DOCKER_UPDATE_SERVICE_NAME='bupdate'
1212
readonly EMAIL_ADDRESSES='sgardoll@ipsl.fr,laurent.troussellier@ipsl.fr'
1313
readonly EMAIL_SUBJECT_TAG='[ESGVOC BACKEND][UPDATE]'
1414
readonly UPDATE_MARK_FILE_PATH="${SCRIPT_DIR_PATH}/update/mark"

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ dev = [
4343
"httpx>=0.28.1",
4444
"hatch>=1.14.0", # Required for version updating through uv.
4545
"pytest-cov>=6.0.0",
46-
"wily>=1.25.0",
4746
"flake8>=7.1.2",
4847
"pyright>=1.1.396",
4948
"uvicorn>=0.34.0",

src/esgvoc_backend/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from esgvoc_backend import constants
55

6-
__version__ = "1.0.0"
6+
__version__ = "1.0.1"
77

88
logging_config = {
99
'version': 1,

tests/api_inputs.py

Lines changed: 130 additions & 113 deletions
Large diffs are not rendered by default.

tests/test_js_generator.py

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,18 @@
1-
from typing import Generator
2-
31
import pytest
42

53
from esgvoc_backend import jsg
64
from tests.utils import _test_get, client_factory
75

86
router = jsg.router
97

10-
JSG_PROJECT_IDS = ["cmip6"]
11-
128

139
@pytest.fixture(scope='module')
1410
def client(request):
1511
return client_factory(request, router)
1612

1713

18-
def _provide_get_jsg_project_ids() -> Generator:
19-
for param in JSG_PROJECT_IDS:
20-
yield param
21-
22-
@pytest.fixture(params=_provide_get_jsg_project_ids())
23-
def jsg_project_id(request) -> str:
24-
return request.param
25-
26-
27-
def test_js_generation(client, jsg_project_id) -> None:
28-
url = f'/{jsg_project_id}'
14+
def test_cmip6_js_generation(client) -> None:
15+
project_id = 'cmip6'
16+
url = f'/{project_id}'
2917
json_result = _test_get(client=client, url=url, params=None, select=False, id=None)
3018
assert json_result

tests/test_validation_api.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ def client(request):
1717

1818

1919
def _test_validation(client: httpx.Client, url: str, params: dict,
20-
query: ValidationExpression, check_in_all_projects: bool = False) -> None:
20+
query: ValidationExpression, check_in_collection: bool = False,
21+
check_in_all_projects: bool = False) -> None:
2122
results = client.get(url=url, params=params)
2223
results.raise_for_status()
2324
json_results = results.json()
@@ -26,7 +27,8 @@ def _test_validation(client: httpx.Client, url: str, params: dict,
2627
matching_terms = list()
2728
elif not isinstance(matching_terms, list):
2829
matching_terms = [matching_terms]
29-
check_validation(query, cast(list[MatchingTerm], matching_terms), check_in_all_projects)
30+
check_validation(query, cast(list[MatchingTerm], matching_terms), check_in_collection,
31+
check_in_all_projects)
3032

3133

3234
def test_valid_term_all_projects(client, val_query) -> None:
@@ -38,7 +40,7 @@ def test_valid_term_all_projects(client, val_query) -> None:
3840
def test_valid_term_in_project(client, val_query) -> None:
3941
url = '/term'
4042
params = {'value': val_query.value, 'project_id': val_query.item.project_id}
41-
_test_validation(client=client, url=url, params=params, query=val_query)
43+
_test_validation(client=client, url=url, params=params, query=val_query, check_in_collection=True)
4244

4345

4446
def test_valid_term_in_collection(client, val_query) -> None:

0 commit comments

Comments
 (0)