Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify the doc between project create vs update. #44

Open
ericbl opened this issue Sep 27, 2023 · 1 comment
Open

Clarify the doc between project create vs update. #44

ericbl opened this issue Sep 27, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@ericbl
Copy link

ericbl commented Sep 27, 2023

Current documentation leads to confusion between "capycli project create" and "capycli project update".
Looking at the code, both are doing the same stuff, but with the major difference being the onlyUpdateProject==True set in https://github.com/sw360/capycli/blob/main/capycli/project/create_project.py.
Looking further, this is setting the 'add' in https://github.com/sw360/sw360python/blob/master/sw360/project.py / update_project_releases(self, releases, project_id, add=False):
which says
Ifaddis True, givenreleases are added to the project, otherwise, the existing releases will be replaced.
And the code indeed create a list of releases to be linked to the project by getting the existing ones and adding the new ones.

Therefore, 'capycli project create' instead of 'capycli project update' would update the project but replace all releases, i.e. remove existing ones.
'create' is actually the only option if we want to update an existing project but remove some releases that do not belong to it anymore.

Please clarify the doc to reveal this major difference.

@gernot-h
Copy link
Collaborator

It might be that I once added "project update" as a 2nd way to call "project create" with somewhat "safer" default settings. So the idea was that "project update" will refuse to create a new project and carefully update an existing one without overwriting things.

I admit this might be a bit confusing. So before we improve the documentation, do we want to keep that behaviour? @tngraf, what do you think?

@tngraf tngraf added the documentation Improvements or additions to documentation label Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants