Skip to content

Import report items as json#548

Open
dcansys wants to merge 9 commits into
mainfrom
feat/import-report-items-as-json
Open

Import report items as json#548
dcansys wants to merge 9 commits into
mainfrom
feat/import-report-items-as-json

Conversation

@dcansys
Copy link
Copy Markdown
Collaborator

@dcansys dcansys commented May 19, 2026

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.

@dcansys dcansys requested a review from viseshrp as a code owner May 19, 2026 14:54
Copilot AI review requested due to automatic review settings May 19, 2026 14:54
@dcansys dcansys marked this pull request as draft May 19, 2026 14:54
@dcansys dcansys requested a review from margalva May 19, 2026 14:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/ansys/dynamicreporting/core/utils/json_importer_models.py
Comment thread src/ansys/dynamicreporting/core/serverless/json_importer.py Outdated
Comment thread src/ansys/dynamicreporting/core/serverless/json_importer.py Outdated
Comment thread src/ansys/dynamicreporting/core/serverless/json_importer.py Outdated
Comment thread src/ansys/dynamicreporting/core/serverless/json_importer.py
Comment thread src/ansys/dynamicreporting/core/serverless/json_importer.py Outdated
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 19, 2026

Codecov Report

❌ Patch coverage is 97.10145% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.67%. Comparing base (f4fdbfb) to head (7982f1d).

Files with missing lines Patch % Lines
.../dynamicreporting/core/serverless/json_importer.py 97.77% 1 Missing and 2 partials ⚠️
...ynamicreporting/core/utils/json_importer_models.py 95.58% 1 Missing and 2 partials ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dcansys dcansys force-pushed the feat/import-report-items-as-json branch 13 times, most recently from d1e344a to 28a50b0 Compare May 21, 2026 11:17
@dcansys dcansys force-pushed the feat/import-report-items-as-json branch from 28a50b0 to 7ee078b Compare May 21, 2026 12:58
@dcansys dcansys marked this pull request as ready for review May 26, 2026 14:36
@dcansys dcansys force-pushed the feat/import-report-items-as-json branch from 3c40340 to 3cd3fbb Compare May 26, 2026 14:48
@dcansys dcansys force-pushed the feat/import-report-items-as-json branch from 3cd3fbb to 7143ea4 Compare May 26, 2026 14:51
@dcansys dcansys force-pushed the feat/import-report-items-as-json branch from 358ecd0 to 9b0a2e4 Compare May 29, 2026 14:14
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.

3 participants