-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add Reverse lookup #43
Add Reverse lookup #43
Conversation
Just made a few updates to fix doc test and test annotations |
Do you have pre-commit installed? It catches the same errors as found by the CI here, but locally. See https://bluetooth-numbers.readthedocs.io/en/stable/contributing.html#clone-the-repository for the installation. |
I am working on that right now. |
@koenvervloesem Kinda struggling with the pre-commit. I have a lot of it cleaned up. I don't seem to have all the type hints correct, but again not getting clear information from Pycharm as to whats wrong. I am kinda stuck and out of time for now. Maybe a development requirements file would be helpful? |
Thanks already for the work you did! I'll take a look at the pre-commit errors tomorrow and see what I can fix. Maybe we can also ignore some of the errors if they're too pedantic. |
I added some comments, these should solve/ignore most of the errors. But have a look at the doctests too. |
Ok, I have cleaned up most of this, I'll finish up later today. |
Ok, just one issue with the import order (see above), and the two doctest issues I reviewed, and then this looks ready to merge. |
I think it's ready. |
If you click on Details next to the failing tests, there are still some issues. Could you take a look at them? Once these tests run successfully, we can merge this PR. |
@koenvervloesem
|
Yes, and the solution is the So this example should look like:
|
Thanks for your patience |
…mbers into ReverseLookup # Conflicts: # pyproject.toml
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #43 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 9 10 +1
Lines 108 153 +45
Branches 16 39 +23
=========================================
+ Hits 108 153 +45 ☔ View full report in Codecov by Sentry. |
Perfect! Now only the code coverage check complains, but the type checking line should be ignored. You can solve this by adding the following lines at the end of
|
Thanks for patiently fixing your code to follow the project's code style! |
Issue #42, reverse lookup
I have implemented this as a class that initiates from the UUID dicts. I did it this way rather than writing the index to a file for two reasons; 1: it's fast enough, 2: In the future, we might want to add the ability to rebuild the index incases where the user adds custom UUIDs.
Feedback appreciated.
I am not very familiar with taking full advantage of pytest.