Skip to content

Conversation

@elainehoml
Copy link

@elainehoml elainehoml commented Jan 13, 2026

Hello, thanks for your work on Pyscicat! We were using it for some internal projects at RFI which required Python 3.12 so I made some changes to get Pyscicat working for our project. Hope this isn't duplicated elsewhere but happy to make any changes

Summary

This PR updates PyScicat to work with Python 3.10-3.14 (up from Python 3.9-3.11) and Pydantic V2.

Changes made

  • The outputs of many of the class creation methods e.g., creating Datasets, Attachments, Proposals etc. no longer return just a string with the pid, but a dictionary of the attributes that were changed. Tests were updated to reflect this - though I think this is more of a Scicat v4 thing rather than Python update?

Example:
Previous behaviour

scicat.upload_instrument(instrument) == "earth"

New behaviour

scicat.upload_instrument(instrument) == {
            "uniqueName": "magictelescope",
            "pid": "earth",
        }
  • Pydantic syntax updates

Copy link
Member

@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.

Importing a private class is undesirable, but I agree that it's probably the best option for now.

I think we should pin pydantic to >=2.0.0 in this PR in requirements.txt.

@elainehoml
Copy link
Author

Thanks @dylanmcreynolds, I've now pinned Pydantic to >= 2.0.0

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