Closed Mews closed 3 months ago
This update refines the documentation and codebase of a Flask application by replacing full path references with relative paths for better readability. It includes changes to the api.rst
, conf.py
, decorators.py
, and errors/__init__.py
files, focusing on simplifying exception handling and documentation references.
Files/Paths | Change Summaries |
---|---|
docs/source/api.rst |
Updated documentation to use FlaskUtils class methods directly for error handling setup. |
docs/source/conf.py |
Added add_module_names = False configuration for EPUB output. |
flask_utils/decorators.py |
Changed docstring in validate_params to raise BadRequestError instead of full path reference. |
flask_utils/errors/__init__.py |
Updated references to FlaskUtils class and methods to use relative paths with ~ symbol. |
Objective (Issue #10) | Addressed | Explanation |
---|---|---|
Refactor documentation to avoid full links | β |
In the world of Flask, a change so bright, Simplifying paths, making docs light.
FlaskUtils
now stands clear and tall, With shorter links, we heed the call. A rabbit hops, in joy it sings, For clarity, these updates bring.
[!WARNING]
Review ran into problems
Problems (1)
* Git: Failed to clone repository. Please contact CodeRabbit support.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Oh wow I didn't think it would be that easy, nice one ! π
I have found some full links still, they might be due to me hard-coding them, but here are the links to the preview build of your PR where I found them, ideally if you could fix those as well in the same PR it would be amazing !
https://flask-utils--29.org.readthedocs.build/en/29/api.html#custom-exceptions
https://flask-utils--29.org.readthedocs.build/en/29/api.html#module-flask_utils.decorators
Oops yeah I didn't realise that, I fixed that now
Is it? I counted 69 characters but I'll shorten it
Also sphinx-lint
detected some trailing whitespaces
Oh mb where are they, I can't see the logs
Oh mb where are they, I can't see the logs
No worries haha, that's why I recommend you install pre-commit
like explained in CONTRIBUTING.md
I had it installed but I cleared my venv and I forgot :/ I'll fix it now
Don't forget to do pre-commit install
and then pre-commit install --hook-type commit-msg
Done!
Weirdly, your commit still isn't passing. Do you want to try again or do you want me to do it ?
The commit message? Which one is failing I can change it again
This one weirdly
Mhm that's definitely less than 72 characters
Want me to try ? Don't touch your branch I'll try and fix it if you're ok with it
Okay π
Hmm still trying to figure it out
Here I fixed it by force. I removed the 72
chars limit. It's dumb anyway, and that way I will enforce it manually, or switch to using a better commit format (see #31)
Thank you for the PR @Mews ! π
Description
Modified the sphinx config file to not include full paths when building the docs
Related Issue
Checklist
Type of change
π Documentation preview π: https://flask-utils--29.org.readthedocs.build/en/29/
Summary by CodeRabbit
Documentation
FlaskUtils
class methods for error handling.add_module_names = False
for EPUB output inconf.py
.validate_params
function's docstring.Refactor
FlaskUtils
class and methods for improved readability and maintainability.