From ac39240638037376da64a05c7c3afe052db4ab38 Mon Sep 17 00:00:00 2001 From: Anna Petrasova Date: Thu, 15 May 2025 13:39:51 -0400 Subject: [PATCH] doc: use absolute links in style guide, add link to cookiecutter --- doc/development/style_guide.md | 18 +++++++++--------- man/mkdocs/docs/development_intro.md | 1 + 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/doc/development/style_guide.md b/doc/development/style_guide.md index cbaeadf8781..69a9cc14df4 100644 --- a/doc/development/style_guide.md +++ b/doc/development/style_guide.md @@ -52,10 +52,10 @@ Use Flake8 to check formatting and basic issues in all files: flake8 python_file.py ``` -The root directory contains [.flake8](../../.flake8) configuration file which -contains a less strict configuration for legacy code. It will be used by default -when running Flake8 within GRASS source code. For new files, you can use the -default configuration: +The root directory contains [.flake8](https://github.com/OSGeo/grass/blob/main/.flake8) +configuration file which contains a less strict configuration for legacy code. +It will be used by default when running Flake8 within GRASS source code. +For new files, you can use the default configuration: ```bash flake8 --isolated --max-line-length=88 {path_to_python_file} @@ -83,11 +83,11 @@ clang-format -i ``` The ClangFormat settings for the repo are defined in -[.clang-format](../../.clang-format). +[.clang-format](https://github.com/OSGeo/grass/blob/main/.clang-format). If using pre-commit is not an option, for whatever reason, there is a helper -script [grass_clang_format.sh](./utils/grass_clang_format.sh), which simplifies -bulk reformatting. +script [grass_clang_format.sh](https://github.com/OSGeo/grass/blob/main/utils/grass_clang_format.sh), +which simplifies bulk reformatting. #### Order of include headers @@ -166,7 +166,7 @@ pre-commit run --files raster/r.sometool/* ``` The pre-commit hooks set is defined in -[.pre-commit-config.yaml](../../.pre-commit-config.yaml). +[.pre-commit-config.yaml](https://github.com/OSGeo/grass/blob/main/.pre-commit-config.yaml). It is possible to temporally disable the pre-commit hooks in the repo, e.g. while working on older branches: @@ -880,7 +880,7 @@ These index manual pages are autogenerated during the build process of GRASS. #### Lazy import of optional dependencies -A tool may use a package that is not [required](../../REQUIREMENTS.md) +A tool may use a package that is not [required](https://github.com/OSGeo/grass/blob/main/REQUIREMENTS.md) by GRASS and may not be available on a user's system. In these cases, import only after the _gs.parser_ call. In that way the tool can be safely compiled even if the dependency is not installed. diff --git a/man/mkdocs/docs/development_intro.md b/man/mkdocs/docs/development_intro.md index 8bc1b97432f..45e8ffaf181 100644 --- a/man/mkdocs/docs/development_intro.md +++ b/man/mkdocs/docs/development_intro.md @@ -26,6 +26,7 @@ The addons are maintained by the GRASS community and are a great way to extend t functionality of GRASS. - [Addons](https://grass.osgeo.org/grass-stable/manuals/addons/) +- [Template for addons](https://github.com/OSGeo/grass-addon-cookiecutter) ## Contributing