Allow Mockgun to load data from a production sever#197
Open
Ahuge wants to merge 13 commits intoshotgunsoftware:masterfrom
Open
Allow Mockgun to load data from a production sever#197Ahuge wants to merge 13 commits intoshotgunsoftware:masterfrom
Ahuge wants to merge 13 commits intoshotgunsoftware:masterfrom
Conversation
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`.
Author
|
I think it's all going to fail because it is missing the "tests/config" file. Where do I get such a file? |
Author
|
Bump? |
How come this has never been resolved? Such a good feature! |
Author
|
¯\_(ツ)_/¯ |
|
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.pyIt follows a similar structure to the SchemaFactory.
I also provide a new mockgun interface to
generate_datawhich also mimics thegenerate_schemafrom theshotgun_api3/lib/mockgun/schema.pyfile.This is my first PR to shotgunsoftware I think so let me know if I need to sign some contribution agreement.
Thanks