From 8d0349a25f5d1b148a2fc0ac68a4408e993605e2 Mon Sep 17 00:00:00 2001 From: Herman Snevajs Date: Thu, 11 Sep 2025 15:26:10 +0200 Subject: [PATCH 1/3] Add pathvalidate lib to requirements --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 371014e9..540f4e16 100644 --- a/setup.py +++ b/setup.py @@ -21,6 +21,7 @@ 'pygeodiff==2.0.4', 'pytz==2022.1', 'click==8.1.3', + 'pathvalidate==3.3.1', ], entry_points={ From 97dba51712efb267c04f1aab904fa6f2c8827add Mon Sep 17 00:00:00 2001 From: Herman Snevajs Date: Thu, 11 Sep 2025 15:29:50 +0200 Subject: [PATCH 2/3] black --- mergin/client_push.py | 2 +- scripts/update_version.py | 6 ++--- setup.py | 46 ++++++++++++++++++--------------------- 3 files changed, 25 insertions(+), 29 deletions(-) diff --git a/mergin/client_push.py b/mergin/client_push.py index 90fbd19a..ad71d80d 100644 --- a/mergin/client_push.py +++ b/mergin/client_push.py @@ -275,7 +275,7 @@ def push_project_finalize(job): f"Upload details: {len(job.upload_queue_items)} file chunks, total size {job.total_size} bytes." ) # server returns various error messages with filename or something generic - # it would be better if it returned list of failed files (and reasons) whenever possible + # it would be better if it returned list of failed files (and reasons) whenever possible job.mp.log.error("--- push finish failed! " + str(err)) # if push finish fails, the transaction is not killed, so we diff --git a/scripts/update_version.py b/scripts/update_version.py index 184d6a8a..20206593 100644 --- a/scripts/update_version.py +++ b/scripts/update_version.py @@ -4,7 +4,7 @@ def replace_in_file(filepath, regex, sub): - with open(filepath, 'r') as f: + with open(filepath, "r") as f: content = f.read() content_new = re.sub(regex, sub, content, flags=re.M) @@ -15,14 +15,14 @@ def replace_in_file(filepath, regex, sub): dir_path = os.path.dirname(os.path.realpath(__file__)) parser = argparse.ArgumentParser() -parser.add_argument('--version', help='version to replace') +parser.add_argument("--version", help="version to replace") args = parser.parse_args() ver = args.version print("using version " + ver) about_file = os.path.join(dir_path, os.pardir, "mergin", "version.py") print("patching " + about_file) -replace_in_file(about_file, "__version__\s=\s\".*", "__version__ = \"" + ver + "\"") +replace_in_file(about_file, '__version__\s=\s".*', '__version__ = "' + ver + '"') setup_file = os.path.join(dir_path, os.pardir, "setup.py") print("patching " + setup_file) diff --git a/setup.py b/setup.py index 540f4e16..3fb74b45 100644 --- a/setup.py +++ b/setup.py @@ -4,36 +4,32 @@ from setuptools import setup, find_packages setup( - name='mergin-client', - version='0.10.5', - url='https://github.com/MerginMaps/python-api-client', - license='MIT', - author='Lutra Consulting Ltd.', - author_email='info@merginmaps.com', - description='Mergin Maps utils and client', - long_description='Mergin Maps utils and client', - + name="mergin-client", + version="0.10.5", + url="https://github.com/MerginMaps/python-api-client", + license="MIT", + author="Lutra Consulting Ltd.", + author_email="info@merginmaps.com", + description="Mergin Maps utils and client", + long_description="Mergin Maps utils and client", packages=find_packages(), - - platforms='any', + platforms="any", install_requires=[ - 'python-dateutil==2.8.2', - 'pygeodiff==2.0.4', - 'pytz==2022.1', - 'click==8.1.3', - 'pathvalidate==3.3.1', + "python-dateutil==2.8.2", + "pygeodiff==2.0.4", + "pytz==2022.1", + "click==8.1.3", + "pathvalidate==3.3.1", ], - entry_points={ - 'console_scripts': ['mergin=mergin.cli:cli'], + "console_scripts": ["mergin=mergin.cli:cli"], }, - classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: MIT License', - 'Operating System :: OS Independent', - 'Programming Language :: Python :: 3' + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3", ], - package_data={'mergin': ['cert.pem']} + package_data={"mergin": ["cert.pem"]}, ) From 59d3ccc6214fcc7f3d0a194c3a75ef99ceb27489 Mon Sep 17 00:00:00 2001 From: Herman Snevajs Date: Thu, 11 Sep 2025 21:52:21 +0200 Subject: [PATCH 3/3] Revert "black" This reverts commit 97dba51712efb267c04f1aab904fa6f2c8827add. --- mergin/client_push.py | 2 +- scripts/update_version.py | 6 ++--- setup.py | 46 +++++++++++++++++++++------------------ 3 files changed, 29 insertions(+), 25 deletions(-) diff --git a/mergin/client_push.py b/mergin/client_push.py index ad71d80d..90fbd19a 100644 --- a/mergin/client_push.py +++ b/mergin/client_push.py @@ -275,7 +275,7 @@ def push_project_finalize(job): f"Upload details: {len(job.upload_queue_items)} file chunks, total size {job.total_size} bytes." ) # server returns various error messages with filename or something generic - # it would be better if it returned list of failed files (and reasons) whenever possible + # it would be better if it returned list of failed files (and reasons) whenever possible job.mp.log.error("--- push finish failed! " + str(err)) # if push finish fails, the transaction is not killed, so we diff --git a/scripts/update_version.py b/scripts/update_version.py index 20206593..184d6a8a 100644 --- a/scripts/update_version.py +++ b/scripts/update_version.py @@ -4,7 +4,7 @@ def replace_in_file(filepath, regex, sub): - with open(filepath, "r") as f: + with open(filepath, 'r') as f: content = f.read() content_new = re.sub(regex, sub, content, flags=re.M) @@ -15,14 +15,14 @@ def replace_in_file(filepath, regex, sub): dir_path = os.path.dirname(os.path.realpath(__file__)) parser = argparse.ArgumentParser() -parser.add_argument("--version", help="version to replace") +parser.add_argument('--version', help='version to replace') args = parser.parse_args() ver = args.version print("using version " + ver) about_file = os.path.join(dir_path, os.pardir, "mergin", "version.py") print("patching " + about_file) -replace_in_file(about_file, '__version__\s=\s".*', '__version__ = "' + ver + '"') +replace_in_file(about_file, "__version__\s=\s\".*", "__version__ = \"" + ver + "\"") setup_file = os.path.join(dir_path, os.pardir, "setup.py") print("patching " + setup_file) diff --git a/setup.py b/setup.py index 3fb74b45..540f4e16 100644 --- a/setup.py +++ b/setup.py @@ -4,32 +4,36 @@ from setuptools import setup, find_packages setup( - name="mergin-client", - version="0.10.5", - url="https://github.com/MerginMaps/python-api-client", - license="MIT", - author="Lutra Consulting Ltd.", - author_email="info@merginmaps.com", - description="Mergin Maps utils and client", - long_description="Mergin Maps utils and client", + name='mergin-client', + version='0.10.5', + url='https://github.com/MerginMaps/python-api-client', + license='MIT', + author='Lutra Consulting Ltd.', + author_email='info@merginmaps.com', + description='Mergin Maps utils and client', + long_description='Mergin Maps utils and client', + packages=find_packages(), - platforms="any", + + platforms='any', install_requires=[ - "python-dateutil==2.8.2", - "pygeodiff==2.0.4", - "pytz==2022.1", - "click==8.1.3", - "pathvalidate==3.3.1", + 'python-dateutil==2.8.2', + 'pygeodiff==2.0.4', + 'pytz==2022.1', + 'click==8.1.3', + 'pathvalidate==3.3.1', ], + entry_points={ - "console_scripts": ["mergin=mergin.cli:cli"], + 'console_scripts': ['mergin=mergin.cli:cli'], }, + classifiers=[ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", - "Programming Language :: Python :: 3", + 'Development Status :: 5 - Production/Stable', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: MIT License', + 'Operating System :: OS Independent', + 'Programming Language :: Python :: 3' ], - package_data={"mergin": ["cert.pem"]}, + package_data={'mergin': ['cert.pem']} )