MAINT do not check for warnings in doc_min_dependencies#27949
MAINT do not check for warnings in doc_min_dependencies#27949adrinjalali merged 7 commits intoscikit-learn:mainfrom
Conversation
|
Since bumping scikit-image raise still another warning, I propose to not check for the warning based on an environment variable. |
.circleci/config.yml
Outdated
| - OPENBLAS_NUM_THREADS: 2 | ||
| - CONDA_ENV_NAME: testenv | ||
| - LOCK_FILE: build_tools/circle/doc_min_dependencies_linux-64_conda.lock | ||
| - WARNINGS_AS_ERRORS: 'false' |
There was a problem hiding this comment.
maybe worth following other environment variable with the SKLEARN_ prefix?
So something like this SKLEARN_DOC_BUILD_WARNINGS_AS_ERRORS to be explicit?
Maybe worth adding to the documented variables here in a separate PR:
https://scikit-learn.org/dev/computing/parallelism.html#environment-variables
In particular this may be worth mentioning that this is different from sphinx-build -W that also turns some warnings into errors.
doc/conf.py
Outdated
| message="pkg_resources is deprecated as an API", | ||
| category=DeprecationWarning, | ||
| ) | ||
| if os.environ.get("WARNINGS_AS_ERRORS", "true") == "true": |
There was a problem hiding this comment.
Maybe use .lower() to make sure that True works as well as true
| if os.environ.get("WARNINGS_AS_ERRORS", "true") == "true": | |
| if os.environ.get("WARNINGS_AS_ERRORS", "true").lower() == "true": |
adrinjalali
left a comment
There was a problem hiding this comment.
Other than adding a comment for the env variable, LGTM if CI is happy.
| message="pkg_resources is deprecated as an API", | ||
| category=DeprecationWarning, | ||
| ) | ||
| if os.environ.get("SKLEARN_DOC_BUILD_WARNINGS_AS_ERRORS", "true").lower() == "true": |
There was a problem hiding this comment.
For info, this is breaking the doc build when using python 3.12 (there is a DeprecationWarning: coming from datetime.datetime.utcfromtimestamp)
There was a problem hiding this comment.
Indeed I think I saw that and left it for later, PR more than welcome 😉! You would need to add them to the already accepted warnings see warnings.filterwarnings("ignore", below
IIRC the deprecation warning is due to dateutil, it has been fixed in main but not released yet, and it seems like it is a bit stuck at the moment dateutil/dateutil#1284 or dateutil/dateutil#1314
Solve the issue observed in
mainwhere the minimum version ofscikit-imageis not compatible with python 3.9+