GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feature/SOF-8060 Feature: read and write a material's atomic constraints over /api/v1 by VsevolodX · Pull Request #52 · mat3ra/api-client

Conversation

@VsevolodX

@VsevolodX VsevolodX commented Nov 4, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Materials are created, updated and read over /api/v1, so a material's atomic constraints are stored with it and come back on read, while list stays on the legacy API because v1 accepts a query selector and silently ignores it (returning the account's first 20 materials instead of the match).

The v1 route files a new material under the login's default account and ignores the account asked for — measured on production: create(config, owner_id=<a non-default account>) returned a material owned by the default one. create therefore compares the owner on the material it reads back and raises, naming the material and both accounts. Teaching MaterialsCreate/MaterialsUpdate to accept accountId is a separate web-app ticket.

Manual checks:

  • A material saved with basis.constraints through client.materials.create comes back from client.materials.get with them (production, seminar)
  • A job created on such a material renders the 0 0 0 flags (SOF-8072 fast cell: 100)
  • An api-examples notebook using get_or_create_material / load_material runs unchanged

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
VsevolodX and others added 3 commits November 3, 2026 21:35
@VsevolodX @claude
feature/SOF-8060 Feature: store a material's atomic constraints when …
b16293c
…creating or updating it

The legacy materials create/update never forward basis.constraints. When a
material carries non-empty constraints, create/update follow the legacy call
with one PUT /api/v1/materials/{id} {accountId, material, constraints}, the
account being the saved material's owner. Without constraints nothing changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@VsevolodX @claude
Check the constraints reply and use the current sign-in token
28f2c95
The v1 route answers failures as HTTP 200 with status 0, so the reply is
read and a rejected write raises. The PUT merges the auth context's current
headers, as BaseEndpoint.request does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@VsevolodX @claude
Assert the rejected-constraints error
0e8752d
Co-Authored-By: Claude Opus 5.5 <[email protected]>
VsevolodX added a commit to mat3ra/api-examples that referenced this pull request Nov 4, 2026
@VsevolodX @claude
Pin api-client to store the frozen plane with the material
178c1f0
mat3ra-api-client at 0e8752d (SOF-8060, mat3ra/api-client#52) stores
basis.constraints when a material is created or updated. Cell 7.5 updates
each saved material, so a material reused by hash gets the constraints too.
Re-pin to the release when it publishes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@VsevolodX VsevolodX mentioned this pull request Nov 6, 2026
feature/SOF-8072 Feature: SE for a Ti adatom on a 5×5 TiN island, descent energetics of Fig. 6 (MACE and DFT) mat3ra/api-examples#385
Open
3 tasks
VsevolodX and others added 3 commits November 6, 2026 13:00
@VsevolodX @claude
feature/SOF-8060 Feature: read and write a material's atomic constrai…
5942406
…nts over /api/v1

get, create and update go through a v1 connection built beside the endpoint's
own, so a material's constraints come back in what the client returns; create
and update carry them natively and return the stored material. list and the
set/import/default methods stay on the account-wide version: a v1 list takes
flat filters, not the Mongo selectors every caller sends.

Co-Authored-By: Claude Opus 5 <[email protected]>
@VsevolodX @claude
Raise when a material lands under another account, and drop the dead …
f98e25d
…accountId

The v1 route creates and updates under the session's default account and never
reads accountId: measured against production, create(owner_id=<non-default>)
returned a material owned by the default account. create now compares the owner
on the read-back it already does and raises on a mismatch; the field, the
account fallback and update's pre-read are gone.

Co-Authored-By: Claude Opus 5 <[email protected]>
@VsevolodX @claude
Name the material and the rejected fields in what the write raises
803c45c
Co-Authored-By: Claude Opus 5 <[email protected]>
@VsevolodX VsevolodX changed the title feature/SOF-8060 Feature: store a material's atomic constraints when creating or updating it feature/SOF-8060 Feature: read and write a material's atomic constraints over /api/v1 Nov 6, 2026
@VsevolodX
Merge remote-tracking branch 'origin/main' into feature/SOF-8060
b5f25f7
VsevolodX added a commit to mat3ra/api-examples that referenced this pull request Nov 6, 2026
@VsevolodX @claude
Pin api-client to the version that reads constraints back
d9d83a9
mat3ra-api-client at b5f25f7 (SOF-8060, mat3ra/api-client#52) creates, updates
and reads materials over /api/v1, so a saved material's atomic constraints come
back from materials.get instead of only reaching a job's rendered input.
Re-pin to the release when it publishes.

Co-Authored-By: Claude Opus 5 <[email protected]>
@VsevolodX VsevolodX mentioned this pull request Nov 17, 2026
feature/SOF-8060 Feature: relaxation keeps a material's own atomic constraints mat3ra/api-examples#412
Open
timurbazhirov
timurbazhirov reviewed Nov 17, 2026
View reviewed changes
Comment thread src/py/mat3ra/api_client/endpoints/materials.py
"""
return self._v1_request("GET", "/".join((self.name, id_)))["entity"]

def create(self, config, owner_id=None):

@timurbazhirov timurbazhirov Nov 17, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Should there be a separate "create_with_constraints"?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@VsevolodX @claude
SOF-8060: send the material as it is; its basis carries the per-atom …
9b3dc12
…properties

Co-Authored-By: Claude Opus 5 <[email protected]>
@VsevolodX VsevolodX mentioned this pull request Nov 18, 2026
feature/SOF-8127 Feature: metal adatom adsorption energy on graphene (Chan 2008) mat3ra/api-examples#416
Open
4 of 7 tasks
timurbazhirov
timurbazhirov reviewed Nov 21, 2026
View reviewed changes
Comment thread src/py/mat3ra/api_client/endpoints/enums.py Outdated
@@ -1,5 +1,6 @@
SECURE = True
DEFAULT_API_VERSION = "2018-10-01"
V1_API_VERSION = "v1"

@timurbazhirov timurbazhirov Nov 21, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@VsevolodX @claude
SOF-8060: name the v1 route where it is used
cd6cdce
Co-Authored-By: Claude Opus 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@timurbazhirov timurbazhirov timurbazhirov left review comments

At least 1 approving review is required to merge this pull request.

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@VsevolodX @timurbazhirov
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.