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

GitHub action: To run & create new release #38

Open
4 tasks
joeflack4 opened this issue Sep 29, 2022 · 0 comments
Open
4 tasks

GitHub action: To run & create new release #38

joeflack4 opened this issue Sep 29, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@joeflack4
Copy link
Member

joeflack4 commented Sep 29, 2022

Overview

Create a GitHub action that will run our analysis, and all of the artefacts it creates (CSVs, visualizations) will go into a new release.

Sub-task list

  • 1. Install requirements
  • 2. Secrets / ignored files
  • 3. Run analysis
  • 4. Create a release

Sub-task details

1. Install requirements

Have it install requirements via pip install -r requirements.txt. It looks like it doesn't need a virtual environment, but I could be wrong.

2. Secrets / ignored files

Have it create a directory called env. Then we want to create an env/.zuliprc in there. Here's an article to get you started. Under the steps section, you can try copy/pasting the below snippet. It'll output the contents of that 'secret' into a new file that it will create at that path.

      - name: 'Create env file'
        run: |
          mkdir env
          echo "${{ secrets.ZULIP_RC }}" > env/.zuliprc

3. Run analysis

Should just need it to run python3 -m fhir_zulip_nlp

But I think there's another change you'll need to do as well to get this to work. If I had fixed the GoogleSheet API issue, then in step 2 (secrets), we'd also be creating a credentials.json and token.json file in env/. But since that is broken, we should store the keywords.csv (which, if you remember, is our downloaded version of what's in the GoogleSheet) inside of fhir_zulip_nlp/cache/. I think we just need to add this line to the .gitignore: !*/cache/keywords.csv. Once we do that, you should be able to commit that file as well.

4. Create a new release

GitHub copilot already created a snippet that starts to do this in the .github/workflows/build_and_release.yaml in my PR.

When it creates a release, have it give the release a title with the date when it was run (YYYY-MM-DD format), rather than the semver version release titles (e.g. 1.2.2) we've been using thus far.

I don't think it matters if there is any text description in the release. We just want to attach the CSVs and images generated to the release, and that will suffice.

Additional info

I created a pull request that has a github action yaml script (.github/workflows/build_and_release.yaml). Likely all of the scripting will be in this 1 file.

Doing this work in a pull request might not work, actually. If we want to test the action out, we want to go to the 'actions' tab, and the action should appear there and let us run it. But this may not work until this script is on the main branch. So, @rohaher you might want to just push commits to main instead of working on that pull request branch.

@joeflack4 joeflack4 added the enhancement New feature or request label Dec 28, 2022
@joeflack4 joeflack4 added this to the MVP (Minimum Viable Product) milestone Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants