-
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
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
89f5de8
Removed unused imports using autoflake.
lmarini c4467c1
Ordered imports using isort.
lmarini 96fa88a
Reformatted using black.
lmarini dfea47f
Setting up pre-commits.
lmarini 81885c1
Ran pre-commit an all files.
lmarini 30ae3c0
Merging main in.
lmarini e4b9817
Merging main in.
lmarini d6d7c8e
Working on creating openapi.json without running backend to be used w…
lmarini 6f79212
Fixed `MUI: The Tabs component doesn't accept a Fragment as a child.`
lmarini 6f925cd
Merge branch 'main' into pre-commit-autoformat
lmarini c41ec91
Fixed runtime error due to replacing `== None` with 'is None'.
lmarini dc64aef
Fixed runtime error due to replacing `== None` with 'is None'.
lmarini ca55602
Automatically generate openapi json file using pre-commit hook.
lmarini 80d05a6
Added codegen precommit hook.
lmarini 9c5c5ab
Setting up prettier and eslint.
lmarini aa77754
First run of prettier.
lmarini 0f095d3
Runnin eslint and prettier as hooks.
lmarini aa73c1a
Skip codegen directories when running eslint and prettier.
lmarini 5643a7c
Fixing merge.
lmarini 94cf050
Flake8 E711 exception. Required for Beanie query to work.
lmarini 2b65b8f
Fixed search_users_prefix codegen stub.
lmarini 043761f
Fixed beanie query for get_dataset_folders.
lmarini 85d641f
Ignore Flake8 E711 since beanie query do not support `is None`.
lmarini File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[flake8] | ||
max-line-length = 180 | ||
extend-ignore = E203, E266, E501, W503, E741, E711 | ||
exclude = .svn,CVS,.bzr,.hg,.git,__pycache__,venv/*,src/*,.rst,build | ||
max-complexity=16 |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,7 @@ jobs: | |
|
||
- name: Publish to NCSA OpenSource | ||
if: | | ||
github.event_name != 'pull_request' | ||
github.event_name != 'pull_request' | ||
&& github.repository == env.MAIN_REPO | ||
uses: bsord/[email protected] | ||
with: | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
repos: | ||
- repo: local | ||
hooks: | ||
- id: extract-openapi | ||
name: extract-openapi | ||
entry: pipenv run extract-openapi | ||
language: system | ||
pass_filenames: false | ||
- repo: local | ||
hooks: | ||
- id: generate-frontend-api-client | ||
name: generate-frontend-api-client | ||
entry: bash -c 'cd frontend && npm run codegen:v2:file' | ||
language: system | ||
pass_filenames: false | ||
- repo: local | ||
hooks: | ||
- id: eslint | ||
name: eslint | ||
entry: bash -c "cd frontend && npx eslint --fix src" | ||
language: system | ||
- repo: local | ||
hooks: | ||
- id: prettier | ||
name: prettier | ||
entry: bash -c "cd frontend && npx prettier src --write" | ||
language: system | ||
- repo: https://github.com/psf/black | ||
rev: 23.11.0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
args: [ "--profile=black" ] | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: check-yaml | ||
exclude: deployments/kubernetes/charts | ||
- id: end-of-file-fixer | ||
exclude: 'openapi.json|frontend/src/openapi/v2/' | ||
- id: trailing-whitespace | ||
exclude: 'openapi.json|frontend/src/openapi/v2/' | ||
- repo: https://github.com/shellcheck-py/shellcheck-py | ||
rev: v0.9.0.6 | ||
hooks: | ||
- id: shellcheck | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 6.1.0 | ||
hooks: | ||
- id: flake8 |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,4 @@ | |
</deployment> | ||
<method v="2" /> | ||
</configuration> | ||
</component> | ||
</component> |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,4 @@ | |
<envs /> | ||
<method v="2" /> | ||
</configuration> | ||
</component> | ||
</component> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,4 @@ | |
<envs /> | ||
<method v="2" /> | ||
</configuration> | ||
</component> | ||
</component> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,4 +21,4 @@ | |
<option name="INPUT_FILE" value="" /> | ||
<method v="2" /> | ||
</configuration> | ||
</component> | ||
</component> |
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
![](docs/source/img/logo_full.png) | ||
![](docs/source/img/logo_full.png) | ||
|
||
# Clowder v2 (In active development) | ||
[![Build Status](https://github.com/clowder-framework/clowder2/actions/workflows/pytest.yml/badge.svg?branch=main)](https://github.com/clowder-framework/clowder2/actions?query=branch%3Amain) | ||
|
@@ -9,8 +9,8 @@ | |
*For the previous version of Clowder, please see [Clowder v1](https://github.com/clowder-framework/clowder).* | ||
|
||
Clowder v2 is a reimagining of the [Clowder research data management system](https://clowderframework.org/) | ||
using a different and newer technology stack. Clowder is a cloud native data management framework to support any | ||
research domain. Clowder was developed to help researchers and scientists in data intensive domains manage raw data, | ||
using a different and newer technology stack. Clowder is a cloud native data management framework to support any | ||
research domain. Clowder was developed to help researchers and scientists in data intensive domains manage raw data, | ||
complex metadata, and automatic data pipelines. | ||
|
||
While the Clowder v1 has worked well over the years, many of the underlying | ||
|
@@ -31,36 +31,36 @@ The v2 documentation is still work in progress. It's available at https://clowde | |
|
||
The v1 documentation is not fully compatible with v2, but it does provide some still relevant information. | ||
It is available at https://clowder-framework.readthedocs.io. | ||
There is a few other documentation links available on the [website](https://clowderframework.org/documentation.html). | ||
There is a few other documentation links available on the [website](https://clowderframework.org/documentation.html). | ||
|
||
## Installation | ||
|
||
The easiest way of running Clowder v2 is checking out the [code](https://github.com/clowder-framework/clowder2) | ||
The easiest way of running Clowder v2 is checking out the [code](https://github.com/clowder-framework/clowder2) | ||
and running `docker compose up` in the main directory. | ||
|
||
Helm charts are available for running Clowder v2 on Kubernetes. See the [helm](https://github.com/clowder-framework/clowder2/tree/main/deployments/kubernetes/charts) directory for more information. | ||
|
||
## Contributing | ||
|
||
We are always looking for contributors. This could be anything from fixing bugs, adding new features, providing new | ||
feature requests, reccomending UI/UX improvements, helping with the documentation, or just testing the system and | ||
We are always looking for contributors. This could be anything from fixing bugs, adding new features, providing new | ||
feature requests, reccomending UI/UX improvements, helping with the documentation, or just testing the system and | ||
providing feedback. Here are a few ways to get started: | ||
|
||
- Join our [Slack](https://join.slack.com/t/clowder-software/shared_invite/zt-4e0vo0sh-YNndJEuLtPGRa7~uIlpcNA) | ||
- Join our [Slack](https://join.slack.com/t/clowder-software/shared_invite/zt-4e0vo0sh-YNndJEuLtPGRa7~uIlpcNA) | ||
channel, introduce yourself, and ask questions about the specific aspects of the system you are interested in. | ||
- Submit an issue (bug or feature request) on the [issue tracker](https://github.com/clowder-framework/clowder2/issues). | ||
- Submit a [pull request](https://github.com/clowder-framework/clowder2/pulls) with a bug fix or new feature. For | ||
- Submit a [pull request](https://github.com/clowder-framework/clowder2/pulls) with a bug fix or new feature. For | ||
larger changes, it's best to open an issue first or ask on Slack to discuss the changes. | ||
- Develop new [information extractors](https://github.com/clowder-framework/pyclowder) and/or visualizations. | ||
|
||
Please follow our [code of conduct](https://github.com/clowder-framework/clowder/blob/develop/CODE_OF_CONDUCT.md) when | ||
Please follow our [code of conduct](https://github.com/clowder-framework/clowder/blob/develop/CODE_OF_CONDUCT.md) when | ||
interacting with the community. | ||
|
||
## Support & Contacts | ||
|
||
The easiest way to get in touch with us is [Slack](https://join.slack.com/t/clowder-software/shared_invite/zt-4e0vo0sh-YNndJEuLtPGRa7~uIlpcNA). | ||
This is a public forum. If you prefer email, you can contact us at [[email protected]](mailto:[email protected]). | ||
This is a public forum. If you prefer email, you can contact us at [[email protected]](mailto:[email protected]). | ||
|
||
## License | ||
|
||
Clowder v2 is licensed under the [Apache 2.0 license](https://github.com/clowder-framework/clowder2/blob/main/LICENSE). | ||
Clowder v2 is licensed under the [Apache 2.0 license](https://github.com/clowder-framework/clowder2/blob/main/LICENSE). |
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
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