Skip to content

Commit

Permalink
Merge branch 'main' into fix_aero_dist_ctor
Browse files Browse the repository at this point in the history
  • Loading branch information
slayoo authored Jan 11, 2025
2 parents 1b7603c + 88bc802 commit d299d51
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .binder/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PyPartMC>=0.0.19
matplotlib
matplotlib!=3.10.0
ipywidgets
voila
open-atmos-jupyter-utils
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,8 @@ def build_extension(self, ext): # pylint: disable=too-many-branches
setup(
name="PyPartMC",
use_scm_version={
"local_scheme": lambda _: "",
"local_scheme": "no-local-version",
"version_scheme": "post-release",
# "fallback_version": "0.0.0"
},
author="PyPartMC team (see https://github.com/open-atmos/PyPartMC/graphs/contributors)",
author_email="[email protected]",
Expand Down
15 changes: 10 additions & 5 deletions tests/test_aero_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,16 +291,21 @@ def test_ctor_fails_with_nonunique_mass_fracs():
assert str(exc_info.value) == "mass_frac keys must be unique"

@staticmethod
def test_segfault_case(): # TODO #319
pytest.skip()

@pytest.mark.skipif(platform.machine() == "arm64", reason="TODO #348")
def test_fixed_segfault_case_on_circular_reference():
# arrange
aero_data = ppmc.AeroData(AERO_DATA_CTOR_ARG_MINIMAL)
fishy_ctor_arg = copy.deepcopy(AERO_MODE_CTOR_LOG_NORMAL)
fishy_ctor_arg["test_mode"]["mass_frac"].append(
fishy_ctor_arg["test_mode"]["mass_frac"]
)
print(fishy_ctor_arg)
ppmc.AeroMode(aero_data, fishy_ctor_arg)

# act
with pytest.raises(TypeError) as exc_info:
ppmc.AeroMode(aero_data, fishy_ctor_arg)

# assert
assert "incompatible constructor arguments" in str(exc_info.value)

@staticmethod
@pytest.mark.skipif(platform.machine() == "arm64", reason="TODO #348")
Expand Down

0 comments on commit d299d51

Please sign in to comment.