Skip to content

Commit 9a0636b

Browse files
committed
fix: separate/merge definitions for tutorial related classes
1 parent cf03ad0 commit 9a0636b

File tree

6 files changed

+87
-152
lines changed

6 files changed

+87
-152
lines changed

functions/definition/tutorial/compare.yaml

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -16,43 +16,11 @@ FbCompareTutorial:
1616
zoomLevel:
1717
type: int
1818

19-
FbCompareTutorialGroup:
20-
model: alias
21-
type:
22-
type: object
23-
fields:
24-
xMax:
25-
type: int
26-
xMin:
27-
type: int
28-
yMax:
29-
type: int
30-
yMin:
31-
type: int
32-
3319
FbCompareTutorialTask:
3420
model: alias
3521
type:
3622
type: object
3723
fields:
38-
geometry: # NOTE: initially empty string
39-
type: string
40-
groupId:
41-
type: int
42-
projectId:
43-
type: string
44-
referenceAnswer:
45-
type: int
46-
screen:
47-
type: int
48-
taskId:
49-
type: string
50-
taskId_real:
51-
type: string
52-
taskX:
53-
type: int
54-
taskY:
55-
type: int
5624
url:
5725
type: string
5826
urlB:

functions/definition/tutorial/completeness.yaml

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -18,43 +18,11 @@ FbCompletenessTutorial:
1818
zoomLevel:
1919
type: int
2020

21-
FbCompletenessTutorialGroup:
22-
model: alias
23-
type:
24-
type: object
25-
fields:
26-
xMax:
27-
type: int
28-
xMin:
29-
type: int
30-
yMax:
31-
type: int
32-
yMin:
33-
type: int
34-
3521
FbCompletenessTutorialTask:
3622
model: alias
3723
type:
3824
type: object
3925
fields:
40-
geometry: # NOTE: initially empty string
41-
type: string
42-
groupId:
43-
type: int
44-
projectId:
45-
type: string
46-
referenceAnswer:
47-
type: int
48-
screen:
49-
type: int
50-
taskId:
51-
type: string
52-
taskId_real:
53-
type: string
54-
taskX:
55-
type: int
56-
taskY:
57-
type: int
5826
url:
5927
type: string
6028
urlB:

functions/definition/tutorial/find.yaml

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -14,42 +14,10 @@ FbFindTutorial:
1414
zoomLevel:
1515
type: int
1616

17-
FbFindTutorialGroup:
18-
model: alias
19-
type:
20-
type: object
21-
fields:
22-
xMax:
23-
type: int
24-
xMin:
25-
type: int
26-
yMax:
27-
type: int
28-
yMin:
29-
type: int
30-
3117
FbFindTutorialTask:
3218
model: alias
3319
type:
3420
type: object
3521
fields:
36-
geometry: # NOTE: initially empty string
37-
type: string
38-
groupId:
39-
type: int
40-
projectId:
41-
type: string
42-
referenceAnswer:
43-
type: int
44-
screen:
45-
type: int
46-
taskId:
47-
type: string
48-
taskId_real:
49-
type: string
50-
taskX:
51-
type: int
52-
taskY:
53-
type: int
5422
url:
5523
type: string
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
FbTileMapServiceTutorialGroup:
2+
model: alias
3+
type:
4+
type: object
5+
fields:
6+
xMax:
7+
type: int
8+
xMin:
9+
type: int
10+
yMax:
11+
type: int
12+
yMin:
13+
type: int
14+
15+
FbTileMapServiceTutorialTask:
16+
model: alias
17+
type:
18+
type: object
19+
fields:
20+
geometry: # NOTE: initially empty string
21+
type: string
22+
groupId:
23+
type: int
24+
projectId:
25+
type: string
26+
referenceAnswer:
27+
type: int
28+
screen:
29+
type: int
30+
taskId:
31+
type: string
32+
taskId_real:
33+
type: string
34+
taskX:
35+
type: int
36+
taskY:
37+
type: int

functions/generated/pyfirebase/pyfirebase_mapswipe/extended_models.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,33 @@ class Config: # type: ignore[reportIncompatibleVariableOverride]
3535
use_enum_values = True
3636
frozen = True
3737
extra = "forbid"
38+
39+
40+
class FbFindTutorialTaskComplete(
41+
models.FbTileMapServiceTutorialTask,
42+
models.FbFindTutorialTask,
43+
):
44+
class Config: # type: ignore[reportIncompatibleVariableOverride]
45+
use_enum_values = True
46+
frozen = True
47+
extra = "forbid"
48+
49+
50+
class FbCompareTutorialTaskComplete(
51+
models.FbTileMapServiceTutorialTask,
52+
models.FbCompareTutorialTask,
53+
):
54+
class Config: # type: ignore[reportIncompatibleVariableOverride]
55+
use_enum_values = True
56+
frozen = True
57+
extra = "forbid"
58+
59+
60+
class FbCompletenessTutorialTaskComplete(
61+
models.FbTileMapServiceTutorialTask,
62+
models.FbCompletenessTutorialTask,
63+
):
64+
class Config: # type: ignore[reportIncompatibleVariableOverride]
65+
use_enum_values = True
66+
frozen = True
67+
extra = "forbid"

