Skip to content

Commit 2cacd62

Browse files
authored
Merge pull request #12 from sandialabs/dev
Dev
2 parents 5dd76b8 + 6c3a516 commit 2cacd62

File tree

15 files changed

+108
-25
lines changed

15 files changed

+108
-25
lines changed

.github/workflows/codeql.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
name: "CodeQL"
22
on:
3-
push:
4-
branches: [ "main" ]
53
pull_request:
64
branches: [ "main" ]
75
jobs:

.github/workflows/main.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
name: main
22
on:
3-
push:
4-
branches: [ main ]
53
pull_request:
64
branches: [ main ]
7-
workflow_dispatch:
8-
env:
9-
REPO_NAME: ${{ github.event.repository.name }}
105
jobs:
116
test:
127
runs-on: ubuntu-latest
@@ -23,7 +18,7 @@ jobs:
2318
- name: install
2419
run: pip install .[testing]
2520
- name: pytest
26-
run: python -m pytest --verbose --cov=./${REPO_NAME}/ --cov-report xml
21+
run: python -m pytest --verbose --cov=./statmechcrack/ --cov-report xml
2722
- name: codecov
2823
uses: codecov/codecov-action@v3
2924
with:

.github/workflows/package.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
outputs:
1616
VERSION: ${{ steps.version.outputs.VERSION }}
1717
pypi:
18-
runs-on: ubuntu-20.04
18+
runs-on: ubuntu-latest
1919
steps:
2020
- uses: actions/checkout@v2
2121
- name: Install dependencies
@@ -33,7 +33,7 @@ jobs:
3333
run: sleep 500s
3434
test-pypi:
3535
needs: [get-version, pypi]
36-
runs-on: ubuntu-20.04
36+
runs-on: ubuntu-latest
3737
steps:
3838
- name: Install and test the package
3939
run: |
@@ -42,7 +42,7 @@ jobs:
4242
python -m statmechcrack.tests
4343
anaconda:
4444
needs: [get-version, pypi]
45-
runs-on: ubuntu-20.04
45+
runs-on: ubuntu-latest
4646
steps:
4747
- uses: actions/checkout@v2
4848
- name: Prepare conda
@@ -80,7 +80,7 @@ jobs:
8080
run: sleep 500s
8181
test-anaconda:
8282
needs: [get-version, anaconda]
83-
runs-on: ubuntu-20.04
83+
runs-on: ubuntu-latest
8484
steps:
8585
- name: Install the package
8686
run: conda install --channel mrbuche statmechcrack==${{ needs.get-version.outputs.VERSION }}
@@ -93,7 +93,7 @@ jobs:
9393
python -m statmechcrack.tests
9494
docker:
9595
needs: [get-version, pypi]
96-
runs-on: ubuntu-20.04
96+
runs-on: ubuntu-latest
9797
steps:
9898
- uses: actions/checkout@v2
9999
- name: Translate README.rst to .md for description
@@ -116,7 +116,7 @@ jobs:
116116
run: sleep 500s
117117
test-docker:
118118
needs: docker
119-
runs-on: ubuntu-20.04
119+
runs-on: ubuntu-latest
120120
container: mrbuche/statmechcrack
121121
steps:
122122
- name: Test the package

.github/workflows/pages.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: pages
22
on:
33
push:
44
branches: [ main ]
5-
workflow_dispatch:
65
jobs:
76
gh-pages:
87
runs-on: ubuntu-latest

.github/workflows/rtd.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: rtd
22
on:
33
push:
44
branches: [ main ]
5-
workflow_dispatch:
65
jobs:
76
docs:
87
runs-on: ubuntu-latest

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Citation
5555

5656
|zenodo|
5757

58-
\M. R. Buche and S. J. Grutzik, ``statMechCrack``: statistical mechanical models for crack growth, `Zenodo (2022) <https://doi.org/10.5281/zenodo.7008312>`_.
58+
\M. R. Buche and S. J. Grutzik, ``statMechCrack``: statistical mechanical models for crack growth, `Zenodo (2023) <https://doi.org/10.5281/zenodo.7008312>`_.
5959

6060
*********
6161
Copyright

SECURITY.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Security Policy
2+
3+
## Reporting a Vulnerability
4+
5+
If there are any vulnerabilities, do not hesitate to report them, but please report them privately.

