Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@
__pycache__
plot_settings.pkl
*.egg-info

# local version file
src/_version.py

build/
2 changes: 0 additions & 2 deletions openmc_plotter/__init__.py

This file was deleted.

57 changes: 56 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,57 @@
[build-system]
requires = ["setuptools", "wheel"]
requires = ["setuptools >= 65.4.0", "setuptools_scm[toml]>=7.0.5"]
build-backend = "setuptools.build_meta"

[project]
name = "openmc_plotter"
authors = [
{ name="OpenMC Development Team", email="openmc@anl.gov" },
]

license = {file = "LICENSE"}
description = "Native plotting GUI for model design and verification"
readme = "README.md"
requires-python = ">=3.6"
keywords = ["openmc", "plotter"]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
]
dependencies = [
"numpy",
"matplotlib",
"PySide2",
]
dynamic = ["version"]

[tool.setuptools.package-data]
myModule = ["assets/*.png"]

[tool.setuptools_scm]
write_to = "src/_version.py"


[project.optional-dependencies]
test = [
"pytest",
"pytest-qt"
]
vtk = [
"vtk"
]

[project.urls]
"Homepage" = "https://github.com/openmc-dev/plotter"
"Bug Tracker" = "https://github.com/openmc-dev/plotter/issues"

[tool.setuptools]
package-dir = {"" = "src"}

[project.scripts]
openmc_geometry_plot = "openmc_plotter.__main__:main"
55 changes: 0 additions & 55 deletions setup.py

This file was deleted.

14 changes: 14 additions & 0 deletions src/openmc_plotter/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
try:
# this works for python 3.8 and higher
from importlib.metadata import version, PackageNotFoundError
except (ModuleNotFoundError, ImportError):
# this works for python 3.7 and lower
from importlib_metadata import version, PackageNotFoundError
try:
__version__ = version("openmc_plotter")
except PackageNotFoundError:
from setuptools_scm import get_version

__version__ = get_version(root="..", relative_to=__file__)

__all__ = ["__version__"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.