TUDelftGeodesy / stmtools

Xarray extension for Space-Time Matrix
https://tudelftgeodesy.github.io/stmtools/
Apache License 2.0
7 stars 0 forks source link

Deprecation warning for Jupyter in mkdocs #72

Closed rogerkuou closed 4 months ago

rogerkuou commented 6 months ago

warning when executing

mkdocs serve
INFO    -  DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs
           given by the platformdirs library.  To remove this warning and
           see the appropriate new directories, set the environment variable
           `JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`.
           The use of platformdirs will be the default in `jupyter_core` v6
             File "/home/oku/miniforge3/envs/mobyle/lib/python3.11/site-packages/jupyter_core/utils/__init__.py", line 90, in
           deprecation
               warnings.warn(message, DeprecationWarning, stacklevel=stacklevel + 1)
             File "/home/oku/miniforge3/envs/mobyle/lib/python3.11/site-packages/jupyter_client/connect.py", line 22, in
               from jupyter_core.paths import jupyter_data_dir, jupyter_runtime_dir, secure_write

Version check:

mamba list mkdocs
# packages in environment at /home/oku/miniforge3/envs/mobyle:
#
# Name                    Version                   Build  Channel
mkdocs                    1.5.3              pyhd8ed1ab_0    conda-forge
mkdocs-autorefs           0.5.0                    pypi_0    pypi
mkdocs-gen-files          0.5.0                    pypi_0    pypi
mkdocs-jupyter            0.24.6                   pypi_0    pypi
mkdocs-material           9.5.4                    pypi_0    pypi
mkdocs-material-extensions 1.3.1                    pypi_0    pypi
mkdocstrings              0.24.0                   pypi_0    pypi
mkdocstrings-python       1.8.0                    pypi_0    pypi
vanlankveldthijs commented 4 months ago

As discussed, suppressing this warning can easily be done by setting an environment variable before running mkdocs, e.g.: JUPYTER_PLATFORM_DIRS=1 mkdocs serve

However, I was not able to find a way to set this environment variable as the project was being installed, either in pyproject.toml or mkdocs.yml

Because this is just a warning on the server, we can ignore it.

However, I will resolve the CODE_OF_CONDUCT.md warning also given when calling mkdocs serve.