-
Notifications
You must be signed in to change notification settings - Fork 6
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
Pre commit autoformat #846
Conversation
hooks: | ||
- id: generate-frontend-api-client | ||
name: generate-frontend-api-client | ||
entry: bash -c 'cd frontend && npm run codegen:v2:file' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the trick that makes this command work without backend running?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh im answering myself...
Is it because the script extract-openapi = "python backend/extract-openapi.py app.main:app"
can generate openapi.json without actually having a running background?
Does that mean I can also update the github action to eliminate all the steps of starting up all docker stacks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Followed the steps and everything works. Approve.
hooks: | ||
- id: generate-frontend-api-client | ||
name: generate-frontend-api-client | ||
entry: bash -c 'cd frontend && npm run codegen:v2:file' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh im answering myself...
Is it because the script extract-openapi = "python backend/extract-openapi.py app.main:app"
can generate openapi.json without actually having a running background?
Does that mean I can also update the github action to eliminate all the steps of starting up all docker stacks?
* Removed unused imports using autoflake. * Ordered imports using isort. * Reformatted using black. * Setting up pre-commits. * Ran pre-commit an all files. * Working on creating openapi.json without running backend to be used with codegen. * Fixed `MUI: The Tabs component doesn't accept a Fragment as a child.` * Fixed runtime error due to replacing `== None` with 'is None'. * Fixed runtime error due to replacing `== None` with 'is None'. * Automatically generate openapi json file using pre-commit hook. * Added codegen precommit hook. * Setting up prettier and eslint. * First run of prettier. * Runnin eslint and prettier as hooks. * Skip codegen directories when running eslint and prettier. * Flake8 E711 exception. Required for Beanie query to work. * Fixed search_users_prefix codegen stub. * Fixed beanie query for get_dataset_folders. * Ignore Flake8 E711 since beanie query do not support `is None`.
* clear more breakpoints and move role to the Details * bump version up * add version to public layout too * update changelog * package json version * Pre commit autoformat (#846) * Removed unused imports using autoflake. * Ordered imports using isort. * Reformatted using black. * Setting up pre-commits. * Ran pre-commit an all files. * Working on creating openapi.json without running backend to be used with codegen. * Fixed `MUI: The Tabs component doesn't accept a Fragment as a child.` * Fixed runtime error due to replacing `== None` with 'is None'. * Fixed runtime error due to replacing `== None` with 'is None'. * Automatically generate openapi json file using pre-commit hook. * Added codegen precommit hook. * Setting up prettier and eslint. * First run of prettier. * Runnin eslint and prettier as hooks. * Skip codegen directories when running eslint and prettier. * Flake8 E711 exception. Required for Beanie query to work. * Fixed search_users_prefix codegen stub. * Fixed beanie query for get_dataset_folders. * Ignore Flake8 E711 since beanie query do not support `is None`. * bump keycloak chart version to 13 so it's using keycloak appversion 20 * update chart lock * add login to github repo * push set to true * revert login to github repo * version updates * revert * no v in the appVersion * change to make keycloak point to external url (#942) * 929 message on empty page if there is no datasets (#930) * basic message, need to improve * adding a login or register button * removing buttons * links to login or register if no public datasets * changing text * srink the version and align to left (#950) * moved key to grid instead of card * adding admin mode to the authwrapper (#951) * Fixed dataset parameters. They weren't being included in rabbtimq message. (#957) * fix extractor bugs and deployment script bug (#958) * Use --host 0.0.0.0 when running uvicorn to make backend listen on host IP. * fix missing add metadata button on dataset pycharm was complaining about missing publicView boolean in DisplayMetadata * Drag and Drop One or More Files (#935) * initial commit, add dependency, new class will eventually combine all file uploads * working on adding upload drag and drop * page does not load * drag and drop does not actually work * addign fileinputdrop as independent component * add fileupload drop inside uploadfiledraganddrop * drag and drop does not add files select selects files but misses the first one * drag and drop works now, is overwritten if file selected using button, need to fix * uploads but overwrites, need to fix * works for the select, need to fix other * should work for drop now too * was not an array * delete icon works removing console logs * drag and drop and select means other upload methods no longer needed * removing text in drag and drop * added to styles but not using because it does not work * some changes, not sure how to do rest * fix button * return to dataset * remove unnecessary imports --------- Co-authored-by: Chen Wang <[email protected]> * precommits --------- Co-authored-by: Luigi Marini <[email protected]> Co-authored-by: Todd Nicholson <[email protected]> Co-authored-by: toddn <[email protected]>
This PR introduces pre-commit hooks to run:
To setup install python library with
pipenv install
and setup hooks withpre-commit install
.NOTE: once in place, hooks are in the
.git
directory and will be run on any branch. They can be removed withpre-commit uninstall
or by skipping them when git commit with--no-verify
.Use
pre-commit run --all-files
to run them before committing.