Skip to content

Add Inventory Instruments and Instrument Templates support#51

Merged
tilorspace merged 2 commits into
masterfrom
feat/inventory-instruments
Jul 7, 2026
Merged

Add Inventory Instruments and Instrument Templates support#51
tilorspace merged 2 commits into
masterfrom
feat/inventory-instruments

Conversation

@tilorspace

Copy link
Copy Markdown
Contributor

RSpace 2.24 introduced Instruments as a native Inventory item type, created from Instrument Templates (the same record/template relationship that Samples have with Sample Templates). This adds first-class client support so the feature can be consumed by scripts and the RSpace MCP server.

  • inv.py: wire IN/NT global-id prefixes into the Id class (making rename, set_image, duplicate, add_extra_fields and upload_attachment work on instruments for free); add INSTRUMENT/INSTRUMENT_TEMPLATE to ResultType; add InstrumentPost and full CRUD/restore/owner-transfer/revision/version methods for instruments and instrument templates on InventoryClient.
  • template_builder.py: extract the shared field-definition methods into a FieldDefinitionBuilder base class and add InstrumentTemplateBuilder alongside the unchanged TemplateBuilder.
  • Tests: unit coverage for IN/NT id handling and InstrumentTemplateBuilder, plus live integration tests for instrument + instrument template CRUD (verified green against demos.researchspace.com).
  • examples/create_instrument.py and CHANGELOG entry; bump version to 2.7.0.

RSpace 2.24 introduced Instruments as a native Inventory item type, created
from Instrument Templates (the same record/template relationship that Samples
have with Sample Templates). This adds first-class client support so the
feature can be consumed by scripts and the RSpace MCP server.

- inv.py: wire IN/NT global-id prefixes into the Id class (making rename,
  set_image, duplicate, add_extra_fields and upload_attachment work on
  instruments for free); add INSTRUMENT/INSTRUMENT_TEMPLATE to ResultType;
  add InstrumentPost and full CRUD/restore/owner-transfer/revision/version
  methods for instruments and instrument templates on InventoryClient.
- template_builder.py: extract the shared field-definition methods into a
  FieldDefinitionBuilder base class and add InstrumentTemplateBuilder
  alongside the unchanged TemplateBuilder.
- Tests: unit coverage for IN/NT id handling and InstrumentTemplateBuilder,
  plus live integration tests for instrument + instrument template CRUD
  (verified green against demos.researchspace.com).
- examples/create_instrument.py and CHANGELOG entry; bump version to 2.7.0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@tilorspace tilorspace requested a review from nebay-abraha July 3, 2026 14:47
@tilorspace

Copy link
Copy Markdown
Contributor Author

@nebay-abraha could you check out the test failure? seems like a dependency is not loaded.

@nebay-abraha

nebay-abraha commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

@nebay-abraha could you check out the test failure? seems like a dependency is not loaded.

@tilorspace , this issue is fixed here Open PR , in your branch --> pyproject.toml add setuptools = "<82".

@tilorspace tilorspace marked this pull request as ready for review July 7, 2026 06:13

@nebay-abraha nebay-abraha left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks good.

@tilorspace tilorspace merged commit e8d35d8 into master Jul 7, 2026
3 checks passed
@tilorspace tilorspace deleted the feat/inventory-instruments branch July 7, 2026 14:47
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.

2 participants