SysBioChalmers / yeast-GEM

The consensus GEM for Saccharomyces cerevisiae
http://sysbiochalmers.github.io/yeast-GEM/
Creative Commons Attribution 4.0 International
96 stars 46 forks source link

yeast 8.5.0 #262

Closed edkerk closed 3 years ago

edkerk commented 3 years ago

Main improvements in this PR:

Also rename your local branches to main and develop:

git branch -m master main
git branch -m devel develop
git fetch origin
git branch -u origin/main main
git branch -u origin/develop develop
git remote set-head origin -a

I hereby confirm that I have:

edkerk commented 3 years ago

@mihai-sysbio Not sure why memote-history.yml contains the step Memote short run (line 42), but should its containing command not at least include --ignore-git? This was not problematic in recent commits/PRs as the model file hadn't changed (see for instance here).

mihai-sysbio commented 3 years ago

Not sure why memote-history.yml contains the step Memote short run (line 42)

I see that the memote run action runs only on pull_request, whereas the memote history runs on push, which happens more often.

but should its containing command not at least include --ignore-git?

There is a hint in this line from memote:

"--ignore-git", is_flag=True, help="Avoid checking the git repository status."

This flag is needed only if the model has been modified without having the changes committed/stashed, e.g. by writing a BiGG compliant model, exactly how it is the case for the memote run action. Instead, memote history runs on the unchanged model.

edkerk commented 3 years ago

@mihai-sysbio Aha, thanks for the explanation. But then I don't understand why memote history fails.

mihai-sysbio commented 3 years ago

The error appears to be interspersed with the memote output, here are the relevant lines:

Committing result and changing back to working branch.
Storing result '03ee7535d608b89812b01f3fa1660b9ce355170b'.
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.9.5/x64/bin/memote", line 8, in <module>
    sys.exit(cli())
  File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/memote/suite/cli/runner.py", line 289, in run
    repo.git.commit(
  File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/git/cmd.py", line 545, in <lambda>
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/git/cmd.py", line 1011, in _call_process
    return self.execute(call, **exec_kwargs)
  File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/git/cmd.py", line 828, in execute
    raise GitCommandError(command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
  cmdline: git commit --message chore: add result for 03ee7535d608b89812b01f3fa1660b9ce355170b
  stderr: 'Author identity unknown

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: empty ident name (for <runner@fv-az212-186.zlodpucb4l4udavnfxg5s20dva.cx.internal.cloudapp.net>) not allowed

The line that looks weirdest to me is:

cmdline: git commit --message chore: add result for 03ee7535d608b89812b01f3fa1660b9ce355170b
mihai-sysbio commented 3 years ago

It doesn't hurt to try out your idea @edkerk. Commit c897a25 adds the flag to instruct memote to not inspect the repository installation, so I'm hoping this does the trick (although I don't understand why it worked so far and now it doesn't).

edkerk commented 3 years ago

Seems like my suggestion didn't work though. The step Memote short run now does not submit the results to gh-pages (which it tried to do previously with cmdline: git commit --message chore: add result for 03ee7535d608b89812b01f3fa1660b9ce355170b, so when the history report is made it doesn't find the most recent changes:

In output from the step Compute Memote history on push, you can see it reads results from gh-pages but does not find the latest commit with changed model (03ee7535d608b89812b01f3fa1660b9ce355170b):

Line 10: Obtaining history of results from the deployment branch gh-pages. (it reads results.db?)

Line 11534-11535: Loading result from '03ee7535d608b89812b01f3fa1660b9ce355170b'. error: Could not load result '03ee7535d608b89812b01f3fa1660b9ce355170b'.

The problem seems to be that in the step Memote short run it does not have the proper credentials for pushing to gh-pages. In the step Auto-commit results the pushing of history_report.html to gh-pages is not handled directly by memote but rather by the action stefanzweifel/git-auto-commit-action@v4.4.0 (where the user name is set!). I'll try to see what happens when setting global user name to memote-bot, bare with me...

edkerk commented 3 years ago

The history report is still not working exactly as intended (see comment), but will merge this PR now as it at least introduces the memote CI to the repo.