-
Notifications
You must be signed in to change notification settings - Fork 68
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
SYNPY-316: Deprecate getProvenance and create get_activity #980
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is in draft mode, but here's some initial comments
synapseclient/__main__.py
Outdated
@@ -1483,7 +1493,7 @@ def build_parser(): | |||
type=str, | |||
help="Output the provenance record in JSON format", | |||
) | |||
parser_get_provenance.set_defaults(func=getProvenance) | |||
parser_get_provenance.set_defaults(func=get_activity) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may have to add another parser so that people know that the cli
synapse get-provenance
is going to be deprecated. As it is written right now, the deprecation warning won't ever be triggered and we don't have synapse get-activity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it - I will add in get-activity
for the CLI.
What is the way to mark these are deprecated? I can add information into the help message like:
help="show provenance records. This is *deprecated* - Swap to using
get-activity instead."
But is that sufficient?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you set the default function for get-provenance
to be getProvenance
, is it able to leverage the deprecated
decorator?
Also - that might not be enough, so we could intentionally add a log.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok great - I am going to leave this calling getProvenance
. In the console it prints out the warning:
DeprecationWarning: Call to deprecated function (or staticmethod) getProvenance. (deprecated and replaced with `get_activity`) -- Deprecated since version 3.1.0.
Hello @BryanFauble! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
|
Closing PR for now - Will re-open at later date when thinking about jira: SYNPY-1303 |
Problem:
getProvenance is not a term defined in the REST docs - should be getActivity
Solution:
get_activity
function and deprecated the old functionget_activity
instead ofgetProvenance
Testing: