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

Change workflows to be reusable #6

Closed
3 tasks done
jacobbieker opened this issue Oct 12, 2021 · 14 comments
Closed
3 tasks done

Change workflows to be reusable #6

jacobbieker opened this issue Oct 12, 2021 · 14 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@jacobbieker
Copy link
Member

jacobbieker commented Oct 12, 2021

Detailed Description

GitHub just released reusable workflows, in beta, https://docs.github.com/en/actions/learn-github-actions/reusing-workflows

It seems like we can reduce a lot of duplication in our repos by moving workflows, especially the PyPi publishing one, linter, and most of the test workflows to here, and just calling them in those repos.

Context

Currently, we have the exact same workflows copied and pasted to all of our new nowcasting repos, and if we want to make changes to one, we have to manually copy and past it to all the other ones to propagate the change.

ToDos

@jacobbieker jacobbieker added enhancement New feature or request good first issue Good for newcomers labels Oct 12, 2021
@JackKelly
Copy link
Member

Sounds like a great idea! Thanks for letting us know about GitHub's new reusable workflows beta :)

@flowirtz
Copy link
Contributor

Great idea to unify this across repos, I think that would make things a lot easier.

I've seen a few different tools across repos now and I think it would make sense to maybe decide on a standard set of things we want to run on all or most python repos. Would this be a sensible starting point?

  • flake8
  • black
  • isort
  • pytest

@JackKelly
Copy link
Member

Sounds great!

We could maybe add pydoctest?

@jacobbieker
Copy link
Member Author

Yeah, sounds good! I'd also go with adding pydoctest, and potentially the release scripts as well? Since they are all the exact same and just copied and pasted as well

@flowirtz
Copy link
Contributor

Sounds good! Maybe it makes sense splitting these out into three groups:

Linters

  • isort
  • flake8
  • black
  • pydocstyle

Test

  • pytest
  • pydoctest

Release

@jacobbieker
Copy link
Member Author

Yeah! That sounds good

flowirtz added a commit to openclimatefix/uk-pv-national-gsp-api that referenced this issue Oct 26, 2021
@JackKelly
Copy link
Member

SGTM! Thanks!

flowirtz added a commit to openclimatefix/uk-pv-national-gsp-api that referenced this issue Oct 26, 2021
flowirtz added a commit that referenced this issue Oct 26, 2021
flowirtz added a commit to openclimatefix/uk-pv-national-gsp-api that referenced this issue Oct 26, 2021
flowirtz added a commit that referenced this issue Oct 26, 2021
@flowirtz
Copy link
Contributor

FYI I made this work for the linting workflow we described above. We now have:

@JackKelly
Copy link
Member

Nice!

@jacobbieker
Copy link
Member Author

Awesome!

jacobbieker added a commit that referenced this issue Oct 26, 2021
Relates to #6
@jacobbieker
Copy link
Member Author

jacobbieker commented Oct 26, 2021

I've added a general test and release ones now too, and updated SatFlow to use them: openclimatefix/satflow@3c2ebc6

@flowirtz
Copy link
Contributor

Awesome! Thanks!

Can we close this issue?

@jacobbieker
Copy link
Member Author

Yeah! Just updated almost all the nowcasting repos to use it now too, so changes here should then affect all our repos

@flowirtz
Copy link
Contributor

Awesome! Thanks so much, @jacobbieker!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants