From 1891f8f4b91670330de0d0687cfce0b394fb5a11 Mon Sep 17 00:00:00 2001 From: "Micah D. Gale" Date: Fri, 5 Jan 2024 10:22:47 -0600 Subject: [PATCH 01/15] Replicated the error in #163. --- tests/test_edge_cases.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/test_edge_cases.py b/tests/test_edge_cases.py index ba4c6609..9285e4e7 100644 --- a/tests/test_edge_cases.py +++ b/tests/test_edge_cases.py @@ -160,3 +160,19 @@ def test_void_cell_set_material(self): print(output) parts = output[0].split() self.assertAlmostEqual(float(parts[2]), -dens_value, places=9) + + def test_geometry_comments(self): + in_strs = """21073 130 0.010000 (-11516 97 -401 ) $ C 1 Lower water + :(-11526 97 -401 ) $ C 2 Lower water + :(-11536 97 -401 ) $ C 3 Lower water + :(-11546 97 -401 ) $ C 4 Lower water + :(-11556 97 -401 ) $ C 5 Lower water + :(-11576 97 -401 ) imp:n=1 $ C 7 Lower water""".split( + "\n" + ) + input = montepy.input_parser.mcnp_input.Input( + in_strs, montepy.input_parser.block_type.BlockType.CELL + ) + cell = montepy.Cell(input) + # this step caused an error for #163 + cell.comments From d0f5f9d7e05d0a7b1233f70efd4307dde331c7ee Mon Sep 17 00:00:00 2001 From: "Micah D. Gale" Date: Fri, 5 Jan 2024 15:46:54 -0600 Subject: [PATCH 02/15] Defined recursive GeometryTree Comments function for nested dicts. --- montepy/__init__.py | 2 +- montepy/input_parser/syntax_node.py | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/montepy/__init__.py b/montepy/__init__.py index e8efe667..22a95eaa 100644 --- a/montepy/__init__.py +++ b/montepy/__init__.py @@ -23,7 +23,7 @@ from montepy.universe import Universe import sys -__version__ = "0.2.4dev1" +__version__ = "0.2.4dev2" # enable deprecated warnings for users if not sys.warnoptions: import os, warnings diff --git a/montepy/input_parser/syntax_node.py b/montepy/input_parser/syntax_node.py index ff301500..a7e83cc4 100644 --- a/montepy/input_parser/syntax_node.py +++ b/montepy/input_parser/syntax_node.py @@ -223,6 +223,7 @@ class GeometryTree(SyntaxNodeBase): def __init__(self, name, tokens, op, left, right=None): super().__init__(name) self._nodes = tokens + print(tokens) self._operator = Operator(op) self._left_side = left self._right_side = right @@ -241,8 +242,19 @@ def format(self): @property def comments(self): - for node in self.nodes.values(): - yield from node.comments + for key, node in self.nodes.items(): + if isinstance(node, SyntaxNodeBase): + yield from node.comments + elif isinstance(node, dict): + yield from GeometryTree._recurse_comments(node) + + @staticmethod + def _recurse_comments(tree): + for node in tree.values(): + if isinstance(node, SyntaxNodeBase): + yield from node.comments + elif isinstance(node, dict): + yield from GeometryTree._recurse_comments(node) @property def left(self): From dd2e914acd394a28c4e200b1c3f3e42eff76a1a4 Mon Sep 17 00:00:00 2001 From: "Micah D. Gale" Date: Mon, 8 Jan 2024 10:35:33 -0600 Subject: [PATCH 03/15] Deleted accidental debug statement. --- montepy/input_parser/syntax_node.py | 1 - 1 file changed, 1 deletion(-) diff --git a/montepy/input_parser/syntax_node.py b/montepy/input_parser/syntax_node.py index a7e83cc4..b6c1b6d1 100644 --- a/montepy/input_parser/syntax_node.py +++ b/montepy/input_parser/syntax_node.py @@ -223,7 +223,6 @@ class GeometryTree(SyntaxNodeBase): def __init__(self, name, tokens, op, left, right=None): super().__init__(name) self._nodes = tokens - print(tokens) self._operator = Operator(op) self._left_side = left self._right_side = right From 38b53566460dae737cab6462d18b7a43087ca76a Mon Sep 17 00:00:00 2001 From: Micah Gale Date: Thu, 11 Jan 2024 07:40:09 -0600 Subject: [PATCH 04/15] Create Github Actions (#2) This just took ... so ... many tries. --- .github/workflows/deploy.yml | 107 +++++++++++++++++++++++++++++++++++ .github/workflows/main.yml | 91 +++++++++++++++++++++++++++++ montepy/__init__.py | 2 +- montepy/errors.py | 3 +- 4 files changed, 200 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/deploy.yml create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..893a831a --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,107 @@ +name: Deploy + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + last-minute-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: set up python 3.8 + uses: actions/setup-python@v4 + with: + python-version: 3.8 + - run: pip install --user -r requirements/dev.txt + - run: python -m pytest + + build-pages: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Configure git + env: + TOKEN: ${{ secrets.ACCESS_TOKEN }} + run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com/".insteadOf "https://github.com/" + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: 3.8 + - run: pip install --user montepy[doc] + - run: cd doc && make html + - uses: actions/configure-pages@v4 + - uses: actions/upload-pages-artifact@v3 + with: + name: deploy-pages + path: doc/build/html/ + + deploy-pages: + permissions: + contents: read + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + needs: [build-pages, last-minute-test] + runs-on: ubuntu-latest + steps: + - run: ls -l + - uses: actions/download-artifact@v4 + with: + name: deploy-pages + - run: ls -l + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 + with: + artifact_name: deploy-pages + + + deploy-test-pypi: + environment: + name: test-pypi + url: https://test.pypi.org/p/montepy # Replace with your PyPI project name + needs: [deploy-pages] + permissions: + contents: read + id-token: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: 3.8 + - run: python -m pip install build + - run: python -m build --sdist --wheel + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ + + deploy-pypi: + environment: + name: pypi + url: https://pypi.org/p/montepy # Replace with your PyPI project name + needs: [deploy-pages, deploy-test-pypi] + permissions: + contents: read + id-token: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: 3.8 + - run: python -m pip install build + - run: python -m build --sdist --wheel + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + + + diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..d635a22b --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,91 @@ +name: Test package + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + + steps: + - uses: actions/checkout@v4 + - name: set up python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - run: pip install --upgrade pip build + - run: pip install -r requirements/common.txt + - run: python -m build --sdist --wheel + - run: pip install . + - run: pip uninstall -y montepy + - run: pip install --user dist/*.whl + - run: pip uninstall -y montepy + - run: pip install --user dist/*.tar.gz + - run: pip install --user montepy[test] + - run: pip install --user montepy[doc] + - run: pip freeze + - name: Upload build artifacts + uses: actions/upload-artifact@v3 + with: + name: build + path: dist/* + + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + + steps: + - uses: actions/checkout@v4 + - name: set up python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - run: pip install --user -r requirements/dev.txt + - run: coverage run -m pytest --junitxml=test_report.xml + - run: coverage report + - run: coverage xml + - name: Upload test report + uses: actions/upload-artifact@v3 + with: + name: test + path: test_report.xml + - name: Upload coverage report + uses: actions/upload-artifact@v3 + with: + name: coverage + path: coverage.xml + + doc-test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: set up python 3.8 + uses: actions/setup-python@v4 + with: + python-version: 3.8 + - run: pip install montepy[doc] + - run: sphinx-build doc/source/ doc/build/ -W --keep-going -E + - run: sphinx-build -b html doc/source/ doc/build/html + - uses: actions/upload-artifact@v3 + with: + name: website + path: doc/build/html + + format-test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: set up python 3.8 + uses: actions/setup-python@v4 + with: + python-version: 3.8 + - run: pip install --user -r requirements/dev.txt + - run: black --check montepy/ tests/ + + diff --git a/montepy/__init__.py b/montepy/__init__.py index 40fed7d2..5f35202d 100644 --- a/montepy/__init__.py +++ b/montepy/__init__.py @@ -23,7 +23,7 @@ from montepy.universe import Universe import sys -__version__ = "0.2.4" +__version__ = "0.2.5dev1" # enable deprecated warnings for users if not sys.warnoptions: import os, warnings diff --git a/montepy/errors.py b/montepy/errors.py index a61b73b3..f0c2464d 100644 --- a/montepy/errors.py +++ b/montepy/errors.py @@ -10,8 +10,7 @@ def __init__(self, message): class MalformedInputError(ValueError): """ - <<<<<<< HEAD - Raised when there is an error with the MCNP input not related to the parser. + Raised when there is an error with the MCNP input not related to the parser. """ def __init__(self, input, message): From 0570167dc44b3fef205bb2bca80af20ccd9b9e8d Mon Sep 17 00:00:00 2001 From: Micah Gale Date: Thu, 11 Jan 2024 08:11:25 -0600 Subject: [PATCH 05/15] Update README.md for github * updated all URLs to github pages * Added logo The logo may not work while the repo is private. Hopefully it will work on public. --- README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 74875231..8eee6eff 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,17 @@ # MontePy +MontePY: a cute snek on a red over white circle + A python library to read, edit, and write MCNP input files. ## Installing -See the [Installing section in the user guide](https://experiment_analysis_all.pages.hpc.inl.gov/software/montepy/starting.html#installing). +See the [Installing section in the user guide](https://idaholab.github.io/MontePy/starting.html#installing). ## User Documentation -MontePy has a [sphinx website](https://experiment_analysis_all.pages.hpc.inl.gov/software/montepy/). +MontePy has a [sphinx website](https://idaholab.github.io/MontePy/index.html). This has a getting started guide for users, as well as API documentation. There is also a developer's guide covering the design and approach of MontePy, and how to contribute. @@ -19,9 +21,9 @@ There is also a developer's guide covering the design and approach of MontePy, a * Handles almost all MCNP input syntax including: message blocks, & continue, comments, etc. * Parses Cells, surfaces, materials, and transforms very well. * Can parse the following surfaces exactly P(X|Y|Z), C(X|Y|Z), C/(X|Y|Z) (I mean it can do PX, and PY, etc.) -* Can read in all other cards but not understand them -* Can write out full MCNP problem even if it doesn't fully understand a card. -* Can write out the MCNP problem verbatim, if it has not been modified at all. +* Can read in all other inputs but not understand them +* Can write out full MCNP problem even if it doesn't fully understand an input. +* Can write out the MCNP problem verbatim, and try to match * Can quickly access cells, surfaces, and materials by their numbers. For example: `cell = problem.cells[105]`. * Can quickly update cell importances. For example `cell.importance.neutron = 2.0`. * Has over 240 test cases right now @@ -56,7 +58,7 @@ So MontePy doesn't do what you want? Right now development is done with a Just- If there's a feature you want add an issue here with the feature request tag. If you want to add a feature on your own talk to Micah Gale (but still add the issue). The system is very modular and you should be able to develop it pretty quickly. -Also read the [developer's guide](https://experiment_analysis_all.pages.hpc.inl.gov/software/montepy/developing.html). +Also read the [developer's guide](https://idaholab.github.io/MontePy/developing.html). # Version Numbering Scheme @@ -70,4 +72,4 @@ Also read the [developer's guide](https://experiment_analysis_all.pages.hpc.inl. Official shall not change. New merges to main shall have a version number incremented. -# Finally: make objects not regexs! +# Finally: make objects not regexes! From 6ca8fb52ff064df4ee8fd609afa437f79c6269e7 Mon Sep 17 00:00:00 2001 From: Micah Gale Date: Thu, 11 Jan 2024 08:14:12 -0600 Subject: [PATCH 06/15] Happy new year! --- doc/source/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 921d2d98..7ba3c42c 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -21,8 +21,8 @@ # -- Project information ----------------------------------------------------- project = "MontePy" -copyright = "2021 – 2023, Battelle Energy Alliance LLC." -author = "Micah D. Gale (@galemica), Travis J. Labossiere-Hickman (@tjlaboss)" +copyright = "2021 – 2024, Battelle Energy Alliance LLC." +author = "Micah D. Gale (@micahgale), Travis J. Labossiere-Hickman (@tjlaboss)" release = importlib.metadata.version("montepy") From 8119c79651c8d6f38ac30a1577bd093a204eb328 Mon Sep 17 00:00:00 2001 From: Micah Gale Date: Thu, 11 Jan 2024 08:14:58 -0600 Subject: [PATCH 07/15] Reved version. --- montepy/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/montepy/__init__.py b/montepy/__init__.py index 5f35202d..ac6b79ec 100644 --- a/montepy/__init__.py +++ b/montepy/__init__.py @@ -23,7 +23,7 @@ from montepy.universe import Universe import sys -__version__ = "0.2.5dev1" +__version__ = "0.2.5dev2" # enable deprecated warnings for users if not sys.warnoptions: import os, warnings From dc28388bffc4081c38ebc6ab005fbeab5c46bc80 Mon Sep 17 00:00:00 2001 From: Micah Gale Date: Thu, 11 Jan 2024 08:20:47 -0600 Subject: [PATCH 08/15] Updated URLs to github in pyproject --- pyproject.toml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3c01b772..6dd48dad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,14 +14,14 @@ authors = [ {name = "Travis Labossiere-Hickman", email = "Travis.LabossiereHickman@inl.gov"}, {name = "Brenna Carbno"} ] -keywords = ["MCNP", "neutronics", "imcnp", "input file", "monte carlo"] +keywords = ["MCNP", "neutronics", "imcnp", "input file", "monte carlo", "radiation transport"] license = {file="LICENSE"} classifiers = [ "Development Status :: 4 - Beta", "Programming Language :: Python :: 3 :: Only", "Intended Audience :: Science/Research", "Intended Audience :: Developers", -# "License :: OSI Approved :: MIT License", + "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Topic :: Scientific/Engineering :: Physics", @@ -39,8 +39,10 @@ test = ["coverage", "pytest"] doc = ["sphinx", "sphinxcontrib-apidoc", "sphinx_rtd_theme"] [project.urls] -Homepage = "https://github.com/idaholab/montepy" +Homepage = "https://idaholab.github.io/MontePy/index.html" Repository = "https://github.com/idaholab/montepy.git" +Documentation = "https://idaholab.github.io/MontePy/index.html" +"Bug Tracker" = "https://github.com/idaholab/MontePy/issues" [build-system] requires = ["setuptools >= 61.0.0"] From c7b020a7256bf80a746e3ba7f64c2fc66359eff6 Mon Sep 17 00:00:00 2001 From: Micah Gale Date: Thu, 11 Jan 2024 07:40:09 -0600 Subject: [PATCH 09/15] Create Github Actions (#2) This just took ... so ... many tries. --- .github/workflows/deploy.yml | 107 +++++++++++++++++++++++++++++++++++ .github/workflows/main.yml | 91 +++++++++++++++++++++++++++++ montepy/errors.py | 3 +- 3 files changed, 199 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/deploy.yml create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..893a831a --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,107 @@ +name: Deploy + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + last-minute-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: set up python 3.8 + uses: actions/setup-python@v4 + with: + python-version: 3.8 + - run: pip install --user -r requirements/dev.txt + - run: python -m pytest + + build-pages: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Configure git + env: + TOKEN: ${{ secrets.ACCESS_TOKEN }} + run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com/".insteadOf "https://github.com/" + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: 3.8 + - run: pip install --user montepy[doc] + - run: cd doc && make html + - uses: actions/configure-pages@v4 + - uses: actions/upload-pages-artifact@v3 + with: + name: deploy-pages + path: doc/build/html/ + + deploy-pages: + permissions: + contents: read + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + needs: [build-pages, last-minute-test] + runs-on: ubuntu-latest + steps: + - run: ls -l + - uses: actions/download-artifact@v4 + with: + name: deploy-pages + - run: ls -l + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 + with: + artifact_name: deploy-pages + + + deploy-test-pypi: + environment: + name: test-pypi + url: https://test.pypi.org/p/montepy # Replace with your PyPI project name + needs: [deploy-pages] + permissions: + contents: read + id-token: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: 3.8 + - run: python -m pip install build + - run: python -m build --sdist --wheel + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ + + deploy-pypi: + environment: + name: pypi + url: https://pypi.org/p/montepy # Replace with your PyPI project name + needs: [deploy-pages, deploy-test-pypi] + permissions: + contents: read + id-token: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: 3.8 + - run: python -m pip install build + - run: python -m build --sdist --wheel + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + + + diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..d635a22b --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,91 @@ +name: Test package + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + + steps: + - uses: actions/checkout@v4 + - name: set up python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - run: pip install --upgrade pip build + - run: pip install -r requirements/common.txt + - run: python -m build --sdist --wheel + - run: pip install . + - run: pip uninstall -y montepy + - run: pip install --user dist/*.whl + - run: pip uninstall -y montepy + - run: pip install --user dist/*.tar.gz + - run: pip install --user montepy[test] + - run: pip install --user montepy[doc] + - run: pip freeze + - name: Upload build artifacts + uses: actions/upload-artifact@v3 + with: + name: build + path: dist/* + + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + + steps: + - uses: actions/checkout@v4 + - name: set up python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - run: pip install --user -r requirements/dev.txt + - run: coverage run -m pytest --junitxml=test_report.xml + - run: coverage report + - run: coverage xml + - name: Upload test report + uses: actions/upload-artifact@v3 + with: + name: test + path: test_report.xml + - name: Upload coverage report + uses: actions/upload-artifact@v3 + with: + name: coverage + path: coverage.xml + + doc-test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: set up python 3.8 + uses: actions/setup-python@v4 + with: + python-version: 3.8 + - run: pip install montepy[doc] + - run: sphinx-build doc/source/ doc/build/ -W --keep-going -E + - run: sphinx-build -b html doc/source/ doc/build/html + - uses: actions/upload-artifact@v3 + with: + name: website + path: doc/build/html + + format-test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: set up python 3.8 + uses: actions/setup-python@v4 + with: + python-version: 3.8 + - run: pip install --user -r requirements/dev.txt + - run: black --check montepy/ tests/ + + diff --git a/montepy/errors.py b/montepy/errors.py index a61b73b3..f0c2464d 100644 --- a/montepy/errors.py +++ b/montepy/errors.py @@ -10,8 +10,7 @@ def __init__(self, message): class MalformedInputError(ValueError): """ - <<<<<<< HEAD - Raised when there is an error with the MCNP input not related to the parser. + Raised when there is an error with the MCNP input not related to the parser. """ def __init__(self, input, message): From 790538ed21c6c488f8952f8d96b5c9d28a4a8859 Mon Sep 17 00:00:00 2001 From: "Micah D. Gale" Date: Thu, 11 Jan 2024 14:09:46 -0600 Subject: [PATCH 10/15] Reved version for release. --- montepy/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/montepy/__init__.py b/montepy/__init__.py index 5f35202d..39781239 100644 --- a/montepy/__init__.py +++ b/montepy/__init__.py @@ -23,7 +23,7 @@ from montepy.universe import Universe import sys -__version__ = "0.2.5dev1" +__version__ = "0.2.5" # enable deprecated warnings for users if not sys.warnoptions: import os, warnings From c60fd0910b732f57b3e3d292a6ee8fd9289c7df4 Mon Sep 17 00:00:00 2001 From: Micah Gale Date: Thu, 11 Jan 2024 14:13:45 -0600 Subject: [PATCH 11/15] Only want deploy to happen when the merge actually happens. --- .github/workflows/deploy.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 893a831a..e75139c7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,8 +3,6 @@ name: Deploy on: push: branches: [main] - pull_request: - branches: [main] jobs: last-minute-test: From ba8fab1340c828b02acb949ab4d125011bb3ea9f Mon Sep 17 00:00:00 2001 From: Micah Gale Date: Thu, 11 Jan 2024 14:26:38 -0600 Subject: [PATCH 12/15] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 37 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 23 ++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..46c1f24f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,37 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: bug +assignees: '' + +--- + +**Reminders** +1. This is not a place to debug your MCNP models +1. MCNP is export controlled and only its 6.2 and 6.3 user manuals are public. Don't include any information about MCNP which is not in those manuals. +1. Your model may be export controlled, or proprietary. Please change specific numbers (e.g., dimensions, material compositions, etc.) in your minimum working examples. + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Version [e.g. 0.2.5] + + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..a7683470 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,23 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. + +** Reminder ** +Only the MCNP 6.2 and 6.3 user manuals are public. If this discusses a feature of MCNP you could only know by running MCNP please do not include it. From d0b0428aaef85e38816d84217cacae7154e5854b Mon Sep 17 00:00:00 2001 From: "Micah D. Gale" Date: Thu, 11 Jan 2024 20:33:13 -0600 Subject: [PATCH 13/15] updated link to issue in dev. --- doc/source/developing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/developing.rst b/doc/source/developing.rst index 4bf70d34..c6ec53a2 100644 --- a/doc/source/developing.rst +++ b/doc/source/developing.rst @@ -322,7 +322,7 @@ How to __str__ vs __repr__ """""""""""""""""""""""""" All objects must implement ``__str__`` (called by ``str()``), and ``__repr__`` (called by ``repr()``). -See `this issue `_ for a more detailed discussion. +See `this issue `_ for a more detailed discussion. In general ``__str__`` should return a one line string with enough information to uniquely identify the object. For numbered objects this should include their number, and a few high level details. For ``__repr__`` this should include debugging information. From 33dd0d28289e9420e4465247290140e7af126720 Mon Sep 17 00:00:00 2001 From: "Micah D. Gale" Date: Mon, 15 Jan 2024 08:31:03 -0600 Subject: [PATCH 14/15] Updated hyperlink for MCNP 6.2 manual --- doc/source/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/index.rst b/doc/source/index.rst index 4f7d4e9c..be171a76 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -22,7 +22,7 @@ See Also ======== * `MontePy github Repository `_ -* `MCNP 6.2 User Manual `_ +* `MCNP 6.2 User Manual `_ * `MCNP 6.3 User Manual `_ Indices and tables From b6ef7de77635b6da2f84fc02a7895add967274ef Mon Sep 17 00:00:00 2001 From: Micah Gale Date: Mon, 15 Jan 2024 13:09:17 -0600 Subject: [PATCH 15/15] Added feature request tag to issue template --- .github/ISSUE_TEMPLATE/feature_request.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index a7683470..32076a73 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -2,7 +2,7 @@ name: Feature request about: Suggest an idea for this project title: '' -labels: '' +labels: 'feature request' assignees: '' --- @@ -19,5 +19,5 @@ A clear and concise description of any alternative solutions or features you've **Additional context** Add any other context or screenshots about the feature request here. -** Reminder ** +**Reminder** Only the MCNP 6.2 and 6.3 user manuals are public. If this discusses a feature of MCNP you could only know by running MCNP please do not include it.