Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:

env:
DATABASE_SCHEMA: 4.6.0
DATABASE_SCHEMA: 4.7.0

permissions:
contents: read
Expand Down
5 changes: 5 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ History
Unreleased / main
-------------------

11.0.3 (2025-05-12)
-------------------

* Update database schema to v4.7.0

11.0.2 (2025-03-13)
-------------------

Expand Down
Binary file added jupyterhub.sqlite
Binary file not shown.
1 change: 1 addition & 0 deletions jupyterhub_cookie_secret
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a3e4ed1be23ee9cbbdc446d4b466f2dd81fc141ddd94d584d306bbad94eb9b64
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "ispyb"
version = "11.0.2"
version = "11.0.3"
description = "Python package to access ISPyB database"
authors = [
{ name = "Diamond Light Source", email = "scientificsoftware@diamond.ac.uk" },
Expand Down Expand Up @@ -59,7 +59,7 @@ unfixable = ["F841"]
ignore = ["E501"]

[tool.bumpversion]
current_version = "11.0.2"
current_version = "11.0.3"
commit = true
tag = true

Expand Down
2 changes: 1 addition & 1 deletion src/ispyb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os
import warnings

__version__ = "11.0.2"
__version__ = "11.0.3"

_log = logging.getLogger("ispyb")

Expand Down
71 changes: 68 additions & 3 deletions src/ispyb/sqlalchemy/_auto_db_schema.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__schema_version__ = "4.6.0"
__schema_version__ = "4.7.0"
import datetime
import decimal
from typing import List, Optional
Expand Down Expand Up @@ -3804,6 +3804,8 @@ class Shipping(Base):
ForeignKeyConstraint(
["deliveryAgent_flightCodePersonId"],
["Person.personId"],
ondelete="SET NULL",
onupdate="CASCADE",
name="Shipping_ibfk_4",
),
ForeignKeyConstraint(
Expand All @@ -3816,14 +3818,14 @@ class Shipping(Base):
ForeignKeyConstraint(
["returnLabContactId"],
["LabContact.labContactId"],
ondelete="CASCADE",
ondelete="SET NULL",
onupdate="CASCADE",
name="Shipping_ibfk_3",
),
ForeignKeyConstraint(
["sendingLabContactId"],
["LabContact.labContactId"],
ondelete="CASCADE",
ondelete="SET NULL",
onupdate="CASCADE",
name="Shipping_ibfk_2",
),
Expand Down Expand Up @@ -4166,6 +4168,7 @@ class DewarRegistryHasProposal(Base):
ForeignKeyConstraint(
["labContactId"],
["LabContact.labContactId"],
ondelete="SET NULL",
onupdate="CASCADE",
name="DewarRegistry_has_Proposal_ibfk4",
),
Expand Down Expand Up @@ -4677,6 +4680,9 @@ class BLSample(Base):
BLSampleImage: Mapped[List["BLSampleImage"]] = relationship(
"BLSampleImage", back_populates="BLSample"
)
BLSamplePosition: Mapped[List["BLSamplePosition"]] = relationship(
"BLSamplePosition", back_populates="BLSample"
)
BLSample_has_DataCollectionPlan: Mapped[List["BLSampleHasDataCollectionPlan"]] = (
relationship("BLSampleHasDataCollectionPlan", back_populates="BLSample")
)
Expand Down Expand Up @@ -4707,6 +4713,9 @@ class BLSample(Base):
XFEFluorescenceSpectrum: Mapped[List["XFEFluorescenceSpectrum"]] = relationship(
"XFEFluorescenceSpectrum", back_populates="BLSample"
)
XrayCentringResult: Mapped[List["XrayCentringResult"]] = relationship(
"XrayCentringResult", back_populates="BLSample"
)
BLSample_has_EnergyScan: Mapped[List["BLSampleHasEnergyScan"]] = relationship(
"BLSampleHasEnergyScan", back_populates="BLSample"
)
Expand Down Expand Up @@ -4962,6 +4971,39 @@ class BLSampleImage(Base):
)


class BLSamplePosition(Base):
__tablename__ = "BLSamplePosition"
__table_args__ = (
ForeignKeyConstraint(
["blSampleId"],
["BLSample.blSampleId"],
name="BLSamplePosition_fk_blSampleId",
),
Index("BLSamplePosition_fk_blSampleId", "blSampleId"),
)

blSamplePositionId: Mapped[int] = mapped_column(
INTEGER(11), primary_key=True, comment="Primary key (auto-incremented)"
)
blSampleId: Mapped[int] = mapped_column(
INTEGER(11), comment="FK, references parent sample"
)
posX: Mapped[Optional[decimal.Decimal]] = mapped_column(Double(asdecimal=True))
posY: Mapped[Optional[decimal.Decimal]] = mapped_column(Double(asdecimal=True))
posZ: Mapped[Optional[decimal.Decimal]] = mapped_column(Double(asdecimal=True))
recordTimeStamp: Mapped[Optional[datetime.datetime]] = mapped_column(
DateTime, comment="Creation or last update date/time"
)
positionType: Mapped[Optional[str]] = mapped_column(
Enum("dispensing"),
comment="Type of marked position (e.g.: dispensing location)",
)

BLSample: Mapped["BLSample"] = relationship(
"BLSample", back_populates="BLSamplePosition"
)


class BLSampleHasDataCollectionPlan(Base):
__tablename__ = "BLSample_has_DataCollectionPlan"
__table_args__ = (
Expand Down Expand Up @@ -6221,13 +6263,21 @@ class XFEFluorescenceSpectrum(Base):
class XrayCentringResult(Base):
__tablename__ = "XrayCentringResult"
__table_args__ = (
ForeignKeyConstraint(
["blSampleId"],
["BLSample.blSampleId"],
ondelete="SET NULL",
onupdate="CASCADE",
name="XrayCentringResult_fk_blSampleId",
),
ForeignKeyConstraint(
["xrayCentringId"],
["XrayCentring.xrayCentringId"],
ondelete="CASCADE",
onupdate="CASCADE",
name="XrayCentringResult_ibfk_1",
),
Index("XrayCentringResult_fk_blSampleId", "blSampleId"),
Index("xrayCentringId", "xrayCentringId"),
{"comment": "Xray Centring result."},
)
Expand Down Expand Up @@ -6297,7 +6347,14 @@ class XrayCentringResult(Base):
gridInfoId: Mapped[Optional[int]] = mapped_column(
INTEGER(11), comment="to be removed"
)
blSampleId: Mapped[Optional[int]] = mapped_column(
INTEGER(11),
comment="The BLSample attributed for this x-ray centring result, i.e. the actual sample even for multi-pins",
)

BLSample: Mapped["BLSample"] = relationship(
"BLSample", back_populates="XrayCentringResult"
)
XrayCentring: Mapped["XrayCentring"] = relationship(
"XrayCentring", back_populates="XrayCentringResult"
)
Expand Down Expand Up @@ -8449,6 +8506,14 @@ class ParticleClassification(Base):
Float,
comment="Quadratic coefficient of quadratic fit to refinement resolution against the logarithm of the number of particles",
)
angularEfficiency: Mapped[Optional[decimal.Decimal]] = mapped_column(
Double(asdecimal=True),
comment="Variation in resolution across different angles, 1-2sig/mean",
)
suggestedTilt: Mapped[Optional[decimal.Decimal]] = mapped_column(
Double(asdecimal=True),
comment="Suggested stage tilt angle to improve angular efficiency. Unit: degrees",
)

CryoemInitialModel: Mapped[List["CryoemInitialModel"]] = relationship(
"CryoemInitialModel",
Expand Down
Loading