Skip to content
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

Alias dog script names as dogshell #305

Merged
merged 1 commit into from
Jan 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions datadog/dogshell/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# Copyright 2015-Present Datadog, Inc
# stdlib
import os
import warnings
import sys

# 3p
import argparse
Expand All @@ -28,6 +30,9 @@


def main():
if sys.argv[0].endswith("dog"):
warnings.warn("dog is pending deprecation. Please use dogshell instead.", PendingDeprecationWarning)

parser = argparse.ArgumentParser(description="Interact with the Datadog API",
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('--config', help="location of your dogrc file (default ~/.dogrc)",
Expand Down
3 changes: 3 additions & 0 deletions datadog/dogshell/wrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import sys
import threading
import time
import warnings

# datadog
from datadog import initialize, api
Expand Down Expand Up @@ -405,4 +406,6 @@ def main():


if __name__ == '__main__':
if sys.argv[0].endswith("dogwrap"):
warnings.warn("dogwrap is pending deprecation. Please use dogshellwrap instead.", PendingDeprecationWarning)
main()
9 changes: 8 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,14 @@ def get_readme_md_contents():
"Documentation": "https://datadogpy.readthedocs.io/en/latest/",
"Source Code": "https://github.com/DataDog/datadogpy",
},
entry_points={"console_scripts": ["dog = datadog.dogshell:main", "dogwrap = datadog.dogshell.wrap:main"]},
entry_points={
"console_scripts": [
"dog = datadog.dogshell:main",
"dogwrap = datadog.dogshell.wrap:main"
"dogshell = datadog.dogshell:main",
"dogshellwrap = datadog.dogshell.wrap:main"
]
},
test_suite="tests",
classifiers=[
"License :: OSI Approved :: BSD License",
Expand Down