Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into 3.0-migrate-develop
Browse files Browse the repository at this point in the history
# Conflicts:
#	PhiML
#	docs/Fluid_Simulation.ipynb
#	phi/VERSION
#	phi/field/_field.py
#	phi/field/_grid.py
#	phi/field/_point_cloud.py
#	phi/field/_scene.py
#	phi/geom/_stack.py
#	phi/physics/diffuse.py
#	phi/vis/_vis.py
#	setup.py
  • Loading branch information
holl- committed May 12, 2024
2 parents dd1c886 + 26735b3 commit 2c32607
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 14 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,3 @@ jobs:
- name: Test with pytest
run: |
coverage run -m pytest tests/commit
- name: Upload coverage
run:
bash <(curl -s https://codecov.io/bash)

- name: pylint
continue-on-error: true
run: |
pylint --rcfile=./demos/.pylintrc demos
pylint --rcfile=./tests/.pylintrc tests
pylint --rcfile=./phi/.pylintrc phi
3 changes: 3 additions & 0 deletions phi/geom/_sphere.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ def __variable_attrs__(self):
def __value_attrs__(self):
return '_center',

def __value_attrs__(self):
return '_center', '_radius'

def __getitem__(self, item):
item = slicing_dict(self, item)
return Sphere(self._center[_keep_vector(item)], self._radius[item], radius_variable=self._radius_variable)
Expand Down
2 changes: 0 additions & 2 deletions tests/commit/geom/test__sphere.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,8 @@ def test_reshaping_const_radius(self):
s = expand(s, batch(b=100))
s = rename_dims(s, 'b', 'bat')
s = unpack_dim(s, 'points', spatial(x=10, y=5))
assert not s.radius.shape
assert batch(bat=100) & spatial(x=10, y=5) & channel(vector='x,y') == s.shape
s = pack_dims(s, 'x,y', instance('particles'))
assert not s.radius.shape
assert batch(bat=100) & instance(particles=50) & channel(vector='x,y') == s.shape
s = flatten(s)
assert batch(bat=100) & instance(flat=50) & channel(vector='x,y') == s.shape

0 comments on commit 2c32607

Please sign in to comment.