cog-imperial / OMLT

Represent trained machine learning models as Pyomo optimization formulations
Other
273 stars 58 forks source link

[WIP] Setup github actions #7

Closed jalving closed 2 years ago

jalving commented 3 years ago

This PR will setup github actions

jalving commented 2 years ago

@fracek I can't seem to get tox to run in github-actions no matter what I try. I'm also having issues with my local machine running tox (likely my virtual environment). Are you able to pull this branch and at least check that tox will run?

I think there must be some interference between pyproject.toml, tox.ini, and setup.cfg. My understanding is that tox will parse the files in that order, but I'm not 100% sure.

You can merge what I have if you want. We still need to get tests working however.

fracek commented 2 years ago

Looks like tox-gh-actions expected tox to be invoked with tox and not python -m tox. Now the main issue is that ubuntu doesn't include the ipopt binary in their ipopt package.

jalving commented 2 years ago

@fracek I managed to get Ipopt working using the conda plugin. Now I get the following error from tox: ERROR: InvocationError for command /home/runner/work/OMLT/OMLT/.tox/py38/bin/pytest (exited with code 1)

It actually hits all the tests, and then errors out. I tried running very simple configuration files and still get this error. I switched back to the original config files I had working to at least run the tests.

On another note, I made some changes to get more tests passing. Notably:

jalving commented 2 years ago

Looks like tox fails if any one test fails. I commented out the failing gbt test for now. Just need to get codecov working now.

jalving commented 2 years ago

@fracek I think you have to setup the codecov account since I am not a member of cog-imperial

codecov[bot] commented 2 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@481b54a). Click here to learn what that means. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main       #7   +/-   ##
=======================================
  Coverage        ?   91.10%           
=======================================
  Files           ?       15           
  Lines           ?      854           
  Branches        ?      147           
=======================================
  Hits            ?      778           
  Misses          ?       51           
  Partials        ?       25           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 481b54a...6197b51. Read the comment docs.

fracek commented 2 years ago

Now it should be working. Let me know if you want me to merge this.

jalving commented 2 years ago

Yeah, go ahead. I'll make a new PR to get the codecov badge on the readme