openlawlibrary / taf

The Archive Framework
GNU Affero General Public License v3.0
10 stars 7 forks source link

Require target-name parameter #430

Closed renatav closed 3 weeks ago

renatav commented 1 month ago

taf targets add-repo --target-name parameter should be a required path argument

Rana-KV commented 3 weeks ago

Hi @renatav, I would like take up this issue and work on it.

renatav commented 3 weeks ago

@Rana-KV Awesome, I assigned it to you,

Rana-KV commented 3 weeks ago

Thanks for assigning the issues @renatav I have question regarding the changes. If target-name is required, then can I remove the fallback option to use target-path? or both are required?

TAF-Capture

renatav commented 3 weeks ago

@Rana-KV We tend to follow a certain convention regarding where the repositories are located. Their filesystem paths tend to include their names. This will be the case if you use the updater to clone the repositories, like it is intended. So, if you have a name, the chances are that we can also correctly calculate the path. If for whatever reason that is not the case, we probably should still make it possible to specify a different path. So, let's actually reverse the order of this if and elif instead of removing the elif

Rana-KV commented 3 weeks ago

Thanks for the information @renatav, I have reversed the order and still kept the description in targest.py about target-name parameter as optional because it be still done with just taget-path.