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

Mat redesign #507

Draft
wants to merge 273 commits into
base: alpha-test-dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
273 commits
Select commit Hold shift + click to select a range
3763a52
Made isotope library use meta-programming.
MicahGale Aug 23, 2024
78090fe
Ensure _is_atom_franction always set.
MicahGale Aug 23, 2024
d88ceeb
Fixing bugs with get/setitem.
MicahGale Aug 23, 2024
ac34dc3
Another fix.
MicahGale Aug 23, 2024
f7567fc
Avoided trying to look for non-existant isotopes.
MicahGale Aug 23, 2024
4910729
Removed magic number from Isotopes.
MicahGale Aug 23, 2024
43bbdd2
Changed default meta_state to 0 from None.
MicahGale Aug 23, 2024
c5a5adb
Fully embraced meta
MicahGale Aug 23, 2024
54e6723
Allowed specifying an element slice by Z number.
MicahGale Aug 23, 2024
3a05994
Padded library in str for pretty printing.
MicahGale Aug 23, 2024
1048375
Allowed passing just an element for slicing.
MicahGale Aug 23, 2024
73a9b1c
Started changelog for material redesign.
MicahGale Aug 25, 2024
d5bf43c
Merge branch 'develop' into mat_redesign
MicahGale Sep 4, 2024
bd3e748
Deleted all previously deprecated code.
MicahGale Sep 4, 2024
a9da602
Updated changelog with deleted code.
MicahGale Sep 4, 2024
6e8e0ae
Switched away from mat_comp dict.
MicahGale Sep 5, 2024
d69a019
Started get/set item, and base dunders.
MicahGale Sep 5, 2024
b6e5f92
Merge branch 'develop' into mat_redesign
MicahGale Sep 12, 2024
9f3140c
Moved isotope to nuclide.
MicahGale Sep 12, 2024
0ed30ef
Refactored Isotope to Nuclide.
MicahGale Sep 12, 2024
8ff4bbc
Started prototype for filtering isotopes.
MicahGale Sep 12, 2024
801360b
Removed deprecated call.
MicahGale Sep 12, 2024
c9fff24
Created filter prepper.
MicahGale Sep 12, 2024
b1c2c0e
Removed hacky hashing.
MicahGale Sep 12, 2024
9497981
Merge branch 'develop' into mat_redesign
MicahGale Sep 12, 2024
1b385a5
Finished concept of finding things.
MicahGale Sep 12, 2024
068d8b0
Deleted dead code.
MicahGale Sep 12, 2024
34a9ed7
Simplified fancy name to be string only.
MicahGale Sep 12, 2024
2630231
Removed all material_components.
MicahGale Sep 12, 2024
17825c5
cleaned up small bugs.
MicahGale Sep 12, 2024
3fe4847
Simplified tests for new interface.
MicahGale Sep 12, 2024
d3e6007
Played around with hypothesis and PBT.
MicahGale Sep 12, 2024
521fcf9
Ignore non-sense isotopes, and helped debugging.
MicahGale Sep 13, 2024
6e7b21b
Fixed bad format re for nuclide.
MicahGale Sep 13, 2024
c639e23
Handled case of bad string.
MicahGale Sep 13, 2024
564ea45
Temporarily fixed equals.
MicahGale Sep 13, 2024
7d78397
Changed how A is sampled to be more physically accurate.
MicahGale Sep 13, 2024
4629e78
Made isotope fancy name more exhaustive.
MicahGale Sep 15, 2024
c5337bf
Fixed issue of dissapearing isomer.
MicahGale Sep 15, 2024
307ae3e
Limited A multiplier to being more physical.
MicahGale Sep 16, 2024
e34d83c
Removed material_components from tests.
MicahGale Sep 16, 2024
92facc4
Made a lot of data_inputs as top level objects.
MicahGale Sep 16, 2024
e6b2bcb
Made elements print by reverse order and truncated.
MicahGale Sep 16, 2024
b45e535
Made iterator of material to hide valuenode.
MicahGale Sep 16, 2024
b61b2d3
Added elements set to cache info.
MicahGale Sep 16, 2024
5e0ff5e
Made easier way to add new nuclides.
MicahGale Sep 16, 2024
d12ec1a
Made it possible to find nuclide and element in material.
MicahGale Sep 16, 2024
37e748e
Setup problem.materials.Element generator.
MicahGale Sep 16, 2024
718bfa2
Made Element truly immutable with slots.
MicahGale Sep 16, 2024
45c48ad
Started trying to make immutable Nuclide.
MicahGale Sep 16, 2024
4a47c5d
Actually implemented immutable backend into Nuclide.
MicahGale Sep 16, 2024
543c764
Updated equality to new iterator.
MicahGale Sep 16, 2024
85736b4
Updated test fixture.
MicahGale Sep 16, 2024
7330ce9
Debugged nuclide str.
MicahGale Sep 16, 2024
1a97f28
Fixed ZAID to be treated as an int actually.
MicahGale Sep 17, 2024
d993776
Test only that material_component is deprecated.
MicahGale Sep 17, 2024
5fe7a67
Fixed update_values to use new data_structure.
MicahGale Sep 17, 2024
d24a833
Ignored new testing artifacts.
MicahGale Sep 17, 2024
228acbf
Brought back new thermal test for new update_pointer.
MicahGale Sep 17, 2024
eb4d383
Implemented a nuclide set hashing system.
MicahGale Sep 17, 2024
edc3181
Exposed nucleus as a property.
MicahGale Sep 17, 2024
f33283d
Moved nuclide equality to mostly nucleus.
MicahGale Sep 17, 2024
05961d0
Improved nuclide sorting.
MicahGale Sep 17, 2024
9252022
Implemented searching for materials by components.
MicahGale Sep 17, 2024
e30b570
Added enum for material libraries types.
MicahGale Sep 17, 2024
6e0b614
Added default_libraries to material class.
MicahGale Sep 17, 2024
88de24d
Ignored no libary parameters.
MicahGale Sep 17, 2024
b1fb135
Made meta class to make immutables singletons.
MicahGale Sep 23, 2024
8c84a10
Made elements and nucleus singletons.
MicahGale Sep 23, 2024
a85ff52
Moved get_from_fancy_name into init
MicahGale Sep 23, 2024
907f559
moved default version to 6.3.0
MicahGale Sep 23, 2024
af541d6
Optimized equality for singleton objects
MicahGale Sep 23, 2024
7e0f37a
Added links to 6.3.1 manual.
MicahGale Sep 23, 2024
59a6181
Added opportunistic cache updates.
MicahGale Sep 23, 2024
37e5ce3
Implemented prototype of set logic for numbered_object_collection.
MicahGale Sep 23, 2024
e5ccf65
Merge branch 'develop' into mat_redesign
MicahGale Sep 24, 2024
b981326
Started alpha test deploy workflow.
MicahGale Sep 24, 2024
8f71cd3
Changed check version over to python.
MicahGale Sep 24, 2024
2331d1f
Moved GHA deploy to using python check version.
MicahGale Sep 24, 2024
30e7d18
Made NumberedObject more like a set.
MicahGale Sep 24, 2024
7e821ac
Created update function, and made it more optimized.
MicahGale Sep 25, 2024
22d15ad
Fixed typo.
MicahGale Sep 25, 2024
653a2f4
Merge branch 'develop' into mat_redesign
MicahGale Oct 3, 2024
7df2a89
Implemented all set operations.
MicahGale Oct 7, 2024
2b2110e
Implemented materials.default_libraries, and change_libraries.
MicahGale Oct 7, 2024
32cdc43
Made is_atom_fraction settable.
MicahGale Oct 7, 2024
62a7a98
fixed typo bug.
MicahGale Oct 7, 2024
a02ca1e
Made test for over removal.
MicahGale Oct 7, 2024
5edaeb4
Removed over removal pop bug.
MicahGale Oct 7, 2024
865cb2e
Merge branch 'develop' into mat_redesign
MicahGale Oct 8, 2024
4c3379f
Added test for #182.
MicahGale Oct 12, 2024
cc020ce
Refactored isotopes Node.
MicahGale Oct 12, 2024
d8bd70e
Made general material parser.
MicahGale Oct 12, 2024
2388adf
Made material parser and syntax node handle parameters too.
MicahGale Oct 12, 2024
1f14326
Made material init handle arbitrary order stuff.
MicahGale Oct 12, 2024
25f5ae8
Finished refactor.
MicahGale Oct 12, 2024
f80f7b6
Fixed bugs with MaterialsNode.
MicahGale Oct 12, 2024
a9146d0
Removed call to old function.
MicahGale Oct 14, 2024
efcb82f
Fixed bug with comparing strings to libraries
MicahGale Oct 14, 2024
f869666
Raised valueError with invalid ZAID.
MicahGale Oct 14, 2024
8104df8
Ensure stupid ZAID parsing is always handled when parsing a ZAID.
MicahGale Oct 14, 2024
b0f1325
Updated fall through test for new default version.
MicahGale Oct 14, 2024
458de0e
Deprecated append to avoid confusion and find bugs.
MicahGale Oct 14, 2024
e2b1d5e
Moved away from old append.
MicahGale Oct 14, 2024
51336b1
New default!
MicahGale Oct 14, 2024
90f3dc0
Fixed attributeErrors.
MicahGale Oct 14, 2024
8abe109
Made parser more robust with all edge cases.
MicahGale Oct 14, 2024
261f096
Fixed name of attribute in test.
MicahGale Oct 14, 2024
726fcd9
Added references to materials in manual.
MicahGale Oct 15, 2024
1314a66
Merge branch 'develop' into mat_redesign
MicahGale Oct 15, 2024
7e52e65
Promoted all surfaces to be easier to access.
MicahGale Oct 17, 2024
05db8cb
Updated mat clone test for new material api.
MicahGale Oct 17, 2024
b1739da
Updated test to all setting mode with strings.
MicahGale Oct 22, 2024
d80a234
Fixed wierd bug in test that shouldn't exist.
MicahGale Oct 22, 2024
3c39e45
Fixed parser to not get confused by starting keyword.
MicahGale Oct 22, 2024
5b08ff0
Merge branch 'develop' into mat_redesign
MicahGale Oct 30, 2024
e6db073
Removed strenum because that's 3.11
MicahGale Nov 2, 2024
e3d21d1
Merge branch 'develop' into mat_redesign
MicahGale Nov 7, 2024
e00b287
Ensured number is checked for mat eq.
MicahGale Nov 7, 2024
c109919
Makred add children to problem as deprecated
MicahGale Nov 7, 2024
4bff505
Added add del hooks to numbered object collection.
MicahGale Nov 7, 2024
f991da5
Added system to auto-add children objects.
MicahGale Nov 7, 2024
d033070
Fully deprecated add_cell_children_to_problem.
MicahGale Nov 7, 2024
ec50490
Removed hashing support from surfaces.
MicahGale Nov 7, 2024
2065fc2
Added map for library suffix to particle types.
MicahGale Nov 7, 2024
1c3da53
Fixed bugs with import. Now infinite recursion issue.
MicahGale Nov 7, 2024
db593a2
Used only final character to calssify library.
MicahGale Nov 8, 2024
9aa37e6
Fixed basic errors breaking everything.
MicahGale Nov 8, 2024
952ad23
Added some default libraries default behavior.
MicahGale Nov 12, 2024
ce75b1a
Made method to figure out which library will be used.
MicahGale Nov 12, 2024
1efbbdc
Merge branch 'develop' into mat_redesign
MicahGale Nov 12, 2024
87503c7
Restricted property testing to subset of libraries due to library for…
MicahGale Nov 12, 2024
c3283f0
Updated num_object to use internal methods more, and fix a few bugs.
MicahGale Nov 12, 2024
c851242
Updated test to avoid reappending the same object.
MicahGale Nov 12, 2024
3c3a887
Removed use of halfspaces from get leaves.
MicahGale Nov 12, 2024
1a7501c
Added flag to add input to error only once.
MicahGale Nov 13, 2024
ab3c63a
Added error messages.
MicahGale Nov 13, 2024
8386623
Added child object adder filter mechanism.
MicahGale Nov 13, 2024
6facc4c
Added mechanism to not add cell children everytime.
MicahGale Nov 13, 2024
5374ca9
Removed strenum.
MicahGale Nov 13, 2024
2bc0d58
Split developer's guide into multiple files for clarity.
MicahGale Nov 13, 2024
e080d80
Started standards for writing doc strings.
MicahGale Nov 13, 2024
9d11eca
Avoide bug if treating material like a list.
MicahGale Nov 14, 2024
de8ef57
Removed deprecation marks. Added example example.
MicahGale Nov 14, 2024
8a6e0c0
Fixed removed old surfaces method to not hash surfaces.
MicahGale Nov 14, 2024
3fa8901
Fixed collection call.
MicahGale Nov 14, 2024
a15db9d
Avoid added material in test.
MicahGale Nov 14, 2024
716bc90
Updated MCNP problem to use proper surface removal.
MicahGale Nov 14, 2024
ae78b70
Fixed basic set logic implementation.
MicahGale Nov 14, 2024
f399753
Implemented eq for NumberedObjectCollection.
MicahGale Nov 14, 2024
3443f31
Updated test to not rely on hashing.
MicahGale Nov 14, 2024
6e91e34
Removed test call to deprecated function.
MicahGale Nov 14, 2024
98eaf6f
changed update surfs system to accept numbers.
MicahGale Nov 15, 2024
dfb3756
Fixed realiance on truthiness of materials.
MicahGale Nov 15, 2024
69da3f7
Made failfast profile.
MicahGale Nov 15, 2024
2ea69f9
Tried to clean up how geometry clone works. Still broken.
MicahGale Nov 15, 2024
a4df3f1
corrected geometries update.
MicahGale Nov 16, 2024
a862007
Don't let getting leaves when not linked to surfaces.
MicahGale Nov 16, 2024
0d0d298
Stop hashing surfaces!
MicahGale Nov 16, 2024
608ef1c
Removed sets from tests.
MicahGale Nov 16, 2024
0f0d9de
Made num object collection eq more robust.
MicahGale Nov 16, 2024
eeb3e10
Fixed cell remove_duplicate_surfaces.
MicahGale Nov 16, 2024
efbfa42
Fixed keys to yield nothing when empty and not None.
MicahGale Nov 17, 2024
128567e
Updated remove surfaces to work with cells officialy.
MicahGale Nov 17, 2024
e370858
Just don't allow setting geometry with no numbers.
MicahGale Nov 17, 2024
fdb59c9
updated geometry tests to have numbers.
MicahGale Nov 17, 2024
9a3389e
Switched test to cloning.
MicahGale Nov 17, 2024
9e7a535
Fixed comments setter and tests.
MicahGale Nov 17, 2024
d6d6d13
Made default libraries hold a syntax node.
MicahGale Nov 18, 2024
dafe5d4
ensured nuclide always has a syntax node.
MicahGale Nov 18, 2024
729f7b4
Worked to ensure that on material edits the syntax tree is updated.
MicahGale Nov 18, 2024
0cf3293
Simplified logic.
MicahGale Nov 18, 2024
de4c82e
Ensured that material syntax tree is always valid.
MicahGale Nov 18, 2024
d920f74
Reduced risk of arbitrary time to execute tests.
MicahGale Nov 18, 2024
ab36fcf
Fixed typo in link.
MicahGale Nov 18, 2024
791495a
Fixed failing doc examples.
MicahGale Nov 18, 2024
b90128b
Added documentation for new modules.
MicahGale Nov 18, 2024
6c7c065
Moved nuclide tests to own file.
MicahGale Nov 18, 2024
432eeb9
Added new features and fixed bugs in Library.
MicahGale Nov 18, 2024
b7f60b3
Tested Library.
MicahGale Nov 18, 2024
cd5097c
Moved back to class based test structure.
MicahGale Nov 18, 2024
84b5339
Tested default libraries.
MicahGale Nov 18, 2024
fa9906c
Allowed setting library with string.
MicahGale Nov 18, 2024
cb6f63e
Fixed how str converted to LibraryType.
MicahGale Nov 18, 2024
a2f47eb
Made LibraryType better for dict hashing.
MicahGale Nov 18, 2024
1a78f4e
Fixed issue with nuclide lt.
MicahGale Nov 18, 2024
c714784
Added docstrings. Tried to fix singleton pattern.
MicahGale Nov 19, 2024
47cbb84
Promoted library to top level.
MicahGale Nov 20, 2024
20c33d6
Moved away from metaclasses to make sphinx happy.
MicahGale Nov 20, 2024
9c52802
Added MCNP 6.3.1 manual.
MicahGale Nov 20, 2024
e9e15cd
Made autodoc prettier.
MicahGale Nov 20, 2024
026c8d6
added a lot more documentation on how nuclide/nucleus works.
MicahGale Nov 20, 2024
d196b8d
Added typehints.
MicahGale Nov 20, 2024
1cc34a4
Finished docs standards.
MicahGale Nov 20, 2024
4c10ad9
Update doc strings for material.
MicahGale Nov 20, 2024
927ac00
Wrote more doc strings.
MicahGale Nov 20, 2024
da2d235
Added doc strings and type enforcement.
MicahGale Nov 21, 2024
6183660
Added system to set/get fractions and nuclides one by one.
MicahGale Nov 21, 2024
9985b09
Fixed typos in docstrings.
MicahGale Nov 21, 2024
e48eb3f
Documented almost all of the new material.
MicahGale Nov 21, 2024
713112e
Finished refactor to weakref and var name.
MicahGale Nov 21, 2024
1fecc43
Escaped doc string breaking pytest.
MicahGale Nov 21, 2024
8bf5361
Added system to test material exports.
MicahGale Nov 21, 2024
23dbbc0
Created system to do default material export formatting.
MicahGale Nov 22, 2024
16955cc
Fixed common instances dictionary of singleton.
MicahGale Nov 25, 2024
a00ea39
Fixed bug with changing - to space for material number.
MicahGale Nov 25, 2024
1e939a9
Moved logic to nuclide to ensure nucleus arguments are always unique.
MicahGale Nov 25, 2024
83d8cfb
Fixed traceback hiding.
MicahGale Nov 25, 2024
6c2d84c
Fixed a few bugs.
MicahGale Nov 25, 2024
ccb30d2
Tested get_nuclide_library
MicahGale Nov 25, 2024
7adfc5d
Fixed bugs with get_nuclide_library.
MicahGale Nov 25, 2024
b5f00fd
Made library case agnostic.
MicahGale Nov 25, 2024
dbd90f1
Tested material getter setter deleter and iter.
MicahGale Nov 25, 2024
f4f2a70
Fixed various bugs with getter setter deleter.
MicahGale Nov 25, 2024
e05397f
Tested contains for materials.
MicahGale Nov 25, 2024
4861b34
updated nuclide repr.
MicahGale Nov 25, 2024
1ae42fc
Made equality more robust, and switched defaults of nuclide to match …
MicahGale Nov 25, 2024
188e6c6
Fixed and simplified material contains.
MicahGale Nov 25, 2024
6c7d5c5
Made test more robust.
MicahGale Nov 25, 2024
f35874d
Tested material values and nuclides
MicahGale Nov 26, 2024
e9de221
Fixed bugs with material nuclides and values.
MicahGale Nov 26, 2024
224b08e
tested material append
MicahGale Nov 26, 2024
5287e0b
Simplified material append.
MicahGale Nov 26, 2024
7318fdf
Added dict like iterator to default libraries
MicahGale Nov 27, 2024
2735c1b
Added default libraries to export test.
MicahGale Nov 27, 2024
b28e253
Added syntax tree deleter to delitem.
MicahGale Nov 27, 2024
a93fd11
Added tests for change lib and add nuclide.
MicahGale Nov 27, 2024
85c9c51
Added better material documentation.
MicahGale Nov 27, 2024
426a7f9
Fixed and implemented material contains.
MicahGale Nov 27, 2024
1d606ac
Tested material find and normalize.
MicahGale Nov 27, 2024
ec1c263
Fixed material contains to take fancy name elemental.
MicahGale Nov 27, 2024
5c00c23
Refactored meta_isomer to be more consistent.
MicahGale Nov 27, 2024
6135576
Fixed material find to actually work.
MicahGale Nov 27, 2024
6e9d8c5
Added docstrings.
MicahGale Nov 27, 2024
c1cf0c7
I can't count.
MicahGale Nov 27, 2024
0d63192
Made library completely sortable.
MicahGale Nov 27, 2024
5125256
Made material find work with null library.
MicahGale Nov 27, 2024
8ad097e
Added bad tests for material find.
MicahGale Nov 27, 2024
72d9b33
Simplified material filters.
MicahGale Nov 27, 2024
80282ff
removed library slicing methods that aren't needed.
MicahGale Nov 27, 2024
d07d5f1
Tested materials.
MicahGale Nov 27, 2024
7e2acf6
Fixed materials get containing.
MicahGale Nov 27, 2024
4d34ad6
Added top level import
MicahGale Nov 27, 2024
afbd1c2
Removed dead code and allowed 0 as a number.
MicahGale Nov 27, 2024
58ade28
Made exemption for mat 0.
MicahGale Nov 27, 2024
9a5cc03
Moved test_numbered completely to pytest.
MicahGale Nov 27, 2024
267a639
Tested collection set logic.
MicahGale Nov 28, 2024
4754bde
Fixed set logic implementation for collections.
MicahGale Nov 28, 2024
83a96fe
Cleaned up deprecations
MicahGale Nov 28, 2024
e641fd3
Tested materials and nuclei.
MicahGale Nov 28, 2024
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
Empty file modified .github/scripts/check_sitemap.py
100644 → 100755
Empty file.
24 changes: 24 additions & 0 deletions .github/scripts/check_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env python

