Skip to content

Commit

Permalink
bump
Browse files Browse the repository at this point in the history
  • Loading branch information
franneck94 committed Oct 29, 2023
1 parent 2097eda commit 2335309
Show file tree
Hide file tree
Showing 5 changed files with 167 additions and 42 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ reports/
lectures/
logs/
models/
ressources/
.ruff_cache
data/*.h5
venv/
.venv/

################################
########### PYTHON #############
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ repos:
exclude: ^docs/

- repo: https://github.com/psf/black
rev: 23.3.0
rev: 23.10.1
hooks:
- id: black
exclude: ^docs/

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.0.261'
rev: 'v0.1.3'
hooks:
- id: ruff
args: [ --fix, --exit-non-zero-on-fix ]
args: [ --fix, --exit-non-zero-on-fix ]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.2.0
rev: v1.6.1
hooks:
- id: mypy
exclude: ^docs/
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,8 @@ This would result in the following console output:
}
--------------------------------------------------
```

### Callabcks

Adding Callbacks like TensorBoard is easy.
Just pass the callbacks list to the .fit mehtod like you would do with a normal keras Model.
149 changes: 135 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,33 +1,154 @@
[tool.black]
target-version = ['py310']
line-length = 80
skip-string-normalization = true
skip-string-normalization = false
skip-magic-trailing-comma = false
extend-exclude = '''
/(
| docs
| setup.py
)/
'''

[tool.isort]
py_version = 310
sections = [
"FUTURE",
"STDLIB",
"THIRDPARTY",
"FIRSTPARTY",
"LOCALFOLDER"
]
default_section = "FIRSTPARTY"
known_third_party = [
"numpy",
"pandas",
"keras",
"tensorflow",
"sklearn",
"matplotlib",
"scipy",
"h5py",
"seaborn",
"numba",
"gym",
"PyQt5",
"PyQt6",
"pyqtgraph",
"torch",
"tqdm",
"cv2",
"skimage",
"tensorcross",
"tensorflow_datasets",
"scikeras"
]
known_first_party = []
known_local_folder = []
# style: black
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
line_length = 80
split_on_trailing_comma = true
lines_after_imports = 2
force_single_line = true
skip_glob = [
"docs/*",
"setup.py"
]

[tool.mypy]
# Platform configuration
python_version = "3.10"
# imports related
ignore_missing_imports = true
follow_imports = "silent"
# None and Optional handling
no_implicit_optional = true
strict_optional = true
# Configuring warnings
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
warn_return_any = false
# Untyped definitions and calls
check_untyped_defs = true
disallow_untyped_calls = false
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_decorators = false
# Disallow dynamic typing
disallow_subclassing_any = true
disallow_any_unimported = false
disallow_any_expr = false
disallow_any_decorated = false
disallow_any_explicit = false
disallow_any_generics = false
# Miscellaneous strictness flags
allow_untyped_globals = true
allow_redefinition = false
local_partial_types = false
implicit_reexport = true
strict_equality = true
# Configuring error messages
show_error_context = false
show_column_numbers = false
show_error_codes = true
exclude = ["examples"]

[tool.ruff]
target-version = "py310"
select = ["F", "E"]
extend-select = ["W", "I", "B", "UP", "PLE", "PLW", "NPY", "RUF", "PD", "SIM", "PT"]
fixable = ["E", "F", "W", "I"]
unfixable = ["B", "UP", "PLE", "PLW", "NPY", "RUF", "PD", "SIM", "PT"]
ignore = ["F401","E402","C408","C416", "UP006", "UP007", "UP035", "UP038", "B905", "NPY002"]

extend-select = ["W", "C90", "I", "N", "UP", "YTT", "ANN", "ASYNC", "B", "A", "C4", "DTZ", "FA", "ISC", "ICN", "PIE", "PYI", "PT", "RET", "SLOT", "SIM", "ARG", "PTH", "PD", "PLC", "PLE", "PLR", "PLW", "FLY", "NPY", "PERF", "RUF"]
ignore = ["I001", "ANN401", "SIM300", "PERF203", "ANN101", "B905"]
fixable = ["F", "E", "W", "C90", "I", "N", "UP", "YTT", "ANN", "ASYNC", "B", "A", "C4", "DTZ", "FA", "ISC", "ICN", "PIE", "PYI", "PT", "RET", "SLOT", "SIM", "ARG", "PTH", "PD", "PLC", "PLE", "PLR", "PLW", "FLY", "NPY", "PERF", "RUF"]
unfixable = []
line-length = 80
extend-exclude = ["tests", "test"]
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"

[tool.ruff.isort]
force-single-line = true
force-sort-within-sections = false
lines-after-imports = 2

[tool.ruff.mccabe]
max-complexity = 10

max-complexity = 24
[tool.ruff.pycodestyle]
ignore-overlong-task-comments = true

[tool.ruff.pydocstyle]
convention = "numpy"

[tool.ruff.flake8-annotations]
allow-star-arg-any = true
ignore-fully-untyped = true
allow-star-arg-any = false
ignore-fully-untyped = false
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"

[tool.pyright]
pythonVersion = "3.10"
typeCheckingMode = "basic"
# enable subset of "strict"
reportDuplicateImport = true
reportInvalidStubStatement = true
reportOverlappingOverload = true
reportPropertyTypeMismatch = true
reportUntypedClassDecorator = true
reportUntypedFunctionDecorator = true
reportUntypedNamedTuple = true
reportUnusedImport = true
# disable subset of "basic"
reportGeneralTypeIssues = false
reportMissingModuleSource = false
reportOptionalCall = false
reportOptionalIterable = false
reportOptionalMemberAccess = false
reportOptionalOperand = false
reportOptionalSubscript = false
reportPrivateImportUsage = false
reportUnboundVariable = true
43 changes: 19 additions & 24 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,29 +1,24 @@
# Runtime requirements
--requirement requirements.txt

# Packaging
setuptools
wheel
twine

# Docs
mkdocs
mkdocstrings[python]
mkdocs-autorefs
mkdocs-material
mkdocs-material-extensions
mkdocstrings
pygments
setuptools>=68.2.2
build>=1.0.3
twine>=4.0.2

# Linting/Tooling
black>=23.3.0
black>=23.10.1
isort>=5.12.0
mypy>=1.2.0
pre-commit>=3.2.2
ruff>=0.0.262
mypy>=1.6.1
pre-commit>=3.5.0
ruff>=0.1.3
pyright>=1.1.333

# Testing
pytest
codecov
pytest-cov
tox
pytest>=7.4.3
codecov>=2.1.13
pytest-cov>=4.1.0
pytest-benchmark>=4.0.0

# Documentation
mkdocs>=1.5.3
mkdocstrings>=0.23.0
mkdocstrings-python>=1.7.3
mkdocs-material>=9.4.6
Pygments>=2.16.1

0 comments on commit 2335309

Please sign in to comment.