Skip to content

Commit

Permalink
update packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
alanlujan91 committed Nov 23, 2024
1 parent 5824dcf commit b0078f4
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 67 deletions.
124 changes: 58 additions & 66 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
requires = ["hatchling", "hatch-vcs", "hatch-requirements-txt"]
build-backend = "hatchling.build"


[project]
name = "econ-ark"
authors = [{ name = "Econ-ARK Team", email = "[email protected]" }]
Expand All @@ -12,56 +11,52 @@ readme = "README.md"
license.file = "LICENSE"
requires-python = ">=3.10"
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Financial and Insurance Industry",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Other/Nonlisted Topic",
"Typing :: Typed",
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Financial and Insurance Industry",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Other/Nonlisted Topic",
"Typing :: Typed",
]
dynamic = ["version", "dependencies", "optional-dependencies"]

[tool.hatch.metadata.hooks.requirements_txt]
files = ["requirements/base.txt"]

[tool.hatch.metadata.hooks.requirements_txt.optional-dependencies]
docs = ["requirements/docs.txt"]
test = ["requirements/dev.txt"]
dev = ["requirements/dev.txt"]

[tool.hatch.build.targets.wheel]
packages = ["src/HARK"]

[project.urls]
Homepage = "https://github.com/econ-ark/HARK"
Documentation = "https://econ-ark.github.io/HARK"
"Bug Tracker" = "https://github.com/econ-ark/HARK/issues"
Discussions = "https://github.com/econ-ark/HARK/discussions"
Changelog = "https://github.com/econ-ark/HARK/releases"


[tool.hatch]
version.source = "vcs"
build.hooks.vcs.version-file = "src/HARK/_version.py"
build.targets.wheel.packages = ["src/HARK"]

[tool.hatch.metadata.hooks.requirements_txt]
files = ["requirements/base.txt"]

[tool.hatch.metadata.hooks.requirements_txt.optional-dependencies]
docs = ["requirements/docs.txt"]
test = ["requirements/dev.txt"]
dev = ["requirements/dev.txt"]

[tool.hatch.envs.default]
features = ["test"]
scripts.test = "pytest {args}"


[tool.pytest.ini_options]
minversion = "6.0"
addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
Expand All @@ -70,7 +65,6 @@ xfail_strict = true
log_cli_level = "INFO"
testpaths = ["tests"]


[tool.coverage]
run.source = ["HARK"]
report.exclude_also = ['\.\.\.', 'if typing.TYPE_CHECKING:']
Expand All @@ -90,37 +84,36 @@ module = "HARK.*"
disallow_untyped_defs = true
disallow_incomplete_defs = true


[tool.ruff]

[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear
"I", # isort
"ARG", # flake8-unused-arguments
"C4", # flake8-comprehensions
"EM", # flake8-errmsg
"ICN", # flake8-import-conventions
"G", # flake8-logging-format
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"RET", # flake8-return
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"T20", # flake8-print
"UP", # pyupgrade
"YTT", # flake8-2020
"EXE", # flake8-executable
"NPY", # NumPy specific rules
"PD", # pandas-vet
"B", # flake8-bugbear
"I", # isort
"ARG", # flake8-unused-arguments
"C4", # flake8-comprehensions
"EM", # flake8-errmsg
"ICN", # flake8-import-conventions
"G", # flake8-logging-format
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"RET", # flake8-return
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"T20", # flake8-print
"UP", # pyupgrade
"YTT", # flake8-2020
"EXE", # flake8-executable
"NPY", # NumPy specific rules
"PD", # pandas-vet
]
ignore = [
"PLR09", # Too many <...>
"PLR2004", # Magic value used in comparison
"ISC001", # Conflicts with formatter
"PLR09", # Too many <...>
"PLR2004", # Magic value used in comparison
"ISC001", # Conflicts with formatter
]
isort.required-imports = ["from __future__ import annotations"]
# Uncomment if using a _compat.typing backport
Expand All @@ -130,7 +123,6 @@ isort.required-imports = ["from __future__ import annotations"]
"tests/**" = ["T20"]
"noxfile.py" = ["T20"]


[tool.pylint]
py-version = "3.10"
ignore-paths = [".*/_version.py"]
Expand All @@ -139,10 +131,10 @@ similarities.ignore-imports = "yes"
# Set fail-under to 0 to prevent failing
fail-under = 0
messages_control.disable = [
"design",
"fixme",
"line-too-long",
"missing-module-docstring",
"missing-function-docstring",
"wrong-import-position",
"design",
"fixme",
"line-too-long",
"missing-module-docstring",
"missing-function-docstring",
"wrong-import-position",
]
2 changes: 1 addition & 1 deletion tests/test_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@


def test_version():
assert importlib.metadata.version("HARK") == m.__version__
assert importlib.metadata.version("econ-ark") == m.__version__

0 comments on commit b0078f4

Please sign in to comment.