nfdi4plants / ARCCommander

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

[BUG] arc a remove/delete do not recognize -s as argument #210

Closed micwij closed 9 months ago

micwij commented 11 months ago

Describe the bug When using arc a remove or arc a delete as currently described in the Knowledgebase the following error occurs:

ERROR: ERROR: unrecognized argument: '-s'.

To Reproduce Steps to reproduce the behavior: In the arcCommander:

arc init arc i create --identifier Test_investigation arc s add -identifier Test_study arc a add -s Test_study -a Test_assay

So far so good. When using: arc a list both study seem to have been correctly created.

Start processing parameterless command.

Start Assay List Study: Test_study --Assay: Test_assay Done processing command.

Then when trying to remove the assay again with:

arc a remove -s Test_study -a Test_assay

the above mentioned error occurs.

Expected behavior Based on the current documentation, I would expect this to delete and unregister the assay. I saw that issue #190 requests to remove the studyidentifier argument, which I generally think is a good idea, so I am not sure if this has been already partially implemented. However when using the command without the study identifier, e.g. :

arc a remove -a Test_assay

a long error occurs (see in screenshots)

As a workaround one can of course separately delete and unregister the assay. However when using arc a delete -s Test_study -a Test_assay the studyidentifier argument is again not recognized Meanwhile arc a delete -a Test_assay arc a unregister -s Test_study -a Test_assay works

Additional context if arc a remove combines arc a delete and arc a unregister then the error maybe results from them currently being incompatible.

Screenshots image

OS and framework information

HLWeil commented 11 months ago

Seems like there was some mix-up with the argument lists between these different commands. Thanks for bringing it up!

HLWeil commented 10 months ago

My proposed change would be the following:

Drop the --studyidentifier from the arc assay remove command.

Instead, the command only takes the assayidentifier, deletes the assay from the ARC and unregisters it from all studies in the ARC.

Does this make sense to you? @micwij

micwij commented 10 months ago

Does this make sense to you? @micwij Yes this sounds like a great solution!