-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #123 from Superb-AI-Suite/v0.19.0
v0.19.0 Change sdk to use new phy-credit
- Loading branch information
Showing
48 changed files
with
2,890 additions
and
1,323 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -147,4 +147,5 @@ wget-log* | |
**/*.ipynb | ||
|
||
# workspace | ||
workspace/ | ||
workspace/ | ||
notebooks/** |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from .phy_credit import phy_credit | ||
|
||
__all__ = ( | ||
"phy_credit", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[[source]] | ||
url = "https://pypi.org/simple" | ||
verify_ssl = true | ||
name = "pypi" | ||
|
||
[packages] | ||
pytest = "*" | ||
semver = "*" | ||
phy-credit = {path = "."} | ||
|
||
[dev-packages] | ||
pytest = "*" | ||
|
||
[requires] | ||
python_version = "3.9" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
from .phy_credit import imageV2, video | ||
from .phy_credit import imageV2, video, pointclouds, common, exceptions | ||
|
||
|
||
__all__ = ( | ||
"common", | ||
"imageV2", | ||
"video", | ||
# 'team_name', | ||
# 'access_key', | ||
# 'ProjectClient', | ||
# 'LabelClient', | ||
# 'DataClient', | ||
# 'Client', | ||
"pointclouds", | ||
"exceptions", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.6.4" | ||
__version__ = "0.6.5" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
import functools | ||
import inspect | ||
import warnings | ||
|
||
string_types = (type(b''), type(u'')) | ||
|
||
|
||
def deprecated(reason): | ||
""" | ||
This is a decorator which can be used to mark functions | ||
as deprecated. It will result in a warning being emitted | ||
when the function is used. | ||
""" | ||
|
||
if isinstance(reason, string_types): | ||
|
||
# The @deprecated is used with a 'reason'. | ||
# | ||
# .. code-block:: python | ||
# | ||
# @deprecated("please, use another function") | ||
# def old_function(x, y): | ||
# pass | ||
|
||
def decorator(func1): | ||
|
||
if inspect.isclass(func1): | ||
fmt1 = "Call to deprecated class {name} ({reason})." | ||
else: | ||
fmt1 = "Call to deprecated function {name} ({reason})." | ||
|
||
@functools.wraps(func1) | ||
def new_func1(*args, **kwargs): | ||
warnings.simplefilter('always', DeprecationWarning) | ||
warnings.warn( | ||
fmt1.format(name=func1.__name__, reason=reason), | ||
category=DeprecationWarning, | ||
stacklevel=2 | ||
) | ||
warnings.simplefilter('default', DeprecationWarning) | ||
return func1(*args, **kwargs) | ||
|
||
return new_func1 | ||
|
||
return decorator | ||
|
||
elif inspect.isclass(reason) or inspect.isfunction(reason): | ||
|
||
# The @deprecated is used without any 'reason'. | ||
# | ||
# .. code-block:: python | ||
# | ||
# @deprecated | ||
# def old_function(x, y): | ||
# pass | ||
|
||
func2 = reason | ||
|
||
if inspect.isclass(func2): | ||
fmt2 = "Call to deprecated class {name}." | ||
else: | ||
fmt2 = "Call to deprecated function {name}." | ||
|
||
@functools.wraps(func2) | ||
def new_func2(*args, **kwargs): | ||
warnings.simplefilter('always', DeprecationWarning) | ||
warnings.warn( | ||
fmt2.format(name=func2.__name__), | ||
category=DeprecationWarning, | ||
stacklevel=2 | ||
) | ||
warnings.simplefilter('default', DeprecationWarning) | ||
return func2(*args, **kwargs) | ||
|
||
return new_func2 | ||
|
||
else: | ||
raise TypeError(repr(type(reason))) |
Oops, something went wrong.