-
Notifications
You must be signed in to change notification settings - Fork 6
feat: Add --include argument to the model-generate script
#40
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
feat: Add --include argument to the model-generate script
#40
Conversation
* Adds a `--tbl-obj` / `-o` argument to the `model-generate` script * Generates table files for the table(s) specified by the new arg * Tests and documents new functionality * Updates pytest to allow passing more args to the `run_generator` fixture
|
Awesome! Great idea. Happy to merge this. I hear you on the naming, but I don't mind the I am ok with either. So let me know if you like the Also left one feedback thing in the review Thanks again! |
|
Yea, |
|
Awesome! Thanks again. I will merge and release soon. |
--tbl-obj argument to the model-generate script--include argument to the model-generate script
Though tkutcher#40 cuts down on the number of files generated, it did not cut down on the number of times fields for tables were requested. This commit moves the "skip" logic to before the `get_fields_for_table` call. (It also adds pytest-mock in order to test the change.)
Description
As a user with a large QB app who is writing an integration script for just a couple of tables in my app, it doesn't make sense to generate class files for all of the tables in my app. This PR allows users to generate files for only a subset of tables via a new
--includeargument (that can be specified multiple times to allow multiple tables).An ancillary benefit is to minimise the risk of re-running the script on an existing client (as described in #29). A user could decide to update just a single table if they really need the changes to that table and don't want to risk updating the whole app.
--include/-iargument to themodel-generatescriptrun_generatorfixtureChecklist:
devbranch