MerginMaps / MerginMaps/python-api-client

CLI: Use the new DELETE project endpoint

Open
#195 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
23
Forks
12
Avg merge
2d 13h
Merged PRs (30d)
7

Description

See the description for https://app.clickup.com/t/861nayppe and https://app.clickup.com/t/861nayqwz and mimic the same in the py-client/plugin.

The existing remove CLI function:

  • should use the POST v2/project/{id}/scheduleDelete by default and returns when the project will be deleted
  • should have a new flag -f, --force-delete to remove the project immediately by calling DELETE /project/{id}

Also, add a help text to that CLI function explaining that normal remove will schedule the project for deletion and the force will remove it forever immediately.

In autotests, use the new version (immediate delete) when doing cleanup.

Comments
Martin D: immediate removal of projects added to python API: https://github.com/MerginMaps/mergin-py-client/pull/177
Martin D: For the time being, clients still use the "old" v1 delete endpoint - we should switch to the v2 delete endpoint only after some time when also CE/EE servers are likely to be migrated already...

Migrated from: https://app.clickup.com/t/861nayu2h

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the existing remove CLI function in the py-client/plugin and the autotests that clean up projects. Compare its current deletion request with the v2 scheduleDelete and immediate DELETE endpoints, then verify the help text, force-delete option, returned schedule information, and cleanup behavior through the relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, cli, testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.