Feature/going sdd#35
Conversation
…ARC building, database access, demo environment, and SQL-to-ARC conversion
…se access, demo environment, and SQL-to-ARC conversion
…and updating related functions for improved type safety and clarity
…ify annotation table streaming and connection string handling
… contract and requirements
…t_type fields to use Literal types for improved type safety
…and performance tuning; remove outdated architectural documentation
…ensions and obsolete architecture rules documentation
There was a problem hiding this comment.
Code Review
This pull request introduces a formal Pydantic model, AnnotationTableRow, to replace raw dictionary handling for annotation table data. It updates the database streaming, builder logic, and processor to use this typed model, improving type safety and validation. Additionally, it adds a warning for assays missing linked studies, refines the AnnotationTableRow validation, updates the demo environment documentation, and removes unused mapper code and redundant documentation.
…r structure, file requirements, and registration in AGENTS.md
- Introduced `ai_workflow.md` detailing the integration of AI coding agents, project structure, and VS Code integration. - Documented the entry point for agents in `AGENTS.md`, emphasizing its role in providing project context. - Explained the spec-driven development approach with a two-level layout for specs in `spec/` and `middleware/*/spec/`. - Outlined the use of agent skills in `.agents/skills/`, including discovery, activation, and execution processes. - Provided practical workflow examples for agents, including adding new config fields and fixing serialization bugs. - Added new specs and design documents for API upload, ARC building, database access, and SQL-to-ARC conversion. - Established principles for the FAIRagro SQL-to-ARC project, emphasizing correctness, memory safety, and security. - Created demo environment specifications to facilitate local testing without external dependencies.
…sql_to_arc into feature/going-sdd
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request establishes a spec-driven development framework by introducing Specifica feature specifications, AI agent skills, and a formalized AI workflow. The core logic for processing annotation tables has been refactored to use a typed AnnotationTableRow Pydantic model, replacing raw dictionary handling and improving type safety across the builder, database, and processor modules. Additionally, the developer environment and project documentation have been cleaned up, including the removal of redundant architectural guides and unused VS Code extensions. Feedback highlights opportunities to refine error handling severity and optimize the placement of logging within data validation logic.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request establishes a robust, spec-driven architecture for the SQL-to-ARC converter by introducing Specifica-compliant feature documentation, custom AI agent configurations, and reusable 'Agent Skills' for library usage. Significant refactoring was performed in the sql_to_arc component to replace raw dictionary processing with a typed AnnotationTableRow model, enhancing type safety during database streaming and ARC construction. Review feedback identifies a mismatch between the column_io_type literal values and the supported arctrl IO types, highlights undefined variables in documentation code snippets, and points out several incorrect relative links in the newly added Markdown files.
| table_name: str = spec_field() | ||
| column_type: str = spec_field() | ||
| row_index: int = spec_field() | ||
| column_io_type: Literal["data", "material_name", "sample_name", "source_name"] | None = spec_field(default=None) |
There was a problem hiding this comment.
The Literal type for column_io_type includes values ("data", "material_name") that do not seem to align with the known strings for IOType.of_string in the arctrl library, as documented in .agents/skills/arctrl/SKILL.md. The skill file lists "source_name", "sample_name", "raw_data_file", "derived_data_file", "image_file", and "material".
Using unsupported values like "data" (as seen in integration tests) could lead to runtime errors when arctrl attempts to process them. Please align the Literal values with those supported by arctrl to ensure correctness.
| column_io_type: Literal["data", "material_name", "sample_name", "source_name"] | None = spec_field(default=None) | |
| column_io_type: Literal["source_name", "sample_name", "raw_data_file", "derived_data_file", "image_file", "material"] | None = spec_field(default=None) |
| if header.IsTermColumn: | ||
| cell = CompositeCell.term(OntologyAnnotation(str(value), "", "")) | ||
| else: | ||
| cell = CompositeCell.free_text(str(value)) |
There was a problem hiding this comment.
The variable value used in this example code block is not defined, which could be confusing for a user or an AI agent trying to understand the example. Please define it to make the snippet self-contained and clearer.
| if header.IsTermColumn: | |
| cell = CompositeCell.term(OntologyAnnotation(str(value), "", "")) | |
| else: | |
| cell = CompositeCell.free_text(str(value)) | |
| value = "some_value" | |
| if header.IsTermColumn: | |
| cell = CompositeCell.term(OntologyAnnotation(str(value), "", "")) | |
| else: | |
| cell = CompositeCell.free_text(str(value)) |
|
|
||
| ```python | ||
| mocker.patch("mycomponent.main.ConfigWrapper.from_yaml_file") | ||
| mocker.patch("mycomponent.main.Config.from_config_wrapper", return_value=mock_config) |
There was a problem hiding this comment.
The variable mock_config used in this example is not defined. To make the example self-contained and easier to understand, please provide a definition for it.
| mocker.patch("mycomponent.main.Config.from_config_wrapper", return_value=mock_config) | |
| mock_config = Config(connection_string=SecretStr("..."), batch_size=10) # Example config | |
| mocker.patch("mycomponent.main.Config.from_config_wrapper", return_value=mock_config) |
| ## 7. Project Conventions | ||
|
|
||
| These rules apply specifically to this project (see also | ||
| [`spec/principles.md`](../../../spec/principles.md)): |
There was a problem hiding this comment.
The relative link to spec/principles.md appears to be incorrect. Given the file's location at .agents/skills/create-specifica-feature/SKILL.md, the path should navigate up four levels to the repository root.
| [`spec/principles.md`](../../../spec/principles.md)): | |
| [`spec/principles.md`](../../../../spec/principles.md)): |
|
|
||
| ## Step 1 — Load project context | ||
|
|
||
| Read [`AGENTS.md`](../../AGENTS.md) to get the project's tech stack, |
There was a problem hiding this comment.
The relative link to AGENTS.md appears to be incorrect. From the current file's location, it should navigate up three levels to reach the repository root.
| Read [`AGENTS.md`](../../AGENTS.md) to get the project's tech stack, | |
| Read [`AGENTS.md`](../../../AGENTS.md) to get the project's tech stack, |
|
|
||
| The authoritative column-level specification for all views — including | ||
| required/optional fields, data types, and cross-dialect type mappings — is | ||
| maintained in [docs/sql_to_arc_database_views.md](../../../../docs/sql_to_arc_database_views.md). |
There was a problem hiding this comment.
The relative link to docs/sql_to_arc_database_views.md appears to be incorrect. Given this file's location, the path needs to navigate up five levels to reach the repository root.
| maintained in [docs/sql_to_arc_database_views.md](../../../../docs/sql_to_arc_database_views.md). | |
| maintained in [docs/sql_to_arc_database_views.md](../../../../../docs/sql_to_arc_database_views.md). |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive AI-agent-friendly documentation and workflow system based on the Specifica and Agent Skills standards. It reorganizes architectural documentation into structured feature folders containing requirement specs and design decisions, while providing on-demand procedural knowledge for libraries like arctrl. On the implementation side, the annotation table processing has been refactored to use a typed AnnotationTableRow Pydantic model instead of raw dictionaries, improving type safety and consistency across the pipeline. Additionally, support for Data cells in ARC tables was added, and tooling configurations for VS Code, Ruff, and Mypy were updated to align with the new project structure. I have no feedback to provide as all review comments were filtered out.
No description provided.