opencobra / memote

memote – the genome-scale metabolic model test suite
https://memote.readthedocs.io/
Apache License 2.0
123 stars 26 forks source link

Replace travis with github actions #729

Closed carrascomj closed 9 months ago

carrascomj commented 2 years ago

This is accompanied with a PR to cookiecutter-memote.

Github changed the API for authentication (see deprecation notice):

Thus, the command line option memote online has to be updated accordingly.

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.

jthom17 commented 1 year ago

Hi , thanks for working on this, have there been any updates? I'm new to both github and memote.

carrascomj commented 1 year ago

@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.

viktorht commented 1 year ago

I just used this fork, and it worked for me!

JamesPino commented 1 year ago

Any updates or timeline?

carrascomj commented 1 year ago

@JamesPino this PR is ready to use but there are three things required to merge it:

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!

JamesPino commented 1 year ago

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 ?

JamesPino commented 1 year ago

@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.

djinnome commented 1 year ago

Can someone with sufficient privileges rerun the tests? I would love it if memote could use github actions

carrascomj commented 1 year ago

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[bot] commented 1 year ago

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 ```diff @@ 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](https://app.codecov.io/gh/opencobra/memote/pull/729?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opencobra) | Coverage Δ | | |---|---|---| | [src/memote/suite/cli/callbacks.py](https://app.codecov.io/gh/opencobra/memote/pull/729?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opencobra#diff-c3JjL21lbW90ZS9zdWl0ZS9jbGkvY2FsbGJhY2tzLnB5) | `77.35% <50.00%> (ø)` | | | [src/memote/suite/cli/runner.py](https://app.codecov.io/gh/opencobra/memote/pull/729?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opencobra#diff-c3JjL21lbW90ZS9zdWl0ZS9jbGkvcnVubmVyLnB5) | `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.

carrascomj commented 1 year ago

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.

carrascomj commented 1 year ago

@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.

Midnighter commented 9 months ago

I'll do my best to review this in a timely fashion now. I appreciate the work in any case 👍🏼

djinnome commented 9 months ago

Thank you! Looking forward to the merge

carrascomj commented 9 months ago

Are you allowed to merge (maybe squash; however you prefer) it, @Midnighter? The pending codecov workflow does not allow me to do it.

Midnighter commented 9 months ago

Need to do something about the codecov setup. I also still see Travis in the checks which is weird.