Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added __version__ to package #242

Merged
merged 1 commit into from
May 16, 2022
Merged
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
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ STP, STL, BRep, HTML and DAGMC h5m.

:point_right: [Video presentation](https://www.youtube.com/embed/fXboew3U7rw)

:point_right: [Installation](https://paramak.readthedocs.io/en/main/#system-installation)
:point_right: [Installation](https://paramak.readthedocs.io/en/main/install.html)

:point_right: [Publication](https://f1000research.com/articles/10-27)

:point_right: [Docker images](https://github.com/fusion-energy/paramak/pkgs/container/paramak)

:point_right: Examples with Neutronics [1](https://github.com/fusion-energy/magnetic_fusion_openmc_dagmc_paramak_example), [2](https://github.com/fusion-energy/inertial_fusion_openmc_dagmc_paramak_example), [3](https://github.com/fusion-energy/neutronics-workshop)
3 changes: 2 additions & 1 deletion conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ build:
requirements:
build:
- python {{ python }}
- setuptools
- setuptools>=46.4.0
- setuptools_scm>=6.3.1
run:
- python {{ python }}
- cadquery {{ cadquery }}
Expand Down
3 changes: 3 additions & 0 deletions paramak/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
try:
# this works for python 3.7 and lower
from importlib.metadata import version, PackageNotFoundError
except (ModuleNotFoundError, ImportError):
# this works for python 3.8 and higher
from importlib_metadata import version, PackageNotFoundError
try:
__version__ = version("paramak")
Expand All @@ -11,6 +13,7 @@

__all__ = ["__version__"]


from .shape import Shape
from .reactor import Reactor
from .utils import (
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[build-system]
requires = [
"setuptools >= 45",
"setuptools >= 46.4.0",
"wheel",
"setuptools_scm[toml] >= 6.2",
"setuptools_scm[toml] >= 6.3.1",
]
build-backend = "setuptools.build_meta"

Expand Down
5 changes: 3 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[metadata]
name = paramak
version = attr: paramak.__version__
author = The Paramak Development Team
author_email = [email protected]
description = Create 3D fusion reactor CAD models based on input parameters
Expand Down Expand Up @@ -39,12 +40,12 @@ install_requires=
setuptools_scm

[options.extras_require]
tests =
tests =
pytest >= 5.4.3
pytest-cov>=2.12.1
pytest-runner>=5.3.1
dagmc_h5m_file_inspector>=0.5.0
docs =
docs =
sphinx >= 4.1.2
sphinx_rtd_theme
sphinx_autodoc_typehints
Expand Down