functions/generated/pyfirebase/pyfirebase_mapswipe/models.py

Lines changed: 20 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -731,21 +731,7 @@ def __setattr__(self, name: str, value: typing.Any) -> None:
731731
super().__setattr__(name, value)
732732

733733

734-
class FbCompareTutorial(TypesyncModel):
735-
projectType: typing.Literal[3]
736-
tileServer: FbObjRasterTileServer
737-
tileServerB: FbObjRasterTileServer
738-
zoomLevel: int
739-
740-
class Config:
741-
use_enum_values = True
742-
extra = "forbid"
743-
744-
def __setattr__(self, name: str, value: typing.Any) -> None:
745-
super().__setattr__(name, value)
746-
747-
748-
class FbCompareTutorialGroup(TypesyncModel):
734+
class FbTileMapServiceTutorialGroup(TypesyncModel):
749735
xMax: int
750736
xMin: int
751737
yMax: int
@@ -759,7 +745,7 @@ def __setattr__(self, name: str, value: typing.Any) -> None:
759745
super().__setattr__(name, value)
760746

761747

762-
class FbCompareTutorialTask(TypesyncModel):
748+
class FbTileMapServiceTutorialTask(TypesyncModel):
763749
geometry: str
764750
groupId: int
765751
projectId: str
@@ -769,8 +755,6 @@ class FbCompareTutorialTask(TypesyncModel):
769755
taskId_real: str
770756
taskX: int
771757
taskY: int
772-
url: str
773-
urlB: str
774758

775759
class Config:
776760
use_enum_values = True
@@ -780,11 +764,10 @@ def __setattr__(self, name: str, value: typing.Any) -> None:
780764
super().__setattr__(name, value)
781765

782766

783-
class FbCompletenessTutorial(TypesyncModel):
784-
projectType: typing.Literal[4]
767+
class FbCompareTutorial(TypesyncModel):
768+
projectType: typing.Literal[3]
785769
tileServer: FbObjRasterTileServer
786770
tileServerB: FbObjRasterTileServer
787-
overlayTileServer: FbObjUnifiedOverlayTileServer
788771
zoomLevel: int
789772

790773
class Config:
@@ -795,11 +778,9 @@ def __setattr__(self, name: str, value: typing.Any) -> None:
795778
super().__setattr__(name, value)
796779

797780

798-
class FbCompletenessTutorialGroup(TypesyncModel):
799-
xMax: int
800-
xMin: int
801-
yMax: int
802-
yMin: int
781+
class FbCompareTutorialTask(TypesyncModel):
782+
url: str
783+
urlB: str
803784

804785
class Config:
805786
use_enum_values = True
@@ -809,18 +790,12 @@ def __setattr__(self, name: str, value: typing.Any) -> None:
809790
super().__setattr__(name, value)
810791

811792

812-
class FbCompletenessTutorialTask(TypesyncModel):
813-
geometry: str
814-
groupId: int
815-
projectId: str
816-
referenceAnswer: int
817-
screen: int
818-
taskId: str
819-
taskId_real: str
820-
taskX: int
821-
taskY: int
822-
url: str
823-
urlB: str
793+
class FbCompletenessTutorial(TypesyncModel):
794+
projectType: typing.Literal[4]
795+
tileServer: FbObjRasterTileServer
796+
tileServerB: FbObjRasterTileServer
797+
overlayTileServer: FbObjUnifiedOverlayTileServer
798+
zoomLevel: int
824799

825800
class Config:
826801
use_enum_values = True
@@ -830,10 +805,9 @@ def __setattr__(self, name: str, value: typing.Any) -> None:
830805
super().__setattr__(name, value)
831806

832807

833-
class FbFindTutorial(TypesyncModel):
834-
projectType: typing.Literal[1]
835-
tileServer: FbObjRasterTileServer
836-
zoomLevel: int
808+
class FbCompletenessTutorialTask(TypesyncModel):
809+
url: str
810+
urlB: str
837811

838812
class Config:
839813
use_enum_values = True
@@ -843,11 +817,10 @@ def __setattr__(self, name: str, value: typing.Any) -> None:
843817
super().__setattr__(name, value)
844818

845819

846-
class FbFindTutorialGroup(TypesyncModel):
847-
xMax: int
848-
xMin: int
849-
yMax: int
850-
yMin: int
820+
class FbFindTutorial(TypesyncModel):
821+
projectType: typing.Literal[1]
822+
tileServer: FbObjRasterTileServer
823+
zoomLevel: int
851824

852825
class Config:
853826
use_enum_values = True
@@ -858,15 +831,6 @@ def __setattr__(self, name: str, value: typing.Any) -> None:
858831

859832

860833
class FbFindTutorialTask(TypesyncModel):
861-
geometry: str
862-
groupId: int
863-
projectId: str
864-
referenceAnswer: int
865-
screen: int
866-
taskId: str
867-
taskId_real: str
868-
taskX: int
869-
taskY: int
870834
url: str
871835

872836
class Config:

0 commit comments

Comments
 (0)