Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

G3 109 implement the register sso user in the geneweaver db package #12

Conversation

bergsalex
Copy link
Collaborator

This PR makes it so that a user who authenticates will be registered in the database as long as they have valid credentials.

Copy link

github-actions bot commented Jan 16, 2024

Test Coverage Report

============================= test session starts ==============================
platform linux -- Python 3.11.7, pytest-7.4.4, pluggy-1.3.0
rootdir: /home/runner/work/geneweaver-api/geneweaver-api
plugins: asyncio-0.21.1, anyio-4.2.0, cov-4.1.0
asyncio: mode=Mode.STRICT
collected 23 items

tests/controllers/test_genesets.py ...                                   [ 13%]
tests/services/test_genset.py .....                                      [ 34%]
tests/services/io/test_read_file_contents.py ...............             [100%]

=============================== warnings summary ===============================
tests/controllers/conftest.py:13
  /home/runner/work/geneweaver-api/geneweaver-api/tests/controllers/conftest.py:13: DeprecationWarning: read_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
    str_json = importlib.resources.read_text("tests.data", "response_geneset_1234.json")

../../../../../opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/importlib/resources/_legacy.py:80
../../../../../opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/importlib/resources/_legacy.py:80
  /opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/importlib/resources/_legacy.py:80: DeprecationWarning: open_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
    with open_text(package, resource, encoding, errors) as fp:

tests/services/test_genset.py:13
  /home/runner/work/geneweaver-api/geneweaver-api/tests/services/test_genset.py:13: DeprecationWarning: read_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
    str_json = importlib.resources.read_text("tests.data", "response_geneset_1234.json")

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

---------- coverage: platform linux, python 3.11.7-final-0 -----------
Name                                            Stmts   Miss  Cover
-------------------------------------------------------------------
src/geneweaver/api/__init__.py                      0      0   100%
src/geneweaver/api/controller/__init__.py           0      0   100%
src/geneweaver/api/controller/api.py                9      0   100%
src/geneweaver/api/controller/batch.py             12      3    75%
src/geneweaver/api/controller/genesets.py          26      5    81%
src/geneweaver/api/controller/message.py            2      0   100%
src/geneweaver/api/controller/search.py             0      0   100%
src/geneweaver/api/core/__init__.py                 0      0   100%
src/geneweaver/api/core/config.py                   2      0   100%
src/geneweaver/api/core/config_class.py            27      1    96%
src/geneweaver/api/core/db.py                       0      0   100%
src/geneweaver/api/core/deps.py                     3      0   100%
src/geneweaver/api/core/exceptions.py              10      3    70%
src/geneweaver/api/core/security.py               116     74    36%
src/geneweaver/api/dependencies.py                 24     12    50%
src/geneweaver/api/main.py                          1      0   100%
src/geneweaver/api/schemas/__init__.py              0      0   100%
src/geneweaver/api/schemas/auth.py                 19      0   100%
src/geneweaver/api/schemas/batch.py                 6      0   100%
src/geneweaver/api/schemas/messages.py             18      0   100%
src/geneweaver/api/schemas/score.py                13     13     0%
src/geneweaver/api/services/__init__.py             0      0   100%
src/geneweaver/api/services/batch.py               13     13     0%
src/geneweaver/api/services/geneset.py             25      0   100%
src/geneweaver/api/services/io.py                   4      0   100%
src/geneweaver/api/services/parse/__init__.py       0      0   100%
src/geneweaver/api/services/parse/batch.py         11      5    55%
src/geneweaver/api/services/pubmeds.py              0      0   100%
-------------------------------------------------------------------
TOTAL                                             341    129    62%
Coverage HTML written to dir htmlcov

Required test coverage of 60% reached. Total coverage: 62.17%
======================== 23 passed, 4 warnings in 1.82s ========================

@bergsalex bergsalex temporarily deployed to jax-cluster-dev-10--dev January 16, 2024 21:11 — with GitHub Actions Inactive
@bergsalex bergsalex temporarily deployed to jax-cluster-dev-10--dev January 16, 2024 21:20 — with GitHub Actions Inactive
@bergsalex bergsalex merged commit c9a533e into main Jan 16, 2024
7 checks passed
@bergsalex bergsalex deleted the G3-109-implement-the-register-sso-user-in-the-geneweaver-db-package branch February 6, 2024 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants