Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update pyscicat ingestion documentation #54

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

mkywall
Copy link
Collaborator

@mkywall mkywall commented Oct 23, 2023

  • use updated method names
  • use OrigDataBlockDTO
  • use model_dump for updated pydantic
  • add information about attachments that are too large

Copy link

@bpedersen2 bpedersen2 left a comment

Choose a reason for hiding this comment

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

Maybe some minor formatting changes, otherwise it looks fine.

Optional: Also add this as example python scripts directly?

@@ -7,12 +7,12 @@ To begin with:
from datetime import datetime
from pathlib import Path

from pyscicat.client import encode_thumbnail, ScicatClient
from pyscicat.client import encode_thumbnail, ScicatClient,CreateDatasetOrigDatablockDto

Choose a reason for hiding this comment

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

nit: ,<space>>...

Choose a reason for hiding this comment

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

unrelated change, but probably OK here.

@@ -146,24 +160,24 @@ dataset = Dataset(
sourceFolder="/foo/bar",
scientificMetadata={"a": "field"},
sampleId="gargleblaster",
**ownable.dict())
Copy link
Collaborator

Choose a reason for hiding this comment

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

You probably did this because of a deprecation warning, but pydantic has been have growing pains. If you do this, pin the version of pydantic in setup.cfg to >= 2.0

Copy link
Collaborator

@dylanmcreynolds dylanmcreynolds left a comment

Choose a reason for hiding this comment

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

This might be a difficult PR to merge, but I think it's worth it. However, pydantic is going to have to get pinned to 2.0 or above for this to work. I think it's time to do that pin. The pydantic migration has been horrible, but we are at the point where we make it hard for pyscicat to be integration with a variety of tools by not going all-in on it. Pinning to 2.0 will be more explicit. [edited to clarify pydantic is currently supported, but 2.0 pin will be explicit]

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