diff --git a/changelog.md b/changelog.md index 23f111fa..09a4671c 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,16 @@ +unreleased: +- added check box to numberlineedits to switch between user input and spreadsheet +- re-enabled MLprediciton +- fixed bug in gui where manual sample couldnt be created when run nubmer was negative. +- Combined beamline view now split vertically not horizontally +0.2.67 +- added run number to sampleshortinfo +- ingest raster result, including beam center to database +- aerotech goes to mount postion for manual mount +- logger config correctly expands file path for logger location. +- smart_rotiation_panel fix - but will be mvoed to DAQ in future update +- Fluoresence scan can be saved to CSV with right click +- Wait for ready before sending Tell to dry 0.2.66 - moved rastergridingestmodel and centreofmassmodel from models to raster_grid.py - after raster load closest image to new centre \ No newline at end of file diff --git a/common/pyproject.toml b/common/pyproject.toml index 89728ee7..b82798c8 100644 --- a/common/pyproject.toml +++ b/common/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "aaredaqlib" -version = "0.2.66" +version = "0.2.67" description = "Libraries shared between AareDAQ and AareGUI" readme = "README.md" requires-python = ">=3.11" diff --git a/common/src/aaredaqlib/models.py b/common/src/aaredaqlib/models.py index 1eb4e2d6..af771831 100644 --- a/common/src/aaredaqlib/models.py +++ b/common/src/aaredaqlib/models.py @@ -382,6 +382,7 @@ class SampleShortInfo(BaseModel): puck_name: str dewar_name: str sample_name: str + run_number: int aaredb_params: Optional[DataCollectionParameters] = None user: str = "" pin: Annotated[int, Field(ge=1, le=16)] diff --git a/daq/pyproject.toml b/daq/pyproject.toml index e50b7822..b28f5564 100644 --- a/daq/pyproject.toml +++ b/daq/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "aaredaq" -version = "0.2.65" +version = "0.2.67" description = "AareDAQ data acquisition server" readme = "README.md" requires-python = ">=3.11" diff --git a/daq/src/aaredaq/auth.py b/daq/src/aaredaq/auth.py index 7690ff63..e293f9ae 100644 --- a/daq/src/aaredaq/auth.py +++ b/daq/src/aaredaq/auth.py @@ -21,7 +21,7 @@ ACCESS_TOKEN_EXPIRE_MINUTES = 24 * 60 * 7 # 1 week SESSION_EXPIRE_SECONDS = 60 * 10 STAFF_GROUP = "unx-MXgroup" - +SUPER_USERS = ["e10019", "e11206", "e18147"] class TokenData(BaseModel): sub: str # Username @@ -42,9 +42,9 @@ def authenticate_user(cfg: BeamlineConfig, form_data: OAuth2PasswordRequestForm) groups = os.getgrouplist(user_info.pw_name, user_info.pw_gid) supplementary_groups = [grp.getgrgid(g).gr_name.lower() for g in groups] - + super_user = form_data.username in SUPER_USERS pgroups = [group for group in supplementary_groups if group.startswith('p')] - staff = "unx-mxgroup" in supplementary_groups or "unx-sls_mx" in supplementary_groups + staff = "unx-mxgroup" in supplementary_groups or "unx-sls_mx" in supplementary_groups or super_user token = TokenData(sub=form_data.username, pgroups=pgroups, staff=staff, diff --git a/daq/src/aaredaq/server.py b/daq/src/aaredaq/server.py index fc73fc8d..f7ec39d8 100644 --- a/daq/src/aaredaq/server.py +++ b/daq/src/aaredaq/server.py @@ -224,6 +224,7 @@ async def sample(token: str = Depends(oauth2_scheme)) -> SampleShortInfo: else: return SampleShortInfo( sample_name="Other user sample", + run_number=0, puck_name="", dewar_name="", db_id=-1, diff --git a/gui/pyproject.toml b/gui/pyproject.toml index 8d68e539..d26e54b0 100644 --- a/gui/pyproject.toml +++ b/gui/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "aaregui" -version = "0.2.66" +version = "0.2.67" description = "Beamline control GUI" readme = "README.md" requires-python = ">=3.11" diff --git a/gui/src/aaregui/main_window.py b/gui/src/aaregui/main_window.py index 71b11b82..8bdaed3c 100644 --- a/gui/src/aaregui/main_window.py +++ b/gui/src/aaregui/main_window.py @@ -110,7 +110,7 @@ class MainWindow(QMainWindow): self.sample_camera = SampleCameraImageLabel(geom=geom, raster=self.raster, parent=top_widget, default_image=default_image) self.beamline_view_container = QWidget(parent=top_widget) - self.beamline_view_layout = QHBoxLayout(self.beamline_view_container) + self.beamline_view_layout = QVBoxLayout(self.beamline_view_container) self.beamline_view_layout.setContentsMargins(0,0,0,0) self.beamline_view_layout.setSpacing(6) diff --git a/gui/src/aaregui/panels/manual_sample_panel.py b/gui/src/aaregui/panels/manual_sample_panel.py index 9693cdf2..5dce6884 100644 --- a/gui/src/aaregui/panels/manual_sample_panel.py +++ b/gui/src/aaregui/panels/manual_sample_panel.py @@ -112,6 +112,7 @@ class ManualSamplePanel(QWidget): puck_name="", dewar_name="", sample_name=self.__sample_name, + run_number=1, #can't be -1. So have defaulted to 1 for now. pin=1, aaredb_params=data_processing, user=self.__pgroup,