-
Notifications
You must be signed in to change notification settings - Fork 201
Allow Mockgun to load data from a production sever #197
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
base: master
Are you sure you want to change the base?
Conversation
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`.
I think it's all going to fail because it is missing the "tests/config" file. Where do I get such a file? |
Bump? |
How come this has never been resolved? Such a good feature! |
¯\_(ツ)_/¯ |
you have contributed the most to SG-API this year so I thought you could have a look at it @carlos-villavicencio-adsk @julien-lang Would you also feel its a good contribution? |
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 thegenerate_schema
from theshotgun_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