|
| 1 | +[project] |
| 2 | +name = "pz-rail" |
| 3 | +description = "Redshift Assessment Infrastructure Layers" |
| 4 | +readme = "README.rst" |
| 5 | +requires-python = ">=3.8" |
| 6 | +license = { file = "LICENSE" } |
| 7 | +authors = [ |
| 8 | + { name = "The LSST DESC PZ WG", email = "[email protected]" } |
| 9 | +] |
| 10 | +classifiers = [ |
| 11 | + "Development Status :: 4 - Beta", |
| 12 | + "License :: OSI Approved :: MIT License", |
| 13 | + "Intended Audience :: Developers", |
| 14 | + "Intended Audience :: Science/Research", |
| 15 | + "Programming Language :: Python", |
| 16 | + "Programming Language :: Python :: 3", |
| 17 | + "Programming Language :: Python :: 3.10", |
| 18 | + "Natural Language :: English", |
| 19 | + "Operating System :: POSIX" |
| 20 | +] |
| 21 | +dynamic = ["version"] |
| 22 | +dependencies = [ |
| 23 | + "h5py", |
| 24 | + "numpy", |
| 25 | + "pandas>=1.1", |
| 26 | + "tables-io>=0.7.5", |
| 27 | + "ceci>=1.10.1", |
| 28 | + "pyyaml", |
| 29 | + "minisom", |
| 30 | + "scipy>=1.9.0", |
| 31 | + "pz-hyperbolic-temp", |
| 32 | + "qp-prob", |
| 33 | + "sklearn", |
| 34 | + "pzflow", |
| 35 | +] |
| 36 | + |
| 37 | +[project.optional-dependencies] |
| 38 | +dev = [ |
| 39 | + "coverage", |
| 40 | + "pylint", |
| 41 | + "pytest", |
| 42 | + "pytest-cov", |
| 43 | + "yamllint", |
| 44 | +] |
| 45 | + |
| 46 | +[build-system] |
| 47 | +requires = ["setuptools>=61", "wheel", "setuptools_scm[toml]>=6.2"] |
| 48 | +build-backend = "setuptools.build_meta" |
| 49 | + |
| 50 | +[tool.setuptools_scm] |
| 51 | +write_to = "src/rail/core/_version.py" |
| 52 | + |
| 53 | +[tool.setuptools.package-data] |
| 54 | +"rail.examples.estimation.data.AB" = ["*.txt"] |
| 55 | +"rail.examples.estimation.data.FILTER" = ["*.res"] |
| 56 | +"rail.examples.estimation.data.SED" = ["*.sed", "*.list"] |
| 57 | +"rail.examples.estimation" = ["*.pkl"] |
| 58 | +"rail.examples.creation.configs" = ["*.yaml"] |
| 59 | +"rail.examples.creation.data" = ["*.pkl", "*.hdf5"] |
| 60 | +"rail.examples.creation.success_rate_data" = ["*.txt"] |
| 61 | +"rail.examples.goldenspike" = ["*.yaml"] |
| 62 | +"rail.examples.goldenspike.data" = ["*.pkl", "*.pq"] |
| 63 | +"rail.examples.testdata" = ["*.ipynb", "*.fits", "*.hdf5", "*.pq", "*.md"] |
| 64 | + |
| 65 | +[tool.coverage.run] |
| 66 | +source = ["src/rail"] |
| 67 | +branch = false |
| 68 | + |
| 69 | +[tool.coverage.report] |
| 70 | +show_missing = true |
| 71 | +exclude_lines = [ |
| 72 | + "pragma: no cover", |
| 73 | + "def __repr__", |
| 74 | + "if self.debug:", |
| 75 | + "if settings.DEBUG", |
| 76 | + "raise AssertionError", |
| 77 | + "raise NotImplementedError", |
| 78 | + "if 0:", |
| 79 | + "if __name__ == .__main__.:", |
| 80 | + "if TYPE_CHECKING:" |
| 81 | +] |
| 82 | + |
| 83 | +[tool.black] |
| 84 | +line-length = 110 |
| 85 | +target-version = ["py310"] |
| 86 | + |
| 87 | +[tool.pydocstyle] |
| 88 | +convention = "numpy" |
| 89 | +add_select = [ |
| 90 | + "D212" # Multi-line docstring summary should start at the first line |
| 91 | +] |
| 92 | +add-ignore = [ |
| 93 | + "D105", # Missing docstring in magic method |
| 94 | + "D102", # Missing docstring in public method (needed for docstring inheritance) |
| 95 | + "D100", # Missing docstring in public module |
| 96 | + # Below are required to allow multi-line summaries. |
| 97 | + "D200", # One-line docstring should fit on one line with quotes |
| 98 | + "D205", # 1 blank line required between summary line and description |
| 99 | + "D400", # First line should end with a period |
| 100 | + # Properties shouldn't be written in imperative mode. This will be fixed |
| 101 | + # post 6.1.1, see https://github.com/PyCQA/pydocstyle/pull/546 |
| 102 | + "D401", |
| 103 | +] |
| 104 | + |
| 105 | +[tool.pylint] |
| 106 | +disable = [ |
| 107 | + "abstract-method", |
| 108 | + "invalid-name", |
| 109 | + "too-many-statements", |
| 110 | + "missing-module-docstring", |
| 111 | + "missing-class-docstring", |
| 112 | + "missing-function-docstring", |
| 113 | + "too-few-public-methods", |
| 114 | + "duplicate-code" |
| 115 | +] |
| 116 | +max-line-length = 110 |
| 117 | +max-locals = 50 |
| 118 | +max-branches = 25 |
| 119 | +max-public-methods = 50 |
| 120 | + |
| 121 | +[tool.isort] |
| 122 | +profile = "black" |
| 123 | +line_length = 110 |
| 124 | + |
| 125 | +[tool.pytest.ini_options] |
| 126 | +addopts = [ |
| 127 | + "--cov=rail", |
| 128 | + "--cov-report=html" |
| 129 | +] |
| 130 | +flake8-ignore = "E203" |
| 131 | + |
| 132 | +[tool.mypy] |
| 133 | +disallow_untyped_defs = true |
| 134 | +disallow_incomplete_defs = true |
| 135 | +ignore_missing_imports = true |
| 136 | +namespace_packages = true |
| 137 | +plugins = "sqlalchemy.ext.mypy.plugin" |
| 138 | +show_error_codes = true |
| 139 | +strict_equality = true |
| 140 | +warn_redundant_casts = true |
| 141 | +warn_unreachable = true |
| 142 | +warn_unused_ignores = true |
0 commit comments