-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit cdd4d07
Showing
8 changed files
with
1,267 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Tests and Linting | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
Linting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
- uses: pre-commit/[email protected] | ||
env: | ||
SKIP: no-commit-to-branch | ||
|
||
Test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
python-version: ["3.10", "3.11", "3.12"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Poetry & dependencies | ||
run: | | ||
pip install poetry==1.8.2 | ||
poetry install | ||
- name: Test with Pytest on Python | ||
run: poetry run pytest |
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,25 @@ | ||
# OS | ||
.DS_Store | ||
|
||
# IDE | ||
.vscode | ||
.idea | ||
|
||
# Python | ||
__pycache__ | ||
.venv | ||
|
||
# Coverage | ||
.coverage | ||
coverage.xml | ||
|
||
# Notebooks | ||
*.ipynb | ||
.ipynb_checkpoints | ||
|
||
# Secrets | ||
.env | ||
|
||
# Data | ||
data/ | ||
*.db |
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,36 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: no-commit-to-branch | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
args: ["--unsafe"] | ||
- id: check-toml | ||
- id: check-json | ||
- id: check-symlinks | ||
- id: check-docstring-first | ||
- id: check-added-large-files | ||
- id: detect-private-key | ||
- id: pretty-format-json | ||
args: | ||
- "--autofix" | ||
- "--no-sort-keys" | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.3.2 | ||
hooks: | ||
# Run the linter. | ||
- id: ruff | ||
types_or: [python, pyi, jupyter] | ||
args: [--fix] | ||
# Run the formatter. | ||
- id: ruff-format | ||
types_or: [python, pyi, jupyter] | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: "v1.9.0" | ||
hooks: | ||
- id: mypy |
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 @@ | ||
# Persil: a typed "fork" of parsy |
Empty file.
Large diffs are not rendered by default.
Oops, something went wrong.
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,29 @@ | ||
[tool.poetry] | ||
name = "persil" | ||
version = "0.1.0" | ||
description = "" | ||
authors = ["Basile Dura <[email protected]>"] | ||
readme = "README.md" | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.10" | ||
|
||
|
||
[tool.poetry.group.dev.dependencies] | ||
ipykernel = "^6.29.4" | ||
ruff = "^0.3.4" | ||
pre-commit = "^3.7.0" | ||
mypy = "^1.9.0" | ||
pytest = "^8.1.1" | ||
pytest-cov = "^5.0.0" | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.ruff.lint.per-file-ignores] | ||
"__init__.py" = ["F401"] | ||
|
||
[tool.pytest.ini_options] | ||
addopts = "--cov persil --cov-report term --cov-report xml" | ||
testpaths = ["tests"] |
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,2 @@ | ||
def test_dummy(): | ||
pass |