Skip to content

Commit

Permalink
Release v1.10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
gfrn committed Jan 14, 2025
1 parent 046364e commit d2b7af9
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 12 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
Changelog
==========

+++++++++
v1.10.1 (14/01/2025)
+++++++++

**Changed**

- Coalesce null CTF values

+++++++++
v1.10.0 (10/12/2024)
+++++++++
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# The devcontainer should use the build target and run as root with podman
# or docker with user namespaces.
#
FROM docker.io/library/python:3.12.7-slim-bookworm as build
FROM docker.io/library/python:3.13.1-slim-bookworm as build

# Add any system dependencies for the developer/build environment here
RUN apt-get update && apt-get upgrade -y && \
Expand Down Expand Up @@ -40,7 +40,7 @@ RUN pip install --upgrade pip && \
# and replace with a comment to avoid a zero length asset upload later
sed -i '/file:/s/^/# Requirements for /' lockfiles/requirements.txt

FROM docker.io/library/python:3.12.7-slim-bookworm as runtime
FROM docker.io/library/python:3.13.1-slim-bookworm as runtime

# Add apt-get system dependecies for runtime here if needed
RUN apt-get update && apt-get install -y libmariadb-dev
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies = [
"mysql-connector-python~=8.2.0",
"pydantic~=2.9.2",
"types-requests",
"lims-utils~=0.2.5"
"lims-utils~=0.2.6"
]
dynamic = ["version"]
license.file = "LICENSE"
Expand Down
9 changes: 5 additions & 4 deletions src/pato/crud/autoproc.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,13 @@ def get_motion_correction(limit: int, page: int, autoProcId: int) -> Paged[FullM


def get_ctf(autoProcId: int):
# COALESCE strips out the column name
data = db.session.execute(
select(
CTF.estimatedResolution,
CTF.estimatedDefocus,
CTF.astigmatism,
ParticlePicker.numberOfParticles,
func.coalesce(CTF.estimatedResolution, 0).label("estimatedResolution"),
func.coalesce(CTF.estimatedDefocus, 0).label("estimatedDefocus"),
func.coalesce(CTF.astigmatism, 0).label("astigmatism"),
func.coalesce(ParticlePicker.numberOfParticles, 0).label("numberOfParticles"),
MotionCorrection.imageNumber,
)
.filter(MotionCorrection.autoProcProgramId == autoProcId)
Expand Down
8 changes: 4 additions & 4 deletions src/pato/crud/tomograms.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
TiltImageAlignment,
Tomogram,
)
from sqlalchemy import Column, literal_column, select
from sqlalchemy import Column, func, literal_column, select
from sqlalchemy import func as f

from ..models.response import (
Expand Down Expand Up @@ -136,9 +136,9 @@ def get_motion_correction(
def get_ctf(tomogramId: int):
data = db.session.execute(
select(
CTF.estimatedResolution,
CTF.estimatedDefocus,
CTF.astigmatism,
func.coalesce(CTF.estimatedResolution, 0).label("estimatedResolution"),
func.coalesce(CTF.estimatedDefocus, 0).label("estimatedDefocus"),
func.coalesce(CTF.astigmatism, 0).label("astigmatism"),
TiltImageAlignment.refinedTiltAngle,
)
.filter(TiltImageAlignment.tomogramId == tomogramId)
Expand Down
2 changes: 1 addition & 1 deletion tests/proposals/test_proposal.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
pytest.param(mx_admin, 2, id="mx"),
pytest.param(user, 1, id="user"),
pytest.param(em_admin, 1, id="em"),
pytest.param(admin, 4, id="admin"),
pytest.param(admin, 5, id="admin"),
],
indirect=["mock_user"],
)
Expand Down

0 comments on commit d2b7af9

Please sign in to comment.