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

Create tests for utils/plotting.py #302

Open
klieret opened this issue Apr 13, 2023 · 6 comments
Open

Create tests for utils/plotting.py #302

klieret opened this issue Apr 13, 2023 · 6 comments

Comments

@klieret
Copy link
Member

klieret commented Apr 13, 2023

No description provided.

@kingjuno
Copy link
Contributor

Hey @klieret
Can I work on this?

@klieret
Copy link
Member Author

klieret commented Apr 25, 2023

Sure. Probably some things can be tested rather trivially with the test data in the repository.

@kingjuno
Copy link
Contributor

kingjuno commented Apr 26, 2023

image
@klieret Do you think these files should be renamed (or fix the code)?

Especially because of this line:

prefix = f"event{evtid}"

  1. This already assumes that the prefix is event (but here it is test_event).
  2. In the example notebook, we use this event{evtid:09}-cells.csv.gz to set event_id to be a 9-letter string. But in this line (event0000{evtid}), the prefix won't be a 9-lettered string if evtid is less than 10000.

I can work with test data by renaming them, but by any chance does this needs to be fixed?

@klieret
Copy link
Member Author

klieret commented Apr 26, 2023

Hi! Thanks, you're absolutely right; that's some bad stuff right there.

I'd say we do the following:

  1. Renaming the test files to start with event (like the original data)
  2. Changing event0000{evtid} also to event{evtid:09}

Thank you for taking such close a look!

@kingjuno
Copy link
Contributor

kingjuno commented May 2, 2023

I am wondering whether there is a need for these two functions plot_3d, plot_rz (not part of any class; independent functions) as I don't see them used anywhere in the codebase.

@klieret
Copy link
Member Author

klieret commented May 5, 2023

A lot of the plotting functions are used for analysis, which is done in separate notebooks. However, these two functions are part of the legacy codebase and they look somewhat less fleshed out than the rest.

I'd say: Let's keep them, but no need to test them for now :)

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

No branches or pull requests

2 participants