-
Notifications
You must be signed in to change notification settings - Fork 61
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
Remove non-native backends #1368
Conversation
@BrunoLiegiBastonLiegi is there any reason to avoid listing |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1368 +/- ##
=======================================
Coverage 99.99% 99.99%
=======================================
Files 78 78
Lines 11196 11199 +3
=======================================
+ Hits 11195 11198 +3
Misses 1 1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Honestly, I don't remember right now why I decided to keep it separated, presumably because it is not properly an universal backend like the others and I wished to keep it separated, but I am not sure. Regarding the updated
|
That's an option, of course. The rationale behind the current proposal is that you could have any random package to expose backends for Qibo, irrespective of the name. So, the |
@BrunoLiegiBastonLiegi I was about implementing the thing we discussed with Despite Would you mind merging as it is, for the sake of limiting dependency issues? |
0a8290e
to
b0fabff
Compare
Although I like the |
Just for fun, I tried to implement the option for the import os
from pathlib import Path
from itertools import chain
def execs(start: str) -> list[str]:
return [
p.name
for p in chain.from_iterable(
Path(d).glob(f"{start}*") for d in os.environ["PATH"].split(os.pathsep)
)
if os.access(p, os.X_OK)
]
# test with few common starting strings
from pprint import pprint
pprint(execs("mount"))
pprint(execs("clang"))
pprint(execs("python"))
pprint(execs("system")) This has no dependency other than the standard library :) Of course, it will be invoked with |
b0fabff
to
a314126
Compare
This just escaped a previous review.
The idea of the
MetaBackend
was to avoid any need for an explicit registration inqibo
, so let's make it complete removing all mentions of"qibojit"
& friends.