Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
aa30e16
Forked version of the ispyb-database project
hormiai76 Jul 26, 2024
92bcb13
hormiai76 database repo set
hormiai76 Jul 29, 2024
a515fad
Bump version: 1.1.0 → 1.2.0
hormiai76 Jul 29, 2024
f29dccf
Bump version: 1.2.0 → 1.2.0
hormiai76 Jul 29, 2024
2715476
Revert "Forked version of the ispyb-database project"
hormiai76 Jul 29, 2024
765843e
Revert "Revert "Forked version of the ispyb-database project""
hormiai76 Jul 29, 2024
8aff012
Revert "Bump version: 1.2.0 → 1.2.0"
hormiai76 Jul 29, 2024
0c06680
Update update.yml
hormiai76 Jul 29, 2024
d14ca2e
Update models to schema version 1.2.1
hormiai76 Jul 29, 2024
e2e120b
Bump version: 1.2.0 → 1.2.1
hormiai76 Jul 29, 2024
087ecab
fix quotes in init file
hormiai76 Jul 29, 2024
595178e
fix version number
hormiai76 Jul 29, 2024
595e53d
fix version number
hormiai76 Jul 29, 2024
d028882
Merge pull request #2 from hormiai76/update-schema-v1.2.1
hormiai76 Jul 29, 2024
54a4094
Update publish.yml
hormiai76 Jul 29, 2024
5982656
Update publish.yml
hormiai76 Jul 29, 2024
885cad8
new version to update SSX models
hormiai76 Sep 13, 2024
44b31d6
Merge branch 'main' into update-schema-v1.2.2
hormiai76 Sep 13, 2024
2f7924c
Merge pull request #3 from hormiai76/update-schema-v1.2.2
hormiai76 Sep 13, 2024
ce46b61
Update models to schema version 1.2.2
hormiai76 Sep 13, 2024
df6a639
Merge pull request #4 from hormiai76/update-schema-v1.2.2
hormiai76 Nov 8, 2024
e856058
add LineScan as new exp type
hormiai76 Nov 8, 2024
5121881
add LineScan as new exp type
hormiai76 Nov 8, 2024
e86a91e
new version for LineScan exp type
hormiai76 Nov 8, 2024
909dcff
Merge branch 'update-schema-v1.2.3' of github.com:hormiai76/ispyb-mod…
hormiai76 Nov 8, 2024
45fa404
new version for LineScan exp type
hormiai76 Nov 8, 2024
f059e44
update history
hormiai76 Nov 8, 2024
ac3f66e
new GphNative experimentkind
hormiai76 Nov 11, 2024
33a6f36
Merge pull request #5 from hormiai76/update-schema-v1.2.3
hormiai76 Nov 11, 2024
2583cdd
init current version to 1.2.1
hormiai76 Nov 11, 2024
dc71a82
Bump version: 1.2.1 → 1.2.2
hormiai76 Nov 11, 2024
d3212b3
Bump version: 1.2.2 → 1.2.2
hormiai76 Nov 11, 2024
c3d74ef
init current version to 1.2.1
hormiai76 Nov 11, 2024
98f0e52
new verison 1.2.2
hormiai76 Nov 11, 2024
31daf1b
init current version to 1.2.1
hormiai76 Nov 11, 2024
b12d1d0
init current version to 1.2.1
hormiai76 Nov 11, 2024
391c586
Bump version: 1.2.1 → 1.2.2
hormiai76 Nov 11, 2024
72c440a
Bump version: 1.2.2 → 1.2.2
hormiai76 Nov 11, 2024
5256413
Bump version: 1.2.2 → 1.2.2
hormiai76 Nov 11, 2024
c73f321
new tag 1.2.2
hormiai76 Nov 11, 2024
775fee3
new tag 1.2.2
hormiai76 Nov 11, 2024
7985f4f
new tag 1.2.2
hormiai76 Nov 11, 2024
2df16ac
Merge pull request #6 from hormiai76/update-schema-v1.2.2
hormiai76 Nov 11, 2024
8107d12
Update setup.cfg
hormiai76 Nov 11, 2024
1e916d0
new version
hormiai76 Nov 11, 2024
13d64d1
new version
hormiai76 Nov 11, 2024
f6d0dfc
Merge pull request #7 from hormiai76/update-schema-v1.2.3
hormiai76 Nov 11, 2024
fe3144d
new version
hormiai76 Nov 11, 2024
4cfd12d
Bump version: 1.2.2 → 1.2.3
hormiai76 Nov 11, 2024
72308f5
Update models to schema version 1.2.3
hormiai76 Nov 11, 2024
ae1d904
Merge branch 'update-schema-v1.2.3' of github.com:hormiai76/ispyb-mod…
hormiai76 Nov 11, 2024
3553bcd
update history file
hormiai76 Nov 11, 2024
89cd772
Merge pull request #9 from hormiai76/update-schema-v1.2.3
hormiai76 Nov 11, 2024
43abdb6
Update models to schema version 1.2.4
hormiai76 Nov 13, 2024
e52f972
update history file
hormiai76 Nov 13, 2024
21e8e57
Bump version: 1.2.3 → 1.2.3
hormiai76 Nov 13, 2024
01586cf
Bump version: 1.2.3 → 1.2.4
hormiai76 Nov 13, 2024
e748045
fix init file
hormiai76 Nov 13, 2024
47610ec
Bump version: 1.2.4 → 1.2.4
hormiai76 Nov 13, 2024
aa45b08
fix init file
hormiai76 Nov 13, 2024
61fb63a
fix init file
hormiai76 Nov 13, 2024
73c632d
Merge pull request #10 from hormiai76/update-schema-v1.2.4
hormiai76 Nov 13, 2024
04dd1f6
Update models to schema version 1.2.5
hormiai76 Nov 27, 2024
54b7cfe
history file updated
hormiai76 Nov 27, 2024
610077e
Bump version: 1.2.4 → 1.2.5
hormiai76 Nov 27, 2024
58cac03
Merge pull request #11 from hormiai76/update-schema-v1.2.5
hormiai76 Nov 27, 2024
e65159d
Update models to schema version 1.2.6
hormiai76 Nov 27, 2024
28d99f1
history file updated
hormiai76 Nov 27, 2024
dc764a9
Bump version: 1.2.5 → 1.2.6
hormiai76 Nov 27, 2024
9abc07e
Merge pull request #12 from hormiai76/update-schema-v1.2.6
hormiai76 Nov 27, 2024
b188f84
feat: new dewar type
hormiai76 Jun 3, 2026
fc2ea36
feat: new dewar type
hormiai76 Jun 3, 2026
0858fe2
feat: new dewar type
hormiai76 Jun 3, 2026
c6a5bfa
remove tests
hormiai76 Jun 3, 2026
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 .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.1.0
current_version = 1.2.7
commit = True
tag = True

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
permissions:
id-token: write
environment: hormiai76
steps:
- uses: actions/checkout@master
- name: Set up Python 3.10
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
name: Get latest release
uses: pozetroninc/github-action-get-latest-release@master
with:
repository: ispyb/ispyb-database
repository: hormiai76/ispyb-database
- uses: actions/checkout@v3
- name: Check if update required
run: |
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
password=password
database=ispyb_build
EOF
wget https://github.com/ispyb/ispyb-database/archive/refs/tags/v${SCHEMA_VERSION}.tar.gz
wget https://github.com/hormiai76/ispyb-database/archive/refs/tags/v${SCHEMA_VERSION}.tar.gz
tar xfz v${SCHEMA_VERSION}.tar.gz
ls
cd ispyb-database-${SCHEMA_VERSION}
Expand Down
34 changes: 33 additions & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,38 @@

