ramp-workflow icon indicating copy to clipboard operation
ramp-workflow copied to clipboard

Fix CI

Open DimitriPapadopoulos opened this issue 1 year ago • 11 comments

  • Update GitHub Actions
  • Python 3.6 has reached end-of-life. Use Python 3.7 instead, and use latest 3.10 too.
  • New cimg images supersede the legacy CircleCI images:
  • Fix docs: we need to either upgrade Sphinx, or pin down Jinja2: https://github.com/pallets/jinja/issues/1630
  • Update test dependencies to fix this error:
    ERROR: Could not find a version that satisfies the requirement tensorflow==2.0.4 (from versions: 2.8.0rc0, 2.8.0rc1, 2.8.0, 2.8.1, 2.8.2, 2.8.3, 2.9.0rc0, 2.9.0rc1, 2.9.0rc2, 2.9.0, 2.9.1, 2.9.2, 2.10.0rc0, 2.10.0rc1, 2.10.0rc2, 2.10.0rc3, 2.10.0)
    ERROR: No matching distribution found for tensorflow==2.0.4
    
  • Remove support code for Python 2 or Python 3.3. It contained bugs.

DimitriPapadopoulos avatar Sep 19 '22 07:09 DimitriPapadopoulos

Almost there, still an issue with docs, despite pinning down Jinja2:

ImportError: cannot import name 'environmentfilter' from 'jinja2'

Any clue? It looks like I am not updating Sphinx or pinning down Jinja2 the right way.

DimitriPapadopoulos avatar Sep 19 '22 09:09 DimitriPapadopoulos

It seems that when doing the sphinx<4.0 install it installs jinja2 3.1.2

Collecting Jinja2>=2.3
  Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB)

albertcthomas avatar Sep 19 '22 11:09 albertcthomas

It seems that when doing the sphinx<4.0 install it installs jinja2 3.1.2

in fact I don't know why it install sphinx < 4.0, this must be your question then :)

albertcthomas avatar Sep 19 '22 11:09 albertcthomas

Any clue?

Probably CI broke at the time and this was a fix. It we can make it work with the latest sphinx version that would certainly be better.

rth avatar Sep 19 '22 11:09 rth

Indeed the question is why it installs sphinx < 4.0. A quick grep comes up with:

setup.py Line 44 in c4faecf

    'docs': ['sphinx>4.1.0', 'sphinx_rtd_theme', 'numpydoc', 'sphinx-click', 'jinja2<3.1.0']

doc/conf.py Line 28 in c4faecf

needs_sphinx = '4.1.0'

It looks like these have no effect at all, something else enforces sphinx<4.0.

DimitriPapadopoulos avatar Sep 19 '22 12:09 DimitriPapadopoulos

Here it asks for sphinx<4.0 in build_doc.sh. This is what is called in CI.

albertcthomas avatar Sep 19 '22 12:09 albertcthomas

Probably CI broke at the time and this was a fix. It we can make it work with the latest sphinx version that would certainly be better.

Yes, see #280

albertcthomas avatar Sep 19 '22 12:09 albertcthomas

Codecov Report

Base: 83.16% // Head: 80.83% // Decreases project coverage by -2.32% :warning:

Coverage data is based on head (759dded) compared to base (4a8d2e5). Patch coverage: 17.43% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #321      +/-   ##
==========================================
- Coverage   83.16%   80.83%   -2.33%     
==========================================
  Files         137      137              
  Lines        4752     4947     +195     
==========================================
+ Hits         3952     3999      +47     
- Misses        800      948     +148     
Impacted Files Coverage Δ
rampwf/externals/tabulate.py 15.58% <16.58%> (-0.21%) :arrow_down:
rampwf/hyperopt/hyperopt.py 98.67% <100.00%> (+0.02%) :arrow_up:
rampwf/score_types/clustering_efficiency.py 100.00% <100.00%> (ø)
rampwf/hyperopt/cli/hyperopt.py 0.00% <0.00%> (ø)
rampwf/hyperopt/tests/test_hyperparameter.py 100.00% <0.00%> (ø)
rampwf/prediction_types/combined.py 97.72% <0.00%> (+0.05%) :arrow_up:
rampwf/tests/test_kits.py 97.18% <0.00%> (+0.08%) :arrow_up:
rampwf/prediction_types/detection.py 85.32% <0.00%> (+0.13%) :arrow_up:
... and 8 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Sep 19 '22 12:09 codecov[bot]

I will keep sphinx<4.0 for now, and fix CI by pinning down jinja2<3.1.0. Then we can address the upgrade of sphinx in a different merge request.

DimitriPapadopoulos avatar Sep 19 '22 13:09 DimitriPapadopoulos

Note that tensoflow and keras are not pinned down any more. A single version for all version of Python doesn't seem to be working.

DimitriPapadopoulos avatar Sep 19 '22 13:09 DimitriPapadopoulos

Ready for review.

DimitriPapadopoulos avatar Sep 19 '22 14:09 DimitriPapadopoulos