Closes #1207 (closed)
Fixes a CICD problem that I introduced in !440 (merged) (rules in .gitlab-ci.yml
)
Replaced Py 3.7 by 3.9, and makes it so that the build creates a venv uses it to install dependencies and run everything. The conda environment is re-used over and over, which saves us time from re-installing Python + graphviz + dialog + curl + sqlite3 + etc. (if we used a container it would work in a similar way).
I've also re-enabled the docs step, that uses Sphinx to build it. @mgimenez with this version of Python (3.9) I got several Sphinx build errors due to missing spaces between ::
and the autosubmit
command (I think this was added recently). There is a commit fixing that here too.
The build that used to take between ten and seventeen minutes seems to be running consistently between 03:50 and 4:30 minutes.
This also unblocks @ltenorio 's work in !426 as the tests are not passing there as I added Protocol
to the code, which is Py3.8+.
@dbeltran I've also replaced assertEquals
by assertEqual
, and assertNotEquals
by assertNotEqual
. The only warnings now are for #1395, #1384 , and others in config parser. I think this should help you using Autosubmit with 3.12 (hopefully).
To review just check the pipeline, and if you want to look at the fixed warnings, just run pytest
locally and check for warnings, or look at the pipeline output.
Note, we have a before_script
that actives the Conda env and creates a venv when one does not exist (before cloning the project the worker deletes the old one, but between test & docs they re-use, see cache:
new entry). So there was no more need of a prepare
stage. The clean
is also not needed as we don't need to delete the conda environments. Just leave it there as it only has sqlite/graphviz/curl/python. The dependencies are installed the a lightweight venv
(much faster).