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

Add automation to automatically release zipped apps #560

Merged
merged 3 commits into from
Feb 12, 2021

Conversation

xhluca
Copy link
Collaborator

@xhluca xhluca commented Feb 11, 2021

Closes #559

Whenever a commit is pushed to master:

  • Automatically bump version
  • Compress each app directory into a zip file
  • Create a release and upload all the zipped apps

Issue for app: #[issue number here]

App pull request

  • This is a new app
  • I am improving an existing app (redesigns/code "makeovers")

About

  • Playground deployment URL (new version):
  • Current gallery app URL: (delete this line if inapplicable)
  • Python app repository link: (delete this line if you are working on a Python app)

Workflow

  • I have created a branch in the appropriate monorepo, and the
    elements necessary for successful deployment are in place.
  • If the app is a redesigned and/or restyled version of an
    existing gallery app, I've summarized the changes requested in the
    appropriate Streambed issue and confirm that they have been applied.
  • If the app is on the Dash Gallery portal, I have added a link to
    the GitHub repository for the source code in the portal description.
  • If the app is a reimplementation of a Python gallery app for the
    DashR gallery, the app in this PR mimics, as closely as possible,
    the style and functionality of the existing app.=
  • I have removed all Google Analytics code from the app's
    assets/ folder.

The pre-review review

I have addressed all of the following questions:

  • Does everything in my code serve some purpose? (I have removed
    any dead and/or irrelevant code.)
  • Does everything in my code have a clear purpose? (My code is
    readable and, where it isn't, it has been commented appropriately.)]
  • Am I reinventing the wheel? (I have used appropriate packages to
    lessen the volume of code that needs to be maintained.)

xhlulu added 2 commits February 11, 2021 13:45
@alexcjohnson
Copy link
Collaborator

What if we only ever had one release available? ie after uploading the new release we delete the previous one(s)? This feels like a bit of a misuse of the release mechanism, but it would make https://github.com/plotly/dash-sample-apps/releases much cleaner, and folks would likely just go there and download the zip they want.

@xhluca
Copy link
Collaborator Author

xhluca commented Feb 12, 2021

Yeah it shouldn't be too hard. (edit: I just tried it here and it worked)

I guess it does make it cleaner, although Github seems to automatically hide the assets of older releases to make it easier to navigate.
image

Moreover replacing the version number with "latest" automatically resolves it. Though I agree it looks a lot cleaner when you look at the tags.

I think one potential advantage will be to more easily access older versions of a certain app, especially if we start versioning based on dash's major version (e.g. dash-sample-apps v1.* corresponds to dash v1.*, etc.) as we start refactoring older apps using new syntax (e.g. pattern matching). However this can still be done by simply cloning the entire repo, which shouldn't be too large once we refactor the git history and move the data files to plotly/datasets.

README.md Outdated Show resolved Hide resolved
alexcjohnson
alexcjohnson previously approved these changes Feb 12, 2021
Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

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

💃 OK, let's keep it as you have, and we can revisit if the many releases become overwhelming. It feels a little confusing to me since most releases will only update one or two apps, but I agree that it could sometimes be useful to go back in time to an older version of an app.

Just a documentation comment, but this looks great!

@xhluca
Copy link
Collaborator Author

xhluca commented Feb 12, 2021

Thanks, I updated the readme with your suggestions; will merge now.

separate note: wouldn't we want to suggest the same pattern above when cloning the whole repo? ie cd into the app dir, set up the virtual env in that dir, and run the app from there? The way we describe it now with running things from the repo root makes it unclear how to handle app-specific venvs.

I think it's a good idea. In fact I feel a lot of the readme might be confusing for the community; it feels to me it was written for internal use. Would be nice to refactor the entire readme and move some parts to contributing.md

@xhluca xhluca merged commit ce31166 into master Feb 12, 2021
@xhluca xhluca deleted the github-actions-auto-release branch February 12, 2021 18:29
xhluca pushed a commit that referenced this pull request Jul 13, 2021
Add automation to automatically release zipped apps

Former-commit-id: ce31166
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.

Auto-release and upload individual apps as zip files
2 participants