Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 12 additions & 3 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,16 @@ jobs:
- name: Merge release back into dev
if: github.ref == 'refs/heads/release'
run: |
git fetch origin dev
git checkout dev
git merge --no-ff origin/release -m "maint: merge release into dev [skip bump]"
# Fetch both branches after the release bump. In particular, the
# origin/release ref checked out by actions/checkout can otherwise
# still point at the pre-bump commit.
git fetch origin dev release
git checkout -B dev origin/dev

# Keep the release version when the version edits conflict. Other
# non-conflicting development changes on dev are retained.
git merge --no-ff -X theirs origin/release \
-m "maint: merge release into dev [skip bump]"

uvx bump-my-version bump pre_n --no-tag
git push origin dev
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,4 @@ openpnm/core/.DS_Store
*.DS_Store
*.nblink
.idea
.leankg
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "openpnm"
version = "3.6.3"
version = "3.6.3-dev1"
description = "A framework for conducting pore network modeling simulations of multiphase transport in porous materials"
authors = [{ name = "OpenPNM Team", email = "jgostick@gmail.com" }]
maintainers = [
Expand Down Expand Up @@ -220,7 +220,7 @@ path = "src/openpnm/__version__.py"
packages = ["src/openpnm"]

[tool.bumpversion]
current_version = "3.6.3"
current_version = "3.6.3-dev1"
parse = """(?x)
(?P<major>0|[1-9]\\d*)\\.
(?P<minor>0|[1-9]\\d*)\\.
Expand Down
2 changes: 1 addition & 1 deletion src/openpnm/_skgraph/queries/_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ def find_neighbor_nodes(network, inds, flatten=True, include_input=False, logic=
if len(rows) == 0:
return []
n_nodes = am.shape[0]
neighbors = am_coo.col[np.in1d(am_coo.row, nodes)]
neighbors = am_coo.col[np.isin(am_coo.row, nodes)]
if logic in ["or", "union", "any"]:
neighbors = np.unique(neighbors)
elif logic in ["xor", "exclusive_or"]:
Expand Down
6 changes: 3 additions & 3 deletions src/openpnm/_skgraph/simulations/_percolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,9 @@ def remove_isolated_clusters(labels, inlets):
# Remove cluster numbers == -1, if any
inv_clusters = inv_clusters[inv_clusters >= 0]
# Find all pores in invading clusters
p_invading = np.in1d(labels.site_labels, inv_clusters)
p_invading = np.isin(labels.site_labels, inv_clusters)
labels.site_labels[~p_invading] = -1
t_invading = np.in1d(labels.bond_labels, inv_clusters)
t_invading = np.isin(labels.bond_labels, inv_clusters)
labels.bond_labels[~t_invading] = -1
return labels

Expand Down Expand Up @@ -268,5 +268,5 @@ def ispercolating(conns, occupied, inlets, outlets):
outs = np.unique(clusters.site_labels[outlets])
if outs[0] == -1:
outs = outs[1:]
hits = np.in1d(ins, outs)
hits = np.isin(ins, outs)
return np.any(hits)
2 changes: 1 addition & 1 deletion src/openpnm/network/_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ def find_nearby_pores(self, pores, r, flatten=False, include_input=False):
Pn = np.unique(temp).astype(np.int64)
# Remove inputs if necessary
if include_input is False:
Pn = Pn[~np.in1d(Pn, pores)]
Pn = Pn[~np.isin(Pn, pores)]
# Convert list of lists to a list of ndarrays
if flatten is False:
if len(Pn) == 0: # Deal with no nearby neighbors
Expand Down
2 changes: 1 addition & 1 deletion src/openpnm/topotools/_perctools.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def find_isolated_clusters(network, mask, inlets):
connected to the given ``inlets``.
"""
labels = find_clusters(network=network, mask=mask)
isolated = np.in1d(labels.pore_labels, labels.pore_labels[inlets], invert=True)
isolated = np.isin(labels.pore_labels, labels.pore_labels[inlets], invert=True)
isolated = np.where(isolated)[0]
return isolated

Expand Down
4 changes: 2 additions & 2 deletions tests/unit/models/misc/MiscTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def test_from_neighbor_throats_min(self):
propname='pore.seed',
prop='throat.seed',
mode='min')
assert np.all(np.in1d(self.net['pore.seed'], self.net['throat.seed']))
assert np.all(np.isin(self.net['pore.seed'], self.net['throat.seed']))
assert np.isclose(self.net['throat.seed'].mean(), 0.5)
assert np.isclose(self.net['pore.seed'].mean(), 0.16454849498327762)

Expand All @@ -121,7 +121,7 @@ def test_from_neighbor_throats_max(self):
propname='pore.seed',
prop='throat.seed',
mode='max')
assert np.all(np.in1d(self.net['pore.seed'], self.net['throat.seed']))
assert np.all(np.isin(self.net['pore.seed'], self.net['throat.seed']))
assert np.isclose(self.net['throat.seed'].mean(), 0.5)
assert np.isclose(self.net['pore.seed'].mean(), 0.8595317725752508)

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/network/GenericNetworkTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def test_find_nearby_pores_distance_2_flattened_include_input(self):
a = self.net.find_nearby_pores(pores=[0, 1], r=2,
flatten=True, include_input=True)
assert np.size(a) == 17
assert np.all(np.in1d([0, 1], a))
assert np.all(np.isin([0, 1], a))

def test_get_incidence_matrix(self):
net = op.network.Demo([4, 4, 1])
Expand Down
Loading