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

[REF-2168] Add share options to custom component commands #2883

Merged
merged 14 commits into from Mar 28, 2024
Merged

Conversation

martinxu9
Copy link
Collaborator

@martinxu9 martinxu9 commented Mar 19, 2024

Summary

  • Use tomlkit to process pyproject.toml, when publishing, ask user if want to interactively update the info (such as source URL, author email)
  • Add a share flag for the publish command. By default after a successful publish, the command ask the user if they want to share information such as demo app link. This information goes to Reflex backend services.
  • Add a share command so the same share logic can happen independent of the publish.

Tests

How to test

  • Use the reflex in this PR. Use an existing custom component project or follow the docs to create a new one. The actual implementation does not matter.
  • Point to control plane dev by setting
export CP_WEB_URL=https://control-plane.dev.reflexcorp.run
export CP_BACKEND_URL=https://rxcp-dev-control-plane.fly.dev

@martinxu9 martinxu9 changed the title Add share options to custom component commands [REF-2168] Add share options to custom component commands Mar 19, 2024
Copy link

linear bot commented Mar 19, 2024

@martinxu9 martinxu9 marked this pull request as draft March 22, 2024 23:32
@martinxu9 martinxu9 marked this pull request as ready for review March 25, 2024 22:26
@masenf masenf self-requested a review March 26, 2024 17:39
Copy link
Contributor

@picklelo picklelo left a comment

Choose a reason for hiding this comment

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

Tested the workflow with my image-zoom app and it seemed to work well. I see it entered in the dev database.

Will wait for masen for final approval

@@ -62,6 +62,7 @@ build = "^1.0.3"
setuptools = "^69.1.1"
httpx = ">=0.25.1"
twine = ">=4.0.0"
tomlkit = "^0.12.4"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this a new dependency or already included by one of the packages? Is there a reason for tomlkit rather than the base toml library?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

tomllib was introduced in 3.11 and it intentionally only includes read/parse. There's no write.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

tomllib was introduced in 3.11 and it intentionally only includes read/parse. There's no write.

masenf
masenf previously approved these changes Mar 27, 2024
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.

i like the toml parsing much better. nice

i wasn't able to actually test it with my new library yet, due to deploy issues. but the code looks good.

@martinxu9
Copy link
Collaborator Author

i like the toml parsing much better. nice

i wasn't able to actually test it with my new library yet, due to deploy issues. but the code looks good.

I'll try to invite the whole team to share and seed our db for the gallery

@martinxu9 martinxu9 merged commit 68c56a9 into main Mar 28, 2024
66 checks passed
@martinxu9 martinxu9 deleted the mx/cc-share branch March 28, 2024 22:13
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.

None yet

4 participants