import argparse
import re
import sys
from setuptools_scm import get_version

parser = argparse.ArgumentParser()
parser.add_argument("-a", "--alpha", action="store_true")
DEPLOY_VERSION = r"\d+\.\d+\.\d+"
ALPHA_VERSION = DEPLOY_VERSION + r"a\d+"
args = parser.parse_args()
if args.alpha:
print("checking alpha release")
parser = ALPHA_VERSION
else:
print("checking Final release.")
parser = DEPLOY_VERSION

version = get_version()
print(f"version = {version}")
if not re.fullmatch(parser, version):
exit(1)
exit(0)
6 changes: 0 additions & 6 deletions .github/scripts/check_version.sh

This file was deleted.

107 changes: 107 additions & 0 deletions .github/workflows/deploy-alpha.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: Deploy

on:
push:
branches: [alpha-test]


jobs:
last-minute-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set up python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
- run: pip install . montepy[develop]
- run: python -m pytest

build-packages:
name: Build, sign, and release packages on github
runs-on: ubuntu-latest
needs: [last-minute-test]
permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
id-token: write # IMPORTANT: mandatory for sigstore
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: set up python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
- run: pip install . montepy[build]
- name: Get Version
id: get_version
run: echo "version=`python -m setuptools_scm`" >> $GITHUB_OUTPUT
- name: Verify that this is a non-dev alpha release
run: .github/scripts/check_version.py --alpha
- run: python -m build .
- name: Sign the dists with Sigstore
uses: sigstore/[email protected]
with:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: v${{ steps.get_version.outputs.version }}
name: Release ${{ steps.get_version.outputs.version }}
draft: true
- run: >-
gh release upload
'v${{ steps.get_version.outputs.version }}' dist/**
--repo '${{ github.repository }}'
- uses: actions/upload-artifact@v4
with:
name: build
path: |
dist/*.tar.gz
dist/*.whl


deploy-test-pypi:
environment:
name: test-pypi
url: https://test.pypi.org/p/montepy # Replace <package-name> with your PyPI project name
needs: [build-packages]
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: build
path: dist/
- 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 <package-name> with your PyPI project name
needs: [deploy-pages, deploy-test-pypi, build-packages]
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: build
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1




2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
id: get_version
run: echo "version=`python -m setuptools_scm`" >> $GITHUB_OUTPUT
- name: Verify that this is a non-dev release
run: .github/scripts/check_version.sh ${{ steps.get_version.outputs.version }}
run: .github/scripts/check_version.py
- run: python -m build .
- name: Sign the dists with Sigstore
uses: sigstore/[email protected]
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ doc/build/*
.idea/
.ipynb_checkpoints/
montepy/_version.py

# various testing results
htmlcov
.hypothesis
.mutmut-cache
4 changes: 3 additions & 1 deletion benchmark/benchmark_big_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
print(f"Memory usage report: {tracemalloc.get_traced_memory()[0]/1024/1024} MB")
del problem
gc.collect()
print(f"Memory usage report after GC: {tracemalloc.get_traced_memory()[0]/1024/1024} MB")
print(
f"Memory usage report after GC: {tracemalloc.get_traced_memory()[0]/1024/1024} MB"
)

if (stop - start) > FAIL_THRESHOLD:
raise RuntimeError(
Expand Down
3 changes: 2 additions & 1 deletion demo/Pin_cell.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"source": [
"import montepy\n",
"import os\n",
"\n",
"montepy.__version__"
]
},
Expand Down Expand Up @@ -95,7 +96,7 @@
"metadata": {},
"outputs": [],
"source": [
"#make folder\n",
"# make folder\n",
"os.mkdir(\"parametric\")\n",
"\n",
"fuel_wall = problem.surfaces[1]\n",
Expand Down
1 change: 1 addition & 0 deletions doc/source/_test_for_missing_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"_version.py",
"__main__.py",
"_cell_data_control.py",
"_singleton.py"
}

base = os.path.join("..", "..")
Expand Down
10 changes: 10 additions & 0 deletions doc/source/api/montepy.data_inputs.nuclide.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
montepy.data_inputs.nuclide module
==================================


.. automodule:: montepy.data_inputs.nuclide
:members:
:inherited-members:
:undoc-members:
:show-inheritance:

1 change: 1 addition & 0 deletions doc/source/api/montepy.data_inputs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ montepy.data\_inputs package
montepy.data_inputs.lattice_input
montepy.data_inputs.material
montepy.data_inputs.material_component
montepy.data_inputs.nuclide
montepy.data_inputs.mode
montepy.data_inputs.thermal_scattering
montepy.data_inputs.transform
Expand Down
9 changes: 9 additions & 0 deletions doc/source/api/montepy.input_parser.material_parser.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
montepy.input\_parser.material\_parser module
==============================================


.. automodule:: montepy.input_parser.material_parser
:members:
:inherited-members:
:undoc-members:
:show-inheritance:
2 changes: 2 additions & 0 deletions doc/source/api/montepy.input_parser.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ montepy.input\_parser package
montepy.input_parser.input_file
montepy.input_parser.input_reader
montepy.input_parser.input_syntax_reader
montepy.input_parser.material_parser
montepy.input_parser.mcnp_input
montepy.input_parser.parser_base
montepy.input_parser.read_parser
montepy.input_parser.shortcuts
montepy.input_parser.surface_parser
montepy.input_parser.syntax_node
montepy.input_parser.tally_parser
montepy.input_parser.tally_seg_parser
montepy.input_parser.thermal_parser
montepy.input_parser.tokens
9 changes: 9 additions & 0 deletions doc/source/api/montepy.input_parser.tally_seg_parser.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
montepy.input\_parser.tally\_seg\_parser module
===============================================


.. automodule:: montepy.input_parser.tally_seg_parser
:members:
:inherited-members:
:undoc-members:
:show-inheritance:
36 changes: 35 additions & 1 deletion doc/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,40 @@
MontePy Changelog
*****************

1.0.0 releases
==============

#Next Version#
--------------
* Redesigned how Materials hold Material_Components. See :ref:`migrate 0 1` (:pull:`507`).

**Breaking Changes**

* Removed ``Material.material_components``. See :ref:`migrate 0 1` (:pull:`507`).

**Deprecated code Removed**

* ``montepy.Cell.geometry_logic_string``
* ``montepy.data_inputs.cell_modifier.CellModifier.has_changed_print_style``
* ``montepy.data_inputs.data_input.DataInputAbstract``

* ``class_prefix``
* ``has_number``
* ``has_classifier``

* ``montepy.input_parser.mcnp_input.Card``
* ``montepy.input_parser.mcnp_input.ReadCard``
* ``montepy.input_parser.mcnp_input.Input.words``
* ``montepy.input_parser.mcnp_input.Comment``
* ``montepy.input_parser.mcnp_input.parse_card_shortcuts``
* ``montepy.mcnp_object.MCNP_Object``

* ``wrap_words_for_mcnp``
* ``compress_repeat_values``
* ``compress_jump_values``
* ``words``
* ``allowed_keywords``

0.5 releases
============

Expand Down Expand Up @@ -47,7 +81,7 @@ MontePy Changelog
============

0.4.1
--------------
----------------

**Features Added**

Expand Down
24 changes: 19 additions & 5 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@
"sphinx.ext.intersphinx",
"sphinx.ext.extlinks",
"sphinx.ext.doctest",
"sphinx_autodoc_typehints",
"sphinx_sitemap",
"sphinx_favicon",
"sphinx_copybutton"
"sphinx_copybutton",
]

# Add any paths that contain templates here, relative to this directory.
Expand All @@ -60,6 +61,12 @@
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []

# autodoc
autodoc_typehints = "both"
typehints_use_signature = True
typehints_use_signature_return = True
autodoc_typehints_description_target = "all"
autodoc_member_order = "groupwise"
# Display the version
display_version = True

Expand All @@ -68,16 +75,23 @@
"https://mcnp.lanl.gov/pdf_files/TechReport_2022_LANL_LA-UR-22-30006"
"Rev.1_KuleszaAdamsEtAl.pdf"
)
UM631 = "https://www.osti.gov/servlets/purl/2372634"
UM62 = (
"https://mcnp.lanl.gov/pdf_files/TechReport_2017_LANL_LA-UR-17-29981"
"_WernerArmstrongEtAl.pdf"
)
extlinks = {
# MCNP 6.3 User's Manual
"manual63sec": (UM63 + "#section.%s", "MCNP 6.3 manual § %s"),
"manual63": (UM63 + "#subsection.%s", "MCNP 6.3 manual § %s"),
"manual63part": (UM63 + "#part.%s", "MCNP 6.3 manual § %s"),
"manual63chapter": (UM63 + "#chapter.%s", "MCNP 6.3 manual § %s"),
"manual63sec": (UM63 + "#section.%s", "MCNP 6.3.0 manual § %s"),
"manual63": (UM63 + "#subsection.%s", "MCNP 6.3.0 manual § %s"),
"manual63part": (UM63 + "#part.%s", "MCNP 6.3.0 manual part %s"),
"manual63chapter": (UM63 + "#chapter.%s", "MCNP 6.3.0 manual Ch. %s"),
# MCNP 6.3.1 User's Manual
"manual631sec": (UM631 + "#section.%s", "MCNP 6.3.1 manual § %s"),
"manual631": (UM631 + "#subsection.%s", "MCNP 6.3.1 manual § %s"),
"manual631part": (UM631 + "#part.%s", "MCNP 6.3.1 manual part %s"),
"manual631chapter": (UM631 + "#chapter.%s", "MCNP 6.3.1 manual Ch. %s"),
# MCNP 6.2 User's manual
"manual62": (UM62 + "#page=%s", "MCNP 6.2 manual p. %s"),
"issue": ("https://github.com/idaholab/MontePy/issues/%s", "#%s"),
"pull": ("https://github.com/idaholab/MontePy/pull/%s", "#%s"),
Expand Down
Loading
Loading