-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implements Tethys Reactpy App Scaffold (#1081)
* Reactpy configured at the baseline-level * Added RESelectInput react component to create a reach dropdown just like original tethys gizmo added on_click, on_change, and on_mouse_over kwargs * Integrates reactpy and implements app scaffold * Handle reactpy-django at app install level * Bugfixes from fresh test There were a few bugs found when installing from a fresh test, namely: * The version of daphne installed by default didn't meet requirements * There was some experimental reactpy core development that I never backed out * Initial wave of tests and resulting refactors/fixes * Adds tests and test-based fixes * Fix broken tests on Windows, flake8 cleanup * Applies black formatting * Try fixing async test * Fix flake8 warning * Tweak test for macos * Another tweak for tests on macos * Fix broken test from last commit * black reformatting * Unpin daphne version * Bugfix: Default arg must be passed to scaffold_command * applies suggested changes * Replaces all usage of os.path with pathlib.Path * reactpy_django detected and added to INSTALLED_APPS in settings.py * ReactPy App scaffold now has pyproject.toml instead of setup.py * Revert spot where os.path had been converted to pathlib.Path In this one instance, Path.exists throws a "File too long" error on Unix machines, while os.path.exists dose not. I couldn't think of a good way around that for now. * Remove erroneous argument * Fix bug with pathlib update to static_finders * Update tests/unit_tests/test_tethys_apps/test_template_loaders.py Co-authored-by: sdc50 <[email protected]> * Update tethys_cli/cli_helpers.py Co-authored-by: sdc50 <[email protected]> * Additional tweaks per feedback Adds tests for remaining tethys_component reactpy files Adds reactpy-django to standard install Fixes broken support for variable in url for pages Adds react-loading-overlay and react-map-gl to built-in ComponentLibrary support Fixes buggy use_workspace * black and flake8 * remove file that was unintentionally committed * Fixes pyproject.toml_tmpl for reacpty scaffold The authors field cannot be present if name and email are blank, so they are now conditional upon those values being filled * Update tethys_apps/base/url_map.py Co-authored-by: Nathan Swain <[email protected]> * Implements latest feedback from @swainn - pyproject.toml added to all scaffolds - reactpy_base.html refactored to extend app_base.html - minor cleanups and refactors * Additional tweaks per feedback/tests - Reverted last commit's swap of argparse.Namespace for mock.MagicMock since mock requires the "name" argument, which isn't allowed by MagicMock on initialization - Added reactpy to dependencies in environment.yml * Fix broken test * Removes reactpy[-django] from dependencies Since reactpy and reactpy-django are not yet available on conda-forge, they were added as pip dependencies. However, that was preventing the tethys coda package from building successfully. Thus, we're backing that out for now until they can be added to conda-forge * Replace Path.walk with os.walk Path.walk didn't exist until Python 3.12, so to support those versions of Python, I had to downgrade back to os.walk. * Replaces odd Namespace usage with UrlMap * Applies black formatting * Separates channels and daphne --------- Co-authored-by: Corey Krewson <[email protected]> Co-authored-by: sdc50 <[email protected]> Co-authored-by: Nathan Swain <[email protected]>
- Loading branch information
1 parent
4d7ca52
commit 6d524e5
Showing
105 changed files
with
3,397 additions
and
1,278 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
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 |
---|---|---|
|
@@ -11,4 +11,4 @@ requirements: | |
- geojson | ||
- shapely | ||
post: | ||
- ./test.sh | ||
- ./test.py |
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 @@ | ||
print("test") |
This file was deleted.
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
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
Oops, something went wrong.