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

Fix mkdocs warnings #145

Merged
merged 3 commits into from
Oct 20, 2024
Merged

Fix mkdocs warnings #145

merged 3 commits into from
Oct 20, 2024

Conversation

paran1
Copy link

@paran1 paran1 commented Oct 18, 2024

Fix WARNING/INFO messages when running mkdocs.

  • Handle deprecation warnings - change materialx.emoji to material.extensions.emoji
  • Fix broken links

With this PR these are no longer logged:

$ mkdocs serve
INFO    -  DeprecationWarning: 'materialx.emoji.twemoji' is deprecated.
           Material emoji logic has been officially moved into mkdocs-material
           version 9.4. Please use Material's 'material.extensions.emoji.twemoji'
           instead of 'materialx.emoji.twemoji' in your 'mkdocs.yml' file.

           ```
           markdown_extensions:
             - pymdownx.emoji:
                 emoji_index: !!python/name:material.extensions.emoji.twemoji
                 emoji_generator: !!python/name:material.extensions.emoji.to_svg
           ```

           'mkdocs_material_extensions' is deprecated and will no longer be
           supported moving forward. This is the last release.

             File "/venv/lib/python3.10/site-packages/materialx/emoji.py", line 118, in twemoji
               return _patch_index(options)
             File "/venv/lib/python3.10/site-packages/materialx/emoji.py", line 68, in _deprecated_func
               warnings.warn(
WARNING -  Material emoji logic has been officially moved into mkdocs-material
           version 9.4. Please use Material's 'material.extensions.emoji.twemoji'
           instead of 'materialx.emoji.twemoji' in your 'mkdocs.yml' file.

           ```
           markdown_extensions:
             - pymdownx.emoji:
                 emoji_index: !!python/name:material.extensions.emoji.twemoji
                 emoji_generator: !!python/name:material.extensions.emoji.to_svg
           ```

           'mkdocs_material_extensions' is deprecated and will no longer be
           supported moving forward. This is the last release.

...

INFO    -  DeprecationWarning: 'materialx.emoji.to_svg' is deprecated.
           Material emoji logic has been officially moved into mkdocs-material
           version 9.4. Please use Material's 'material.extensions.emoji.to_svg'
           instead of 'materialx.emoji.to_svg' in your 'mkdocs.yml' file.

           ```
           markdown_extensions:
             - pymdownx.emoji:
                 emoji_index: !!python/name:material.extensions.emoji.twemoji
                 emoji_generator: !!python/name:material.extensions.emoji.to_svg
           ```

           'mkdocs_material_extensions' is deprecated and will no longer be
           supported moving forward. This is the last release.

             File "/venv/lib/python3.10/site-packages/pymdownx/emoji.py", line 328, in handleMatch
               el = self.generator(
             File "/venv/lib/python3.10/site-packages/materialx/emoji.py", line 68, in _deprecated_func
               warnings.warn(
WARNING -  Material emoji logic has been officially moved into mkdocs-material
           version 9.4. Please use Material's 'material.extensions.emoji.to_svg'
           instead of 'materialx.emoji.to_svg' in your 'mkdocs.yml' file.

           ```
           markdown_extensions:
             - pymdownx.emoji:
                 emoji_index: !!python/name:material.extensions.emoji.twemoji
                 emoji_generator: !!python/name:material.extensions.emoji.to_svg
           ```

           'mkdocs_material_extensions' is deprecated and will no longer be
           supported moving forward. This is the last release.
INFO    -  Doc file 'software/python.md' contains an unrecognized relative link 'Python versions', it was left as is.
INFO    -  Doc file 'software/r.md' contains an unrecognized relative link 'swcarpentry.github.io/r-novice-inflammation/', it was left as is.
INFO    -  Doc file 'cluster_guides/start_interactive_node.md' contains a link '#when-to-use-an-interactive node', but there is no such anchor on this page.
INFO    -  Doc file 'software/beast2.md' contains a link '../getting_started/login_rackham.md#remote-desktop-via-a-ThinLinc client', but the doc
           'getting_started/login_rackham.md' does not contain an anchor '#remote-desktop-via-a-ThinLinc client'.
INFO    -  Doc file 'software/beast2.md' contains a link '../getting_started/login_rackham.md#remote-desktop-via-the-web', but the doc
           'getting_started/login_rackham.md' does not contain an anchor '#remote-desktop-via-the-web'.
INFO    -  Doc file 'software/install.md' contains a link 'compiling_parallel.md#overview-of-available-compilers-from-gcc-and-intel-and-compatible-mpi-libraries', but
           the doc 'software/compiling_parallel.md' does not contain an anchor '#overview-of-available-compilers-from-gcc-and-intel-and-compatible-mpi-libraries'.
INFO    -  Doc file 'software/jobstats.md' contains a link '#jobstats---plot', but there is no such anchor on this page.
INFO    -  Doc file 'software/python_venv.md' contains a link '../software/python.md#loading-python-modules', but the doc 'software/python.md' does not contain an
           anchor '#loading-python-modules'.
INFO    -  Documentation built in 6.60 seconds

Pär Lindfors added 3 commits October 19, 2024 01:10
Replace materialx with material.extensions.emoji.twemoji and
material.extensions.emoji.to_svg.

Avoids deprecation info/warnings when running mkdocs:

INFO    -  DeprecationWarning: 'materialx.emoji.to_svg' is deprecated.
           Material emoji logic has been officially moved into mkdocs-material
           version 9.4. Please use Material's 'material.extensions.emoji.to_svg'
           instead of 'materialx.emoji.to_svg' in your 'mkdocs.yml' file.

           ```
           markdown_extensions:
             - pymdownx.emoji:
                 emoji_index: !!python/name:material.extensions.emoji.twemoji
                 emoji_generator: !!python/name:material.extensions.emoji.to_svg
           ```

           'mkdocs_material_extensions' is deprecated and will no longer be
           supported moving forward. This is the last release.

WARNING -  Material emoji logic has been officially moved into mkdocs-material
           version 9.4. Please use Material's 'material.extensions.emoji.to_svg'
           instead of 'materialx.emoji.to_svg' in your 'mkdocs.yml' file.

           ```
           markdown_extensions:
             - pymdownx.emoji:
                 emoji_index: !!python/name:material.extensions.emoji.twemoji
                 emoji_generator: !!python/name:material.extensions.emoji.to_svg
           ```

           'mkdocs_material_extensions' is deprecated and will no longer be
           supported moving forward. This is the last release.
Fix all bad links that mkdocs warned about when starting:

INFO    -  Doc file 'software/python.md' contains an unrecognized relative link 'Python versions', it was left as is.
INFO    -  Doc file 'software/r.md' contains an unrecognized relative link 'swcarpentry.github.io/r-novice-inflammation/', it was left as is.
INFO    -  Doc file 'cluster_guides/start_interactive_node.md' contains a link '#when-to-use-an-interactive node', but there is no such anchor on this page.
INFO    -  Doc file 'software/beast2.md' contains a link '../getting_started/login_rackham.md#remote-desktop-via-a-ThinLinc client', but the doc
           'getting_started/login_rackham.md' does not contain an anchor '#remote-desktop-via-a-ThinLinc client'.
INFO    -  Doc file 'software/beast2.md' contains a link '../getting_started/login_rackham.md#remote-desktop-via-the-web', but the doc
           'getting_started/login_rackham.md' does not contain an anchor '#remote-desktop-via-the-web'.
INFO    -  Doc file 'software/install.md' contains a link 'compiling_parallel.md#overview-of-available-compilers-from-gcc-and-intel-and-compatible-mpi-libraries', but
           the doc 'software/compiling_parallel.md' does not contain an anchor '#overview-of-available-compilers-from-gcc-and-intel-and-compatible-mpi-libraries'.
INFO    -  Doc file 'software/jobstats.md' contains a link '#jobstats---plot', but there is no such anchor on this page.
INFO    -  Doc file 'software/python_venv.md' contains a link '../software/python.md#loading-python-modules', but the doc 'software/python.md' does not contain an
           anchor '#loading-python-modules'.
@richelbilderbeek
Copy link
Member

@paran1 this is great! I've always wanted to fix those warnings too! Will happily merge!

@richelbilderbeek richelbilderbeek merged commit bb9219a into main Oct 20, 2024
6 of 8 checks passed
@richelbilderbeek richelbilderbeek deleted the fix_mkdocs_warnings branch October 20, 2024 08:32
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.

2 participants