123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317 |
- [build-system]
- build-backend = "hatchling.build"
- requires = ["hatchling"]
- [project]
- authors = [
- {name = 'Daniele Arosio', email = 'darosio@duck.com'}
- ]
- classifiers = [
- "Environment :: Console",
- "Operating System :: OS Independent",
- "Programming Language :: Python :: 3 :: Only",
- "Programming Language :: Python :: 3.11",
- "Programming Language :: Python :: 3.12",
- "Programming Language :: Unix Shell",
- "Intended Audience :: Science/Research",
- "Topic :: Scientific/Engineering",
- "Development Status :: 3 - Alpha"
- ]
- dependencies = [
- "bioio == 1.0.2",
- "click == 8.1.7",
- "dask-image",
- "nima",
- "numpy",
- "scikit-image",
- "scipy",
- "seaborn",
- "opencv-python == 4.10.0.84",
- "tifffile", # ==2024.5.22
- "tqdm",
- "zarr" # ==2.18.2
- ]
- description = "CRISPR-λ data project."
- keywords = ["continuous evolution", "CRISPR"]
- license = "BSD-3-Clause"
- name = "dt_evolv"
- requires-python = ">=3.11"
- version = "0.0.1"
- [project.optional-dependencies]
- dev = [
- "commitizen",
- "ipykernel",
- "jupyter",
- "ruff",
- "pre-commit",
- "pylsp-mypy==0.6.8",
- "ruff-lsp == 0.0.53"
- ]
- docs = [
- "autodocsumm",
- "nbsphinx",
- "pydata-sphinx-theme",
- "Sphinx",
- "sphinx-click",
- "sphinx_autodoc_typehints",
- "sphinxcontrib-plantuml"
- ]
- tests = [
- "coverage[toml]",
- "mypy",
- "pygments", # color xdoctest
- "pytest",
- "types-click",
- "types-tqdm",
- "xdoctest"
- ]
- [project.scripts]
- evolv = "dt_evolv.__main__:evolv"
- [tool.codespell]
- count = true
- ignore-words-list = "ciao"
- quiet-level = 3
- [tool.commitizen]
- name = "cz_customize"
- tag_format = "v$version"
- version = "0.0.1"
- version_files = [
- "pyproject.toml:version",
- "docs/conf.py:release",
- "tests/test_cli.py:expected_version",
- "Readme.org:Version"
- ]
- [tool.commitizen.customize]
- bump_map = {"^.+!:" = "MAJOR", "BREAKING CHANGE" = "MAJOR", "feat" = "MINOR", "fix" = "PATCH", "perf" = "PATCH", "refactor" = "PATCH"}
- bump_pattern = "^(BREAKING CHANGE|feat|fix|perf|refactor)"
- change_type_map = {"feat" = "Feat", "fix" = "Fix", "docs" = "Docs", "build" = "Build", "style" = "Style", "refactor" = "Refactor", "perf" = "Perf", "test" = "Test", "ci" = "CI/CD"}
- change_type_order = ["BREAKING CHANGE", "Feat", "Fix", "Docs", "Style", "Perf", "Test", "Build", "CI/CD"]
- changelog_pattern = "^(feat|fix|docs|style|refactor|perf|test|build|ci)?(\\(.*\\))?(!)?"
- commit_parser = "^(?P<change_type>feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\\((?P<scope>[^()\r\n]*)\\)|\\()?(?P<breaking>!)?:\\s(?P<message>.*)?"
- example = """fix(parser): correct minor typos in code\n
- see the issue for details on the typos fixed\n
- closes issue #12
- """
- info_path = "cz_customize_info.txt"
- message_template = "{{change_type}}:{% if show_message %} {{message}}{% endif %}"
- schema = """
- <type>(<scope>): <subject>
- <BLANK LINE>
- <body>
- <BLANK LINE>
- (BREAKING CHANGE: )<footer>
- """
- schema_pattern = "^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert|bump)(?:\\(([^()\r\n]*)\\)|\\()?(!)?:\\s(.*)?|^git-annex in"
- [[tool.commitizen.customize.questions]]
- choices = [
- {value = "feat", name = "feat: A new feature. Correlates with MINOR in SemVer"},
- {value = "fix", name = "fix: A bug fix. Correlates with PATCH in SemVer"},
- {value = "perf", name = "perf: A code change that improves performance. Correlates with PATCH in SemVer"},
- {value = "docs", name = "docs: Documentation only changes"},
- {value = "style", name = "style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)"},
- {value = "refactor", name = "refactor: A code change that neither fixes a bug nor adds a feature"},
- {value = "test", name = "test: Adding missing or correcting existing tests"},
- {value = "build", name = "build: Changes that update the build system, development tools or external dependencies"},
- {value = "ci", name = "ci: Changes to our CI configuration files and scripts (example scopes: GitLabCI)"},
- {value = "revert", name = "revert: Reverting to previous commit(s)."}
- ]
- message = "Select the type of change you are committing"
- name = "change_type"
- type = "list"
- [[tool.commitizen.customize.questions]]
- message = "Body."
- name = "message"
- type = "input"
- [[tool.commitizen.customize.questions]]
- message = "Do you want to add body message in commit?"
- name = "show_message"
- type = "confirm"
- [tool.coverage.paths]
- source = ["src", "*/site-packages"]
- tests = ["tests", "*/tests"]
- [tool.coverage.report]
- # fail_under = 100
- exclude_lines = [
- "pragma: no cover"
- ]
- show_missing = true
- [tool.coverage.run]
- branch = true
- omit = ["*__init__.py"]
- source = ["dt_evolv", "tests"]
- [tool.hatch.envs.default]
- features = ["dev", "tests", "docs"]
- [tool.hatch.envs.default.scripts]
- # {args} e.g. "--increment PATCH"
- bump = [
- "cz bump --major-version-zero -ch {args}"
- ]
- ch = "cz ch --incremental --unreleased-version HEAD"
- clean = "rm -rf ./build .coverage ./__pycache__ ./.mypy_cache ./.pytest_cache ./docs/_build ./tests/__pycache__ ./dist ./src/dt_evolv/__pycache__"
- docs = "sphinx-build docs docs/_build"
- docserve = "python -m http.server 8000 -d docs/_build"
- init = [
- "pre-commit --version",
- "pre-commit install",
- "pre-commit install --hook-type commit-msg --hook-type pre-push"
- ]
- lint = [
- "pre-commit --version",
- "pre-commit run --all-files --show-diff-on-failure {args}" # No need for --hook-stage=manual
- ]
- [tool.hatch.envs.tests]
- features = ["tests"]
- template = "tests"
- [[tool.hatch.envs.tests.matrix]]
- python = ["3.12", "3.11"]
- [tool.hatch.envs.tests.scripts]
- all = ["test", "type", "xdoc", "cov"]
- cov = [
- "coverage combine",
- "coverage report",
- "coverage xml"
- ]
- test = "coverage run -p -m pytest"
- type = "mypy src tests docs/conf.py"
- xdoc = "python -m xdoctest dt_evolv all"
- [tool.isort]
- combine_as_imports = true
- force_single_line = false
- include_trailing_comma = true
- known_first_party = "dt_evolv"
- line_length = 88 # to match black's default line length
- multi_line_output = 3
- profile = "black"
- [tool.mypy]
- enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
- exclude = ""
- plugins = ["numpy.typing.mypy_plugin"]
- pretty = true
- show_column_numbers = true
- show_error_codes = true
- show_error_context = true
- strict = true
- warn_unreachable = true
- warn_unused_configs = true
- [tool.pylint.format]
- ignore-long-lines = "^\\s*(# )?<?https?://\\S+>?$|# type: ignore|# noqa:|# nosec \"|# pylint:"
- max-line-length = 88
- max-module-lines = 1600
- [tool.pylint.main]
- ignore-paths = [""]
- jobs = 0
- py-version = "3.12"
- [tool.pylint.messages_control]
- disable = [
- "invalid-name",
- "design",
- "fixme"
- ]
- [tool.pylint.refactoring]
- # Maximum number of nested blocks for function / method body
- max-nested-blocks = 8 # default 5
- [tool.pylint.reports]
- output-format = "colorized"
- [tool.pylsp-mypy]
- dmypy = false
- enabled = true
- live_mode = true
- strict = true
- [tool.ruff]
- extend-exclude = ["data/", "docs/202*.ipynb"]
- extend-include = ["*.ipynb"]
- force-exclude = true
- line-length = 88
- target-version = "py312"
- [tool.ruff.format]
- docstring-code-format = true
- [tool.ruff.lint]
- ignore = ["ANN101", "ANN102", "ISC001"]
- select = [
- "A", # builtins
- "ANN", # typing annotation
- "ARG", # unused arguments
- "B", # bugbear
- "BLE", # blind-except
- "C",
- "C4", # comprehensions
- "C90", # mccabe
- "D", # pydocstyle
- "DTZ", # dates
- "E", # pycodestyle
- "TRY", # exceptions
- "EM", # exceptions
- "ERA", # eradicate
- "F", # pyflakes
- "FBT", # boolean-trap
- "FLY", # flyntp
- "FURB", # refurbishing and modernizing
- "I", # isort
- "ICN", # import conventions (opinionated)
- "ISC", # implicit-str-concat
- "N", # pep8-naming
- "NPY",
- "AIR", # airflow
- "PERF", # pperformance anti pattern
- "PD", # pandas-vet
- "PGH", # pygrep WAIT
- "PL", # pylint see PLR2004...
- "PT", # pytest-style
- "PTH", # use-pathlib
- "Q", # quotes
- "RET", # Return
- "RSE", # Raise
- "RUF", # Ruff
- "S", # bandit XXX
- "SLF", # private self
- "SLOT", # __slot__
- "SIM", # simplify
- "TID", # tidy-imports
- "TCH", # TYPE_CHECKING
- "TRY", # tryceratops
- # "TD", # TODOs
- # "FIX", #
- "UP", # pyupgrade
- "YTT", # 2020
- "W" # pycodestyle
- ]
- isort.combine-as-imports = true
- isort.force-single-line = false
- isort.known-first-party = ["dt_evolv"]
- isort.split-on-trailing-comma = true
- mccabe.max-complexity = 12
- [tool.ruff.lint.per-file-ignores]
- "*.ipynb" = ["ERA", "E501", "ANN", "D", "EM", "TRY", "PLR", "PTH", "PLW2901", "F"]
- "__init__.py" = ["I002"] # don't need annotations
- "tests/*" = ["PLR2004", "S101"]
- [tool.ruff.lint.pydocstyle]
- convention = "numpy"
|