## Unreleased / main

## v1.2.7 (03/06/2026)

Update `type` Enum values in the `Dewar` table.


## v1.2.6 (26/11/2024)

Update `fyleType` Enum values in the `SSXProcessingResultAttachment` table.


## v1.2.5 (26/11/2024)

Make `dataCollectionId` mandatory in the `SSXProcessingResult` table.
Create a new entry in the `Permission` table to be used by beamine service accounts.

## v1.2.4 (13/11/2024)

Add `nbCrystals` to `SSXProcessingResult` table.

## v1.2.3 (11/11/2024)

Add `LineScan` and `GphNative` to `DataCollectionGroup.experimentType`.


## v1.2.2 (13/09/2024)

Create new tables

- SSXProcessingResult
- SSXProcessingResultAttachment


## v1.1.0 (17/01/2023)

Create new tables:
Expand All @@ -14,7 +46,7 @@ Create new tables:
- EventType
- Event

Add SSX-Chip and SSX-Jet to DataCollectionGroup.experimentType.
Add `SSX-Chip` and `SSX-Jet` to `DataCollectionGroup.experimentType`.

## v1.0.0 (20/07/2022)

Expand Down
Empty file modified generate_models.sh
100644 → 100755
Empty file.
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
sqlalchemy
mysql-connector-python==8.0.29
pytest
black
sqlacodegen
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = ispyb-models
version = 1.1.0
name = ispyb-models-pyispyb
version = 1.2.7
description = SQLAlchemy ORM models for the ISPyB database
long_description = file: README.md
long_description_content_type = text/markdown
Expand All @@ -22,7 +22,7 @@ keywords =
ISPyB
database
SQLAlchemy
url = https://github.com/ispyb/ispyb-models
url = https://github.com/hormiai76/ispyb-models

