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/uri based construction #42

Open
wants to merge 10 commits into
base: dev
Choose a base branch
from
Open

Conversation

Kulv3r
Copy link
Contributor

@Kulv3r Kulv3r commented Oct 11, 2019

Per #38

Mikhail Savushkin added 3 commits October 11, 2019 19:06
@Kulv3r Kulv3r requested a review from thorwhalen October 11, 2019 16:16
@Kulv3r
Copy link
Contributor Author

Kulv3r commented Oct 11, 2019

There are persisters that I could not think of a proper way to add uri/collection args:

  • dropbox_w_dropbox
  • dynamodb_w_boto3
  • googledrive_w_pydrive
  • local_files
  • s3_w_boto3

Also, while implementing it, there were persisters with 2 kinds of URI param - as a string like https://username:[email protected]:5984/, or as a dict like:

dict(
  conn_protocol='tcp',
  host='localhost',
  port='1433',
  db_username='SA',
  db_pass='Admin123x',
  db_name='py2store',
)

And I feel concerned about this. 2 types, not consistent. Maybe convert string-typed URIs to dict ones also. Would be more complex to use, but more consistent overall.

Copy link
Member

@thorwhalen thorwhalen left a comment

Choose a reason for hiding this comment

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

What we talked about during our chat...

files_list_folder_kwargs=None, rev=None):
def __init__(
self,
rootdir,
Copy link
Member

Choose a reason for hiding this comment

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

rootdir? Or uri?

data_fields=None,
):
db_name = uri.pop('db_name')
self._mongo_client = MongoClient(**uri)
Copy link
Member

Choose a reason for hiding this comment

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

It seems like old interface is broken with this. Need to either change all usages of MongoPersister, or handle the case where uri is db_name. I'll look into this myself, but note this effect for other persisters you take care of.

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.

2 participants