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

conan.io C++ packages need to be recognized as registry #368

Closed
mattkretz opened this issue Sep 17, 2024 · 5 comments
Closed

conan.io C++ packages need to be recognized as registry #368

mattkretz opened this issue Sep 17, 2024 · 5 comments

Comments

@mattkretz
Copy link
Contributor

https://github.com/NLeSC/awesome-research-software-registries lists https://conan.io for C++, but howfairis does not recognize projects that are available through Conan.

The solution seems to be a simple

--- a/howfairis/mixins/registry_mixin.py
+++ b/howfairis/mixins/registry_mixin.py
@@ -14,6 +14,7 @@ class RegistryMixin:
             results = [
                 self.has_ascl_badge(),
                 self.has_bintray_badge(),
+                self.has_conan_badge(),
                 self.has_conda_badge(),
                 self.has_cran_badge(),
                 self.has_crates_badge(),
@@ -43,6 +44,11 @@ class RegistryMixin:
                    r"https://img\.shields\.io/bintray/.*"]
         return self._eval_regexes(regexes)
 
+    def has_conan_badge(self):
+        """ """
+        regexes = [r"https://img\.shields\.io/conan/.*"]
+        return self._eval_regexes(regexes)
+
     def has_conda_badge(self):
         """ """
         regexes = [r"https://anaconda\.org/.*/.*/badges/downloads\.svg",

While recognizing conan badges is simple, fixing the tests to not fail after the change is way more complex. I could use some help there. I tried to adjust the expected snippets and add a test_has_conan_badge function to test_checker_.... But now pytest errors out with 'UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc5 in position 18: invalid continuation byte' all over the place. Even after switching back to the 'main' branch with a clean 'git status'. I'm no Python expert... how do I reset this thing without starting over completely?

@mattkretz
Copy link
Contributor Author

Oh, the tests pick up vim's .*.swp files (binary) and try to interpret them as utf-8. Not helpful.

@mattkretz
Copy link
Contributor Author

OK, managed to adjust the tests. IMHO, adjusting tests for a new badge is way too complex.

May I open a PR?

@jspaaks
Copy link
Member

jspaaks commented Sep 17, 2024

Hi @mattkretz, thanks for reporting this. Let me ping @fdiblen and @c-martinez for you, they might be able to tell you how best to go about this.

@c-martinez
Copy link
Contributor

Hi,

Thanks @jspaaks for pinging us!

@mattkretz, I briefly discussed this with @fdiblen. Yes, a PR would be very welcome! Could you please tag me in the PR, to make sure it gets reviewed without too much delay?

You are right, maybe we could improve/simplify how we are testing the badges, but I am not sure if/when we would be able to implement that.

@c-martinez
Copy link
Contributor

Addressed by #369 -- thanks @mattkretz and @fdiblen !

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

No branches or pull requests

3 participants