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

Include Python version 3.10 and remove 3.6 in CI #566

Closed
wants to merge 9 commits into from

Conversation

LauWien
Copy link
Contributor

@LauWien LauWien commented Feb 22, 2022

This PR includes Python version 3.10 and removes Python version 3.6 in CI.
Closes #532

How to review

  • Read the diff and note that the CI checks all pass.

PR checklist

  • Continuous integration checks all ✅
  • Add, expand, or update documentation.
  • Update release notes.

@LauWien LauWien marked this pull request as draft February 22, 2022 16:18
@codecov
Copy link

codecov bot commented Feb 22, 2022

Codecov Report

Merging #566 (c5ab939) into main (1df3619) will decrease coverage by 0.0%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##            main    #566     +/-   ##
=======================================
- Coverage   93.8%   93.7%   -0.1%     
=======================================
  Files         40      40             
  Lines       3057    3057             
=======================================
- Hits        2870    2867      -3     
- Misses       187     190      +3     
Impacted Files Coverage Δ
message_ix/tests/test_tutorials.py 88.4% <0.0%> (-11.6%) ⬇️

@khaeru
Copy link
Member

khaeru commented Feb 22, 2022

Sorry for not advertising more loudly, but I made these changes incidentally in the branch for #557. I was expecting to merge that quickly, but it is stalled on #559.

@LauWien
Copy link
Contributor Author

LauWien commented Feb 23, 2022

Sorry for not advertising more loudly, but I made these changes incidentally in the branch for #557. I was expecting to merge that quickly, but it is stalled on #559.

Oh shoot, sorry I didn't check deeply!
I started #565 to fix #559, by first forcing to use the new pandas release 1.4.1, since the test_add_year.py was running through successful locally with that version. The tests were also successful on GHA with pandas==1.4.1, but then I saw with that new errors occur, see here. So I thought, I should maybe first check the offending lines here f7c1374 which led to the same failing tests here like described in #565, so I reverted 6c3ef88 and started this new PR here to first tackle the failing tests with pandas==1.4.1 on Python version 3.6 and after the failing tests in ubuntu-latest.
So maybe we don't need to adapt the offending lines since with the latest pandas version the test test_add_year.py, which failed previously, were successful, but remove Python version 3.6 and tackle the failing ubuntu-latest tests. What do you think?

Regarding the failing ubuntu-test e.g. the following error:

File /opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/message_ix/models.py:359, in GAMSModel.run(self, scenario)
E               340 """Execute the model.
E               341 
E               342 GAMSModel creates a file named ``cplex.opt`` in the model directory
E              (...)
E               348    each process may produced unexpected results.
E               349 """
E               350 # If two runs are kicked off simulatenously with the same
E               351 # self.model_dir, then they will try to write the same optfile, and may
E               352 # write different contents.
E              (...)
E               357 
E               358 # Write CPLEX options into an options file
E           --> 359 optfile = self.model_dir / "cplex.opt"
E               360 lines = ("{} = {}".format(*kv) for kv in self.cplex_opts.items())
E               361 optfile.write_text("\n".join(lines))
E           
E           TypeError: unsupported operand type(s) for /: 'str' and 'str'
E           TypeError: unsupported operand type(s) for /: 'str' and 'str'

It seems like the whitespace in line 359 optfile = self.model_dir / "cplex.opt" is ignored, which leads to a string division.

@khaeru
Copy link
Member

khaeru commented Feb 23, 2022

This TypeError is the very thing that #557 is meant to address.

@LauWien
Copy link
Contributor Author

LauWien commented Feb 23, 2022

This TypeError is the very thing that #557 is meant to address.

🤦‍♀️ sorry..
So then I guess I can close #566 and #565, since with pandas==1.4.1 the test_add_year.py is successful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include Python version 3.10 and remove 3.6 in CI
2 participants