setup.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,7 @@ def get_version():
5353
'Development Status :: 5 - Production/Stable',
5454
'Intended Audience :: Science/Research',
5555
'Topic :: Scientific/Engineering',
56-
'Programming Language :: Python :: 3.5',
57-
'Programming Language :: Python :: 3.6',
58-
'Programming Language :: Python :: 3.7',
59-
'Programming Language :: Python :: 3.8',
60-
'Programming Language :: Python :: 3.9',
61-
'Programming Language :: Python :: 3.10',
56+
'Programming Language :: Python'
6257
],
6358
project_urls={
6459
'Anaconda': 'https://anaconda.org/mrbuche/statmechcrack',

statmechcrack/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
from .isotensional import CrackIsotensional
88
from .mechanical import CrackMechanical
99
from .monte_carlo import CrackMonteCarlo
10+
from .q2d.core import CrackQ2D
11+
from .q2d.isometric import CrackQ2DIsometric
12+
from .q2d.isotensional import CrackQ2DIsotensional
13+
from .q2d.mechanical import CrackQ2DMechanical
1014

1115

12-
__version__ = "0.5.0"
16+
__version__ = "0.6.0"

statmechcrack/mechanical.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515

1616
class CrackMechanical(BasicUtility):
17-
"""The crack model class for the isometric ensemble.
17+
"""The crack model class treated mechanically.
1818
1919
Attributes:
2020
N (int): The number of broken bonds.

statmechcrack/q2d/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
"""Initializes the subpackage.
2+
3+
"""
4+
5+
from .core import CrackQ2D
6+
from .isometric import CrackQ2DIsometric
7+
from .isotensional import CrackQ2DIsotensional
8+
from .mechanical import CrackQ2DMechanical

statmechcrack/q2d/core.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"""The core module for the quasi-two-dimensional crack model.
2+
3+
"""
4+
5+
from .isotensional import CrackQ2DIsotensional
6+
7+
8+
class CrackQ2D(CrackQ2DIsotensional):
9+
r"""The quasi-two-dimensional crack model class.
10+
11+
"""
12+
def __init__(self, **kwargs):
13+
"""Initializes the :class:`CrackQ2D` class.
14+
15+
Initialize and inherit all attributes and methods
16+
from a :class:`.CrackQ2DIsotensional` class instance.
17+
18+
"""
19+
CrackQ2DIsotensional.__init__(self, **kwargs)

statmechcrack/q2d/isometric.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
"""A module for the quasi-two-dimensional crack model
2+
in the isometric ensemble.
3+
4+
"""
5+
6+
from .mechanical import CrackQ2DMechanical
7+
8+
9+
class CrackQ2DIsometric(CrackQ2DMechanical):
10+
"""The quasi-two-dimensional crack model class
11+
for the isometric ensemble.
12+
13+
"""
14+
def __init__(self, **kwargs):
15+
"""Initializes the :class:`CrackQ2DIsometric` class.
16+
17+
Initialize and inherit all attributes and methods
18+
from a :class:`.CrackQ2DMechanical` class instance.
19+
20+
"""
21+
CrackQ2DMechanical.__init__(self, **kwargs)

statmechcrack/q2d/isotensional.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
"""A module for the quasi-two-dimensional crack model
2+
in the isotensional ensemble.
3+
4+
"""
5+
6+
from .isometric import CrackQ2DIsometric
7+
8+
9+
class CrackQ2DIsotensional(CrackQ2DIsometric):
10+
"""The quasi-two-dimensional crack model class
11+
for the isotensional ensemble.
12+
13+
"""
14+
def __init__(self, **kwargs):
15+
"""Initializes the :class:`CrackQ2DIsotensional` class.
16+
17+
Initialize and inherit all attributes and methods
18+
from a :class:`.CrackQ2DIsometric` class instance.
19+
20+
"""
21+
CrackQ2DIsometric.__init__(self, **kwargs)

statmechcrack/q2d/mechanical.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"""A module for the quasi-two-dimensional crack model treated mechanically.
2+
3+
"""
4+
5+
from ..utility import BasicUtility
6+
7+
8+
class CrackQ2DMechanical(BasicUtility):
9+
"""The quasi-two-dimensional crack model class treated mechanically.
10+
11+
"""
12+
def __init__(self, **kwargs):
13+
"""Initializes the :class:`CrackQ2DMechanical` class.
14+
15+
Initialize and inherit all attributes and methods
16+
from a :class:`BasicUtility` class instance.
17+
18+
"""
19+
BasicUtility.__init__(self)

0 commit comments

Comments
 (0)