• R/O
  • SSH

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

修訂1019b68a71df6f2f5b7ff431b1260e4ca36eec8a (tree)
時間2024-02-19 05:27:23
作者Albert Mietus < albert AT mietus DOT nl >
CommiterAlbert Mietus < albert AT mietus DOT nl >

Log Message

The summary of the (py,compiler) package structure is more-or-less done (DOC-only)

Change Summary

差異

diff -r 58fbcdb582d0 -r 1019b68a71df CCastle/DocParts/Design/01.Architecture/02.packages.rst
--- a/CCastle/DocParts/Design/01.Architecture/02.packages.rst Sun Feb 18 18:14:40 2024 +0100
+++ b/CCastle/DocParts/Design/01.Architecture/02.packages.rst Sun Feb 18 21:27:23 2024 +0100
@@ -62,6 +62,37 @@
6262 e.g. plugins. Or as reference for a reader.
6363
6464
65+.. hint:: Suppose we make the “nice-fsm-plugin” that act as transformer ...
66+
67+ .. note:: The resulting namespace will be: |BR| ``castle.transformers.fsm.nice_fsm``
68+
69+ The name of the top directly does not matter (for python). We advice a name that shows it’s not a python-id, and is
70+ related to the package name. For example:
71+ |BR|
72+ ``<nice-fsm-plugin>``
73+
74+ This directory contains the *only* package-info-file, which name a content depends on the (package) build systems.
75+ E.g.
76+
77+ * ``setup.py`` (or ...)
78+
79+ + **name** *:str* e.g. “nice-fsm-castle-plugin”`
80+ + **packages** *:List[str]* =[ ``castle.transformers.fsm.nice_fsm``, ...]
81+
82+ We need a file-hierarchy, with *empty* directories, that mirror the (shared) namespace
83+
84+ * ``<nice-fsm-plugin>/castle/`` -- empty, no `__init__,py`
85+ * ``<nice-fsm-plugin>/castle/transformers/`` -- empty, no `__init__,py`
86+ * ``<nice-fsm-plugin>/castle/transformers/fsm`` -- empty, no `__init__,py`
87+ * ``<nice-fsm-plugin>/castle/transformers/fsm/nice_fsm`` Holds all code:
88+
89+ - **__init__.py** can be empty, but typically uses ``from .<> import <>`` to have the “api functionality” available
90+ - **<files>.py** code
91+ - **<sub>/** sub-package, (full-dirname to be included in `packages=[...]` above
92+
93+
94+
95+
6596 Opportunity
6697 ===========
6798 Let study the options, our needs and how others handle packages & plugins, before designing for castle.
@@ -157,7 +188,9 @@
157188 In practice, “ownership” (like: who owns the code-archive, but also “when” to release) are the borders that define the
158189 distribution-packages.
159190
191+------
160192
193+XXXX
161194
162195 ------
163196