mapillary / mapillary/mapillary_tools

Upload history should be qualified as cache data

Open
#568 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discussion
Dominant language
Python
Stars
315
Forks
145
Avg merge
3d 10h
Merged PRs (30d)
2

Description

https://github.com/mapillary/mapillary_tools/blob/2f3331c6194a9d977e2e06541320830feb9ac7ad/mapillary_tools/upload.py#L50-L55
This data is not essential for the app to work. It is neither an app setting, a configuration, nor a preference. It can also be recreated at any time. The upload history is not tied to a specific machine either because uploaded imagery could have been pulled by the local machine from anywhere. Thus, it should not need to roam. The upload history can become huge very quickly for users frequently uploading lots of sequences. No one really wants to roam this stuff around over networks. Furthermore, for how long does this “history” (has to) live?

Please, see the XDG Base Directory Specification for qualifying app data. The same logic applies to basically any other OS. So please, use appdirs.user_cache_dir for upload history data. Yeah, you can override MAPILLARY_UPLOAD_HISTORY_PATH but it should be set to a sane default initially. If a user really wants to keep track of uploaded sequences over multiple machines or wants to keep the upload history indefinitely then they should configure MAPILLARY_UPLOAD_HISTORY_PATH to their desire.

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 in mapillary_tools/upload.py at lines 50-55 and compare the current upload-history default with appdirs.user_cache_dir. The work is done when the default history location uses the user cache directory while MAPILLARY_UPLOAD_HISTORY_PATH remains an override for users who want different retention or sharing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.