-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configs for `isort` and `black` are placed in `pyproject.toml` Pre-commit hooks are set. Github action workflow `lint` is also added. Only checked push are permitted to trigger a release.
- Loading branch information
1 parent
8e55104
commit eeff8e5
Showing
10 changed files
with
110 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: check-case-conflict | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: name-tests-test | ||
- id: requirements-txt-fixer | ||
- id: detect-private-key | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
args: ["--profile", "black", "--line-length=100", "--python-version=38"] | ||
- repo: https://github.com/psf/black | ||
rev: 23.9.0 | ||
hooks: | ||
- id: black | ||
args: ["--line-length=100", "--target-version=py38"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Contributing to the project | ||
|
||
This project is still under construction. We welcome any contributions. Please **carefully** read the following instructions before contributing. | ||
|
||
## Code style | ||
|
||
We use `isort` with `black` to enforce a consistent code style. | ||
```shell | ||
pip install isort==5.12.0 black==23.9.0 | ||
``` | ||
|
||
Configs can be found in `pyproject.toml`. | ||
|
||
CI also checks code style before pushing to `main` branch. Try to run `isort` and `black` locally before pushing to avoid unnecessary CI failures: | ||
```shell | ||
isort . | ||
black . | ||
``` | ||
|
||
### Pre-commit hook | ||
|
||
To automatically run `isort` and `black` before each commit, install `pre-commit`: | ||
```shell | ||
pip install pre-commit | ||
``` | ||
|
||
Then run `pre-commit install` to install the hook. | ||
|
||
## Commit message | ||
|
||
Check out [this article](https://www.conventionalcommits.org/en/v1.0.0/) for a detailed explanation of how to write a good commit message. | ||
|
||
Commit messages started with `feat` will trigger a major version bump, `fix` will trigger a minor version bump. | ||
|
||
Also check out [semantic-release](https://github.com/semantic-release/semantic-release) for details. | ||
|
||
## Test | ||
|
||
⚠ Under construction. ⚠ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
[build-system] | ||
requires = ["setuptools"] | ||
build-backend = "setuptools.build_meta" | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.isort] | ||
profile = "black" | ||
py_version = "38" | ||
line_length = 100 | ||
|
||
[tool.black] | ||
line-length = 100 | ||
target-version = ["py38"] | ||
include = '\.pyi?$' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
from .alert import * | ||
from .arbitration import * | ||
from .archon_hunt import * | ||
from .cambion_drift import * | ||
from .cetus import * | ||
from .counted_item import * | ||
from .daily_deal import * | ||
from .event import * | ||
from .fissure import * | ||
from .flash_sale import * | ||
from .invasion import * | ||
from .mission import * | ||
from .orb_vallis import * | ||
from .arbitration import * | ||
from .counted_item import * | ||
from .reward import * | ||
from .mission import * | ||
from .invasion import * | ||
from .void_trader import * | ||
from .fissure import * | ||
from .archon_hunt import * | ||
from .sortie import * | ||
from .event import * | ||
from .void_trader import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters