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

[Question] Retrieving all variables instead of compliance only in API #325

Open
kequach opened this issue Mar 20, 2021 · 3 comments
Open
Labels
question Further information is requested

Comments

@kequach
Copy link

kequach commented Mar 20, 2021

First off, labeling is only available for contributors, so I can't tag this issue as a question.
As I see it right now, it's not possible to retrieve all the variables from the verbose print. The compliance object only has flags for each category (for example registry) but I would like to retrieve all flags within the registry flag. Basically, I want the print in the screenshot instead of the condensed information in the next cell:
image

Is there a plan to add this feature or did I just overlook it?

@jspaaks jspaaks added the question Further information is requested label Mar 22, 2021
@jspaaks
Copy link
Member

jspaaks commented Mar 22, 2021

Hello and welcome @beld78!

Unfortunately, this is not possible at the moment. We anticipate that we'll add something like that to the public API though. There is a somewhat cryptic issue here: #269. We'll need to add this feature to have more detailed reporting in fairtally.

In the meantime, if you need to throw together something quickly, you could run these methods

self.has_ascl_badge(),
self.has_bintray_badge(),
self.has_conda_badge(),
self.has_cran_badge(),
self.has_crates_badge(),
self.has_maven_badge(),
self.has_npm_badge(),
self.has_pypi_badge(),
self.has_rsd_badge(),
self.is_on_github_marketplace()
(self refers to an instance of Checker there)

Good luck, and let us know how you get on,
-Jurriaan

@J535D165
Copy link

Thanks @beld78 for reporting and @jspaaks for the answer. We are running into the same issue. This is definitively an important feature to have. What is your timeline for this feature?

I had a look at the internal structure, but it seems to be not very straightforward to implement. Outside of the https://github.com/fair-software/howfairis/tree/main/howfairis/cli submodule, nothing should print to stdout I think. For example, this method should not print to stdout directly (or the entire class shouldn't):

def check_registry(self):
""" """
if not self.is_quiet:
print("(3/5) registry")
reason = self.skip_registry_checks_reason
if reason is None:
results = [
self.has_ascl_badge(),
self.has_bintray_badge(),
self.has_conda_badge(),
self.has_cran_badge(),
self.has_crates_badge(),
self.has_maven_badge(),
self.has_npm_badge(),
self.has_pypi_badge(),
self.has_rsd_badge(),
self.is_on_github_marketplace()
]
return True in results
if reason == "":
if not self.is_quiet:
self._print_state(check_name="skipped (no reason provided)", state=True)
return True
if not self.is_quiet:
self._print_state(check_name="skipped (reason: {0})".format(reason), state=True)
return True

After this is refactored, it seems to be straightforward to make a JSON export option.

Feel free to tag me in any issues regarding this topic. Happy to contribute somewhere during the development of this feature.

@jspaaks
Copy link
Member

jspaaks commented Mar 24, 2021

We won't be able to work on this for the coming weeks, resources have been allocated elsewhere. But after that, my guess is we'll pick this up as one of the first things. We can ping you then if you'd like to contribute? Would be good to get more opinions and use cases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants