-
Notifications
You must be signed in to change notification settings - Fork 25
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
Move etelemetry logic to become in effect also when used as a Python library #726
Comments
i think CLI is our main use case at the moment, more than library, so i think it should happen in the CLI, but possibly for any command (including ls and organize, which could be affected by schema versions). once the library is actually released, we can check how to inform user then. in other projects we tend to call it once in init and never gets called again. but is called each time for a python process (but we pass on |
we are using it as a library already in many ad-hoc scripts, and who knows what users do on the hub etc. library was released from day 1 of the CLI release if not before, we just do not promote it too heavily I guess ;)
again -- who knows how users would use the beast. WDYT @satra ? |
sounds good and indeed dandi should use |
Invoke etelemetry when constructing a DandiAPIClient; honor DANDI_NO_ET
ATM we have etelemetry under
cli/command.py:main
so it is only in effect for CLI. As we will use it now to prevent "bad" versions (#725), we should make it used consistently between CLI and when used as a Python module.Not yet sure how to not bother with etelemetry if user does use CLI but merely for
--help
-- I guess it is ok to do all etelemetry checks/etc, but if we are to fail on bad version, we should not bother with etelemetry for "every import".Since the main rationale is for "interactions with dandiarchive" I think we should
DandiAPIClient.__init__
@satra - do you foresee any other aspects I forgot, or locations where to do the check? e.g.
organize
in principle also a worthy location to perform the check, but since used most likely through CLI -- should be covered.The text was updated successfully, but these errors were encountered: