-
Notifications
You must be signed in to change notification settings - Fork 281
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
[ENH] Read Rockstar members #4661
Conversation
ba1bea4
to
da24357
Compare
da24357
to
fe736a5
Compare
fe736a5
to
f3f7878
Compare
@yt-fido test this please |
@cphyc I think adjustments are needed to pass the new test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm really glad someone finally had the courage to implement this. Can you also add a section in the Rockstar frontend docs in doc/source/examining/loading_data.rst
?
f3f7878
to
dc614e1
Compare
I'm not sure where the conflicts came from, but the rest looked good to me. If they can be cleared up, I think this is ready to be merged. |
dc614e1
to
012b4c1
Compare
@yt-fido test this please |
@yt-fido test this please |
We have one failing test to deal with |
I cannot reproduce the failing test locally with a Python 3.10 install. Is there a way to get more information? |
Weird; I have tried locally and cannot reproduce the error on 3.9, 3.10 or 3.11. Here's the code I tried import yt
ds = yt.load_sample("rockstar_halos/halos_0.0.bin")
for halo_id, Npart in zip(
ds.r["halos", "particle_identifier"],
ds.r["halos", "num_p"],
):
print(halo_id)
halo = ds.halo("halos", halo_id)
assert halo is not None
# Try accessing properties
halo.position
halo.velocity
halo.mass
# Make sure we can access the member particles
assert len(halo.member_ids) == Npart This should be the code of the failing test, unless I am mistaken. |
9a0023c
to
0fce073
Compare
@yt-fido test this please. |
@cphyc the test server is dead, see discussion on Slack. |
@yt-fido Test this please |
I made a bit of progress - it seems that the checksum of the data is not the same on fido as it is on my computer:
I should note that the local data was downloaded through |
cbf3a0a
to
635338c
Compare
I am quite confident is that the test data isn't the same as the one online. @Xarthisius would it be possible to make sure that the dataset on jenkins is the same as the one obtained when using I have tested locally and it works like a charm. |
@yt-fido Test this please |
3b14587
to
88425d5
Compare
adding the "enhancement" label just to make Mergeable Bot happy |
@neutrinoceros @brittonsmith I think the "Mergeable" bot is stuck, unless I am misunderstanding? |
Removing and re-adding a label did the trick. |
self.particle_identifier = particle_identifier | ||
|
||
def __repr__(self): | ||
return "%s_%s_%09d" % (self.halo_ds, self.ptype, self.particle_identifier) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not an f-string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not anymore :)
PR Summary
This allow to read member data from Rockstar catalogues.
PR Checklist