Hygiene of Directories Structure
The current structure of our monorepo is listed in the root-level README.md file. In addition to that this files contains a summary of our github actions builds statuses. It is the responsibility of the monorepo maintainer to
-
ensure that new additions to the monorepo are placed according to the structure;
-
when necessary make changes to the structure;
-
keep
README.mdup-to-date.
This is general rule applied to everyone to avoid adding to git those files that can easily be generated using the necessary scripts.
If your code creates some plots, you shouldn’t add these plot to git. Although, adding a picture is acceptable. For example, a screenshot for a vignette or some illustration you’ve drawn in a specialized program.
Same is true for spreadsheets, csv or sav data files, or various other things which are generated in your scripts. If you need to have access to such files in the future, you should save them on S3 or Google Drive.
We’ve tried to implement some general rules for ignoring common output files in our root-level .gitignore but it can’t, and shouldn’t, capture all the possible occasions.
As mentioned earlier, we have a root-level gitignore file with common general rules. It also contains a short instruction one should read before updating it. The general idea is that one shouldn’t add too specific rules to it. To define a specific project-level ignores please create a project-level .gitignore in the corresponding project’s folder. For example, if you use a folder called “JIRA-123-tests” in your project for some temporary scripts, you should create .gitignore in your project’s root and add “JIRA-123-tests/” to it.
It is the responsibility of the monorepo maintainer to keep the main monorepo .gitignore in good shape.