Skip to content

Add some new helper methods to upstream#99

Open
meramsey wants to merge 4 commits intowhitesource-ps:masterfrom
meramsey:master
Open

Add some new helper methods to upstream#99
meramsey wants to merge 4 commits intowhitesource-ps:masterfrom
meramsey:master

Conversation

@meramsey
Copy link
Copy Markdown
Contributor

Some stuff I had made before using sdk that I felt might be useful to have in the SDK.

Added some tests and it looks like my black formatter also kept trying to fix pep8 stuff.
Also noticed errors when trying to run the tests when adding mine due to the mock library not being in main or extras. Seemed like having requirements-dev.txt made most sense but feel free to adjust as needed.

Is there any opposition to maybe running black against the code base as a single commit so that going forward contributions using black formatting don't have to worry about whitespace and stuff?
More about Black
https://black.readthedocs.io/en/stable/

@meramsey
Copy link
Copy Markdown
Contributor Author

@NatalyaDalid any chance this can be this merged?

I tried to fix the signoff DCO stuff, but looks like it's still not working :( not sure if you still get notified if that fails or not

Thanks in advance.

@rammatzkvosky rammatzkvosky self-requested a review February 27, 2022 07:39
Comment thread ws_sdk/app.py
Comment thread ws_sdk/app.py
sort_by=sort_by)
return products

def get_product_by_name(self,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check get_scopes_from_name() to be used instead.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes but that returns a list. In this helper function you get only one result

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @meramsey - it returns a list for cases where you might have more than 1 entity with the same name :

  1. Global organization --> products with the same name in different organizations.
  2. Non-global organization--> projects with the same name within different products.

Comment thread ws_sdk/app.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants