nci-cidc-api-modules 1.0.1__tar.gz → 1.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. {nci_cidc_api_modules-1.0.1/nci_cidc_api_modules.egg-info → nci_cidc_api_modules-1.0.2}/PKG-INFO +7 -7
  2. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2/nci_cidc_api_modules.egg-info}/PKG-INFO +7 -7
  3. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2}/nci_cidc_api_modules.egg-info/requires.txt +6 -6
  4. nci_cidc_api_modules-1.0.2/pyproject.toml +67 -0
  5. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2}/requirements.modules.txt +6 -7
  6. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2}/setup.py +1 -1
  7. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2}/tests/test_api.py +8 -11
  8. nci_cidc_api_modules-1.0.1/pyproject.toml +0 -8
  9. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2}/LICENSE +0 -0
  10. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2}/MANIFEST.in +0 -0
  11. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2}/README.md +0 -0
  12. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2}/cidc_api/config/__init__.py +0 -0
  13. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2}/cidc_api/config/db.py +0 -0
  14. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2}/cidc_api/config/logging.py +0 -0
  15. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2}/cidc_api/config/secrets.py +0 -0
  16. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2}/cidc_api/config/settings.py +0 -0
  17. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2}/cidc_api/csms/__init__.py +0 -0
  18. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2}/cidc_api/csms/auth.py +0 -0
  19. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2}/cidc_api/models/__init__.py +0 -0
  20. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2}/cidc_api/models/csms_api.py +0 -0
  21. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2}/cidc_api/models/files/__init__.py +0 -0
  22. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2}/cidc_api/models/files/details.py +0 -0
  23. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2}/cidc_api/models/files/facets.py +0 -0
  24. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2}/cidc_api/models/migrations.py +0 -0
  25. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2}/cidc_api/models/models.py +0 -0
  26. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2}/cidc_api/models/schemas.py +0 -0
  27. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2}/cidc_api/shared/__init__.py +0 -0
  28. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2}/cidc_api/shared/auth.py +0 -0
  29. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2}/cidc_api/shared/emails.py +0 -0
  30. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2}/cidc_api/shared/gcloud_client.py +0 -0
  31. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2}/cidc_api/shared/rest_utils.py +0 -0
  32. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2}/nci_cidc_api_modules.egg-info/SOURCES.txt +0 -0
  33. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2}/nci_cidc_api_modules.egg-info/dependency_links.txt +0 -0
  34. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2}/nci_cidc_api_modules.egg-info/not-zip-safe +0 -0
  35. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2}/nci_cidc_api_modules.egg-info/top_level.txt +0 -0
  36. {nci_cidc_api_modules-1.0.1 → nci_cidc_api_modules-1.0.2}/setup.cfg +0 -0
@@ -1,16 +1,16 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nci_cidc_api_modules
3
- Version: 1.0.1
3
+ Version: 1.0.2
4
4
  Summary: SQLAlchemy data models and configuration tools used in the NCI CIDC API
5
5
  Home-page: https://github.com/NCI-CIDC/cidc-api-gae
6
6
  License: MIT license
7
7
  Requires-Python: >=3.9
8
8
  Description-Content-Type: text/markdown
9
9
  License-File: LICENSE
10
- Requires-Dist: werkzeug==2.0.3
11
- Requires-Dist: flask~=2.0.3
10
+ Requires-Dist: werkzeug==2.3.8
11
+ Requires-Dist: flask==2.2.5
12
12
  Requires-Dist: flask-migrate==2.5.2
13
- Requires-Dist: flask-sqlalchemy~=2.4.0
13
+ Requires-Dist: flask-sqlalchemy==2.5.1
14
14
  Requires-Dist: sqlalchemy~=1.3.0
15
15
  Requires-Dist: marshmallow==3.19.0
16
16
  Requires-Dist: marshmallow-sqlalchemy==0.22.3
@@ -21,9 +21,9 @@ Requires-Dist: google-cloud-bigquery==3.3.5
21
21
  Requires-Dist: google-api-python-client==2.64.0
22
22
  Requires-Dist: pandas<2,>=1
23
23
  Requires-Dist: python-dotenv==0.10.3
24
- Requires-Dist: requests==2.22.0
25
- Requires-Dist: jinja2~=3.0.3
26
- Requires-Dist: nci-cidc-schemas~=0.26.28
24
+ Requires-Dist: requests==2.31.0
25
+ Requires-Dist: jinja2==3.1.3
26
+ Requires-Dist: nci-cidc-schemas==0.26.29
27
27
 
28
28
  # NCI CIDC API <!-- omit in TOC -->
29
29
 
@@ -1,16 +1,16 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nci_cidc_api_modules
3
- Version: 1.0.1
3
+ Version: 1.0.2
4
4
  Summary: SQLAlchemy data models and configuration tools used in the NCI CIDC API
5
5
  Home-page: https://github.com/NCI-CIDC/cidc-api-gae
6
6
  License: MIT license
7
7
  Requires-Python: >=3.9
8
8
  Description-Content-Type: text/markdown
9
9
  License-File: LICENSE
10
- Requires-Dist: werkzeug==2.0.3
11
- Requires-Dist: flask~=2.0.3
10
+ Requires-Dist: werkzeug==2.3.8
11
+ Requires-Dist: flask==2.2.5
12
12
  Requires-Dist: flask-migrate==2.5.2
13
- Requires-Dist: flask-sqlalchemy~=2.4.0
13
+ Requires-Dist: flask-sqlalchemy==2.5.1
14
14
  Requires-Dist: sqlalchemy~=1.3.0
15
15
  Requires-Dist: marshmallow==3.19.0
16
16
  Requires-Dist: marshmallow-sqlalchemy==0.22.3
@@ -21,9 +21,9 @@ Requires-Dist: google-cloud-bigquery==3.3.5
21
21
  Requires-Dist: google-api-python-client==2.64.0
22
22
  Requires-Dist: pandas<2,>=1
23
23
  Requires-Dist: python-dotenv==0.10.3
24
- Requires-Dist: requests==2.22.0
25
- Requires-Dist: jinja2~=3.0.3
26
- Requires-Dist: nci-cidc-schemas~=0.26.28
24
+ Requires-Dist: requests==2.31.0
25
+ Requires-Dist: jinja2==3.1.3
26
+ Requires-Dist: nci-cidc-schemas==0.26.29
27
27
 
28
28
  # NCI CIDC API <!-- omit in TOC -->
29
29
 
@@ -1,7 +1,7 @@
1
- werkzeug==2.0.3
2
- flask~=2.0.3
1
+ werkzeug==2.3.8
2
+ flask==2.2.5
3
3
  flask-migrate==2.5.2
4
- flask-sqlalchemy~=2.4.0
4
+ flask-sqlalchemy==2.5.1
5
5
  sqlalchemy~=1.3.0
6
6
  marshmallow==3.19.0
7
7
  marshmallow-sqlalchemy==0.22.3
@@ -12,6 +12,6 @@ google-cloud-bigquery==3.3.5
12
12
  google-api-python-client==2.64.0
13
13
  pandas<2,>=1
14
14
  python-dotenv==0.10.3
15
- requests==2.22.0
16
- jinja2~=3.0.3
17
- nci-cidc-schemas~=0.26.28
15
+ requests==2.31.0
16
+ jinja2==3.1.3
17
+ nci-cidc-schemas==0.26.29
@@ -0,0 +1,67 @@
1
+ [tool.black]
2
+ exclude = "migrations"
3
+ target-version = ["py36"]
4
+
5
+ [tool.pytest.ini_options]
6
+ minversion = "6.0"
7
+ # configure a webdriver for testing Dash dashboards
8
+ # addopts = "--webdriver Chrome --headless"
9
+
10
+ [tool.poetry]
11
+ name = "cidc-api-gae"
12
+ version = "1.0.2"
13
+ description = ""
14
+ authors = []
15
+ readme = "README.md"
16
+
17
+ [tool.poetry.dependencies]
18
+ python = ">=3.9,<3.10"
19
+ flask-cors = "3.0.9"
20
+ flask-cachecontrol = "0.3.0"
21
+ six = "1.13.0"
22
+ python-jose = "3.0.1"
23
+ psycopg2-binary = ">=2,<3"
24
+ packaging = "19.2"
25
+ protobuf = "3.20.3"
26
+ gunicorn = "^21.2.0"
27
+ gevent = "23.9.1"
28
+ psycogreen = "1.0.2"
29
+ webargs = "6.0.0"
30
+ dash = "2.15.0"
31
+ markupsafe = "2.1.5"
32
+
33
+ [tool.poetry.group.dev.dependencies]
34
+ pytest = ">=8.0.1,<8.1.0"
35
+ black = "22.3.0"
36
+ pre-commit = "2.9.2"
37
+ ipython = "8.13.0"
38
+ flask-shell-ipython = "0.5.1"
39
+ webdriver-manager = "^4.0.1"
40
+ percy = "2.0.2"
41
+ selenium = "3.141.0"
42
+ bs4 = "0.0.1"
43
+
44
+
45
+ [tool.poetry.group.modules.dependencies]
46
+ werkzeug = "2.3.8"
47
+ flask = "2.2.5"
48
+ flask-migrate = "2.5.2"
49
+ flask-sqlalchemy = "2.5.1"
50
+ sqlalchemy = ">=1.3.0,<1.4.0"
51
+ marshmallow = "3.19.0"
52
+ marshmallow-sqlalchemy = "0.22.3"
53
+ google-cloud-storage = ">=1.35.0,<1.36.0"
54
+ google-cloud-secret-manager = "2.16.2"
55
+ google-cloud-pubsub = "0.43.0"
56
+ google-cloud-bigquery = "3.3.5"
57
+ google-api-python-client = "2.64.0"
58
+ pandas = ">=1,<2"
59
+ python-dotenv = "0.10.3"
60
+ requests = "2.31.0"
61
+ jinja2 = "3.1.3"
62
+ nci-cidc-schemas = "0.26.29"
63
+
64
+ # keep the existing build step
65
+ # [build-system]
66
+ # requires = ["poetry-core"]
67
+ # build-backend = "poetry.core.masonry.api"
@@ -1,7 +1,7 @@
1
- werkzeug==2.0.3
2
- flask~=2.0.3
1
+ werkzeug==2.3.8
2
+ flask==2.2.5
3
3
  flask-migrate==2.5.2
4
- flask-sqlalchemy~=2.4.0
4
+ flask-sqlalchemy==2.5.1
5
5
  sqlalchemy~=1.3.0
6
6
  marshmallow==3.19.0
7
7
  marshmallow-sqlalchemy==0.22.3
@@ -12,7 +12,6 @@ google-cloud-bigquery==3.3.5
12
12
  google-api-python-client==2.64.0
13
13
  pandas>=1,<2
14
14
  python-dotenv==0.10.3
15
- requests==2.22.0
16
- # pin jinja version to resolve cidc-schemas dependency issue
17
- jinja2~=3.0.3
18
- nci-cidc-schemas~=0.26.28
15
+ requests==2.31.0
16
+ jinja2==3.1.3
17
+ nci-cidc-schemas==0.26.29
@@ -1,4 +1,4 @@
1
- """Package up cidc_api/models.py for use in other services."""
1
+ """Bundle up packages from cidc_api for use in other services."""
2
2
 
3
3
  from setuptools import setup
4
4
 
@@ -3,6 +3,7 @@
3
3
  This file doesn't contain tests for methods that don't directly correspond
4
4
  to data resources, like endpoints that handle upload-related functionality.
5
5
  """
6
+
6
7
  import os
7
8
 
8
9
  os.environ["TZ"] = "UTC"
@@ -246,7 +247,7 @@ def test_resource_post(resource, config, cidc_api, clean_db, monkeypatch):
246
247
  item = config["model"].find_by_id(response.json["id"]).__dict__
247
248
  assert_dict_contains(item, config["json"])
248
249
  else:
249
- assert response.status_code == 405
250
+ assert response.status_code == 404
250
251
 
251
252
 
252
253
  @pytest.mark.parametrize("resource, config", resource_requests.items())
@@ -454,6 +455,10 @@ def test_endpoint_urls(cidc_api):
454
455
  "/users/data_access_report",
455
456
  }
456
457
 
458
+ # TODO: remove extra_endpoints_for_tests
459
+ extra_endpoints_for_tests = {"/bad_request", "/key_error"}
460
+ expected_endpoints = expected_endpoints | extra_endpoints_for_tests
461
+
457
462
  # Check that every endpoint included in the API is expected.
458
463
  endpoints = set(
459
464
  [
@@ -465,25 +470,17 @@ def test_endpoint_urls(cidc_api):
465
470
  assert endpoints == expected_endpoints
466
471
 
467
472
 
473
+ # TODO: these tests should be triggered from regular routes
468
474
  def test_exception_handler(clean_cidc_api):
469
475
  """
470
476
  Ensure that the API handles HTTPExceptions in its routes as expected.
471
477
  """
472
- message = "uh oh!"
473
-
474
- @clean_cidc_api.route("/bad_request")
475
- def raise_bad_request():
476
- raise BadRequest(message)
477
-
478
- @clean_cidc_api.route("/key_error")
479
- def raise_key_error():
480
- raise KeyError(message)
481
478
 
482
479
  client = clean_cidc_api.test_client()
483
480
 
484
481
  res = client.get("/bad_request")
485
482
  assert res.status_code == 400
486
- assert res.json == {"_status": "ERR", "_error": {"message": message}}
483
+ assert res.json == {"_status": "ERR", "_error": {"message": "bad_request"}}
487
484
 
488
485
  res = client.get("/key_error")
489
486
  assert res.status_code == 500
@@ -1,8 +0,0 @@
1
- [tool.black]
2
- exclude = "migrations"
3
- target-version = ["py36"]
4
-
5
- [tool.pytest.ini_options]
6
- minversion = "6.0"
7
- # configure a webdriver for testing Dash dashboards
8
- addopts = "--webdriver Chrome --headless"