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

feat(label): add "MultiPolyline2DSubcatalog" & "LabeledMultiPolyline2D" #821

Merged
merged 1 commit into from
Jul 16, 2021

Conversation

AChenQ
Copy link
Collaborator

@AChenQ AChenQ commented Jul 13, 2021

No description provided.

@AChenQ AChenQ requested a review from Lee-000 as a code owner July 13, 2021 07:54
@coveralls
Copy link

coveralls commented Jul 13, 2021

Pull Request Test Coverage Report for Build 1036748837

  • 84 of 84 (100.0%) changed or added relevant lines in 7 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 82.922%

Totals Coverage Status
Change from base Build 1036728359: 0.2%
Covered Lines: 5205
Relevant Lines: 6277

💛 - Coveralls

@AChenQ AChenQ force-pushed the T16640_add_multipolyline branch from 76df851 to 7970376 Compare July 14, 2021 04:11
@AChenQ AChenQ requested a review from linjiX as a code owner July 14, 2021 04:11
tensorbay/label/basic.py Show resolved Hide resolved
tensorbay/label/label_polyline.py Show resolved Hide resolved
Comment on lines 244 to 247
>>> categories = NameList()
>>> categories.append(CategoryInfo("a"))
>>> attributes = NameList()
>>> attributes.append(AttributeInfo("gender", enum=["female", "male"]))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use MultiPolyline2DSubcatalog.add_category and MultiPolyline2DSubcatalog.add_attribute instead.

... "instance": "12345",
... }
>>> LabeledMultiPolyline2D.loads(contents)
LabeledPolyline2D [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LabeledMultiPolyline2D?

@@ -111,7 +111,10 @@ def __init_subclass__(cls) -> None:
type_ = cls.__annotations__.pop(_ATTRS_BASE, None)
if type_:
cls._attrs_base.loader = type_._loads # pylint: disable=protected-access
cls._attrs_base.dumper = type_.dumps
if hasattr(type_, "_dumps"):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cls._attrs_base.dumper = type_.dumps if hasattr(type_, "_dumps") else type_.dumps

@AChenQ AChenQ force-pushed the T16640_add_multipolyline branch 6 times, most recently from f4efeab to f5edcba Compare July 15, 2021 07:18
@@ -111,7 +111,11 @@ def __init_subclass__(cls) -> None:
type_ = cls.__annotations__.pop(_ATTRS_BASE, None)
if type_:
cls._attrs_base.loader = type_._loads # pylint: disable=protected-access
cls._attrs_base.dumper = type_.dumps
cls._attrs_base.dumper = (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

= getattr(type_, "_dumps", type_.dumps)?

@AChenQ AChenQ force-pushed the T16640_add_multipolyline branch from f5edcba to 45043fe Compare July 15, 2021 09:58
@AChenQ AChenQ force-pushed the T16640_add_multipolyline branch from 45043fe to e07ef8e Compare July 16, 2021 08:04
@AChenQ AChenQ force-pushed the T16640_add_multipolyline branch from e07ef8e to f0be84e Compare July 16, 2021 08:20
@AChenQ AChenQ merged commit b447e64 into Graviti-AI:main Jul 16, 2021
@AChenQ AChenQ deleted the T16640_add_multipolyline branch July 16, 2021 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants