reflex icon indicating copy to clipboard operation
reflex copied to clipboard

Replace utils module

Open iron3oxide opened this issue 2 years ago β€’ 4 comments

All Submissions:

  • [x] Have you followed the guidelines stated in CONTRIBUTING.md file?
  • [x] Have you checked to ensure there aren't any other open Pull Requests for the desired changed?

Having a utils module is considered a code smell in most cases, including this one. It did way too much different stuff and even required circular imports in some places. This PR distributes the code formerly contained in the utils module in a logically coherent manner into new and existing modules. It also includes minor fixups that were necessary to pass all tests; the most notable one being the clear separation of web directory creation, frontend package installation and frontend setup. This fixup should increase testability in general, as the frontend setup called the frontend package installation function in the previous code, which made it way harder to mock said installation.

Type of change

Refactoring

Changes To Core Features:

  • [x] Have you added an explanation of what your changes do and why you'd like us to include them?
  • [x] Have you successfully ran tests with your changes locally?

iron3oxide avatar Mar 12 '23 20:03 iron3oxide

Done, that probably won't fix the workflow error from the first run though. I'll dig into that.

iron3oxide avatar Mar 12 '23 22:03 iron3oxide

Seems like from __future__ import annotations was never needed in route.py until now. I think this should fix the workflow errors, but I haven't been able to set rtx up to test with 3.7 or 3.8 yet, so only a rerun will tell for sure.

iron3oxide avatar Mar 12 '23 23:03 iron3oxide

Forgot to lint the docstrings πŸ€¦β€β™‚οΈ. Sorry for the delay, should work now.

iron3oxide avatar Mar 13 '23 02:03 iron3oxide

Thanks for fixing the build! We're cutting a release tonight, I'll merge this in afterwards.

picklelo avatar Mar 13 '23 02:03 picklelo

Looking into why the integration test is failing

picklelo avatar Mar 16 '23 17:03 picklelo

Talked with @ElijahAhianyo offline - looks like this is because we need to update pcweb and pynecone at the same time. I ran the integration test manually and it passed, so I'll merge this in.

picklelo avatar Mar 16 '23 21:03 picklelo