-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix proxy and redirects for globus auth on docker compose * Various lint and test fixes * Update yarn.lock * Some changes made to try and get globus transfers working. * Update docs to match new config (#707) * Updated the local config file used for local testing. The new file .local_config, contains the configuration used when running Metagrid locally. Updated the manage_metagrid script to run Metagrid from the single docker-compose file. Updated some settings to use llnl instead of ornl for local development and testing. Removed some unused environment variable files after after testing that they aren't used. Left the default variables in place because Metagrid fails to build when several of the defaults aren't set, still working to troubeshoot why. Globus transfer steps in the front-end are working, however transfers seem to fail and need to be resolved. * Switch from CRA to Vite and clean up tests (#692) * Switch from CRA to Vite and clean up tests * Fixed issue with loading screen continuing even after cancel button click. Updated local test config. Globus transfers still not working. --------- Co-authored-by: Zach Price <[email protected]> Co-authored-by: downiec <[email protected]> * Fix proxy and redirects for globus auth on docker compose * Various lint and test fixes * Update yarn.lock * Some changes made to try and get globus transfers working. * Update docs to match new config Auto generate configuration documentation with pre-commit hooks * Revert yarn.lock, fix more tests * Includes some updates and minor fixes so that everything builds and runs correctly. Removed the GLOBUS_REDIRECT setting and did some cleanup of the manage_metagrid.sh functions. * Updated the test files to no longer use the act() functions, as they are deprecated. Cleaned up and fixed some failing tests. * Fix esgsearch json tests * Minor test fixes to see if tests will pass on github (they pass locally). --------- Co-authored-by: downiec <[email protected]> Co-authored-by: Zach Price <[email protected]> --------- Co-authored-by: Zach Price <[email protected]> Co-authored-by: bstrdsmkr <[email protected]>
- Loading branch information
1 parent
18ba9dc
commit aa5a775
Showing
103 changed files
with
4,498 additions
and
7,401 deletions.
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
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 |
---|---|---|
|
@@ -183,6 +183,7 @@ tags | |
.env | ||
.envs/* | ||
!.envs/.local/ | ||
docker-compose.*-overlay.yml | ||
|
||
# Documentation artifacts | ||
docs/site | ||
|
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,44 +1,81 @@ | ||
exclude: "docs|node_modules|migrations|.git|.tox" | ||
default_stages: [commit] | ||
default_stages: [ commit ] | ||
fail_fast: true | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v5.0.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v5.0.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
|
||
# Back-end | ||
# ------------------------------------------------------------------------------ | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: 7.1.1 | ||
hooks: | ||
- id: flake8 | ||
args: ["--config=backend/setup.cfg"] | ||
additional_dependencies: [flake8-isort] | ||
# Back-end | ||
# ------------------------------------------------------------------------------ | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: 7.1.1 | ||
hooks: | ||
- id: flake8 | ||
args: [ "--config=backend/setup.cfg" ] | ||
additional_dependencies: [ flake8-isort ] | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 24.10.0 | ||
hooks: | ||
- id: black | ||
args: ["--config=backend/pyproject.toml"] | ||
- repo: https://github.com/psf/black | ||
rev: 24.10.0 | ||
hooks: | ||
- id: black | ||
args: [ "--config=backend/pyproject.toml" ] | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.12.0 | ||
hooks: | ||
- id: mypy | ||
additional_dependencies: ["types-requests"] | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.12.0 | ||
hooks: | ||
- id: mypy | ||
additional_dependencies: [ "types-requests" ] | ||
|
||
# Front-end | ||
# ------------------------------------------------------------------------------ | ||
# Runs the local node `lint` script to avoid dependencies being out of sync with `frontend/package.json` | ||
# https://github.com/pre-commit/pre-commit/issues/945 | ||
- repo: local | ||
hooks: | ||
- id: eslint_and_tsc | ||
name: eslint_and_tsc | ||
language: system | ||
files: .+(js|jsx|ts|tsx|json)$ | ||
entry: bash -c 'cd frontend && yarn precommit' | ||
- repo: https://github.com/radeklat/settings-doc | ||
rev: '4.3.1' | ||
hooks: | ||
- id: settings-doc-markdown | ||
name: Generate backend settings markdown | ||
language: system | ||
entry: env PYTHONPATH=$PYTHONPATH:backend settings-doc generate --output-format markdown | ||
args: | ||
- '--class' | ||
- 'config.settings.site_specific.MetagridBackendSettings' | ||
- '--update' | ||
- 'docs/docs/users/configurable_environment_variables.md' | ||
- '--between' | ||
- '<!-- start generated backend settings markdown -->' | ||
- '<!-- end generated backend settings markdown -->' | ||
- '--templates' | ||
- 'docs/custom_templates' | ||
- '--heading-offset' | ||
- '3' | ||
|
||
- id: settings-doc-markdown | ||
name: Generate frontend settings markdown | ||
language: system | ||
entry: env PYTHONPATH=$PYTHONPATH:backend settings-doc generate --output-format markdown | ||
args: | ||
- '--class' | ||
- 'config.settings.site_specific.MetagridFrontendSettings' | ||
- '--update' | ||
- 'docs/docs/users/configurable_environment_variables.md' | ||
- '--between' | ||
- '<!-- start generated frontend settings markdown -->' | ||
- '<!-- end generated frontend settings markdown -->' | ||
- '--templates' | ||
- 'docs/custom_templates' | ||
- '--heading-offset' | ||
- '3' | ||
|
||
# Front-end | ||
# ------------------------------------------------------------------------------ | ||
# Runs the local node `lint` script to avoid dependencies being out of sync with `frontend/package.json` | ||
# https://github.com/pre-commit/pre-commit/issues/945 | ||
- repo: local | ||
hooks: | ||
- id: eslint_and_tsc | ||
name: eslint_and_tsc | ||
language: system | ||
files: .+(js|jsx|ts|tsx|json)$ | ||
entry: bash -c 'cd frontend && yarn precommit' |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from typing import Any, Iterable | ||
|
||
from .site_specific import MetagridBackendSettings, MetagridFrontendSettings | ||
from .static import DjangoStaticSettings | ||
|
||
|
||
def __dir__() -> Iterable[str]: | ||
"""The list of available options are retrieved from | ||
the dict view of our DjangoSettings object. | ||
""" | ||
return ( | ||
DjangoStaticSettings.model_fields.keys() | ||
| MetagridBackendSettings.model_fields.keys() | ||
| MetagridFrontendSettings.model_fields.keys() | ||
) | ||
|
||
|
||
def __getattr__(name: str) -> Any: | ||
"""Turn the module access into a DjangoSettings access""" | ||
_combined_settings = DjangoStaticSettings().model_dump() | ||
_combined_settings |= MetagridBackendSettings().model_dump() | ||
_combined_settings |= MetagridFrontendSettings().model_dump() | ||
|
||
return _combined_settings[name] |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.