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

Docs: add contributing guidelines #282

Merged
merged 2 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Contributing Guidelines

First off, thanks for considering to contribute to this project!

These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.

## Versioning and changelog

This project adheres to [Semantic Versioning](https://semver.org/).
The CHANGELOG format tries to complies with [Keep a Changelog](https://keepachangelog.com/) but it's mainly a concatenation of autogenerated release notes by GitHub Release.

## Git hooks

We use git hooks through [pre-commit](https://pre-commit.com/) to enforce and automatically check some "rules". Please install it before any commit: `pre-commit install`.

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: [google-style](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html) is used to write technical documentation right into the code.
- 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.

## Security

As the aim of this project is to be carried out on large-scale IT infrastructures, security is one of the development challenges. It's enforced through automated checks, which are mainly executed in CI. But there are a few best practices to bear in mind:

- give preference to the standard Python library, even it's longer to develop
- or consider adding an additional third-party dependency (interest, consequences, linked dependencies, etc.)
- take security alerts into account

## IDE

Feel free to use the IDE you love. Here come configurations for some popular IDEs to fit those guidelines.

### Visual Studio Code

It's the IDE used by the main developer, so the configuration is tracked on this repository until new contributors with other IDEs are joining the project.

Configuration is under: [.vscode/settings.json](/.vscode/settings.json)
2 changes: 2 additions & 0 deletions docs/development/contribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
```{include} ../../CONTRIBUTING.md
```
3 changes: 2 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ maxdepth: 1
caption: Usage
---
usage/cli
settings
```

```{toctree}
Expand All @@ -39,7 +40,6 @@ maxdepth: 2
caption: Miscellaneous
titlesonly: true
---
settings
misc/formats_matrix
misc/compatibility
misc/credits
Expand All @@ -54,6 +54,7 @@ misc/credits
maxdepth: 2
caption: Development
---
development/contribute
development/windows
development/ubuntu
development/tests
Expand Down
Binary file added docs/static/img/dicogis_gui_settings.webp
Binary file not shown.
6 changes: 6 additions & 0 deletions docs/settings.md → docs/usage/settings.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Configuration

## Using graphical interface

Options are accessible through the `Settings` tab:

![DicoGIS GUI settings tags](../static/img/dicogis_gui_settings.webp)

## Using environment variables

Some options and arguments can be set with environment variables.
Expand Down