Skip to content

Commit

Permalink
build: transitioned to pdm from poetry, not sure I like it. Python 3.…
Browse files Browse the repository at this point in the history
…12 support will not work as long as we support 3.8, because numpy
  • Loading branch information
JuanPedroGHM committed Feb 1, 2024
1 parent aecaaa5 commit 3910888
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 53 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ dmypy.json
# Custom
.vscode
*.out
poetry.lock
*.lock
.perun.ini
examples/data
examples/**/perun_results
.pdm-python
perun_results/
101 changes: 49 additions & 52 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,62 +1,63 @@
[tool.poetry]
[project]
name = "perun"
version = "0.5.0"
description = ""
authors = ["Gutiérrez Hermosillo Muriedas, Juan Pedro <[email protected]>"]
license = "BSD-3-Clause"
description = "Command line tool to easily estimate energy consumption of python applications."
authors = [
{name = "Gutiérrez Hermosillo Muriedas, Juan Pedro", email = "[email protected]"},
]
dependencies = [
"py-cpuinfo>=6.0.0",
"numpy>=1.23",
"psutil>=5.9.0",
"h5py<4.0.0,>=3.2.0",
"pandas>=1.3",
"tabulate>=0.9",
]
requires-python = ">=3.8,<3.13"
readme = "README.md"
homepage = "https://github.com/Helmholtz-AI-Energy/perun"

[tool.poetry.scripts]
perun = "perun.api.cli:cli"

[tool.poetry.dependencies]
python = ">=3.8,<4.0"
py-cpuinfo = ">=5.0.0"
numpy = ">=1.20.0"
psutil = "^5.9.0"
h5py = "^3.5.9"
pandas = {version = ">=1.3"}
tabulate = ">=0.9"
mpi4py = {version = "^3.1", optional = true }
nvidia-ml-py = {version = "^12.535.77", optional = true }
pyrsmi = {version = "^1.0.1", optional = true }

[tool.poetry.extras]
mpi = ["mpi4py"]
nvidia = ["nvidia-ml-py"]
rocm = ["pyrsmi"]

[tool.poetry.group.dev]
optional = true
license = {text = "BSD-3-Clause"}

[tool.poetry.group.dev.dependencies]
pytest = "*"
pytest-cov = "*"
flake8 = "*"
mypy = "*"
black = "*"
pre-commit = "*"
pydocstyle = "*"
python-semantic-release = "^8.1.1"
[project.urls]
homepage = "https://github.com/Helmholtz-AI-Energy/perun"

[tool.poetry.group.docs]
optional = true
[project.optional-dependencies]
mpi = ["mpi4py<4.0,>=3.1"]
nvidia = ["nvidia-ml-py<13.0.0,>=12.535.77"]
rocm = ["pyrsmi<2.0.0,>=1.0.1"]

[tool.poetry.group.docs.dependencies]
sphinx = "*"
sphinx-rtd-theme = "*"
sphinx-autoapi = "*"
[project.scripts]
perun = "perun.api.cli:cli"

[tool.poetry.group.mpi]
optional = true
[tool.pdm.build]
includes = []

[tool.poetry.group.mpi.dependencies]
mpi4py = "^3.1"
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"

[tool.pdm]
distribution = true

[tool.pdm.dev-dependencies]
dev = [
"pytest>=6.0.0",
"pytest-cov",
"flake8>=4.0.0",
"mypy>=1.0.0",
"black>=22.0.0",
"pre-commit>=3.0.0",
"pydocstyle",
"python-semantic-release>=8.0.0",
]
docs = [
"sphinx>=7.0.0",
"sphinx-rtd-theme>=2.0.0",
"sphinx-autoapi",
]

[tool.semantic_release]
version_variables = [ "perun/__init__.py:__version__", "docs/conf.py:release" ]
version_toml = ["pyproject.toml:tool.poetry.version"]
version_toml = ["pyproject.toml:project.version"]
commit_message = "{version} [skip ci]"

[tool.semantic_release.remote.token]
Expand All @@ -82,10 +83,6 @@ profile = "black"
match-dir = 'perun'
convention = 'numpy'

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.mypy]
exclude = [
'tests/**/*'
Expand Down

0 comments on commit 3910888

Please sign in to comment.