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

Feature/di stub api #28

Merged
merged 20 commits into from Aug 15, 2022
Merged

Feature/di stub api #28

merged 20 commits into from Aug 15, 2022

Conversation

codecakes
Copy link
Contributor

Adds working api functionality using a dummy database.

This feature branch introduces some crucial updates to develop branch :

TODO:

  • Real database adapter.
  • Temporarily locks in .venv as virtualenv until workaround found.

@codecakes codecakes self-assigned this Aug 6, 2022
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Aug 6, 2022

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 3.43%.

Quality metrics Before After Change
Complexity 1.12 ⭐ 0.85 ⭐ -0.27 👍
Method Length 36.00 ⭐ 34.58 ⭐ -1.42 👍
Working memory 5.32 ⭐ 4.43 ⭐ -0.89 👍
Quality 85.97% 89.40% 3.43% 👍
Other metrics Before After Change
Lines 181 231 50
Changed files Quality Before Quality After Quality Change
registrations/domain/hospital/registration.py 88.98% ⭐ 88.98% ⭐ 0.00%
registrations/infrastructure/adapters/api/app.py 78.92% ⭐ 87.40% ⭐ 8.48% 👍
registrations/infrastructure/adapters/api/di_builder.py % 96.67% ⭐ %

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!

@codecakes codecakes added documentation Improvements or additions to documentation enhancement New feature or request infrastructure refactor labels Aug 6, 2022
@codecakes codecakes marked this pull request as ready for review August 6, 2022 00:31
@codecakes codecakes requested a review from a team August 6, 2022 00:38
start.sh Show resolved Hide resolved
@codecakes codecakes requested a review from nlinde August 15, 2022 17:06
@codecakes codecakes linked an issue Aug 15, 2022 that may be closed by this pull request
@codecakes codecakes merged commit bb9760d into develop Aug 15, 2022
@codecakes codecakes deleted the feature/di-stub-api branch August 15, 2022 18:24
@codecakes codecakes added the stub-api dummy demo stub label Aug 15, 2022
codecakes added a commit that referenced this pull request Aug 16, 2022
* updated Structure of core project

* smaller header style

* added geolocation and added_since fields. added application service test case for added_since

* Format code with black and isort

* commented description on complex regex string

* added mypy to poetry, updated precommit. refactored and updates fastapi adapter with dummy repos module to test api calls. ignoring [no-any-unimported] for starlette Request

* no need of requirements file. updated pre-commit mypy to resolve to modules in python executable and mypy config set to pyproject.toml. update mypy ignore in app.py

* updated readme to add poetry.toml; this is not extensively documented. this is needed to set within project scope virtualenv. this allows setting virtualenv and installing poetry packages locally.

* Format code with black and isort

* shortened command is easier to reproduce, port and build in CI on external deployment services

* adding another dockerfile that works as image for cloud run. updating cors middleware on app server

* Format code with black and isort

* Add a shebang or a 'shell' directive.

* error when it errs

* Format code with black and isort

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
codecakes added a commit that referenced this pull request Aug 19, 2022
* updated Structure of core project

* smaller header style

* added geolocation and added_since fields. added application service test case for added_since

* Format code with black and isort

* commented description on complex regex string

* added mypy to poetry, updated precommit. refactored and updates fastapi adapter with dummy repos module to test api calls. ignoring [no-any-unimported] for starlette Request

* no need of requirements file. updated pre-commit mypy to resolve to modules in python executable and mypy config set to pyproject.toml. update mypy ignore in app.py

* updated readme to add poetry.toml; this is not extensively documented. this is needed to set within project scope virtualenv. this allows setting virtualenv and installing poetry packages locally.

* Format code with black and isort

* shortened command is easier to reproduce, port and build in CI on external deployment services

* adding another dockerfile that works as image for cloud run. updating cors middleware on app server

* Format code with black and isort

* Add a shebang or a 'shell' directive.

* error when it errs

* Format code with black and isort

* WIP:: added m3o dbaas support. Need to implement several TODOs/

* updated repo and parse_to_dict function

* refactored hospital_dict

* updated exception RecordAlreadyExistsError to fastapi

* Format code with black and isort

* clean cache use apt-get

* Feature/di stub api (#28)

* updated Structure of core project

* smaller header style

* added geolocation and added_since fields. added application service test case for added_since

* Format code with black and isort

* commented description on complex regex string

* added mypy to poetry, updated precommit. refactored and updates fastapi adapter with dummy repos module to test api calls. ignoring [no-any-unimported] for starlette Request

* no need of requirements file. updated pre-commit mypy to resolve to modules in python executable and mypy config set to pyproject.toml. update mypy ignore in app.py

* updated readme to add poetry.toml; this is not extensively documented. this is needed to set within project scope virtualenv. this allows setting virtualenv and installing poetry packages locally.

* Format code with black and isort

* shortened command is easier to reproduce, port and build in CI on external deployment services

* adding another dockerfile that works as image for cloud run. updating cors middleware on app server

* Format code with black and isort

* Add a shebang or a 'shell' directive.

* error when it errs

* Format code with black and isort

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* Format code with black and isort

* 'Refactored by Sourcery' (#31)

Co-authored-by: Sourcery AI <>

* Format code with black and isort

* dockerfile refactors. added and refactored functionality in api, uses bootstrap.py and di_builder. updated logic in m3o repo.

* added TODO

* Format code with black and isort

* add as interface

* updated docker compose to have necessary local development env vars

* Format code with black and isort

* deleted obsolete files

* fix DOCUMENTATION_API typo

* prod and test version if else

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request infrastructure refactor stub-api dummy demo stub
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

deploy to google cloud run
2 participants