Skip to content

Feature/m3o dbaas (Sourcery refactored) - #31

Merged
codecakes merged 1 commit into
feature/m3o-dbaasfrom
sourcery/feature/m3o-dbaas
Aug 16, 2022
Merged

codecakes merged 1 commit into
feature/m3o-dbaasfrom
sourcery/feature/m3o-dbaas

Conversation

@sourcery-ai

@sourcery-ai sourcery-ai Bot commented Aug 16, 2022 •

Copy link
Copy Markdown
Contributor

Pull Request #30 refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

NOTE: As code is pushed to the original Pull Request, Sourcery will
re-run and update (force-push) this Pull Request with new refactorings as
necessary. If Sourcery finds no refactorings at any point, this Pull Request
will be closed automatically.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Review changes via command line

To manually merge these changes, make sure you're on the feature/m3o-dbaas branch, then run:

git fetch origin sourcery/feature/m3o-dbaas
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

@sourcery-ai
sourcery-ai Bot requested a review from codecakes August 16, 2022 15:33
@sourcery-ai
sourcery-ai Bot force-pushed the sourcery/feature/m3o-dbaas branch from 5a63820 to e04f921 Compare August 16, 2022 15:33
@sourcery-ai
sourcery-ai Bot force-pushed the sourcery/feature/m3o-dbaas branch from e04f921 to 6bc1430 Compare August 16, 2022 15:49
@sourcery-ai
sourcery-ai Bot force-pushed the sourcery/feature/m3o-dbaas branch from 6bc1430 to 7d1424e Compare August 16, 2022 15:49
# check if unverified hospital exists then return exists error.
if self._record_exists(self.__unverified_tbl, **kwargs):
raise RecordAlreadyExistsError(f"Record already exists.")
raise RecordAlreadyExistsError("Record already exists.")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function M3OHospitalRepoImpl.save_unverified_hospital refactored with the following changes:

# check if unclaimed hospital exists then return exists error.
if self._record_exists(self.__unclaimed_hospital, **kwargs):
raise RecordAlreadyExistsError(f"Record already exists.")
raise RecordAlreadyExistsError("Record already exists.")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function M3OHospitalRepoImpl.save_unclaimed_hospital refactored with the following changes:

@codecakes
codecakes merged commit 656fb48 into feature/m3o-dbaas Aug 16, 2022
@codecakes
codecakes deleted the sourcery/feature/m3o-dbaas branch August 16, 2022 15:50
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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant