Skip to content

Commit

Permalink
Docs: add contributing guidelines (#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
Guts authored May 30, 2024
2 parents 0380b65 + 28f7696 commit 2fe6366
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 1 deletion.
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

0 comments on commit 2fe6366

Please sign in to comment.