Import report items as json#548
Open
dcansys wants to merge 9 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a JSON import path for serverless ADR report items, backed by shared Pydantic schemas for validating item payloads.
Changes:
- Adds shared JSON schema models for report items and top-level import payloads.
- Adds a serverless importer that loads JSON, creates a default layout template, and saves text/table/image/file/scene/tree items.
- Adds normalization helpers for JSON-style tags and table/tree conversion.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
src/ansys/dynamicreporting/core/utils/json_importer_models.py |
Defines Pydantic models for supported JSON report item payloads. |
src/ansys/dynamicreporting/core/serverless/json_importer.py |
Implements serverless import logic for validated JSON report items. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #548 +/- ##
==========================================
+ Coverage 82.33% 82.67% +0.34%
==========================================
Files 32 34 +2
Lines 8705 8912 +207
Branches 1585 1614 +29
==========================================
+ Hits 7167 7368 +201
- Misses 1054 1056 +2
- Partials 484 488 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
d1e344a to
28a50b0
Compare
28a50b0 to
7ee078b
Compare
3c40340 to
3cd3fbb
Compare
3cd3fbb to
7143ea4
Compare
358ecd0 to
9b0a2e4
Compare
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.
This is implementation of reading, converting and inserting report items through the JSON format.
Items JSON import will load a JSON file, create a default template, and save all report items to ADR.
JSON Schema is in the documentation.
PoC: https://github.com/ansys-internal/adr_mechanical/tree/poc/import-report-items-as-json
Note: more enhanced default template with basic ToC and sections will come in the next iterations.