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

Tab completion doesn't pass through from swiftsimio #16

Open
kyleaoman opened this issue Sep 20, 2024 · 0 comments
Open

Tab completion doesn't pass through from swiftsimio #16

kyleaoman opened this issue Sep 20, 2024 · 0 comments

Comments

@kyleaoman
Copy link
Member

Recent python version support tab completion in interactive use. Currently swiftsimio will tab complete on something like:

>>> sd = SWIFTDataset(snapshot_filename)
>>> sd.gas.<press tab twice>
sd.gas.averaged_star_formation_rates              sd.gas.masses_from_collapsar
sd.gas.compton_yparameters                        sd.gas.masses_from_nsm
sd.gas.coordinates                                sd.gas.masses_from_snia
sd.gas.densities                                  sd.gas.masses_from_snii
sd.gas.densities_at_last_agnevent                 sd.gas.maximal_sniikinetic_feedbackvkick
sd.gas.densities_at_last_supernova_event          sd.gas.maximal_temperature_scale_factors
sd.gas.diffusion_parameters                       sd.gas.maximal_temperatures
<truncated>

Trying this on a SWIFTGalaxy created from the same snapshot doesn't give the same result (although I wish it did) because the tab completion doesn't pick up all of the properties as they're "hidden": sg.gas is not actually a SWIFTDataset but a helper class, the actual SWIFTDataset is sg.gas._particle_dataset. Presumably it's possible to pass through attributes of sg.gas._particle_dataset to the tab completion feature, somehow?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant