From 10d649a6e20fff73c8ab47a907cdce31e71a33a6 Mon Sep 17 00:00:00 2001 From: Anandashankar Anil Date: Tue, 4 Nov 2025 11:03:51 +0100 Subject: [PATCH 1/3] Remove unused module, previously used by taca --- flowcell_parser/db.py | 60 ------------------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 flowcell_parser/db.py diff --git a/flowcell_parser/db.py b/flowcell_parser/db.py deleted file mode 100644 index 2ddb045..0000000 --- a/flowcell_parser/db.py +++ /dev/null @@ -1,60 +0,0 @@ -import couchdb -import logging - -log = logging.getLogger(__name__) - - -def setupServer(conf): - db_conf = conf['statusdb'] - url = "https://{0}:{1}@{2}".format( - db_conf['username'], - db_conf['password'], - db_conf['url']) - return couchdb.Server(url) - - -def update_doc(db, obj, over_write_db_entry=False): - view = db.view('info/name') - # If there is already a flowcell with that name in the DB - if len(view[obj['name']].rows) == 1: - remote_doc = view[obj['name']].rows[0].value - # remove id and rev for comparison - doc_id = remote_doc.pop('_id') - doc_rev = remote_doc.pop('_rev') - if remote_doc != obj: - # if they are different, merge the old into the new - if not over_write_db_entry: - # do not merge if over_write option is specified - obj = merge(obj, remote_doc) - obj['_id'] = doc_id - obj['_rev'] = doc_rev - db[doc_id] = obj - log.info("updating {0}".format(obj['name'])) - elif len(view[obj['name']].rows) == 0: - # it is a new doc, upload it - db.save(obj) - log.info("saving {0}".format(obj['name'])) - else: - log.warn("more than one row with name {0} found".format(obj['name'])) - - -# merges d2 in d1, keeps values from d1 -# taken from scilifelab -def merge(d1, d2): - """ Will merge dictionary d2 into dictionary d1. - On the case of finding the same key, the one in d1 will be used. - :param d1: Dictionary object - :param s2: Dictionary object - """ - for key in d2: - if key in d1: - if isinstance(d1[key], dict) and isinstance(d2[key], dict): - merge(d1[key], d2[key]) - elif d1[key] == d2[key]: - pass # same leaf value - else: - log.debug("Values for key {key} in d1 and d2 differ,", - "using d1's value".format(key=key)) - else: - d1[key] = d2[key] - return d1 From 1b98015babb62ced2e0441f11189235f4655b92d Mon Sep 17 00:00:00 2001 From: Anandashankar Anil Date: Tue, 4 Nov 2025 11:04:43 +0100 Subject: [PATCH 2/3] Harmonise action var name --- .github/workflows/check_pr_label.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check_pr_label.yml b/.github/workflows/check_pr_label.yml index cac9312..4a437c9 100644 --- a/.github/workflows/check_pr_label.yml +++ b/.github/workflows/check_pr_label.yml @@ -4,7 +4,7 @@ on: types: [opened, synchronize, labeled, unlabeled] jobs: - check-pr_label: + check_pr_label: runs-on: ubuntu-latest steps: - name: Checkout PR @@ -13,7 +13,7 @@ jobs: fetch-depth: 0 # Fetch all history for all branches and tags - name: Check if the PR contains the label validation or no validation - id: prlabel_check + id: check_pr_label if: | ! contains( github.event.pull_request.labels.*.name, 'validation') && ! contains( github.event.pull_request.labels.*.name, 'no validation') run: | From 739e5c5cc28d589fe52c9ac938a1ce0fa973aa72 Mon Sep 17 00:00:00 2001 From: Anandashankar Anil Date: Tue, 4 Nov 2025 14:47:30 +0100 Subject: [PATCH 3/3] Update versions, requirements --- VERSIONLOG.md | 3 +++ flowcell_parser/__init__.py | 2 +- requirements.txt | 1 - 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/VERSIONLOG.md b/VERSIONLOG.md index da266bd..3f82273 100644 --- a/VERSIONLOG.md +++ b/VERSIONLOG.md @@ -1,5 +1,8 @@ # Flowcell Parser Version Log +## 20251104.1 +Remove unused db module + ## 20230524.1 Add support for NovaSeqXPlus and improve readability diff --git a/flowcell_parser/__init__.py b/flowcell_parser/__init__.py index 63bd9af..794273f 100644 --- a/flowcell_parser/__init__.py +++ b/flowcell_parser/__init__.py @@ -1,3 +1,3 @@ """ Main flowcell_parser module """ -__version__ = '1.0.4' +__version__ = '1.0.5' diff --git a/requirements.txt b/requirements.txt index ad2b4cb..c473874 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,2 @@ beautifulsoup4 -couchdb pyyaml