Skip to content

Commit b2c873a

Browse files
authored
♻️ Maintenance/minor changes on testing on overall repo (ITISFoundation#3348)
1 parent 3147837 commit b2c873a

File tree

99 files changed

+150
-548
lines changed

Some content is hidden

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

99 files changed

+150
-548
lines changed

CITATION.cff

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ authors:
4949
- given-names: Alexandre
5050
family-names: Allexandre
5151
affiliation: "IT'IS Foundation"
52+
- given-names: Colin
53+
family-names: Rawlings
5254
- given-names: Tobias
5355
family-names: Oetiker
5456
affiliation: "OETIKER+PARTNER AG"

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
<!-- NOTE: when branched replace `master` in urls -->
99
[![Code style: black]](https://github.com/psf/black)
1010
[![Requires.io]](https://requires.io/github/ITISFoundation/osparc-simcore/requirements/?branch=master "State of third party python dependencies")
11-
<!-- [![travis-ci]](https://travis-ci.org/ITISFoundation/osparc-simcore "State of CI: build, test and pushing images") Commented until #2029 is resolved-->
1211
[![Github-CI Push/PR]](https://github.com/ITISFoundation/osparc-simcore/actions?query=workflow%3A%22Github-CI+Push%2FPR%22+branch%3Amaster)
1312
[![codecov](https://codecov.io/gh/ITISFoundation/osparc-simcore/branch/master/graph/badge.svg?token=h1rOE8q7ic)](https://codecov.io/gh/ITISFoundation/osparc-simcore)
1413
[![github.io]](https://itisfoundation.github.io/)
@@ -18,15 +17,18 @@
1817

1918
<!-- ADD HERE ALL BADGE URLS. Use https://shields.io/ -->
2019
[Code style: black]:https://img.shields.io/badge/code%20style-black-000000.svg
21-
[Requires.io]:https://img.shields.io/requires/github/ITISFoundation/osparc-simcore.svg?branch=master
22-
[travis-ci]:https://travis-ci.org/ITISFoundation/osparc-simcore.svg?branch=master
20+
[Requires.io]:https://requires.io/github/ITISFoundation/osparc-simcore/requirements.svg?branch=master
2321
[github.io]:https://img.shields.io/website-up-down-green-red/https/itisfoundation.github.io.svg?label=documentation
2422
[itis.dockerhub]:https://img.shields.io/website/https/hub.docker.com/u/itisfoundation.svg?down_color=red&label=dockerhub%20repos&up_color=green
2523
[license]:https://img.shields.io/github/license/ITISFoundation/osparc-simcore
2624
[Github-CI Push/PR]:https://github.com/ITISFoundation/osparc-simcore/workflows/Github-CI%20Push/PR/badge.svg
25+
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ITISFoundation_osparc-simcore&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=ITISFoundation_osparc-simcore)
2726
<!------------------------------------------------------>
2827

2928

29+
30+
31+
3032
The SIM-CORE, named **o<sup>2</sup>S<sup>2</sup>PARC****O**pen **O**nline **S**imulations for **S**timulating **P**eripheral **A**ctivity to **R**elieve **C**onditions – is one of the three integrative cores of the SPARC program’s Data Resource Center (DRC).
3133
The aim of o<sup>2</sup>S<sup>2</sup>PARC is to establish a comprehensive, freely accessible, intuitive, and interactive online platform for simulating peripheral nerve system neuromodulation/ stimulation and its impact on organ physiology in a precise and predictive manner.
3234
To achieve this, the platform will comprise both state-of-the art and highly detailed animal and human anatomical models with realistic tissue property distributions that make it possible to perform simulations ranging from the molecular scale up to the complexity of the human body.

api/tests/test_conventions_openapi.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
CONVERTED_SUFFIX = "-converted.yaml"
1717

1818

19-
# TESTS ----------------------------------------------------------
2019
# NOTE: parametrizing tests per file makes more visible which file failed
2120
# NOTE: to debug use the wildcard and select problematic file, e.g. list_files_in_api_specs("*log_message.y*ml"))
2221

api/tests/test_full_openapis.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from openapi_spec_validator.exceptions import OpenAPIValidationError
66
from utils import is_openapi_schema, list_files_in_api_specs, load_specs
77

8-
# TESTS ----------------------------------------------------------
98
# NOTE: parametrizing tests per file makes more visible which file failed
109
# NOTE: to debug use the wildcard and select problematic file, e.g. list_files_in_api_specs("*log_message.y*ml"))
1110

api/tests/test_individual_json_schemas.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from utils import is_json_schema, list_files_in_api_specs, load_specs
66

77

8-
# TESTS ----------------------------------------------------------
98
# NOTE: parametrizing tests per file makes more visible which file failed
109
# NOTE: to debug use the wildcard and select problematic file, e.g. list_files_in_api_specs("*log_message.y*ml"))
1110
@pytest.mark.skip(reason="Implementing in PR 324")

api/tests/test_individual_openapi_schemas.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ def converted_specs_testdir(api_specs_dir, all_api_specs_tails, tmpdir_factory):
136136
return testdir
137137

138138

139-
# TESTS ----------------------------------------------------------
140139
@pytest.mark.skip(reason="Implementing in PR 324")
141140
def test_valid_individual_openapi_specs(api_specs_tail, converted_specs_testdir):
142141
# NOTE: api_specs_tail is a parametrized **fixture**

api/tests/test_repo_data.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ def project_schema(request, api_specs_dir):
5454
return _load_data(schema_path)
5555

5656

57-
# TESTS --------------------------------------------------
58-
59-
6057
@pytest.mark.parametrize("data_path", PROJECTS_PATHS)
6158
def test_project_against_schema(data_path, project_schema, this_repo_root_dir):
6259
"""

packages/models-library/tests/test_utils_pydantic_models_factory.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# pylint: disable=unused-variable
55

66
import json
7-
from typing import Callable, Dict, Optional
7+
from typing import Callable, Optional
88

99
import pytest
1010
from faker import Faker
@@ -19,8 +19,6 @@
1919
from pydantic.types import PositiveInt
2020
from yarl import URL
2121

22-
# HELPERS ---------------------------------------------------------------
23-
2422

2523
def assert_same_fields(model_cls, reference_model_cls):
2624

@@ -33,7 +31,7 @@ def assert_same_fields(model_cls, reference_model_cls):
3331
assert got_fields == expected_fields
3432

3533

36-
def _trim_descriptions(schema: Dict):
34+
def _trim_descriptions(schema: dict):
3735
data = {}
3836
for key in schema:
3937
if key not in ("description", "title"):
@@ -171,9 +169,6 @@ class UserListItem(BaseModel):
171169
# parses from User
172170

173171

174-
# FIXTURES ---------------------------------------------------------------
175-
176-
177172
@pytest.fixture
178173
def fake_user(faker: Faker) -> User:
179174
"""a fake domain model of a User resource"""
@@ -185,9 +180,6 @@ def fake_user(faker: Faker) -> User:
185180
)
186181

187182

188-
# TESTS ------------------------------------------------------------------
189-
190-
191183
def test_build_UserCreate_model():
192184
# In UserCreate, we exclude the primary key
193185
_BaseUserCreate = copy_model(
@@ -264,7 +256,7 @@ def test_build_UserGet_model(fake_user: User):
264256

265257
assert _trim_descriptions(UserGet.schema()) == _trim_descriptions(_UserGet.schema())
266258

267-
payload_user: Dict = (
259+
payload_user: dict = (
268260
Envelope[_UserGet].parse_data(fake_user).dict(exclude_unset=True)
269261
)
270262

packages/pytest-simcore/src/pytest_simcore/docker_compose.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,6 @@ def pytest_sessionfinish(session: pytest.Session, exitstatus: ExitCode) -> None:
325325
_save_docker_logs_to_folder(failed_test_directory)
326326

327327

328-
# HELPERS ---------------------------------------------
329-
330-
331328
def _minio_fix(service_environs: dict) -> dict:
332329
"""this hack ensures that S3 is accessed from the host at all time, thus pre-signed links work."""
333330
if "S3_ENDPOINT" in service_environs:

packages/pytest-simcore/src/pytest_simcore/docker_swarm.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@
2929
log = logging.getLogger(__name__)
3030

3131

32-
# HELPERS --------------------------------------------------------------------------------
33-
34-
3532
class _ResourceStillNotRemoved(Exception):
3633
pass
3734

@@ -142,9 +139,6 @@ def _fetch_and_print_services(
142139
print(json.dumps({"service": service, "tasks": tasks}, indent=1))
143140

144141

145-
# FIXTURES --------------------------------------------------------------------------------
146-
147-
148142
@pytest.fixture(scope="session")
149143
def docker_client() -> Iterator[docker.client.DockerClient]:
150144
client = docker.from_env()

0 commit comments

Comments
 (0)