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

Allow Mockgun to load data from a production sever #197

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

Ahuge
Copy link

@Ahuge Ahuge commented May 3, 2019

This PR is designed to add additional support for Mockgun allowing me to load a local database cache with data from my production server.

I do this by introducing a new module shotgun_api3/lib/mockgun/data.py
It follows a similar structure to the SchemaFactory.

I also provide a new mockgun interface to generate_data which also mimics the generate_schema from the shotgun_api3/lib/mockgun/schema.py file.

This is my first PR to shotgunsoftware I think so let me know if I need to sign some contribution agreement.

Thanks

Alex added 12 commits May 3, 2019 12:27
The idea is that we will be able to serialize our database into a mockgun-able format.

We have a "database_path" like the schema_paths.
Just has a bunch of the default projects from a shotgun site setup.
Also git add the database pickle
DatabaseFactory allows us to load the database from disk into memory
generate_data works the same as `generate_schema` but allows an `entity_subset`
Also bugfixes confirming that the client has set the schema paths first.
The functionality now lives on the DatabaseFactory as `set_database`.
@Ahuge
Copy link
Author

Ahuge commented May 3, 2019

I think it's all going to fail because it is missing the "tests/config" file.

Where do I get such a file?

@pscadding pscadding added the Logged logged to jira label May 17, 2019
@Ahuge
Copy link
Author

Ahuge commented Jun 20, 2019

Bump?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Logged logged to jira
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants