-
Notifications
You must be signed in to change notification settings - Fork 3
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
floriscalkoen
committed
Oct 8, 2024
1 parent
c55f43d
commit 3dc94dd
Showing
8 changed files
with
129 additions
and
45 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 |
---|---|---|
|
@@ -160,3 +160,6 @@ dist* | |
|
||
# duckdb | ||
*:memory* | ||
|
||
src/coastpy/_version.py | ||
*.vscode* |
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,23 +1,32 @@ | ||
ci: | ||
autofix_prs: false | ||
autofix_prs: true | ||
autoupdate_schedule: weekly | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
rev: v4.6.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: debug-statements | ||
- id: check-json | ||
- id: check-yaml | ||
- id: check-toml | ||
- id: check-added-large-files | ||
- id: pretty-format-json | ||
exclude: '\.ipynb$' | ||
- id: sort-simple-yaml | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 23.7.0 | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.5.1 | ||
hooks: | ||
- id: black | ||
language_version: python3.11 | ||
# Run the linter. | ||
- id: ruff | ||
args: [ --fix ] | ||
# Run the formatter. | ||
- id: ruff-format | ||
|
||
- repo: https://github.com/kynan/nbstripout | ||
rev: 0.6.1 | ||
rev: 0.7.1 | ||
hooks: | ||
- id: nbstripout |
This file was deleted.
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
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,7 +1,79 @@ | ||
[tool.black] | ||
line-length = 88 | ||
[build-system] | ||
requires = ["hatchling", "hatch-vcs"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "coclico" | ||
dynamic = ["version"] | ||
description = "Python tools for the CoCliCo workbench" | ||
authors = [{ name = "Floris Calkoen", email = "[email protected]"}] | ||
license = "MIT" | ||
readme = "README.md" | ||
requires-python = ">=3.11" | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Topic :: Scientific/Engineering", | ||
] | ||
|
||
dependencies = [] | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"black", | ||
"coverage", | ||
"flake8", | ||
"isort", | ||
"mypy", | ||
"nbsphinx", | ||
"pre-commit", | ||
"pytest-cov", | ||
"pytest-mock", | ||
"pytest", | ||
"ruff", | ||
"sphinx-gallery", | ||
"sphinx-rtd-theme", | ||
"sphinx", | ||
] | ||
|
||
docs = [ | ||
"nbsphinx", | ||
"sphinx", | ||
"sphinx-gallery", | ||
"sphinx-rtd-theme", | ||
] | ||
|
||
test = [ | ||
"black", | ||
"coverage", | ||
"flake8", | ||
"isort", | ||
"pytest", | ||
"pytest-cov", | ||
"pytest-mock", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/TUDelft-CITG/coastpy" | ||
|
||
[tool.hatch.version] | ||
source = "vcs" | ||
|
||
[tool.hatch.build.hooks.vcs] | ||
version-file = "src/coclico/_version.py" | ||
|
||
|
||
[tool.ruff] | ||
line-length = 88 | ||
src = ["src"] | ||
target-version = "py312" | ||
|
||
|
||
[tool.ruff.lint] | ||
select = [ | ||
"E", "F", "W", # flake8 | ||
"B", # flake8-bugbear | ||
|
@@ -10,33 +82,25 @@ select = [ | |
"C4", # flake8-comprehensions | ||
"EM", # flake8-errmsg | ||
"ICN", # flake8-import-conventions | ||
"ISC", # flake8-implicit-str-concat | ||
"PGH", # pygrep-hooks | ||
"PIE", # flake8-pie | ||
"PL", # pylint | ||
"PT", # flake8-pytest-style | ||
"PTH", # flake8-use-pathlib | ||
"RUF", # Ruff-specific | ||
"SIM", # flake8-simplify | ||
"TID251", # flake8-tidy-imports.banned-api | ||
"T20", # flake8-print | ||
"UP", # pyupgrade | ||
"YTT", # flake8-2020 | ||
] | ||
extend-ignore = [ | ||
"PLR", # Design related pylint codes | ||
"E501", # Line too long | ||
"E402", # Module level import not at top of file | ||
"PT004", # Incorrect check, usefixtures is the correct way to do this | ||
"RUF012", # Would require a lot of ClassVar's | ||
] | ||
src = ["src"] | ||
unfixable = [ | ||
"T20", # Removes print statements | ||
"F841", # Removes unused variables | ||
] | ||
|
||
exclude = [] | ||
target-version = "py311" | ||
flake8-unused-arguments.ignore-variadic-names = true | ||
unfixable = [] | ||
|
||
[tool.ruff.pydocstyle] | ||
convention = "google" | ||
[tool.ruff.lint.pydocstyle] | ||
convention = "google" |
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,4 @@ | ||
from ._version import __version__ | ||
from .example_module import example_function | ||
|
||
__all__ = ["__version__", "example_function"] |
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,16 @@ | ||
# file generated by setuptools_scm | ||
# don't change, don't track in version control | ||
TYPE_CHECKING = False | ||
if TYPE_CHECKING: | ||
from typing import Tuple, Union | ||
VERSION_TUPLE = Tuple[Union[int, str], ...] | ||
else: | ||
VERSION_TUPLE = object | ||
|
||
version: str | ||
__version__: str | ||
__version_tuple__: VERSION_TUPLE | ||
version_tuple: VERSION_TUPLE | ||
|
||
__version__ = version = '0.1.dev43+g80da1ae.d20241008' | ||
__version_tuple__ = version_tuple = (0, 1, 'dev43', 'g80da1ae.d20241008') |
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 example_function(): | ||
return "Example Output" |