Skip to content

feat: register MongoDB - #37

Merged
uniqueg merged 3 commits into
devfrom
db
May 25, 2020
Merged

uniqueg merged 3 commits into
devfrom
db

Conversation

@sarthakgupta072

@sarthakgupta072 sarthakgupta072 commented May 25, 2020 •

Copy link
Copy Markdown
Member

Description

register_mongodb.py module in various service have two functions namely create_mongo_client and register_mongodb.

On some analysis it can be seen that, create_mongo_client function can be used for any service. But register_mongodb is specific to each service because it involves creating a database and collections which are specific to each service.

Closes #10

Along with this change, there are some style changes in some previously written tests to follow PEP-257

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • Style Changes

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have not reduced the existing code coverage

@sarthakgupta072
sarthakgupta072 requested a review from uniqueg May 25, 2020 12:34
@uniqueg uniqueg changed the title feat: add register_mongodb module with function create_mongo_client feat: register MongoDB May 25, 2020
@uniqueg

uniqueg commented May 25, 2020

Copy link
Copy Markdown
Member

This looks fine, but I think it shouldn't be too hard to generalize the register_mongodb() function. Let me give it shot :-)

@uniqueg
uniqueg merged commit 8ce8d7c into dev May 25, 2020
@uniqueg
uniqueg deleted the db branch May 25, 2020 17:48
uniqueg added a commit that referenced this pull request Jul 3, 2020
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.

Add database module(s) with unit tests

2 participants