-
Notifications
You must be signed in to change notification settings - Fork 9
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
base: main
Are you sure you want to change the base?
Conversation
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
Updates from new release and then headers untab
print response content
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.
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 |
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.
nit: ,<space>>...
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.
unrelated change, but probably OK here.
@@ -146,24 +160,24 @@ dataset = Dataset( | |||
sourceFolder="/foo/bar", | |||
scientificMetadata={"a": "field"}, | |||
sampleId="gargleblaster", | |||
**ownable.dict()) |
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.
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
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.
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]