[options]
include_package_data = True
Expand Down
2 changes: 1 addition & 1 deletion src/ispyb/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
EventChain,
)

__version__ = "1.1.0"
__version__ = "1.2.6"

DataCollection.GridInfo = relationship(
"GridInfo", secondary="DataCollectionGroup", back_populates="DataCollection"
Expand Down
83 changes: 79 additions & 4 deletions src/ispyb/models/_auto_db_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

from .base import CustomBase


Base = declarative_base(cls=CustomBase)
metadata = Base.metadata

Expand Down Expand Up @@ -1348,6 +1347,8 @@ class XRFFluorescenceMappingROI(Base):
"Still",
"SSX-Chip",
"SSX-Jet",
"LineScan",
"GphNative",
),
),
Column("DataCollectionGroup_startTime", DateTime),
Expand Down Expand Up @@ -1693,6 +1694,8 @@ class XRFFluorescenceMappingROI(Base):
"Still",
"SSX-Chip",
"SSX-Jet",
"LineScan",
"GphNative",
),
),
Column("DataCollectionGroup_startTime", DateTime),
Expand Down Expand Up @@ -2002,7 +2005,7 @@ class XRFFluorescenceMappingROI(Base):
Column("transportValue", INTEGER(10)),
Column("trackingNumberToSynchrotron", String(30)),
Column("trackingNumberFromSynchrotron", String(30)),
Column("type", Enum("Dewar", "Toolbox"), server_default=text("'Dewar'")),
Column("type", Enum("Dewar", "Toolbox", "Other"), server_default=text("'Dewar'")),
Column("isReimbursed", TINYINT(1), server_default=text("'0'")),
Column("sessionId", INTEGER(10), server_default=text("'0'")),
Column("beamlineName", String(45)),
Expand Down Expand Up @@ -2735,7 +2738,9 @@ class XRFFluorescenceMappingROI(Base):
Column("Dewar_firstExperimentId", INTEGER(10)),
Column("Dewar_trackingNumberToSynchrotron", String(30)),
Column("Dewar_trackingNumberFromSynchrotron", String(30)),
Column("Dewar_type", Enum("Dewar", "Toolbox"), server_default=text("'Dewar'")),
Column(
"Dewar_type", Enum("Dewar", "Toolbox", "Other"), server_default=text("'Dewar'")
),
Column("Shipping_shippingId", INTEGER(10), server_default=text("'0'")),
Column("Shipping_proposalId", INTEGER(10), server_default=text("'0'")),
Column("Shipping_shippingName", String(45)),
Expand Down Expand Up @@ -4683,7 +4688,9 @@ class Dewar(Base):
trackingNumberFromSynchrotron = Column(String(30))
facilityCode = Column(String(20), comment="Unique barcode assigned to each dewar")
type = Column(
Enum("Dewar", "Toolbox"), nullable=False, server_default=text("'Dewar'")
Enum("Dewar", "Toolbox", "Other"),
nullable=False,
server_default=text("'Dewar'"),
)
isReimbursed = Column(
TINYINT(1),
Expand Down Expand Up @@ -5319,6 +5326,8 @@ class DataCollectionGroup(Base):
"Still",
"SSX-Chip",
"SSX-Jet",
"LineScan",
"GphNative",
)
)
startTime = Column(DateTime, comment="Start time of the dataCollectionGroup")
Expand Down Expand Up @@ -6361,6 +6370,37 @@ class SSXDataCollection(Base):
DataCollection = relationship("DataCollection", uselist=False)


