Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughAdded support for "program terms" resource in the MPT API client, including a new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
|



This pull request introduces a new "Program Terms" resource to the API client, providing both synchronous and asynchronous services for managing program terms. It includes the implementation of the resource, integration into the main program services, end-to-end and unit tests, and updates to configuration and linting settings.
The most important changes are:
Program Terms Resource Implementation:
Term,TermService, andAsyncTermServiceclasses inmpt_api_client/resources/program/programs_terms.pyto support CRUD, publish, and unpublish operations for program terms, including model definition and service configuration.Integration with Program Services:
mpt_api_client/resources/program/programs.pyto import and expose the newtermsandasync termsservice methods, making program terms accessible via the main program client. [1] [2] [3]tests/unit/resources/program/test_programs.pyto include tests for the new terms services. [1] [2] [3]Testing:
tests/e2e/program/program/term/test_async_term.pyandtest_sync_term.py, including create, update, get, delete, filter, publish, and unpublish scenarios. [1] [2]tests/unit/resources/program/test_programs_terms.py, covering endpoints, method presence, field mapping, and optional fields.tests/e2e/program/program/term/conftest.py.Configuration and Linting:
e2e_config.test.jsonto include a term ID for use in tests.pyproject.tomlto add linting ignores for the new test files.Closes MPT-20329
Termmodel with fields for term metadata (name, description, display order, status) and references (program, audit)TermServiceandAsyncTermServiceclasses supporting CRUD operations, publish/unpublish, filtering, and iterationProgramsServiceandAsyncProgramsServicevia newterms(program_id)methodsPTC-9643-3741-0001)