Skip to content

Commit 6d78409

Browse files
committed
Merge branch 'master' into project-history
2 parents 40963e8 + d734ee4 commit 6d78409

9 files changed

Lines changed: 21 additions & 13 deletions

File tree

.github/workflows/python_packages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Build sdist
2222
run: python setup.py sdist
2323

24-
- uses: actions/upload-artifact@v2
24+
- uses: actions/upload-artifact@v4
2525
with:
2626
path: dist/*.tar.gz
2727

@@ -30,7 +30,7 @@ jobs:
3030
runs-on: ubuntu-latest
3131
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
3232
steps:
33-
- uses: actions/download-artifact@v2
33+
- uses: actions/download-artifact@v4.1.7
3434
with:
3535
name: artifact
3636
path: dist

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## 0.9.3
4+
5+
- Added ```list-files``` CLI command for list of project files (#199 by @kaloyan13)
6+
- Upgrade pygeodiff to 2.0.4 (#217)
7+
- Do not use paginated endpoint for project version detail (#216)
8+
- Improve client error handling (#209)
9+
310
## 0.9.2
411

512
- Update rules when pushing with editor permission level (#208)

mergin/cli.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def _print_unhandled_exception():
143143

144144

145145
@click.group(
146-
epilog=f"Copyright (C) 2019-{date.today().year} Lutra Consulting\n\n(mergin-py-client v{__version__} / pygeodiff v{GeoDiff().version()})"
146+
epilog=f"Copyright (C) 2019-{date.today().year} Lutra Consulting\n\n(python-api-client v{__version__} / pygeodiff v{GeoDiff().version()})"
147147
)
148148
@click.option(
149149
"--url",
@@ -661,6 +661,7 @@ def reset(ctx):
661661
except Exception as e:
662662
_print_unhandled_exception()
663663

664+
664665
@cli.command()
665666
@click.argument("project")
666667
@click.option("--json", is_flag=True, default=False, help="Output in JSON format")
@@ -680,7 +681,7 @@ def list_files(ctx, project, json):
680681
else:
681682
click.echo("Fetched {} files .".format(len(project_files)))
682683
for file in project_files:
683-
click.echo(" {:40}\t{:6.1f} MB".format(file['path'], file["size"] / (1024 * 1024)))
684+
click.echo(" {:40}\t{:6.1f} MB".format(file["path"], file["size"] / (1024 * 1024)))
684685

685686

686687
if __name__ == "__main__":

mergin/client_pull.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ def download_files_async(
788788
mp.log.info(f"Got project info. version {project_info['version']}")
789789

790790
# set temporary directory for download
791-
temp_dir = tempfile.mkdtemp(prefix="mergin-py-client-")
791+
temp_dir = tempfile.mkdtemp(prefix="python-api-client-")
792792

793793
if output_paths is None:
794794
output_paths = []

mergin/client_push.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def push_project_async(mc, directory):
124124
changes = filter_changes(mc, project_info, changes)
125125
mp.log.debug("push changes:\n" + pprint.pformat(changes))
126126

127-
tmp_dir = tempfile.TemporaryDirectory(prefix="mergin-py-client-")
127+
tmp_dir = tempfile.TemporaryDirectory(prefix="python-api-client-")
128128

129129
# If there are any versioned files (aka .gpkg) that are not updated through a diff,
130130
# we need to make a temporary copy somewhere to be sure that we are uploading full content.

mergin/merginproject.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def project_id(self) -> str:
162162
163163
Raises ClientError if project id is not present in the project metadata. This should
164164
only happen with projects downloaded with old client, before February 2023,
165-
see https://github.com/MerginMaps/mergin-py-client/pull/154
165+
see https://github.com/MerginMaps/python-api-client/pull/154
166166
"""
167167
self._read_metadata()
168168

@@ -810,7 +810,7 @@ def resolve_unfinished_pull(self, user_name):
810810

811811
self.log.info("resolving unfinished pull")
812812

813-
temp_dir = tempfile.mkdtemp(prefix="mergin-py-client-")
813+
temp_dir = tempfile.mkdtemp(prefix="python-api-client-")
814814

815815
for root, dirs, files in os.walk(self.unfinished_pull_dir):
816816
for file_name in files:

mergin/test/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ def test_available_storage_validation(mcStorage):
803803
def test_available_storage_validation2(mc, mc2):
804804
"""
805805
Testing of storage limit - should not be applied for user pushing changes into project with different namespace.
806-
This should cover the exception of mergin-py-client that a user can push changes to someone else's project regardless
806+
This should cover the exception of python-api-client that a user can push changes to someone else's project regardless
807807
the user's own storage limitation. Of course, other limitations are still applied (write access, owner of
808808
a modified project has to have enough free storage).
809809

mergin/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# The version is also stored in ../setup.py
2-
__version__ = "0.9.2"
2+
__version__ = "0.9.3"
33

44
# There seems to be no single nice way to keep version info just in one place:
55
# https://packaging.python.org/guides/single-sourcing-package-version/

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
setup(
77
name='mergin-client',
8-
version='0.9.2',
9-
url='https://github.com/MerginMaps/mergin-py-client',
8+
version='0.9.3',
9+
url='https://github.com/MerginMaps/python-api-client',
1010
license='MIT',
1111
author='Lutra Consulting Ltd.',
1212
author_email='info@merginmaps.com',
@@ -18,7 +18,7 @@
1818
platforms='any',
1919
install_requires=[
2020
'python-dateutil==2.8.2',
21-
'pygeodiff==2.0.2',
21+
'pygeodiff==2.0.4',
2222
'pytz==2022.1',
2323
'click==8.1.3',
2424
],

0 commit comments

Comments
 (0)