From 221c98af77c62783870296c5b9700f30ba3613d6 Mon Sep 17 00:00:00 2001 From: Julien Moura Date: Mon, 30 Sep 2024 15:37:48 +0200 Subject: [PATCH 1/2] update(tooling): add rules regarding coding practices in contributing guidelines --- CONTRIBUTING.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d6830f7..f35f655 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,3 +9,14 @@ These are mostly guidelines, not rules. Use your best judgment, and feel free to We use git hooks through [pre-commit](https://pre-commit.com/) to enforce and automatically check some "rules". Please install them (`pre-commit install`) before to push any commit. See the relevant configuration file: `.pre-commit-config.yaml`. + +## Code Style + +Make sure your code *roughly* follows [PEP-8](https://www.python.org/dev/peps/pep-0008/) and keeps things consistent with the rest of the code: + +- docstrings: [sphinx-style](https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docstrings.html#the-sphinx-docstring-format) is used to write technical documentation. +- formatting: [black](https://black.readthedocs.io/) is used to automatically format the code without debate. +- sorted imports: [isort](https://pycqa.github.io/isort/) is used to sort imports +- static analisis: [flake8](https://flake8.pycqa.org/en/latest/) is used to catch some dizziness and keep the source code healthy. + +[ruff](https://docs.astral.sh/ruff/) is also used to homogeneize rules and perform most of operations as quick as is "rust" possible. From 55bd5b382e4d3b615c85a055ce62404774ed7a5a Mon Sep 17 00:00:00 2001 From: Julien Moura Date: Mon, 30 Sep 2024 15:38:13 +0200 Subject: [PATCH 2/2] update(tooling): complete git ignore with classic (gitignore.io) --- .gitignore | 137 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 133 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index ab9713d..4370d8c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,108 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +junit/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_apidoc/ +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + # Environments .env .venv @@ -7,13 +112,37 @@ ENV/ env.bak/ venv.bak/ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + + +# ########################################## +# Custom ################################### +# ########################################## + +# PyQt/PyQGIS artefacts +profile_manager/gui/*.db +profile_manager/resources/**/*.db # IDE .idea +*.zip # packaging +plugins.xml zip_build