nfdi4plants / ARCCommander

Tool to manage your ARCs
MIT License
11 stars 9 forks source link

Add .gitignore and ReadMe files to empty folders #113

Closed HLWeil closed 2 years ago

HLWeil commented 2 years ago

Two git-related features were added to support the user in creating arcs following the specification:

91

A standard .gitignore file gets added to the arc when arc init is called. This .gitignore by default will make git only track files inside the standard arc folders.

92

Dummy ReadMe.md files will be added to assay subfolders (dataset,protocols). This will make git track these folders even if the user doesn't add any files themselves.

chgarth commented 2 years ago

Thanks for this addition.

Creating a default .gitignore appears as a good idea. However, I would not ignore files outside the standard arc folders by default. This IMHO goes against the principle of least surprise for users. E. g. extra files/dirs are in the top level are silently ignored.

As opposed to the faux readme files, could we simply add .gitkeep files, as is customary?

HLWeil commented 2 years ago

@chgarth, thanks for your input 👍


Regarding .gitignore: I see your point.. The thing is, there is actually nothing specific that has to be ignored by default. The intention with the .gitignore was to nugde the user towards maintaining a tidy arc by placing files in the appropriate folders.

So, I don't actually see any alternative, less harsh default .gitignore. But alternatively, to save the user from unexpected, ignored changes, the insertion of the .gitignore could be made optional. Maybe a --gitignore flag could be added to the arc init command?


Regarding .gitkeep: I think the .gitkeep files might cause some confusion. But the ReadMes could be filled with some info about the folders they are placed in. Like this, they could serve an additional purpose?

HLWeil commented 2 years ago

I made the .gitignore optional and replaced the Readme.md with .gitkeep files

chgarth commented 2 years ago

I made the .gitignore optional and replaced the Readme.md with .gitkeep files

👍

We had earlier discussed that encouraging users to keep a "tidy" arc could be an explicit mechanism, e.g. arc sync would state that there are files that are not annotated etc.

There are also some use cases where arcs serve a dual role (for example, if they are also RO Crates), and then additional payload (as defined in arc spec) should be expected anyway, I think.

Thanks for your efforts!