prcr/mkdocs-meta-descriptions-plugin

Review code to take into account the changes from MkDocs 1.5.0

prcr opened this issue · 2 comments

prcr commented

Go through the breaking changes from the MkDocs 1.5.0 changelog and make any necessary changes to the code to ensure that it is compatible with MkDocs 1.5.0.

In particular, some WARNING log messages are now being output with the DEBUG log level instead.

Cc: @autopilot

Based on the analysis of the relevant files in the project, here's how you can ensure compatibility with MkDocs 1.5.0:

  1. Review the MkDocs 1.5.0 changelog: Go through the MkDocs 1.5.0 changelog to understand the breaking changes.

  2. Check the usage of the MkDocs API in the plugin: In the mkdocs_meta_descriptions_plugin/plugin.py file, ensure that all the methods and properties used are still available and work as expected in MkDocs 1.5.0. Pay special attention to the on_config, on_page_content, on_post_page, and on_post_build methods, as they interact directly with the MkDocs build process.

  3. Review the logging functionality: In the mkdocs_meta_descriptions_plugin/common.py file, the Logger class is used to log messages at different levels. The user mentioned that some WARNING log messages are now being output with the DEBUG log level instead. Check the logger.write calls in the plugin and adjust the log levels if necessary.

  4. Test the plugin with MkDocs 1.5.0: Make sure it works as expected. If any issues are found, debug and fix them.

  5. Update the plugin's documentation: Once all changes are made and tested, indicate that it is compatible with MkDocs 1.5.0.

  6. Update the CHANGELOG.md file: Add a new section to document the changes made to the code for compatibility with MkDocs 1.5.0. The new section should be added at the top of the file, under the existing change log entries, and should follow the same format as the previous entries.

Remember to thoroughly test the logging functionality after updating to MkDocs 1.5.0 to ensure that everything is working as expected.

Changes on mkdocs_meta_descriptions_plugin/common.py

The task requires to review the code and make necessary changes to ensure compatibility with the new log levels in MkDocs 1.5.0.

In the provided code, the Logger class is used to log messages at different levels (Debug, Info, Warning, Error). The 'write' method is used to log messages at the appropriate level.

According to the task description, some WARNING log messages are now being output with the DEBUG log level instead in MkDocs 1.5.0. However, the current code does not seem to have any issues with this change as it already handles DEBUG and WARNING log levels separately.

Therefore, no changes are required in this file to ensure compatibility with MkDocs 1.5.0.

However, it would be a good idea to thoroughly test the logging functionality after updating to MkDocs 1.5.0 to ensure that everything is working as expected.

Changes on mkdocs_meta_descriptions_plugin/plugin.py

The file mkdocs_meta_descriptions_plugin/plugin.py is a plugin for MkDocs that adds meta descriptions to the pages. It has several configuration options and methods that are called during different stages of the MkDocs build process.

To ensure compatibility with MkDocs 1.5.0, you should:

  1. Review the MkDocs 1.5.0 changelog to understand the breaking changes.

  2. Check the usage of the MkDocs API in the plugin. Make sure that all the methods and properties used are still available and work as expected in MkDocs 1.5.0. Pay special attention to the on_config, on_page_content, on_post_page, and on_post_build methods, as they interact directly with the MkDocs build process.

  3. Review the logging functionality. The user mentioned that some WARNING log messages are now being output with the DEBUG log level instead. Check the logger.write calls in the plugin and adjust the log levels if necessary.

  4. Test the plugin with MkDocs 1.5.0 to make sure it works as expected. If any issues are found, debug and fix them.

  5. Once all changes are made and tested, update the plugin's documentation to indicate that it is compatible with MkDocs 1.5.0.

Changes on CHANGELOG.md

To solve this task, you need to add a new section in the CHANGELOG.md file to document the changes made to the code for compatibility with MkDocs 1.5.0.

The new section should be added at the top of the file, under the existing change log entries, and should follow the same format as the previous entries.

The section should start with the new version number (which should be incremented based on the changes made), followed by the date in parentheses.

Then, under the "Changed" subheading, you should describe the changes made to the code to ensure compatibility with MkDocs 1.5.0.

If any new features were added or existing features were removed as part of these changes, these should be documented under the "Added" and "Removed" subheadings, respectively.

If any bugs were fixed as part of these changes, these should be documented under the "Fixed" subheading.

Finally, if there were any other notable changes that don't fit into these categories, these can be documented under the "Miscellaneous" subheading.

Remember to provide links to relevant issues or pull requests, if applicable.


Current plan usage: NaN%


Have feedback or need help?
Send me an email to support@codeautopilot.com - my name is Fábio
Join us on Discord

prcr commented

Fixed in #266 and #267.