From e21f4693ab618c217d175b4bedcfff4383da8c59 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Thu, 2 Dec 2021 16:38:34 +0000 Subject: [PATCH] first package layout --- LICENSE | 21 +++++++++++ README.md | 0 gmsh2dagmc/__init__.py | 2 ++ dagmc.py => gmsh2dagmc/dagmc.py | 0 dagmc_gmsh.py => gmsh2dagmc/dagmc_gmsh.py | 0 gmsh2dagmc.py => gmsh2dagmc/gmsh2dagmc | 4 +-- requirements.txt | 1 + setup.py | 43 +++++++++++++++++++++++ 8 files changed, 69 insertions(+), 2 deletions(-) create mode 100755 LICENSE create mode 100644 README.md create mode 100644 gmsh2dagmc/__init__.py rename dagmc.py => gmsh2dagmc/dagmc.py (100%) rename dagmc_gmsh.py => gmsh2dagmc/dagmc_gmsh.py (100%) rename gmsh2dagmc.py => gmsh2dagmc/gmsh2dagmc (82%) create mode 100644 requirements.txt create mode 100644 setup.py diff --git a/LICENSE b/LICENSE new file mode 100755 index 0000000..33efe88 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Svalinn + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/gmsh2dagmc/__init__.py b/gmsh2dagmc/__init__.py new file mode 100644 index 0000000..eeb3f0a --- /dev/null +++ b/gmsh2dagmc/__init__.py @@ -0,0 +1,2 @@ +from .dagmc import dagmcGeom +from .dagmc_gmsh import gmshTopology diff --git a/dagmc.py b/gmsh2dagmc/dagmc.py similarity index 100% rename from dagmc.py rename to gmsh2dagmc/dagmc.py diff --git a/dagmc_gmsh.py b/gmsh2dagmc/dagmc_gmsh.py similarity index 100% rename from dagmc_gmsh.py rename to gmsh2dagmc/dagmc_gmsh.py diff --git a/gmsh2dagmc.py b/gmsh2dagmc/gmsh2dagmc similarity index 82% rename from gmsh2dagmc.py rename to gmsh2dagmc/gmsh2dagmc index 9416062..2d56c38 100644 --- a/gmsh2dagmc.py +++ b/gmsh2dagmc/gmsh2dagmc @@ -1,7 +1,7 @@ #!/usr/env/python3 import sys -from dagmc_gmsh import gmshTopology -from dagmc import dagmcGeom +from gmsh2dagmc import gmshTopology +from gmsh2dagmc import dagmcGeom if len(sys.argv) < 2: print("Usage: " + sys.argv[0] + " file.msh") diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..8887651 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +gmsh diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..7755e75 --- /dev/null +++ b/setup.py @@ -0,0 +1,43 @@ +import setuptools + +with open("README.md", "r") as fh: + long_description = fh.read() + +setuptools.setup( + name="gmsh2dagmc", + version="develop", + summary="Convert gmsh files to DAGMC geometry", + author="Andrew Davis", + description="A Python package for converting gmsh files to DAGMC h5m files", + long_description=long_description, + long_description_content_type="text/markdown", + url="https://github.com/svalinn/gmsh2dagmc", + packages=setuptools.find_packages(), + zip_safe=True, + package_dir={"gmsh2dagmc": "gmsh2dagmc"}, + scripts=["gmsh2dagmc/gmsh2dagmc"], + package_data={ + "gmsh2dagmc": [ + "requirements.txt", + "README.md", + "LICENSE", + ] + }, + classifiers=[ + "Natural Language :: English", + "Topic :: Scientific/Engineering", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + ], + tests_require=["pytest-cov"], + install_requires=[ + "gmsh", # testing with v4.8.4 + # "pymoab", is needed but not available on pip + # pymoab can be install with Conda + ], +) \ No newline at end of file