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

add plugin handling for waveforms #3319

Merged
merged 9 commits into from
Jun 20, 2020
Merged

add plugin handling for waveforms #3319

merged 9 commits into from
Jun 20, 2020

Conversation

ahnitz
Copy link
Member

@ahnitz ahnitz commented Jun 18, 2020

If the plugin is simply installed, pycbc will automatically pick it up and its waveform models will be available from PyCBC. I think this is the behavior we would like for external packages. The hook is the standard Python mechanism using the 'entrypoint' system of 'pkg_resources', which was explicitly designed for this purpose.

  • (this will eventually deprecated the older undocumented interface, but I'm not removing in this PR yet). "

It would be good if you all could sign off on the generic interface and merge this first. In the next PR, I'll add documentation to main pages on how to use this both from the package level and how to add a waveform within a single script (by calling pycbc.waveform.add_custom_waveform). That will be followed up by the corresponding tutorial example (which we want for the workshop next week).

Copy link
Contributor

@cdcapano cdcapano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! Some documentation on how to use this would be good (e.g., what functions are required? Does the approximant name need to be unique and distinct from one currently in the waveform module? What happens if you use the same approximant name?), but I take it you plan to do that in a separate PR? Anyway, looks fine to me.

@ahnitz
Copy link
Member Author

ahnitz commented Jun 19, 2020

@ahnitz ahnitz requested a review from cdcapano June 19, 2020 17:54
Copy link
Contributor

@cdcapano cdcapano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding docs @ahnitz. I've highlighted a few formatting things to change in the docs; see below. Feel free to merge once you've addressed them.

docs/waveform_plugin.rst Outdated Show resolved Hide resolved
docs/waveform_plugin.rst Outdated Show resolved Hide resolved
docs/waveform_plugin.rst Outdated Show resolved Hide resolved
docs/waveform_plugin.rst Outdated Show resolved Hide resolved
docs/waveform_plugin.rst Outdated Show resolved Hide resolved
docs/waveform_plugin.rst Outdated Show resolved Hide resolved
docs/waveform_plugin.rst Outdated Show resolved Hide resolved
docs/waveform_plugin.rst Outdated Show resolved Hide resolved
docs/waveform_plugin.rst Show resolved Hide resolved
docs/waveform_plugin.rst Outdated Show resolved Hide resolved
@ahnitz ahnitz merged commit 926b628 into gwastro:master Jun 20, 2020
lenona pushed a commit to lenona/pycbc that referenced this pull request Sep 14, 2020
* add plugin handling for waveforms

* cc

* cc

* add debugging, don't require m1/m2 for all waveforms

* add waveform plugin docs

* ws

* forgot to commit this

* Collin's comments

* test
OliverEdy pushed a commit to OliverEdy/pycbc that referenced this pull request Apr 3, 2023
* add plugin handling for waveforms

* cc

* cc

* add debugging, don't require m1/m2 for all waveforms

* add waveform plugin docs

* ws

* forgot to commit this

* Collin's comments

* test
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 this pull request may close these issues.

2 participants