RepoSense icon indicating copy to clipboard operation
RepoSense copied to clipboard

Some CS2103 commits not showing up in the reposense dashboard

Open damithc opened this issue 3 years ago • 15 comments

Bug reported by student https://github.com/nus-cs2103-AY2021S2/forum/issues/302 Config https://github.com/nus-cs2103-AY2021S2/tp-dashboard/tree/master/configs Dashboard https://nus-cs2103-ay2021s2.github.io/tp-dashboard Commits by author (noelmathewisaac)

Need to fix quickly if this is a real problem

damithc avatar Apr 09 '21 08:04 damithc

@gerhean @dcshzj @HCY123902 need help with this

damithc avatar Apr 10 '21 02:04 damithc

After trying it locally, removing src/main/resources in the Ignore Glob List column in repo-config.json seems to make the report include commits that only involves changes with Fxml and CSS files. The possible cause of the original problem is that the commits that only involve the files residing in src/main/resources are not recognized by the report

HCY123902 avatar Apr 10 '21 04:04 HCY123902

Thanks for the investigation @HCY123902 How come .fxml files still appear in the code view? Perhaps 'ignore glob' is not working fully?

damithc avatar Apr 10 '21 04:04 damithc

I think using src/main/resources/** instead of src/main/resources will remove the Fxml file changes and commits that only involves Fxml and CSS files from the report, which should give the intended behavior. The current issue seems to be that, when path glob such as src/main/resources is used in the column, some file changes in the path glob are still captured by the authorship contribution panel, but the commits that only involve changes in the file path glob will be ignored by the report. Maybe the documentation should include the file path glob format specification in the CSV configuration?

HCY123902 avatar Apr 10 '21 04:04 HCY123902

I think using src/main/resources/** instead of src/main/resources will remove the Fxml file changes and commits that only involves Fxml and CSS files from the report, which should give the intended behavior. The current issue seems to be that, when path glob such as src/main/resources is used in the column, some file changes in the path glob are still captured by the authorship contribution panel, but the commits that only involve changes in the file path glob will be ignored by the report. Maybe the documentation should include the file path glob format specification in the CSV configuration?

Thanks for the further investigation @HCY123902 Yes, we can update the documentation if necessary.

damithc avatar Apr 10 '21 04:04 damithc

Should we remove src/main/resources/view from the Ignore Glob List? So something like src/main/resources/!(view)/**?

Or is it intended that UI changes should not be tracked?

gerhean avatar Apr 10 '21 05:04 gerhean

Should we remove src/main/resources/view from the Ignore Glob List? So something like src/main/resources/!(view)/**?

Can try that. Confirmed that's the correct glob syntax?

damithc avatar Apr 10 '21 06:04 damithc

Should we remove src/main/resources/view from the Ignore Glob List? So something like src/main/resources/!(view)/**?

Can try that. Confirmed that's the correct glob syntax?

Seems to work. Thanks for the top @gerhean We can add a few examples like these in the documentation.

damithc avatar Apr 10 '21 07:04 damithc

I just assumed that the syntax is the same as the frontend minimatch, but I can't say for sure whether the backend uses a package which uses the same syntax to parse.

Also I think src/main/resources/!(view)/** does not match files placed directly in the resource folder (means reposense will not ignore them), not sure if that's important.

gerhean avatar Apr 10 '21 07:04 gerhean

Also I think src/main/resources/!(view)/** does not match files placed directly in the resource folder (means reposense will not ignore them), not sure if that's important.

I'm also not sure if this expression is a good fit, although doesn't seem to break anything ATM. In any case, we should provide better documentation of glob patterns supported. Might depend on the libraries used by the frontend and backend as globs are used in both parts.

damithc avatar Apr 10 '21 08:04 damithc

This is fairly comprehensive https://mywiki.wooledge.org/glob

gerhean avatar Apr 10 '21 09:04 gerhean

This is fairly comprehensive https://mywiki.wooledge.org/glob

Nice. Let's point to it from our UG.

damithc avatar Apr 10 '21 09:04 damithc

Actually, there is already a link in User Guide pointing to https://docs.oracle.com/javase/tutorial/essential/io/fileOps.html#glob. It is just that it is not obvious enough in that section

HCY123902 avatar Apr 10 '21 10:04 HCY123902

@gerhean Do you mind if I start a PR on it? I think it should just be a minor change that adds some link to the User Guide

HCY123902 avatar Apr 10 '21 10:04 HCY123902

#1541 has been merged, any other tasks still pending for this issue?

dcshzj avatar Apr 27 '21 02:04 dcshzj

Propose closing this issue since the corresponding issue in the CS2103 forum for that semester has also been closed (and something from 2 years back is unlikely to be relevant today).

yhtMinceraft1010X avatar Jan 27 '23 10:01 yhtMinceraft1010X

I agree, think we can close the issue

chan-j-d avatar Jan 27 '23 14:01 chan-j-d