From 13957160f842a3fedd808b24398e05cc2802efec Mon Sep 17 00:00:00 2001 From: Chris Kerr Date: Sat, 20 Jan 2024 23:36:51 +0200 Subject: [PATCH 1/2] Update regular expression for mdbtools 1.0 output The output formatting has changed - it now puts multiple data rows in a single INSERT statement, and also changes the quoting of text data. --- galvani/res2sqlite.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/galvani/res2sqlite.py b/galvani/res2sqlite.py index 2329473..591b945 100755 --- a/galvani/res2sqlite.py +++ b/galvani/res2sqlite.py @@ -439,7 +439,8 @@ def mdb_get_data_text(s3db, filename, table): print("Reading %s..." % table) insert_pattern = re.compile( - r'INSERT INTO "\w+" \([^)]+?\) VALUES \(("[^"]*"|[^")])+?\);\n', re.IGNORECASE + r"""INSERT INTO "\w+" \([^)]+?\) VALUES (\((('[^']*')|"[^"]*"|[^')])+?\),?\s*)+;\n""", + re.IGNORECASE, ) try: # Initialize values to avoid NameError in except clause From dbd01957db923b4d1824a4bf1b8a4f9f9d277b1c Mon Sep 17 00:00:00 2001 From: Chris Kerr Date: Sat, 20 Jan 2024 23:41:43 +0200 Subject: [PATCH 2/2] Use newer Ubuntu image for CI tests We no longer need to use an old Ubuntu image with old mdbtools version. --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4fc4e25..f9e6afe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,8 +17,7 @@ jobs: pytest: name: Run Python unit tests - # Note that 20.04 is currently required until galvani supports mdbtools>=1.0. - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false