You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, we can implement this and leave it up to the creator of the consent mechanism whether or not they should use it.
Stateful consent switch - off when used as library, on when used as standalone tool
Create a stateful consent mechanism with a boolean switch. By default, the switch will be False and the mechanism will not grant consent. This way, if a tool which integrates with Humbug can be used as a library, any dependents of that library will not send reporting.
However, if the tool can also be used from the command line, the CLI can switch the state of the mechanism to True to enable reporting.
The text was updated successfully, but these errors were encountered:
Some options. We should implement at least one of the following options, but we do not have to implement them all.
Using inspect
Here is an example of how to detect this automatically:
Taken from Ray telemetry proposal: https://docs.google.com/document/d/1gZut2v52xDd3bNBaw2PxilUBWQRixIQcOJPx16FIoAw/edit#
Now, I don't like using
inspect.stack
(see this Stack Overflow post and this Python mailing list thread for some reasons why).However, we can implement this and leave it up to the creator of the consent mechanism whether or not they should use it.
Stateful consent switch - off when used as library, on when used as standalone tool
Create a stateful consent mechanism with a boolean switch. By default, the switch will be
False
and the mechanism will not grant consent. This way, if a tool which integrates with Humbug can be used as a library, any dependents of that library will not send reporting.However, if the tool can also be used from the command line, the CLI can switch the state of the mechanism to
True
to enable reporting.The text was updated successfully, but these errors were encountered: