Skip to content

Entry points bumps plugins #292

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

bmaranville
Copy link
Member

Use the new bumps scheme for defining plugin behavior with entry points. (depends on bumps/bumps#284)

Sets the active plugin as "refl1d" before starting the wx GUI.

@bmaranville bmaranville requested review from glass-ships, pkienzle and Copilot and removed request for glass-ships and pkienzle May 30, 2025 18:19
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements the new bumps scheme for defining plugin behavior via entry points and sets the active plugin as "refl1d" for both CLI and GUI modes. Key changes include:

  • Removal of deprecated plugin registration code in cli.py and main.py.
  • Introduction of a new error plotting function (errplot) in fitplugin.py.
  • Updates to pyproject.toml with new entry point definitions for plugin interfaces.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
refl1d/webview/server/cli.py Removed deprecated commented code; streamlined CLI setup.
refl1d/main.py Removed setup_bumps, set ACTIVE_PLUGIN_NAME directly in CLI/GUI.
refl1d/bumps_interface/migrations.py Added full_migration function with strict schema version check.
refl1d/bumps_interface/fitplugin.py Removed unused functions and added the errplot function.
pyproject.toml Added and updated entry point definitions for new bumps scheme.
doc/conf.py Removed manual plugin registration.
Comments suppressed due to low confidence (1)

pyproject.toml:64

  • There is an entry point defined for 'save_json' targeting refl1d.bumps_interface.fitplugin:save_json, but this function is not defined in the provided diff. Please ensure that a proper implementation is added.
[project.entry-points."bumps.serialize.save_json"]

pyproject.toml Outdated
[project.entry-points."bumps.calc_errors"]
refl1d = "refl1d.uncertainty:calc_errors"

[project.entry-points."bumps.show_errors.maptlotlib"]
Copy link
Preview

Copilot AI May 30, 2025

Choose a reason for hiding this comment

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

The entry point name 'bumps.show_errors.maptlotlib' appears to have a typo. It is likely intended to be 'bumps.show_errors.matplotlib'.

Suggested change
[project.entry-points."bumps.show_errors.maptlotlib"]
[project.entry-points."bumps.show_errors.matplotlib"]

Copilot uses AI. Check for mistakes.

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.

1 participant