From 9811b0573e71049da52a8590c6c3aeaef0fd63f2 Mon Sep 17 00:00:00 2001 From: Lingxin Meng Date: Wed, 18 Jun 2025 10:16:36 +0100 Subject: [PATCH 1/4] correct how app.py is run --- docs/install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/install.md b/docs/install.md index 10dd9277c..0b9248af7 100644 --- a/docs/install.md +++ b/docs/install.md @@ -695,7 +695,7 @@ Let's run it: ```bash cd localdb-tools/viewer -./app.py --config admin_conf.yml +python app.py --config admin_conf.yml ``` At this point, the app is simply executed as a user's process, and the app can -- GitLab From aba65fd7d625457545b473fe008d043b2d39777e Mon Sep 17 00:00:00 2001 From: Lingxin Meng Date: Wed, 18 Jun 2025 12:12:52 +0100 Subject: [PATCH 2/4] update python instructions --- docs/install.md | 59 ++++++++++++++++++------------------------------- 1 file changed, 22 insertions(+), 37 deletions(-) diff --git a/docs/install.md b/docs/install.md index 0b9248af7..1a4e6cccf 100644 --- a/docs/install.md +++ b/docs/install.md @@ -1,14 +1,10 @@ # Installation Guide -!!! info - - Everyone is requested to update the version to v2.6.1-rc2 or later - ## Updating from v2.x.y - You can use `git fetch --all --tags; git checkout tags/v2.6.1-rc2` - Please make sure to run - `python3 -m pip install (--user) -r setting/requirements-pip.txt` to include + `python -m pip install (--user) -r setting/requirements-pip.txt` to include updating of dependency python libraries - For `itkdb`, we now use `itkdb[eos]>=0.6.14` which requires `pycurl` installation. Unfortunately for some operation systems installation of @@ -345,39 +341,28 @@ sudo yum -y install git --enablerepo=ius --disablerepo=base,epel,extras,updates !!! check Check `git --version` returns `git version 2.36.1` -### Install Python 3.7 (required for `module-qc-nonelec-gui`) - -Next, let's install `python 3.7`. The python3 version distributed by `yum/dnf` -by default is `3.6.8` for both CentOS7 and CentOS Stream 8. Strictly speaking, -`python3.7` is not absolutely needed for the LocalDB system, but the -non-electrical tests GUI tool (`module-qc-nonelec-gui`) needs to base on -`python3.7` or higher. If you do not use `module-qc-nonelec-gui` on this host of -the LocalDB service, this step can be skipped. +### Install python -First, install the following package via `yum`: +The python version distributed by `yum/dnf` by default is `3.6.8` for both +CentOS7 and CentOS Stream 8. However, these native python versions are not +supported anymore. For supported python versions please check +https://devguide.python.org/versions -```bash -sudo yum install -y zlib-devel libffi-devel bzip2-devel openssl-devel \ -ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel \ -libuuid-devel xz-devel -``` +Currently, the supported python versions are 3.9 through 3.13. -Then let's download and compile `python3.7` package (here uses `3.7.3`). +If you use a virtual python environment, we recommend something that can install +a python version that's independent from your OS's native python version like +the following: -```bash -cd ~/Downloads -curl -O https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz -tar xf Python-3.7.3.tgz; cd Python-3.7.3/ -./configure --enable-optimization -make -j -sudo make install -``` +- miniconda: https://www.anaconda.com/docs/getting-started/miniconda/install +- Pixi: https://pixi.sh -!!! check Check `python3 --version` returns `Python 3.7.3` +If you have to update your OS's native python version, please follow +instructions here: -!!! note You might also want to upgrade thee `pip` version via -`pip3.7 install --upgrade pip`. This could be requested by python modules to be -installed. +- for Alma9: + https://cloudspinx.com/how-to-install-python-3-13-on-rocky-linux-almalinux/ +- for CentOS7: https://gist.github.com/gavxin/a21128ba0fba006db285c962da941898 ### g++ devtoolset-7 (CentOS7 only) @@ -539,7 +524,7 @@ y [2022-07-12 14:28:20] ## 2. Setup Viewer Application [2022-07-12 14:28:20] $ cd /home/itkqc/localdb-tools/viewer [2022-07-12 14:28:20] $ ./setup_viewer.sh -[2022-07-12 14:28:20] $ python3 app.py --config admin_conf.yml +[2022-07-12 14:28:20] $ python app.py --config admin_conf.yml [2022-07-12 14:28:20] [2022-07-12 14:28:20] ## 3. Access Viewer Application [2022-07-12 14:28:20] - From the DB machine: http://localhost:5000/localdb/ @@ -668,7 +653,7 @@ Submodule path 'plotting-tool': checked out 'deb5f1e4ebbc72c176fe749521fe5c25495 [LDB] Finished setting up of Viewer Application!! [LDB] [LDB] Start Viewer Webapp locally by ... -[LDB] python3 /home/itkqc/localdb-tools/viewer/app.py --config /home/itkqc/localdb-tools/viewer/admin_conf.yml +[LDB] python /home/itkqc/localdb-tools/viewer/app.py --config /home/itkqc/localdb-tools/viewer/admin_conf.yml [LDB] [LDB] Start Viewer Webapp as a service: [LDB] sudo systemctl enable localdb.viewer @@ -779,7 +764,7 @@ cd module-qc-nonelec-gui And run the following installation command ```bash -python3 -m pip install --user -e . +python -m pip install --user -e . ``` ```text @@ -859,14 +844,14 @@ cd localdb [LDB ERROR] - pandas [LDB ERROR] [LDB ERROR] Install them by: -[LDB ERROR] python3 -m pip install --user -r /home/itkqc/YARR/localdb/setting/requirements-pip.txt +[LDB ERROR] python -m pip install --user -r /home/itkqc/YARR/localdb/setting/requirements-pip.txt ``` Uh oh, it assumes to have `pandas` python module to be installed. Let's install it: ```bash -python3 -m pip install --user -r /home/itkqc/YARR/localdb/setting/requirements-pip.txt +python -m pip install --user -r /home/itkqc/YARR/localdb/setting/requirements-pip.txt ``` Then let's retry `setup_db.sh`: -- GitLab From 414444cc96f71ee294739109d5e7bb3aeaa915cf Mon Sep 17 00:00:00 2001 From: Lingxin Meng Date: Wed, 18 Jun 2025 12:32:09 +0100 Subject: [PATCH 3/4] add Alma9, group OS related info, format info boxes --- docs/install.md | 142 ++++++++++++++++++++++++++---------------------- 1 file changed, 76 insertions(+), 66 deletions(-) diff --git a/docs/install.md b/docs/install.md index 1a4e6cccf..f19058497 100644 --- a/docs/install.md +++ b/docs/install.md @@ -16,11 +16,10 @@ well as `module-qc-analysis-tools` and when the environment uses old versions the service won't run. -!!! info - - If you have been using the LocalDB for RD53A modules previously, and - you wish to use the same `mongoDB` server, it could be cleaner to first reserve - old databases for RD53A, and then create fresh databases for ITkPixV1.x modules. + !!! info If you have been using the LocalDB for RD53A modules previously, and + you wish to use the same `mongoDB` server, it could be cleaner to first + reserve old databases for RD53A, and then create fresh databases for ITkPix + v1.1 and v2 modules. ### Moving old databases @@ -38,7 +37,7 @@ archiving purpose, riding on the above moved databases. ## Docker installation -The following examples are using `v2.2.2` of the `localdb` viewer. +The following examples are using `v2.6.1-rc2` of the `localdb` viewer. === "Docker" @@ -64,12 +63,12 @@ The following examples are using `v2.2.2` of the `localdb` viewer. This will run the `mongodb` in the background as a daemon accessible under `localhost:27017` and identifiable by the name `mongodb` (try running `docker ps` to see it) and this alias can be used like a DNS on the bridge network we created. - Then we just need to run `localdb` similarly and give it the right configuration for connecting to `mongodb` (please change `v2-2-27` to the tag you want): + Then we just need to run `localdb` similarly and give it the right configuration for connecting to `mongodb` (please change `v2.6.1-rc2` to the tag you want): ```bash docker run -d --rm -p 8080:5000 \ --name localdb --net web \ - gitlab-registry.cern.ch/yarr/localdb-tools/viewer:v2-2-27 \ + gitlab-registry.cern.ch/yarr/localdb-tools/viewer:v2.6.1-rc2 \ --host=mongodb \ --port=27017 \ --db=localdb \ @@ -142,7 +141,7 @@ The following examples are using `v2.2.2` of the `localdb` viewer. localdb: restart: unless-stopped - image: gitlab-registry.cern.ch/yarr/localdb-tools/viewer:v2-2-2 + image: gitlab-registry.cern.ch/yarr/localdb-tools/viewer:v2.6.1-rc2 container_name: "localdb" depends_on: - mongodb @@ -234,7 +233,7 @@ The following examples are using `v2.2.2` of the `localdb` viewer. localdb: restart: unless-stopped - image: gitlab-registry.cern.ch/yarr/localdb-tools/viewer:v2-2-2 + image: gitlab-registry.cern.ch/yarr/localdb-tools/viewer:v2.6.1-rc2 container_name: "localdb" depends_on: - mongodb @@ -297,7 +296,8 @@ docker exec -it mongodb bash ## Standalone installation -This installation guide supports `CentOS7` and `CentOS Stream 8` Linux OS. +This installation guide supports `CentOS7`, `CentOS Stream 8` and `Alma 9` Linux +OS. For `CentOS7`, we assume "Development and Creative Workstation" Base Environment, with the following Add-Ons checkboxes selected: @@ -325,22 +325,6 @@ following Add-Ons checkboxes selected: Here we assume all commands are executed by a user who can do `sudo`. -### Install more modern git (optional, CentOS7 only) - -The default git version installed on CentOS7 is `1.8`, which is a bit old-ish. -Let's update the git package first for more comfortable usage. This step is not -absolutely required. For CentOS Stream 8 the default deployed git is modern and -this step is not needed. - -```bash -sudo yum -y remove git -sudo yum -y install https://repo.ius.io/ius-release-el7.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -sudo yum install libsecret pcre2 -sudo yum -y install git --enablerepo=ius --disablerepo=base,epel,extras,updates -``` - -!!! check Check `git --version` returns `git version 2.36.1` - ### Install python The python version distributed by `yum/dnf` by default is `3.6.8` for both @@ -364,7 +348,38 @@ instructions here: https://cloudspinx.com/how-to-install-python-3-13-on-rocky-linux-almalinux/ - for CentOS7: https://gist.github.com/gavxin/a21128ba0fba006db285c962da941898 -### g++ devtoolset-7 (CentOS7 only) +### CMake3 + +`CMake3` is required to be installed before the following installation. + +```bash +sudo yum install -y epel-release +sudo yum install -y cmake3 +``` + + !!! check + Check `cmake3 --version` returns `cmake3 version 3.17.5` + +### For CentOS7 only + +#### Install more modern git + +The default git version installed on CentOS7 is `1.8`, which is a bit old-ish. +Let's update the git package first for more comfortable usage. This step is not +absolutely required. For CentOS Stream 8 the default deployed git is modern and +this step is not needed. + +```bash +sudo yum -y remove git +sudo yum -y install https://repo.ius.io/ius-release-el7.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm +sudo yum install libsecret pcre2 +sudo yum -y install git --enablerepo=ius --disablerepo=base,epel,extras,updates +``` + + !!! check + Check `git --version` returns `git version 2.36.1` + +#### g++ devtoolset-7 The `analysis-tools` package run on the background of the LocalDB viewer requires a modern `g++` compiler with `-std=c++17`. For CentOS7 the @@ -378,29 +393,20 @@ source /opt/rh/devtoolset-7/enable source /opt/rh/devtoolset-7/enable >> ~/.bashrc ``` -!!! check Check `g++ --version` returns + !!! check + Check `g++ --version` returns - ```text - g++ (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5) - Copyright (C) 2017 Free Software Foundation, Inc. - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - ``` - -!!! note For the latest `devel` version of `YARR`, more modern `g++ 9` is -required. In order to install it, you can use -`bash sudo yum install -y devtoolset-9 ` instead. - -### CMake3 + ```text + g++ (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5) + Copyright (C) 2017 Free Software Foundation, Inc. + This is free software; see the source for copying conditions. There is NO + warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + ``` -`CMake3` is required to be installed before the following installation. - -```bash -sudo yum install -y epel-release -sudo yum install -y cmake3 -``` - -!!! check Check `cmake3 --version` returns `cmake3 version 3.17.5` + !!! note + For the latest `devel` version of `YARR`, more modern `g++ 9` is + required. In order to install it, you can use + `bash sudo yum install -y devtoolset-9 ` instead. ## Localdb-tools setup @@ -538,12 +544,13 @@ y Once the last messages from `# Quick tutorial` is shown, the installation should be successfully completed. -!!! note For other Linux distributions than `CentOS7`, it could be the case that -some `yum` packages are not possible to install. This may include -`centos-release-scl.noarch`, `devtoolset-7.x86_64` or `cmake3.x86_64` for -instance. If you observe them, please comment-out those packages by putting `#` -at the first character of the line or completely delete these lines from -`setting/requirements-yum.txt` and rerun `setting/db_server_install.shh`. + !!! note + For other Linux distributions than `CentOS7`, it could be the case that + some `yum` packages are not possible to install. This may include + `centos-release-scl.noarch`, `devtoolset-7.x86_64` or `cmake3.x86_64` for + instance. If you observe them, please comment-out those packages by putting `#` + at the first character of the line or completely delete these lines from + `setting/requirements-yum.txt` and rerun `setting/db_server_install.shh`. ### Create admin account on MongoDB @@ -787,17 +794,19 @@ Installing collected packages: pyasn1, msgpack, lockfile, urllib3, simple-settin Successfully installed attrs-22.2.0 cachecontrol-0.12.11 certifi-2022.12.7 charset-normalizer-3.1.0 click-8.1.3 ecdsa-0.18.0 idna-3.4 itkdb-0.4.0 jsonschema-4.17.3 lockfile-0.12.2 module-qc-nonelec-gui-0.0.2.dev4 msgpack-1.0.5 opencv-python-headless-3.4.18.65 pyasn1-0.4.8 pylibmagic-0.2.2 pymongo-3.13.0 pyrsistent-0.19.3 python-dotenv-1.0.0 python-jose-3.3.0 python-magic-0.4.27 requests-2.28.2 rsa-4.9 simple-settings-1.2.0 typer-0.7.0 urllib3-1.26.15 ``` -!!! Note For macOS, it will be required to install `pyqt` via Homebrew: -` brew install pyqt5 ` + !!! note + For macOS, it will be required to install `pyqt` via Homebrew: + `brew install pyqt5 ` -!!! Note You will need to configure the `LocalDB` host in the configuration file -`src/module_qc_nonelec_gui/configuration/configuration.json`, especially when -you run QCHeler on a different host than the `LocalDB` host. + !!! note + You will need to configure the `LocalDB` host in the configuration file + `src/module_qc_nonelec_gui/configuration/configuration.json`, especially when + you run QCHeler on a different host than the `LocalDB` host. - ``` - "mongoDB": { "address": "127.0.0.1", "port": "27017" }, - "localDB_web": { "address": "127.0.0.1", "port": "5010" }, - ``` + ``` + "mongoDB": { "address": "127.0.0.1", "port": "27017" }, + "localDB_web": { "address": "127.0.0.1", "port": "5010" }, + ``` That's it! Now you will be able to launch `module-qc-nonelec-gui` @@ -919,8 +928,9 @@ libGL error: failed to load driver: swrast The script asks if the site name is correct. Edit it if it is correct. -!!! Note Specify the institution name as it is registered in the ITk Production -Database + !!! note + Specify the institution name as it is registered in the ITk Production + Database ```stdout [LDB] Are you sure that is correct? (Move to edit mode when answer 'n') [y/n/exit] -- GitLab From 924bce183d47d2b464b96149695360506a11dcfb Mon Sep 17 00:00:00 2001 From: Lingxin Meng Date: Wed, 18 Jun 2025 12:37:11 +0100 Subject: [PATCH 4/4] versions --- mkdocs.yml | 2 +- tbump.toml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/mkdocs.yml b/mkdocs.yml index fdb641b4c..90d92736b 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: Local DB Docs (Version 2.2) +site_name: Local DB Docs (Version 2.6.1-rc2) docs_dir: docs site_dir: site diff --git a/tbump.toml b/tbump.toml index d9f2e682a..62645a765 100644 --- a/tbump.toml +++ b/tbump.toml @@ -46,11 +46,16 @@ search = "qcAnalysisVersion = \"{current_version}\"" [[file]] src = "docs/install.md" + +[[file]] +src = "mkdocs.yml" + [[file]] src = ".zenodo.json" [[file]] src = "CITATION.cff" + [[field]] # the name of the field name = "candidate" -- GitLab