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

Update 2D simple shear CI tests #116

Merged
merged 30 commits into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
aac2397
remove: Remove outdated copy of voigt averaging method
adigitoleo Jul 11, 2023
e93bc48
test: Clean up simple shear 2d tests and compare to Kaminski 2001
adigitoleo Jul 11, 2023
0fd7416
test: Fix bad conditional
adigitoleo Jul 11, 2023
71497a2
fix: Fix unused rng attribute
adigitoleo Jul 11, 2023
f6e66c5
test: Use shorter time for CPO integration
adigitoleo Jul 11, 2023
3bc31ff
fix: Add missing datafile
adigitoleo Jul 11, 2023
eb9a65c
test: Use even shorter time for CPO integration
adigitoleo Jul 11, 2023
0f1f170
dev: Add CLI tool to plot polefigures from npz file
adigitoleo Jul 12, 2023
7091984
test: Use Fraters & Billen, 2021 parameters for CPO integration
adigitoleo Jul 12, 2023
42bf59a
test: Fix 2d simple shear tests!
adigitoleo Jul 17, 2023
43b5fea
test: Add asserts for GBM test angles
adigitoleo Jul 18, 2023
c3f9899
feat: Allow using strain data to set polefigure suptitles
adigitoleo Jul 20, 2023
5e5c6e7
test: Plot symmetry diagnostic instead of strength and tweak asserts
adigitoleo Jul 20, 2023
dc3e583
test: Fix GBS test and header in GBM datafile
adigitoleo Jul 20, 2023
31669ab
fix: GBS now carries over previous orientation
adigitoleo Jul 20, 2023
89b5390
test: Fix GBS test asserts and add commented versions for SCCS
adigitoleo Jul 20, 2023
a6f9afe
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 20, 2023
71a98b6
fix: Add missing data file for GBS
adigitoleo Jul 20, 2023
062a27a
fix: Fix incorrect strain ticks in polefigures
adigitoleo Jul 20, 2023
2c08eb1
test: Fix incorrecto outdir conditional
adigitoleo Jul 20, 2023
284a17c
test: Fix tolerance value
adigitoleo Jul 20, 2023
90a845a
test: Fix minor tolerance issue.
adigitoleo Jul 21, 2023
a3156be
dev: Don't show pytest "short summary" duplicate errors in CI
adigitoleo Jul 21, 2023
7cc0211
refactor: Rename skip_nans -> remove_nans
adigitoleo Jul 21, 2023
a1ffdf6
remove: [skip ci] Remove old pfplot script, use pydrex-polefigures
adigitoleo Jul 22, 2023
839ba31
fix: Fix incorrect RNG seeding and add --runslow for long tests
adigitoleo Jul 24, 2023
c578c4c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 24, 2023
95b67e4
tests: Add missing seed fixture
adigitoleo Jul 24, 2023
43cf3dc
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 24, 2023
a7876c8
fix: Fix pre-commit issues
adigitoleo Jul 24, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
sudo apt-get install -y python3-pip
python3 -m pip install --upgrade pip
python3 -m pip install "$PWD"[test]
python3 -m pytest
python3 -m pytest -rN
15 changes: 14 additions & 1 deletion src/pydrex/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import numpy as np

from pydrex import exceptions as _err
from pydrex import io as _io
from pydrex import logger as _log
from pydrex import minerals as _minerals
from pydrex import stats as _stats
Expand All @@ -31,7 +32,9 @@ def __call__(self):
if args.range is None:
i_range = None
else:
i_range = range(*(int(s) for s in args.range.split(":")))
start, stop_ex, step = (int(s) for s in args.range.split(":"))
# Make command line start:stop:step stop-inclusive, it's more intuitive.
i_range = range(start, stop_ex + step, step)

density_kwargs = {"kernel": args.kernel}
if args.smoothing is not None:
Expand All @@ -58,6 +61,7 @@ def __call__(self):
i_range=i_range,
density=args.density,
savefile=args.out,
strains=_io.read_scsv(args.scsv).strain,
**density_kwargs,
)
except (argparse.ArgumentError, ValueError, _err.Error) as e:
Expand All @@ -73,6 +77,15 @@ def _get_args(self) -> argparse.Namespace:
help="range of strain indices to be plotted, in the format start:stop:step",
default=None,
)
parser.add_argument(
"-f",
"--scsv",
help=(
"path to SCSV file with a column named 'strain'"
+ " that lists shear strain percentages for each strain index"
),
default=None,
)
parser.add_argument(
"-p",
"--postfix",
Expand Down
Loading