rename user_id file
See original GitHub issueTelemetry/analytics are anonymised and can be disabled.
However for unification across Iterative’s stack (MLEM, TPI, CML etc.) it’s a good idea to put the config in one place. Basically move the existing $CONFDIR/dvc/user_id
to $CONFDIR/iterative/telemetry
. More explicitly:
import json
from shutil import copy
from pathlib import Path
from appdirs import user_config_dir
# DVC backwards-compatibility
old = Path(user_config_dir("dvc/user_id", "iterative"))
# cross-product path
new = Path(user_config_dir("iterative/telemetry", False))
uid = generate_id() # see above
if uid.lower() == "do-not-track":
return
if new.exists():
uid = new.read_text().strip()
else:
if old.exits():
uid = json.load(old.open())["user_id"]
new.write_text(uid)
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:17 (9 by maintainers)
Top Results From Across the Web
How to rename the User folder in Windows 10?
Go to the C:\users\ folder and rename the subfolder with the original user name to the new user name. · Go to the...
Read more >How to change User File name of the User Account in ...
1. Open File Explorer and then open User profile folder. · 2. Click on the user folder, then tap on F2 Key. ·...
Read more >How to Change the User Folder Name in Windows 10 - Lifewire
Change Windows 10 User Folder Name In Registry · Open the Command Prompt in administrator mode. · Type wmic useraccount list full and...
Read more >How to: Rename User Profile Folder in Windows 10/8/7
Step 1. Enable the Hidden Administrator Account · Step 2. Change the User Profile folder path in Registry. · Step 3. Rename User...
Read more >How to Rename the User folder in Windows 10 , 11
Method 1 – Using Registry changes. 1 – Log in using an administrative account on your windows PC. 2 – Now, Open file...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@skshetry To your concerns about transparency and user trust - we should make https://github.com/iterative/iterative-telemetry public (see: https://github.com/iterative/iterative-telemetry/issues/30), I don’t think that it warrants the duplication personally
Today this package doesn’t do much, but the idea is to unify the more important parts of telemetry in the future (not just
user_id
resolution and config file location). And we see that for every small decision we have 20 opinions, so it makes sense from a process stand point as well. I believe that our current divergence in various projects (MLEM, GTO, TPI, DVC, VSCODE) showed us that we need this centralized as part of a healthier process around telemetry that situates it as a cross-team effort@mike0sv @casperdcl So what’s the status of telemetry package? Can we publish it and use it at least partically to retrieve the file location, etc? Seems better than having multiple projects do their own thing by hand. I can also contribute backward-compatibility code there to use old user_id as noted above (this will be useful for years, because some people stick to older dvc version for years).
EDIT: as noted by @omesser there is an issue for it already https://github.com/iterative/iterative-telemetry/issues/13