wakatime / vscode-wakatime

Visual Studio Code plugin for automatic time tracking and metrics generated from your programming activity.
https://wakatime.com/vs-code
BSD 3-Clause "New" or "Revised" License
1.23k stars 137 forks source link

need to create .wakatime-project file for Jupiter notebooks ipynb project #252

Open wohenbushuang opened 2 years ago

wohenbushuang commented 2 years ago

I just newly install the vscode plugin. I have two project (folders), one is purely in golang and the other is Jupiter notebooks with some documents. And I have set

hide_file_names = true
hide_project_names = true

The golang project can create a .wakatime-project file, and then record to the same, random name project. However the Jupiter notebooks project will create a new random project name everytime, and without creating a .wakatime-project file in the project folder.

alanhamlett commented 2 years ago

Maybe related to wakatime/wakatime-cli#598.

@wohenbushuang does this still happen for you?

wohenbushuang commented 2 years ago

cli version v1.38.0, for now neither golang nor ipynb (i.e., language irrelevant) folder makes a difference, it won't create new random project anymore, seems bug solved. Thanks a lot!

wohenbushuang commented 2 years ago

I have to complain that the documents are not user friendly enough.

1. I had to do a full coverage test for the following results, which I cannot directly find or infer from the current documents.

.git hide_project_names = true will create .wakatime-project detected project name
yes yes yes, with generated random name in .wakatime-project
yes no no folder name
no yes no "Unknown Project"
no no no "Unknown Project"

It won't automatically create .wakatime-project file, unless it has (1) hide_project_names = true in config, and (2) has .git.

In description of hide_project_names:

When a project folder is detected instead of using the folder name as the project, a .wakatime-project file is created with a random project name.

This sentence is obscure, and it doesn't explicitly mention that it only applies to hide_project_names = true configured (i.e. only 1st case but not 2nd case). Meanwhile, for .wakatime-project existed, it also won't create (overwrite).

BTW, for the 4th case, what about try to use the folder name if no .wakatime-project found in parent folders? Sometimes complex (eg. containing Word, Excel, Powerpoint) project folders will not (or forget to) use git, and forget to manually create .wakatime-project at the begining weeks. If hide_file_names = true (only project level statistic need), nothing can do to separate HIDDEN files of multiple projects in one "Unknown Project" project.

2. FAQ: How are projects detected? is too simple.

3. FAQ accordion cannot expand all for quick search.