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

Refactor zipping in reflex export #1668

Merged
merged 2 commits into from
Aug 24, 2023
Merged

Refactor zipping in reflex export #1668

merged 2 commits into from
Aug 24, 2023

Conversation

martinxu9
Copy link
Contributor

@martinxu9 martinxu9 commented Aug 23, 2023

Summary

  • Fixes reflex export should fail if zipping fails #1506 .
  • Fixes reflex export exit code and log messages are inaccurate #1285 .
  • Refactor zipping code in the reflex export command.
  • Use zipfile library to make the zip instead of opening up an external sub-shell, this also unifies the code for windows and non-windows.
  • Add separate progress bars for backend and frontend zip; remove the console.log as it is not consistent with rest of the CLI output.
  • Slightly modified the logic what files to exclude:
    • Previously:
        1. assets*, frontend.zip*, backend.zip* are excluded
        1. __pycache__ included
    • Now:
        1. assets folder, frontend.zip, backend.zip are excluded
        1. __pycache__ excluded

Tests

  • Manual testing export on the reflex-web and compare the files in the frontend and backend zips.
  • Progress bars added for zipping:
image

@martinxu9 martinxu9 force-pushed the martinxu9/export-zip-fix branch from a96dadd to 0012060 Compare August 23, 2023 22:12
@martinxu9 martinxu9 requested review from picklelo and masenf August 23, 2023 22:13
masenf
masenf previously approved these changes Aug 23, 2023
Copy link
Collaborator

@masenf masenf left a comment

Choose a reason for hiding this comment

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

just a comment for your consideration. otherwise looks good to me.

@masenf masenf added this to the v0.2.7 milestone Aug 23, 2023
Co-authored-by: Masen Furer <m_github@0x26.net>
@martinxu9
Copy link
Contributor Author

Approve one more time please @masenf

Copy link
Collaborator

@masenf masenf left a comment

Choose a reason for hiding this comment

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

@martinxu9 martinxu9 merged commit 76b8af3 into main Aug 24, 2023
@picklelo picklelo deleted the martinxu9/export-zip-fix branch September 16, 2023 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

reflex export should fail if zipping fails reflex export exit code and log messages are inaccurate
2 participants