Skip to content

Commit

Permalink
Rename 'Test Cluster' to 'Unit Testing' to unstutter class and item n…
Browse files Browse the repository at this point in the history
…aming (project-chip#23495)

* Renamed Test Cluster to just test, to unstutter names.

* zap regen

* make all clusters compile

* Make tests compile

* Restyle

* Fix expected JNI filename codegen

* Fix darwin code renaming

* Update cirque test for naming (no cluster suffix)

* More updates for python: TestCluster to Clusters.Test

* Correct cirque test to expect cluster name to be Test

* Start renaming to Unit Testing for a more complete cluster name

* more updates to maning for the test cluster to unit testing

* make define consistent

* Restyled by clang-format

* Restyled by autopep8

* Fix up naming in the test cluster implementation

* Restyled by clang-format

* Fix darwin build

* Fix cirque

* Fix cirque

* Fix cirque

* Fix repl examples

* Restyled by autopep8

* Fix android output files

* Fix cirque

* Another cirque fix

* update ipynb code for Objects.UnitTesting

* Replace more unusual auto-sed for cluster_objects

* Replace comment in ipynmb

* Restyled by autopep8

* Fix expected unit test cluster name. hoping this is the last cirque fix

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
2 people authored and adbridge committed Nov 18, 2022
1 parent 4495a35 commit b4b6dd1
Show file tree
Hide file tree
Showing 113 changed files with 11,347 additions and 11,297 deletions.
8 changes: 4 additions & 4 deletions docs/guides/python_chip_controller_building.md
Original file line number Diff line number Diff line change
Expand Up @@ -624,10 +624,10 @@ ZCL cluster commands.
```python
# devCtrl.WriteAttribute(<nodeid>, [(<endpointid>, Clusters.<cluster>.Attributes.<attribute>(value=<attribute value>))])
# e.g.
await devCtrl.WriteAttribute(1, [(1, Clusters.TestCluster.Attributes.Int8u(value=1))])
await devCtrl.WriteAttribute(1, [(1, Clusters.TestCluster.Attributes.Boolean(value=True))])
await devCtrl.WriteAttribute(1, [(1, Clusters.TestCluster.Attributes.OctetString(value=b'123123\x00'))])
await devCtrl.WriteAttribute(1, [(1, Clusters.TestCluster.Attributes.CharString(value='233233'))])
await devCtrl.WriteAttribute(1, [(1, Clusters.UnitTesting.Attributes.Int8u(value=1))])
await devCtrl.WriteAttribute(1, [(1, Clusters.UnitTesting.Attributes.Boolean(value=True))])
await devCtrl.WriteAttribute(1, [(1, Clusters.UnitTesting.Attributes.OctetString(value=b'123123\x00'))])
await devCtrl.WriteAttribute(1, [(1, Clusters.UnitTesting.Attributes.CharString(value='233233'))])
```

### `zclsubscribe <Cluster> <Attribute> <Nodeid> <Endpoint> <MinInterval> <MaxInterval>`
Expand Down
400 changes: 200 additions & 200 deletions docs/guides/repl/Matter_Basic_Interactions.ipynb

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/guides/repl/Matter_REPL_Intro.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@
"<span style=\"color: #000080; text-decoration-color: #000080\">│</span> <span style=\"color: #000080; text-decoration-color: #000080\">│</span>\n",
"<span style=\"color: #000080; text-decoration-color: #000080\">│</span> <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">E.g</span> <span style=\"color: #000080; text-decoration-color: #000080\">│</span>\n",
"<span style=\"color: #000080; text-decoration-color: #000080\">│</span> <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\"> </span><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f; font-weight: bold\">(</span><span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf; font-weight: bold\">1</span><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">, </span> <span style=\"color: #000080; text-decoration-color: #000080\">│</span>\n",
"<span style=\"color: #000080; text-decoration-color: #000080\">│</span> <span style=\"color: #bf7fbf; text-decoration-color: #bf7fbf; font-weight: bold\">Clusters.TestCluster.Attributes.XYZAttribute</span><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f; font-weight: bold\">…</span> <span style=\"color: #000080; text-decoration-color: #000080\">│</span>\n",
"<span style=\"color: #000080; text-decoration-color: #000080\">│</span> <span style=\"color: #bf7fbf; text-decoration-color: #bf7fbf; font-weight: bold\">Clusters.UnitTesting.Attributes.XYZAttribute</span><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f; font-weight: bold\">…</span> <span style=\"color: #000080; text-decoration-color: #000080\">│</span>\n",
"<span style=\"color: #000080; text-decoration-color: #000080\">│</span> <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">-- Write </span><span style=\"color: #7fbf7f; text-decoration-color: #7fbf7f\">'hello'</span><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\"> to the XYZ attribute on the </span> <span style=\"color: #000080; text-decoration-color: #000080\">│</span>\n",
"<span style=\"color: #000080; text-decoration-color: #000080\">│</span> <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">test cluster to endpoint </span><span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf; font-weight: bold\">1</span> <span style=\"color: #000080; text-decoration-color: #000080\">│</span>\n",
"<span style=\"color: #000080; text-decoration-color: #000080\">│</span> <span style=\"color: #808000; text-decoration-color: #808000; font-style: italic\">ZCLAttributeList</span> = <span style=\"color: #00ffff; text-decoration-color: #00ffff; font-style: italic\">def </span><span style=\"color: #800000; text-decoration-color: #800000; font-weight: bold\">ZCLAttributeList</span><span style=\"font-weight: bold\">()</span>: <span style=\"color: #000080; text-decoration-color: #000080\">│</span>\n",
Expand Down Expand Up @@ -893,7 +893,7 @@
"\u001b[34m│\u001b[0m \u001b[34m│\u001b[0m\n",
"\u001b[34m│\u001b[0m \u001b[2mE.g\u001b[0m \u001b[34m│\u001b[0m\n",
"\u001b[34m│\u001b[0m \u001b[2m \u001b[0m\u001b[1;2m(\u001b[0m\u001b[1;2;36m1\u001b[0m\u001b[2m, \u001b[0m \u001b[34m│\u001b[0m\n",
"\u001b[34m│\u001b[0m \u001b[1;2;35mClusters.TestCluster.Attributes.XYZAttribute\u001b[0m\u001b[1;2m…\u001b[0m \u001b[34m│\u001b[0m\n",
"\u001b[34m│\u001b[0m \u001b[1;2;35mClusters.UnitTesting.luster.Attributes.XYZAttribute\u001b[0m\u001b[1;2m…\u001b[0m \u001b[34m│\u001b[0m\n",
"\u001b[34m│\u001b[0m \u001b[2m-- Write \u001b[0m\u001b[2;32m'hello'\u001b[0m\u001b[2m to the XYZ attribute on the \u001b[0m \u001b[34m│\u001b[0m\n",
"\u001b[34m│\u001b[0m \u001b[2mtest cluster to endpoint \u001b[0m\u001b[1;2;36m1\u001b[0m \u001b[34m│\u001b[0m\n",
"\u001b[34m│\u001b[0m \u001b[3;33mZCLAttributeList\u001b[0m = \u001b[3;96mdef \u001b[0m\u001b[1;31mZCLAttributeList\u001b[0m\u001b[1m(\u001b[0m\u001b[1m)\u001b[0m: \u001b[34m│\u001b[0m\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3528,7 +3528,7 @@ server cluster ElectricalMeasurement = 2820 {
readonly attribute int16u clusterRevision = 65533;
}

server cluster TestCluster = 4294048773 {
server cluster UnitTesting = 4294048773 {
enum SimpleEnum : ENUM8 {
kUnspecified = 0;
kValueA = 1;
Expand Down Expand Up @@ -4705,7 +4705,7 @@ endpoint 1 {
ram attribute clusterRevision default = 3;
}

server cluster TestCluster {
server cluster UnitTesting {
ram attribute boolean;
ram attribute bitmap8;
ram attribute bitmap16;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8055,7 +8055,7 @@
]
},
{
"name": "Test Cluster",
"name": "Unit Testing",
"code": 4294048773,
"mfgCode": null,
"define": "TEST_CLUSTER",
Expand Down Expand Up @@ -8107,7 +8107,7 @@
]
},
{
"name": "Test Cluster",
"name": "Unit Testing",
"code": 4294048773,
"mfgCode": null,
"define": "TEST_CLUSTER",
Expand Down Expand Up @@ -19159,7 +19159,7 @@
]
},
{
"name": "Test Cluster",
"name": "Unit Testing",
"code": 4294048773,
"mfgCode": null,
"define": "TEST_CLUSTER",
Expand Down Expand Up @@ -19331,7 +19331,7 @@
]
},
{
"name": "Test Cluster",
"name": "Unit Testing",
"code": 4294048773,
"mfgCode": null,
"define": "TEST_CLUSTER",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2952,7 +2952,7 @@ server cluster AccountLogin = 1294 {
timed command Logout(): DefaultSuccess = 3;
}

server cluster TestCluster = 4294048773 {
server cluster UnitTesting = 4294048773 {
enum SimpleEnum : ENUM8 {
kUnspecified = 0;
kValueA = 1;
Expand Down Expand Up @@ -3801,7 +3801,7 @@ endpoint 1 {
ram attribute clusterRevision default = 1;
}

server cluster TestCluster {
server cluster UnitTesting {
ram attribute boolean;
ram attribute bitmap8;
ram attribute bitmap16;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8055,7 +8055,7 @@
]
},
{
"name": "Test Cluster",
"name": "Unit Testing",
"code": 4294048773,
"mfgCode": null,
"define": "TEST_CLUSTER",
Expand Down Expand Up @@ -8107,7 +8107,7 @@
]
},
{
"name": "Test Cluster",
"name": "Unit Testing",
"code": 4294048773,
"mfgCode": null,
"define": "TEST_CLUSTER",
Expand Down Expand Up @@ -18951,7 +18951,7 @@
]
},
{
"name": "Test Cluster",
"name": "Unit Testing",
"code": 4294048773,
"mfgCode": null,
"define": "TEST_CLUSTER",
Expand Down Expand Up @@ -19123,7 +19123,7 @@
]
},
{
"name": "Test Cluster",
"name": "Unit Testing",
"code": 4294048773,
"mfgCode": null,
"define": "TEST_CLUSTER",
Expand Down
8 changes: 4 additions & 4 deletions examples/thermostat/thermostat-common/thermostat.zap
Original file line number Diff line number Diff line change
Expand Up @@ -7011,7 +7011,7 @@
]
},
{
"name": "Test Cluster",
"name": "Unit Testing",
"code": 4294048773,
"mfgCode": null,
"define": "TEST_CLUSTER",
Expand Down Expand Up @@ -7063,7 +7063,7 @@
]
},
{
"name": "Test Cluster",
"name": "Unit Testing",
"code": 4294048773,
"mfgCode": null,
"define": "TEST_CLUSTER",
Expand Down Expand Up @@ -14129,7 +14129,7 @@
]
},
{
"name": "Test Cluster",
"name": "Unit Testing",
"code": 4294048773,
"mfgCode": null,
"define": "TEST_CLUSTER",
Expand Down Expand Up @@ -14173,7 +14173,7 @@
]
},
{
"name": "Test Cluster",
"name": "Unit Testing",
"code": 4294048773,
"mfgCode": null,
"define": "TEST_CLUSTER",
Expand Down
8 changes: 4 additions & 4 deletions examples/tv-app/tv-common/tv-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -6921,7 +6921,7 @@
]
},
{
"name": "Test Cluster",
"name": "Unit Testing",
"code": 4294048773,
"mfgCode": null,
"define": "TEST_CLUSTER",
Expand Down Expand Up @@ -6973,7 +6973,7 @@
]
},
{
"name": "Test Cluster",
"name": "Unit Testing",
"code": 4294048773,
"mfgCode": null,
"define": "TEST_CLUSTER",
Expand Down Expand Up @@ -9219,7 +9219,7 @@
]
},
{
"name": "Test Cluster",
"name": "Unit Testing",
"code": 4294048773,
"mfgCode": null,
"define": "TEST_CLUSTER",
Expand Down Expand Up @@ -9271,7 +9271,7 @@
]
},
{
"name": "Test Cluster",
"name": "Unit Testing",
"code": 4294048773,
"mfgCode": null,
"define": "TEST_CLUSTER",
Expand Down
8 changes: 4 additions & 4 deletions scripts/idl/test_xml_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def testCluster(self):
<!-- Comments should be supported -->
<configurator>
<cluster>
<name>Test Cluster</name>
<name>Test</name>
<code>0x1234</code>
<attribute side="server" code="11" type="INT32U" min="0" max="2" isNullable="true" reportable="true" writable="false">SomeIntAttribute</attribute>
Expand Down Expand Up @@ -83,7 +83,7 @@ def testCluster(self):
Idl(clusters=[
Cluster(
side=ClusterSide.CLIENT,
name='TestCluster',
name='Test',
code=0x1234,
attributes=[
Attribute(definition=Field(data_type=DataType(name='INT32U'), code=11, name='SomeIntAttribute',
Expand Down Expand Up @@ -150,7 +150,7 @@ def testFabricScopedAndSensitive(self):
idl = XmlToIdl('''<?xml version="1.0"?>
<configurator>
<cluster>
<name>Test Cluster</name>
<name>Test</name>
<code>0x0001</code>
<event side="server" code="0x1234" name="FabricEvent" priority="info" isFabricSensitive="true" optional="false">
Expand All @@ -173,7 +173,7 @@ def testFabricScopedAndSensitive(self):
''')
self.assertEqual(idl,
Idl(clusters=[Cluster(side=ClusterSide.CLIENT,
name='TestCluster',
name='Test',
code=1,
events=[Event(priority=EventPriority.INFO,
name='FabricEvent',
Expand Down
Loading

0 comments on commit b4b6dd1

Please sign in to comment.