class SSXProcessingResult(Base):
__tablename__ = "SSXProcessingResult"
__table_args__ = {"comment": "Processing Results table for SSX experiments."}

ssxProcessingResultId = Column(INTEGER(11), primary_key=True, comment="Primary key")
dataCollectionId = Column(
ForeignKey(
"DataCollection.dataCollectionId", ondelete="CASCADE", onupdate="CASCADE"
),
nullable=False,
index=True,
)
hitRate = Column(Float)
indexingRate = Column(Float)
indexingType = Column(Enum("Preliminary", "Final"))
status = Column(Enum("Running", "Failed", "Success"))
createdTimeStamp = Column(
TIMESTAMP, nullable=False, server_default=text("current_timestamp()")
)
lastUpdate = Column(
TIMESTAMP,
nullable=False,
server_default=text("current_timestamp()"),
comment="last update timestamp",
)
comments = Column(String(100))
nbCrystals = Column(INTEGER(11), comment="Number of crystals")

DataCollection = relationship("DataCollection")


class XRFFluorescenceMapping(Base):
__tablename__ = "XRFFluorescenceMapping"

Expand Down Expand Up @@ -6587,6 +6627,41 @@ class PDBEntry(Base):
AutoProcProgram = relationship("AutoProcProgram")


class SSXProcessingResultAttachment(Base):
__tablename__ = "SSXProcessingResultAttachment"
__table_args__ = {
"comment": "Processing Results attachments table for SSX experiments."
}

ssxProcessingResultAttachmentId = Column(
INTEGER(11), primary_key=True, comment="Primary key"
)
ssxProcessingResultId = Column(
ForeignKey(
"SSXProcessingResult.ssxProcessingResultId",
ondelete="CASCADE",
onupdate="CASCADE",
),
index=True,
)
fileName = Column(String(255), nullable=False)
filePath = Column(String(255), nullable=False)
fileType = Column(
Enum("Real-time processing results", "Processing results"), nullable=False
)
createdTimeStamp = Column(
TIMESTAMP, nullable=False, server_default=text("current_timestamp()")
)
lastUpdate = Column(
TIMESTAMP,
nullable=False,
server_default=text("current_timestamp()"),
comment="last update timestamp",
)

SSXProcessingResult = relationship("SSXProcessingResult")


class WorkflowMesh(Base):
__tablename__ = "WorkflowMesh"

Expand Down
1 change: 0 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import sqlalchemy.orm
import sqlalchemy.schema


engine = sqlalchemy.create_engine(
url=os.environ["SQLALCHEMY_DATABASE_URI"],
connect_args={"use_pure": True},
Expand Down