memote
memote copied to clipboard
[WIP] Replace travis with github actions
This is accompanied with a PR to cookiecutter-memote.
- [x] fix #706
Github changed the API for authentication (see deprecation notice):
- Username+password authentication is no longer possible, it has to be done via a token. The web application flow may be relevant for memote.
- The authorization endpoint does not exist anymore.
Thus, the command line option memote online
has to be updated accordingly.
- [x] description of feature/fix
For the reasons outlined above, it is easier to replace travis with github actions than to figure out the new workflow; the difficulty lies in programmatically generating github's token, which does not seem to be possible anymore. Github actions does not need an user-created token since it has access to its own token via a secret.
As of now, the user has to create a token following github documentation to specify the token and add it as an argument:
memote online --token "your-github-token"
Or, alternatively, have an environment variable GITHUB_TOKEN
set to the token.
GITHUB_TOKEN="your-github-token" memote online
It would be better to have a setup more similar to the web application flow, where the user would be pointed to create a token during memote new
.
- [ ] tests added/passed
- [ ] add an entry to the next release
Hi , thanks for working on this, have there been any updates? I'm new to both github and memote.
@jthom17 I was going to have another developer working on this to polish the github-user interaction but that could not happen in the end. I see some people forking this to use it, so, if it is useful, I can push it to pass the CI-CD tests and set it as ready for review.
I just used this fork, and it worked for me!
Any updates or timeline?
@JamesPino this PR is ready to use but there are three things required to merge it:
- Some triage that I need for this testing issue.
- Merge https://github.com/opencobra/cookiecutter-memote/pull/21 and modify this line to point to upstream.
- Documentation (release entry + token setup). I will do this now.
I cannot say anything about the timeline because memote is mainly maintained by people in their spare time, and reviewing code can take up some time. In the meantime, you can always install it from the downstream branch:
pip install "git+https://github.com/carrascomj/memote.git@refactor-github-actions"
And please let me know if you find any bug in the implementation!
Everything seems to work. The github actions report have expired. Is it possible to rerun them? We are trying to leverage this more, so if I can review and write more tests to get it merged please let me know.
Is it possible to add a feature to add memote gh-actions files to an existing repo, rather than build a repo from memote online ?
@carrascomj checking back in. What can I do to get this merged? I can review or write additional tests as needed. The current tests are failing, but results are not logged anymore.
Can someone with sufficient privileges rerun the tests? I would love it if memote could use github actions
I have rerun the workflow. If I remember it right, I am doing something wrong at either the test or at the time of creating a deployment branch if it does not exist. Additionally, python3.6 has to be deprecated. Feel free to ping me next week if I haven't got back to this.
Codecov Report
Patch coverage: 76.47%
and project coverage change: +3.37%
:tada:
Comparison is base (
3687f37
) 73.60% compared to head (941adeb
) 76.98%.
:exclamation: Current head 941adeb differs from pull request most recent head 047bd99. Consider uploading reports for the commit 047bd99 to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## develop #729 +/- ##
===========================================
+ Coverage 73.60% 76.98% +3.37%
===========================================
Files 50 50
Lines 3020 2872 -148
Branches 656 645 -11
===========================================
- Hits 2223 2211 -12
+ Misses 703 569 -134
+ Partials 94 92 -2
Files Changed | Coverage Δ | |
---|---|---|
src/memote/suite/cli/callbacks.py | 77.35% <50.00%> (ø) |
|
src/memote/suite/cli/runner.py | 78.00% <80.00%> (+26.59%) |
:arrow_up: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
It seems like the tests are now passing. python3.6 workflows have to be removed (and maybe add 3.9, 3.10 and 3.11 but that should be another PR); pandas has to be pinned to solve the 3.7 errors; and no idea about the 3.7 Linux workflow.
@Midnighter tests are passing now, if you have some time. If not, maybe others can jump in.
I had to move forward the supported python versions in this PR.
I'll do my best to review this in a timely fashion now. I appreciate the work in any case 👍🏼
Thank you! Looking forward to the merge
Are you allowed to merge (maybe squash; however you prefer) it, @Midnighter? The pending codecov workflow does not allow me to do it.
Need to do something about the codecov setup. I also still see Travis in the checks which is weird.