-
Notifications
You must be signed in to change notification settings - Fork 3
Fix moorhen api validation #109
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
martinemnoble1
wants to merge
379
commits into
main
Choose a base branch
from
fix-moorhen-api-validation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Task interface paths should be plugin.container.inputData.PARAM, not plugin.inputData.PARAM. Fixed incorrect paths in: - crank2.tsx: All inputData paths (100+ items) - aimless_pipe.tsx: controlParameters.CELL filter - servalcat_pipe.tsx: inputData.FREERFLAG error key - shelx.tsx: crank2.inputData.ATOM_TYPE error key 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Extend usePopcorn provider to support 'error' and 'warning' severity types - Add error handling with user feedback to job clone, run, and delete operations - Add error handling for project creation and import operations - Add error handling to Moorhen push-to-ccp4i2 panel - Add error handling to whatnext job creation and report verdict - Replace silent failures with informative snackbar messages 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Refactor CPdbDataFile.setContentFlag() to _introspect_content_flag() - Base CDataFile.setContentFlag() now handles None-safety checks - Subclasses only need to implement _introspect_content_flag() hook - Fixes AttributeError when contentFlag is None during file loading 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
The whatnext feature was creating jobs with empty input files because:
1. remove_container_default_values() was deleting inputData children
- Added preserve_containers parameter, defaults to {'inputData'}
- inputData structure preserved for context-based population
2. set_input_by_context_job() was creating its own plugin instance
- Added plugin parameter to reuse caller's plugin instance
- Added save_params parameter for caller-controlled saving
- Changes now persist to the correct plugin instance
3. async_create_job.py now passes plugin through to context population
Added comprehensive test suite: test_set_input_by_context.py (8 tests)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- ProjectViewSet.create_job now accepts context_job_uuid for explicit context - Added auto_context parameter (default True) to control context population - Added clarifying comment in JobViewSet about dbHandler creation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Type the catch parameter as unknown and cast to Error for message access. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- prosmart_refmac: Remove debug prints, add traceback to CErrorReport - refmac_i2: Fix empty wavelength list crash, remove Python 2 compat - CCP4i2RunnerDjango: Add validity() check before checkInputData() - servalcat_pipe: Add validity() override to adjust metalCoord qualifiers - crank2_basepipe: Fix CString dict key lookup (use str()) - modelASUCheck: Fix CString dict key lookup for polymerType - tests/utils: Improve diagnostic.xml reporting in test output 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
MakeLink: Add validity() to dynamically set allowUndefined based on MON_TYPE selection (TLC vs CIF mode) and make GUI-populated LIST fields optional for CLI use. This mirrors the logic in MakeLink_gui.py. mrbump_basic: Add validity() to filter ENSEMBLES list length error (code 101). ENSEMBLES is vestigial - defined with listMinLength=1 but not used by MrBUMP which finds its own search models. test_make_link: Add allow_errors=True to handle diagnostic warnings for optional empty strings. Task interfaces: Add TODO comments noting that client-side validity filtering should move to Python validity() methods. Clarify that ASU content trigger pattern in parrot.tsx is valid client-side. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…iles - async_run_job.py: Add validity() call before import_input_files to allow plugins to adjust qualifiers (e.g., servalcat_pipe sets allowUndefined=True for metalCoordWrapper.inputData.XYZIN) - cdata_file.py: Add WARNING (code 103) for optional unset CDataFile fields to draw user's attention in GUI even when allowUndefined=True - servalcat_pipe.py: Add validity() override to set allowUndefined=True for embedded metalCoordWrapper inputs, and add comprehensive error handling with ERROR_CODES dictionary and try/except blocks in startProcess() - Add test_servalcat_async_run.py to verify validity() correctly sets allowUndefined=True before validation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…ion builder UI - Extended coordinate_selection module with semantic category keywords: protein, nucleic, solvent, ligand, sugar, polymer, backbone, sidechain, hetero - Added CategoryType enum and CategorySelector AST node - Updated tokenizer with keyword aliases (water→solvent, saccharide→sugar, hetatm→hetero) - Implemented residue classification sets (AMINO_ACIDS, NUCLEIC_ACIDS, etc.) - Fixed useFileDigest to unwrap API response at source (consistency with fetchDigest) - Built CPdbDataFileElement with digest-aware selection builder: - Chain selection checkboxes with type labels - Residue range inputs per chain - Category filter chips (include/exclude cycling) - Atom-level filters (backbone/sidechain) - Live selection string preview - Added 74 unit tests for coordinate_selection (tokenizer, parser, evaluator) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Remove ifAtomSelection qualifier dependency for showing the selection builder UI - now displays whenever file digest has content. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Scrollbars in the job list and directory panels now honor light/dark theme using theme.palette.action.disabled for the thumb color. Applied to both desktop and mobile views. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Wrap all tab content in a single Box with consistent scrolling behavior instead of each tab managing its own scroll. All tabs now use a unified scroll container with theme-aware scrollbar styling. - Removed individual Paper wrappers with overflowY from Directory/Logs tabs - Changed Editor heights from fixed calc() to 100% (container handles sizing) - Consistent scrollbar styling across light/dark themes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Replace fragile calc(100vh - 15rem) with flexbox layout that automatically adapts to variable header heights (long titles, wrapped tab labels, etc.): - Outer Box: flex column with height 100vh - Container: flex: 1 with minHeight: 0 (critical for nested scroll) - JobHeader/Tabs: flexShrink: 0 (take natural height) - Scroll Box: flex: 1, minHeight: 0 (fills remaining space, scrolls) This prevents double-scrollbar issues when headers vary in height. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
The job view sits inside the project layout's Panel component, not at the viewport root. Use height: 100% to fill the parent Panel rather than 100vh which would overflow. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
The flexbox approach with height: 100% wasn't propagating correctly through the Panel component, causing double scrolling on Task Interface. Reverted to the original calc(100vh - 16rem) approach which worked. TODO: Find a better solution for variable header heights. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Changed from calc(100vh - 16rem) to calc(100vh - 20rem) to account for the project layout's MenuBar and padding that already subtract from the viewport height. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Document how to set up the baselayer compatibility layer in the main branch to enable trivial merging of pipeline/wrapper code between ccp4i2-django and main branches. Includes: - Explanation of why baselayer exists - Step-by-step setup for main branch - Code template for baselayer/__init__.py - Usage patterns for cross-branch code - Merging workflow - Comparison table of what baselayer provides in each branch 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- pipeline/ERROR_HANDLING_PATTERNS.md: CErrorReport usage, try/except patterns, ERROR_CODES dictionary best practices - pipeline/VALIDITY_PATTERNS.md: Content-aware validation using validity() method overrides for conditional requirements - cli/I2RUN_GUIDE.md: Comprehensive i2run documentation including complex data object construction (fullPath=, columnLabels=, fileUse:) - api/API_OVERVIEW.md: REST API endpoints overview and usage examples - Updated README.md and QUICK_REFERENCE.md with references to new docs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- docs/source/conf.py: Sphinx configuration with autodoc, napoleon, autosummary extensions for generating API docs from docstrings - docs/source/index.rst: Main documentation index - docs/source/api_reference/: Auto-generated API documentation - cpluginscript.rst, cdata.rst, ccontainer.rst, cdatafile.rst - cerror.rst, base_classes.rst, fundamental_types.rst, signal_system.rst - docs/source/cli/: CLI documentation including existing i2run.rst - docs/source/api/: REST API documentation stubs - docs/source/pipeline/: Pipeline development guides - docs/source/core/: Core architecture documentation - docs/Makefile: Build commands (make html, make livehtml) - docs/requirements.txt: Sphinx dependencies Build with: cd docs && pip install -r requirements.txt && make html 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Delete dbapi/ directory (9,296 lines) - superseded by Django ORM - CCP4DbApi.py, CCP4DbUtils.py, CCP4DbMockup.py, CCP4TestDb.py - database_schema.sql, temp_database_schema.sql - stubs/dbapi.py remains as compatibility stub - Move Qt-dependent utils to legacy/utils/: - startup.py - Qt application startup - exportI2Project.py, ImportAllProjects.py, ExportAllProjects.py - importDir.py These utilities are replaced by: - CLI commands: ccp4i2 projects export/import - Django models: server/ccp4x/db/models.py 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- client/README.md: Quick start guide, technology stack overview - client/FRONTEND_DEVELOPMENT.md: Comprehensive developer guide - Architecture (Electron + Next.js dual-mode) - Directory structure - Component hierarchy - Data flow and API layer - State management (SWR, Redux, Context) - Task interface system - Report system - Styling guide - How to add new features - mddocs/README.md: Added Frontend Development section - client/package.json: Updated extraResources (dbapi -> stubs) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Added Frontend Development section with links to client/README.md and client/FRONTEND_DEVELOPMENT.md - Updated directory listing: client/ is now "Electron + Next.js/React frontend" (not "planned") 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Added links to Frontend README and Frontend Development Guide in the "Next Steps" section to improve documentation discoverability. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Picture class (CCP4ReportParser.py): - Use external sceneFile directly without copying when provided - Use deterministic filenames based on label instead of glob-based incrementing - Files now overwrite on regeneration instead of proliferating CPdbDataComposition (CCP4ModelData.py): - Use gemmi's entity_type for proper ligand classification - monomers now contains only significant ligands (NonPolymer, not water, not metal ions, ≥5 atoms) - New format: "chain:resname:seqnum" (e.g., "A:ATP:501") - Added allResidueNames for backward compatibility refmac_report.py: - Removed redundant filtering (now done at source in CPdbDataComposition) - Deterministic filenames: ligand_A_ATP_501.scene.xml - Clearer labels: "Ligand A:ATP:501" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Modified plugin_lookup.py to prefix 'ccp4i2.' to all module imports - Regenerated plugin_registry.py with correctly rooted imports - This ensures plugins are importable when ccp4i2 is installed as a package 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Modified report_lookup.py to prefix 'ccp4i2.' to all module imports - Regenerated report_registry.py with correctly rooted imports - Consistent with plugin_registry.py fix 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Updated imports in: - aimless_pipe.py: aimless_cifstats import - import_merged.py: mmcifutils, mmcifconvert, importutils, mtzimport imports - mmcifconvert.py: mmcifutils, importutils imports Regenerated plugin_registry.py - now discovers 167 plugins (was 165) including aimless_pipe which was missing due to failed imports. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The class registry was failing to import CData implementation classes
(CCP4XtalData, CCP4ModelData, etc.) because it used
importlib.import_module('core.{module}') instead of
importlib.import_module('ccp4i2.core.{module}').
This caused container generation to fall back to CString for all
specialized types like CPdbDataFile, CObsDataFile, etc.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The class registry was failing to find stub classes (CProjectIdStub, CFilePathStub, CUUIDStub, etc.) because it used 'core.' module paths instead of 'ccp4i2.core.' paths. This caused container loading to fall back to CString for many specialized types, breaking file upload and other operations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update module paths from 'core.CCP4XtalData' etc. to 'ccp4i2.core.CCP4XtalData' to fix fileContent being None when content classes fail to import. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use importlib.import_module instead of spec_from_file_location This properly supports relative imports in plugin modules since ccp4i2 is installed as an editable package - Fix module path calculation to be relative to CCP4I2_ROOT This ensures module names like "ccp4i2.wrappers.phaser_analysis..." are generated correctly for all plugins - Remove now-unnecessary module path fixup in main Now generates 175 plugins including phaser_analysis. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When pipelines run with doAsync=False, sub-job signal handlers execute synchronously during process(). This commit ensures: 1. prosmart_refmac.startProcess() returns the actual status set by signal handlers (via self._status) instead of hardcoding SUCCEEDED 2. CPluginScript.process() now calls reportStatus() before all early returns, ensuring the 'finished' signal is emitted even when validation, processInputFiles, makeCommandAndScript, or startProcess fail. This is essential for pipelines that rely on the signal to coordinate sub-jobs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix isValidEndpoint to reject negative IDs while allowing 0 - Fix useProject to accept undefined/null for conditional fetching - Remove -1 fallback pattern that caused invalid API requests - Fix difference map detection: sub_type === 2 (was inverted) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix isValidEndpoint to reject negative IDs while allowing 0 - Fix useProject to accept undefined/null for conditional fetching - Remove -1 fallback pattern that caused invalid API requests - Fix difference map detection: sub_type === 2 (was inverted) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Remove all `|| 0` and `?? 0` fallback patterns when calling useProject and useJob hooks. These caused requests to non-existent /projects/0/ endpoints when the real ID wasn't available yet. Now passes undefined when ID is not available, which correctly skips the API request (SWR key becomes null). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.