Feature/problems in db#21
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new "problem" feature by adding models, utility functions, views, and commands to import problem data, while also deprecating the example app.
- Added Django models for SickProblem, FracasProblem, and FracasPremise
- Created import commands for SICK and FraCaS problems with corresponding migrations
- Updated URL routes and settings by removing the deprecated example app
Reviewed Changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| backend/problem/views.py | Added basic view module with a placeholder comment |
| backend/problem/utils.py | Added a progress utility function for console progress display |
| backend/problem/models.py | Created models for problem management with validations |
| backend/problem/migrations/0002_fracasproblem_fracaspremise.py | Added migration for FracasProblem and FracasPremise models |
| backend/problem/migrations/0001_initial.py | Initial migration for SickProblem model |
| backend/problem/management/commands/import_sick.py | Implemented command to import SICK problems from a TSV file |
| backend/problem/management/commands/import_fracas.py | Implemented command to import FraCaS problems from an XML file |
| backend/problem/apps.py | Added Django app configuration for the "problem" app |
| backend/langpro_annotator/urls.py | Updated URL configuration and removed the deprecated example view |
| backend/langpro_annotator/proxy_frontend.py | Fixed a documentation typo in the proxy frontend function |
| backend/langpro_annotator/common_settings.py | Updated installed apps in settings by replacing "example" with "problem" |
| backend/example/* | Removed deprecated example app modules |
| backend/.gitignore | Excluded problem/data files from version control |
Comments suppressed due to low confidence (1)
backend/problem/models.py:62
- Typo in help_text: 'origianl' should be corrected to 'original'.
help_text='Indicates whether the answer in the origianl FraCaS problem is non-standard (i.e. not "Yes", "No", or "Don't know")'
bbonf
reviewed
May 22, 2025
There was a problem hiding this comment.
Pull Request Overview
This pull request introduces functionality to import SICK and FraCaS datasets into the system while removing the outdated 'example' app from both the frontend and backend.
- Adds dataclasses for problem types with clear attributes.
- Implements import commands for SICK (TSV) and FraCaS (XML) problems with JSON conversion and database persistence.
- Removes obsolete example app code and updates settings to reference the new problem app.
Reviewed Changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| backend/problem/types.py | Introduces immutable dataclasses for SICK and FraCaS problems. |
| backend/problem/services.py | Provides services to convert Problem model data into corresponding dataclass instances, with error handling via print statements. |
| backend/problem/models.py | Adds the Problem model with type choices and content field. |
| backend/problem/management/commands/import_sick.py | Implements CSV-based import for SICK problems into the database. |
| backend/problem/management/commands/import_fracas.py | Implements XML-based import for FraCaS problems with section annotation support. |
| backend/langpro_annotator/urls.py | Removes references to the obsolete example app and tidies SPA proxy routes. |
| backend/langpro_annotator/proxy_frontend.py | Corrects the docstring typo in the proxy view wrapper. |
| backend/langpro_annotator/common_settings.py | Updates installed apps and logging configuration; removes example app references. |
| backend/example/* | Removes obsolete example code. |
| backend/.gitignore | Adds exclusion for problem data files. |
Comments suppressed due to low confidence (1)
backend/problem/services.py:26
- Using print statements for error handling can lead to inconsistent logging; consider using a logging mechanism (e.g., logger.warning) for better maintainability and consistency with the rest of the project.
print(f"Warning: Could not parse JSON content for Problem ID {problem_obj.id}")
Contributor
Author
|
Round two! How about this architecture? |
XanderVertegaal
commented
May 22, 2025
Merged
bbonf
reviewed
May 28, 2025
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
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.
Allows the import of SICK and FraCaS datasets and removes the 'example' app from the frontend and backend code.