Skip to content

fix(bdweb): hide deprecated blocks from the palette - #267

Open
KristofersJurevics wants to merge 1 commit into
petercorke:feat/bdwebfrom
KristofersJurevics:codex/issue-220
Open

KristofersJurevics wants to merge 1 commit into
petercorke:feat/bdwebfrom
KristofersJurevics:codex/issue-220

Conversation

@KristofersJurevics

Copy link
Copy Markdown

Summary

The web palette and block-info endpoint expose deprecated blocks from the private registry. Use sim.block_library for both endpoints so users can select INTEGRATOR_S instead of DINTEGRATOR.

This changes public behaviour: deprecated block types disappear from /api/blocks and return 404 from /api/blockinfo/{name}. Existing diagrams containing those types still load.

Fixes #220. Targets feat/bdweb, as requested.

Testing

On Python 3.10 with MPLBACKEND=Agg QT_QPA_PLATFORM=offscreen:

  • pytest tests/test_bdweb.py -q --timeout=50 --timeout_method=thread: 50 passed.
  • pytest --capture=no --timeout=50 --timeout_method=thread: 525 passed, 9 skipped.
  • Black checks passed for the new tests and the three changed server lines; git diff --check passed. The branch's server file has pre-existing whole-file Black differences, which are left alone.

OpenAI Codex drafted the fix and regression tests and ran the commands above. The contributor has confirmed personally reading, running and understanding the change.

Checklist

  • The issue is assigned to me, and no other open PR addresses it
  • This PR covers a single concern
  • Tests were added, and the full suite passes locally on Python 3.10
  • The code works on every Python version in the classifiers (the CI matrix has not run; local verification used the oldest supported version)
  • This change was AI-assisted (tool: OpenAI Codex) and I have read and run the code myself
  • This change alters public behaviour (described above)

@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

This branch has not been deployed

No deployments
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