Skip to content

feat(model-export): provide model methods to export data#40

Merged
Datata1 merged 7 commits intomainfrom
jd/model-export-methods
Feb 7, 2026
Merged

feat(model-export): provide model methods to export data#40
Datata1 merged 7 commits intomainfrom
jd/model-export-methods

Conversation

@Datata1
Copy link
Owner

@Datata1 Datata1 commented Feb 7, 2026

#34

@Datata1 Datata1 self-assigned this Feb 7, 2026
@Datata1 Datata1 requested a review from Copilot February 7, 2026 13:49
@github-actions
Copy link

github-actions bot commented Feb 7, 2026

🛡️ Bandit Security Scan Results

✅ No security issues found by Bandit.

@github-actions
Copy link

github-actions bot commented Feb 7, 2026

Coverage

Pytest Coverage Report
FileStmtsMissCoverMissing
src/codesphere
   client.py220100% 
   config.py90100% 
   exceptions.py943859%25–26, 30, 40–42, 55, 72–75, 85–87, 101–104, 106–107, 148–151, 158–160, 197–199, 205, 207, 211, 214, 216, 218–219, 222
   http_client.py54688%78–79, 81–82, 87–88
   utils.py271640%12–13, 26–32, 34–35, 40–43, 45
src/codesphere/core
   base.py340100% 
   handler.py911385%118–120, 125–130, 136–137, 140–141
   operations.py110100% 
src/codesphere/resources/metadata
   operations.py60100% 
   resources.py200100% 
   schemas.py280100% 
src/codesphere/resources/team
   operations.py60100% 
   resources.py170100% 
   schemas.py260100% 
src/codesphere/resources/team/domain
   manager.py300100% 
   operations.py100100% 
   resources.py31487%45, 48–50
   schemas.py350100% 
src/codesphere/resources/workspace
   operations.py110100% 
   resources.py23291%24, 32
   schemas.py760100% 
src/codesphere/resources/workspace/envVars
   models.py32293%39–40
   operations.py60100% 
   schemas.py40100% 
src/codesphere/resources/workspace/landscape
   models.py00100% 
   resources.py00100% 
src/codesphere/resources/workspace/pipeline
   models.py00100% 
   resources.py00100% 
TOTAL7038188% 

Test Execution Summary

Tests Skipped Failures Errors Time
128 0 💤 0 ❌ 0 🔥 1.850s ⏱️

@github-actions
Copy link

github-actions bot commented Feb 7, 2026

Integration Test Results

28 tests   28 ✅  52s ⏱️
 1 suites   0 💤
 1 files     0 ❌

Results for commit 2799c56.

♻️ This comment has been updated with latest results.

Copy link

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 convenience export helpers to SDK models/lists so callers can easily serialize to dict/JSON/YAML, and introduces tests to validate the new behavior.

Changes:

  • Add to_dict(), to_json(), and to_yaml() to CamelModel.
  • Add to_list(), to_json(), and to_yaml() to ResourceList.
  • Add unit tests covering default/alias behavior, indenting, empty lists, and missing-YAML handling.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 6 comments.

File Description
src/codesphere/core/base.py Implements export helpers for CamelModel and ResourceList.
tests/core/test_base.py Adds unit tests for the new export helpers.
pyproject.toml Adds pyyaml dependency to support YAML export.

Datata1 and others added 2 commits February 7, 2026 14:51
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Datata1 Datata1 requested a review from Copilot February 7, 2026 14:00
Copy link

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

Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.

Datata1 and others added 4 commits February 7, 2026 15:02
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Datata1 Datata1 merged commit cbce32e into main Feb 7, 2026
4 of 5 checks passed
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.

1 participant