Skip to content

Commit

Permalink
Document codegen python code (#15306)
Browse files Browse the repository at this point in the history
* Add comments to build-time generator logic.

Add some code comments and slight cleanup to
idl generator logic.

* Add a readme.md

* Restyled by prettier-markdown

* Fix some typos

* Another typo fix

* More typos from misspell check

* Update wordlist with IDL content ... spellcheck on code makes me sad

* Remove typo of octet

* add back apparently used filter. Did not realise it is used

* Do not add misspelled words to wordlist

* Fix one more typo

* Fix typo

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Sep 5, 2023
1 parent a09dfc5 commit 761441b
Show file tree
Hide file tree
Showing 8 changed files with 442 additions and 38 deletions.
40 changes: 32 additions & 8 deletions .github/.wordlist.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

14
15
16
Expand All @@ -17,6 +16,7 @@ ABI
ABIs
ables
AccessControl
AccessControlEntry
accessor
AccountLogin
acdbc
Expand Down Expand Up @@ -48,6 +48,7 @@ amebad
amebaiot
announcementReason
AnnounceOTAProvider
AnnounceOtaProviderRequest
APIs
apk
AppConfig
Expand All @@ -74,6 +75,7 @@ armv
ASAN
asdk
AssertionError
AST
ASYNC
atomics
att
Expand All @@ -89,6 +91,7 @@ ATW
ATWC
AudioOutput
auth
AuthMode
autocompletion
autoconnect
autocrlf
Expand Down Expand Up @@ -226,6 +229,8 @@ CMVH
cn
codeaurora
codebase
codegen
CodeGenerator
CodeLab
codelabs
ColorControl
Expand All @@ -246,12 +251,14 @@ ConnectIP
ConnectivityManager
ConnectivityManagerImpl
ConnectNetwork
ConnectNetworkRequest
ConnectNetworkResponse
connstring
conntype
const
ContentApp
ContentApp's
ContentAppPlatform
ContentApp's
ContentLaunch
ContentLauncher
continuousHinting
Expand Down Expand Up @@ -301,9 +308,11 @@ DCL
DCMAKE
DCONFIG
debianutils
debugText
DEDEDEDE
deepnote
DefaultOTAProviders
DefaultSuccess
definedValue
DehumidificationControl
DelayedActionTime
Expand Down Expand Up @@ -413,8 +422,10 @@ endsWith
eno
entrypoint
enum
Enums
env
eq
errorValue
esd
ESPPORT
Espressif
Expand All @@ -434,6 +445,7 @@ exe
ExecStart
executables
ExtendedPAN
ExtensionEntry
extern
extpanid
FabricId
Expand Down Expand Up @@ -496,7 +508,6 @@ getManualTests
getstarted
getTests
GH
gh
ghp
githubusercontent
gitignore
Expand Down Expand Up @@ -548,6 +559,8 @@ ibb
ICA
ICMP
IDF
IDL
IDLs
idx
ifdef
ifdefs
Expand Down Expand Up @@ -608,18 +621,24 @@ jre
js
json
JTAG
jupyter
Jupyter
jupyterlab
KA
kBusy
kCase
Kconfig
KeypadInput
kGroup
kInvalidCommandId
KitProg
kNodeIdNotSpecified
knownissues
kPAKEParameterError
kPase
KVS
kWindowNotOpen
LabelList
LabelStruct
launchable
LAUNCHXL
ldflags
Expand Down Expand Up @@ -764,6 +783,7 @@ MX
mydir
MyPASSWORD
MySSID
namespacing
nano
natively
navpad
Expand Down Expand Up @@ -794,6 +814,7 @@ nrfdks
nrfutil
nrfxlib
NTAG
nullable
nullptr
NUM
nwk
Expand Down Expand Up @@ -852,6 +873,7 @@ PacketBuffer
PAI
PairDevice
PAKE
palletsprojects
pankore
param
params
Expand Down Expand Up @@ -952,6 +974,7 @@ ReadConfigValue
readelf
readfds
README
readonly
readthedocs
Reag
rebase
Expand All @@ -966,17 +989,17 @@ Rendez
RendezvousInformation
RendezvousParameters
RendezVousTest
repl
REPL
repo
req
Requestor
Requestor's
RequestorCanConsent
Requestor's
Requestors
responder
retargeting
reusability
reviwed
rfid
rfids
RGB
Expand Down Expand Up @@ -1012,8 +1035,8 @@ ScriptBinding
SDC
SDHC
SDK
SDK's
sdkconfig
SDK's
SDKs
SDKTARGETSYSROOT
sdl
Expand Down Expand Up @@ -1071,6 +1094,7 @@ SSID
startoffset
StartScan
startsWith
StatusCode
stderr
stdout
sterm
Expand Down Expand Up @@ -1117,6 +1141,7 @@ TCP
teardown
Telink
TemperatureMeasurement
templating
testability
TestArray
TestCluster
Expand Down Expand Up @@ -1181,7 +1206,6 @@ TXD
txt
UART
udc
UDC
udcport
udhcpc
UDP
Expand Down
7 changes: 6 additions & 1 deletion scripts/codegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@


class CodeGeneratorTypes(enum.Enum):
"""
Represents every generator type supported by codegen and maps
the simple enum value (user friendly and can be a command line input)
into underlying generators.
"""
JAVA = enum.auto()

def CreateGenerator(self, *args, **kargs):
Expand All @@ -42,7 +47,7 @@ def CreateGenerator(self, *args, **kargs):

class ListGeneratedFilesStorage(GeneratorStorage):
"""
Output a list of files to be generated
A storage that prints out file names that would have content in them.
"""

def get_existing_data(self, relative_path: str):
Expand Down
Loading

0 comments on commit 761441b

Please sign in to comment.