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

untested examples? #931

Closed
dneise opened this issue Jan 24, 2019 · 9 comments · Fixed by #2266
Closed

untested examples? #931

dneise opened this issue Jan 24, 2019 · 9 comments · Fixed by #2266
Assignees

Comments

@dneise
Copy link
Member

dneise commented Jan 24, 2019

I believe none of the examples in ctapipe/example is currently tested in a pytest.

I think untested examples can easily outdate and then confuse more than they help.

@dneise dneise self-assigned this Jan 24, 2019
@kosack
Copy link
Contributor

kosack commented Jan 28, 2019

agreed - eventually however I think they may all move to notebooks that get automatically inserted into the documentation (as we discussed), but that may take some time.

So for now, we could just execute them like we do the notebooks... They are sort of integration tests, so we could make a tests/ directory with a test-runner that marks them as pytest.mark.integration (so they can be easily deactivated for quick testing), and just have a single test that loops through them and runs each...)

@kosack
Copy link
Contributor

kosack commented Jan 28, 2019

We can also then identify which ones are outdated and should be removed. A few might be useful to turn into real Tools (and move to ctapipe/tools), like muon_reconstruction and display_summed_images, which are already somewhat useful.

@dneise dneise assigned kosack and unassigned dneise Jan 29, 2019
@dneise
Copy link
Member Author

dneise commented Jan 29, 2019

Karl works on this in #941

@Tobychev
Copy link
Contributor

@kosack I think this can be closed by now?

@kosack
Copy link
Contributor

kosack commented Feb 23, 2023

Let me check - I think we can probably remove the examples directory, but I would like to move a few into notebooks. The only example I use that i find very useful for debugging is load_one_event.py

@maxnoe
Copy link
Member

maxnoe commented Feb 23, 2023

The examples/ folder is still tehre and contains a lot of somewhat useful but unstructured example code.

This should be either moved to docstrings, example notebooks or removed.

In the current state of this repo, the issue is still valid.

@kosack
Copy link
Contributor

kosack commented Feb 23, 2023

yes, following what I said above - I will make a PR that moves anything useful to notebooks.

@maxnoe
Copy link
Member

maxnoe commented Feb 23, 2023

Could also be docstrings of classes (e.g. the load_one_event could either be in the docstring of ArrayEventContainer or of (SimTel)EventSource

@maxnoe
Copy link
Member

maxnoe commented Mar 1, 2023

This is basically a duplicate of #657, closing this one

@maxnoe maxnoe closed this as completed Mar 1, 2023
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

Successfully merging a pull request may close this issue.

4 participants