Skip to content

Commit c7c274c

Browse files
authored
Move from setup.py to pyproject.toml (#166)
1 parent 6830777 commit c7c274c

File tree

4 files changed

+60
-66
lines changed

4 files changed

+60
-66
lines changed

openmc_plotter/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
__version__ = '0.4.1'
1+
from importlib.metadata import version
2+
3+
__version__ = version("openmc-plotter")

openmc_plotter/plotgui.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def mouseMoveEvent(self, event):
280280

281281
if self.model.tally_data is not None:
282282
tid, value = self.getTallyInfo(event)
283-
if value is not None and value != np.nan:
283+
if value is not None and not np.isnan(value):
284284
self.updateTallyDataIndicatorValue(value)
285285
tallyInfo = "Tally {} {}: {:.5E}".format(
286286
tid, cv.tallyValue, value)

pyproject.toml

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,57 @@
11
[build-system]
2-
requires = ["setuptools", "wheel"]
2+
requires = ["setuptools>=80", "setuptools_scm>=8", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "openmc-plotter"
7+
dynamic = ["version"]
8+
authors = [
9+
{ name = "OpenMC Development Team", email = "[email protected]" },
10+
]
11+
license = "MIT"
12+
description = "Plotting tool for OpenMC models and tally data"
13+
readme = "README.md"
14+
classifiers = [
15+
"Development Status :: 4 - Beta",
16+
"Intended Audience :: Developers",
17+
"Intended Audience :: End Users/Desktop",
18+
"Intended Audience :: Science/Research",
19+
"Natural Language :: English",
20+
"Topic :: Scientific/Engineering",
21+
"Programming Language :: Python :: 3",
22+
"Programming Language :: Python :: 3.10",
23+
"Programming Language :: Python :: 3.11",
24+
"Programming Language :: Python :: 3.12",
25+
"Programming Language :: Python :: 3.13",
26+
]
27+
requires-python = ">=3.10"
28+
dependencies = [
29+
"openmc>=0.15.0",
30+
"numpy",
31+
"matplotlib",
32+
"PySide6",
33+
]
34+
35+
[project.optional-dependencies]
36+
test = ["pytest", "pytest-qt"]
37+
vtk = ["vtk"]
38+
39+
[project.urls]
40+
"Homepage" = "https://github.com/openmc-dev/plotter"
41+
"Download" = "https://github.com/openmc-dev/plotter"
42+
"Issue Tracker" = "https://github.com/openmc-dev/plotter/issues"
43+
"Source Code" = "https://github.com/openmc-dev/plotter"
44+
45+
[project.scripts]
46+
openmc-plotter = "openmc_plotter.__main__:main"
47+
48+
[tool.setuptools]
49+
include-package-data = true
50+
51+
[tool.setuptools.packages.find]
52+
include = ["openmc_plotter*"]
53+
54+
[tool.setuptools.package-data]
55+
openmc_plotter = ["assets/*.png"]
56+
57+
[tool.setuptools_scm]

setup.py

Lines changed: 0 additions & 63 deletions
This file was deleted.

0 commit comments

Comments
 (0)