Skip to content
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

Implements Tethys Reactpy App Scaffold #1081

Merged
merged 45 commits into from
Nov 25, 2024
Merged

Implements Tethys Reactpy App Scaffold #1081

merged 45 commits into from
Nov 25, 2024

Conversation

shawncrawley
Copy link
Contributor

Description

This merge request implements a Tethys ReactPy App scaffold. I will flesh out this description soon with all of the ins and outs of it. I just wanted to finally get this in as a draft pull request to get more eyes on it.

Changes Made to Code:

Related

Additional Notes

Quality Checks

  • [] New code is 100% tested
  • [] Code has been formated
  • [] Code has been linted
  • [] Docstrings for new methods have been added

shawncrawley and others added 8 commits May 13, 2024 20:51
…ike original tethys gizmo

added on_click, on_change, and on_mouse_over kwargs
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
@swainn swainn added major feature experimental Experimental features labels Aug 24, 2024
@swainn swainn added this to the Version 4.3 milestone Aug 24, 2024
@coveralls
Copy link

coveralls commented Aug 29, 2024

Coverage Status

coverage: 100.0%. remained the same
when pulling b3bb243 on tethys-reactpy
into c24902e on main.

@shawncrawley shawncrawley marked this pull request as ready for review August 29, 2024 23:23
environment.yml Outdated Show resolved Hide resolved
tethys_cli/cli_helpers.py Outdated Show resolved Hide resolved
Copy link
Member

@sdc50 sdc50 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shawncrawley just a couple of minor changes (I've added suggestions that you can just commit if you agree with them).

I'm very excited about the reactpy addition. The Path changes are all internal, but everything is converted back to a string in return values. I think this is the right call for now (to ensure we aren't breaking anything). However, in Tethys 5.0 I think we should switch and return Path objects wherever possible.

shawncrawley and others added 7 commits October 11, 2024 11:33
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
@shawncrawley
Copy link
Contributor Author

@swainn @sdc50 I've got everything done and passing tests except oddly the "Tethys-CI / Conda Build (ubuntu-latest)" test run. Any thoughts there on what could be going on? I have reactpy-django now installed by default, which did throw a wrench in some of the testing. Maybe it's related here? But oddly only this one build...

@shawncrawley
Copy link
Contributor Author

@gagelarsen Do you have any idea on the failing "Conda Build" GitHub workflow?

The authors field cannot be present if name and email
are blank, so they are now conditional upon those
values being filled
@shawncrawley
Copy link
Contributor Author

I know the issue: it's definitely being caused by reactpy-django being added as a pip requirement in the envrionment.yml file (see here). All the more reason to get that package added to conda-forge.

tests/coverage.cfg Show resolved Hide resolved
environment.yml Outdated Show resolved Hide resolved
environment.yml Outdated Show resolved Hide resolved
tethys_apps/base/url_map.py Outdated Show resolved Hide resolved
tethys_sdk/components/utils.py Outdated Show resolved Hide resolved
tethys_apps/templates/tethys_apps/reactpy_base.html Outdated Show resolved Hide resolved
shawncrawley and others added 4 commits October 22, 2024 13:42
- pyproject.toml added to all scaffolds
- reactpy_base.html refactored to extend app_base.html
- minor cleanups and refactors
- 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
@shawncrawley
Copy link
Contributor Author

It looks like the only thing that remains is getting reactpy and reactpy-django added to conda-forge. I found that we'd also have to add reactpy-router, which unfortunately doesn't have an sdist file (required, I believe, by conda-forge). But I reached out to the reactpy maintainers and they quickly responded that they'll get the sdist file added by tomrorow. Once that's done, I should be able to submit the PR to the conda staged-recipes repo and get those added. It's the final stretch!

Copy link
Member

@swainn swainn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve, barring conda package and all comments addressed.

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
Path.walk didn't exist until Python 3.12, so to support those versions of Python, I had to downgrade back to os.walk.
@swainn swainn merged commit 6d524e5 into main Nov 25, 2024
42 checks passed
@swainn swainn deleted the tethys-reactpy branch November 25, 2024 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
experimental Experimental features major feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants