Skip to content

Cleanup references to previous repository name of python-api-client #217

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions mergin/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def _print_unhandled_exception():


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


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


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion mergin/client_pull.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ def download_files_async(
mp.log.info(f"Got project info. version {project_info['version']}")

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

if output_paths is None:
output_paths = []
Expand Down
2 changes: 1 addition & 1 deletion mergin/client_push.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def push_project_async(mc, directory):
changes = filter_changes(mc, project_info, changes)
mp.log.debug("push changes:\n" + pprint.pformat(changes))

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

# If there are any versioned files (aka .gpkg) that are not updated through a diff,
# we need to make a temporary copy somewhere to be sure that we are uploading full content.
Expand Down
4 changes: 2 additions & 2 deletions mergin/merginproject.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def project_id(self) -> str:

Raises ClientError if project id is not present in the project metadata. This should
only happen with projects downloaded with old client, before February 2023,
see https://github.com/MerginMaps/mergin-py-client/pull/154
see https://github.com/MerginMaps/python-api-client/pull/154
"""
self._read_metadata()

Expand Down Expand Up @@ -810,7 +810,7 @@ def resolve_unfinished_pull(self, user_name):

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

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

for root, dirs, files in os.walk(self.unfinished_pull_dir):
for file_name in files:
Expand Down
2 changes: 1 addition & 1 deletion mergin/test/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ def test_available_storage_validation(mcStorage):
def test_available_storage_validation2(mc, mc2):
"""
Testing of storage limit - should not be applied for user pushing changes into project with different namespace.
This should cover the exception of mergin-py-client that a user can push changes to someone else's project regardless
This should cover the exception of python-api-client that a user can push changes to someone else's project regardless
the user's own storage limitation. Of course, other limitations are still applied (write access, owner of
a modified project has to have enough free storage).

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
setup(
name='mergin-client',
version='0.9.2',
url='https://github.com/MerginMaps/mergin-py-client',
url='https://github.com/MerginMaps/python-api-client',
license='MIT',
author='Lutra Consulting Ltd.',
author_email='info@merginmaps.com',
Expand Down
Loading