Skip to content

Allow Mockgun to load data from a production sever - #197

Open
Ahuge wants to merge 13 commits into
shotgunsoftware:masterfrom
Ahuge:feature/ah/mockgun_load_data
Open

Allow Mockgun to load data from a production sever#197
Ahuge wants to merge 13 commits into
shotgunsoftware:masterfrom
Ahuge:feature/ah/mockgun_load_data

Conversation

@Ahuge

@Ahuge Ahuge commented May 3, 2019

Copy link
Copy Markdown

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

Ahuge commented May 3, 2019

Copy link
Copy Markdown
Author

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

Ahuge commented Jun 20, 2019

Copy link
Copy Markdown
Author

Bump?

@patrickwolf

patrickwolf commented Mar 12, 2025

Copy link
Copy Markdown

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

How come this has never been resolved? Such a good feature!

@Ahuge

Ahuge commented Mar 12, 2025

Copy link
Copy Markdown
Author

¯\_(ツ)_/¯

@patrickwolf

patrickwolf commented Apr 4, 2025

Copy link
Copy Markdown

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?
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Logged logged to jira

3 participants