• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

eclipse-aascw / aas-core-codegen / 35393723831
90%

Build:
DEFAULT BRANCH: main
Ran 18 Sep 2026 08:56PM UTC
Jobs 3
Files 264
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

18 Sep 2026 08:51PM UTC coverage: 85.895% (+0.009%) from 85.886%
35393723831

push

github

web-flow
Type runtime IDs of intermediate representation (#731)

The types of the intermediate representation are compared by identity and
not by value -- two properties which agree on the name and on the type
annotation are two different properties -- so everything which has to key
on one of them keys on ``id(.)``. There were some thirty such containers,
and every one of them was a bare ``int``:

    literal_id_set: Final[FrozenSet[int]]
    _property_id_set: FrozenSet[int]
    _concrete_descendant_id_set: FrozenSet[int]
    ids_of_types_reaching_a_number: Set[int]

Nothing therefore stopped an ID of one kind from being looked up in a set
of another. ``runtime_id`` now carries the kind of the object over into
the type of its ID:

    RuntimeId = NewType("RuntimeId", int)
    IdOfOurType = NewType("IdOfOurType", RuntimeId)
    IdOfClass = NewType("IdOfClass", IdOfOurType)
    IdOfProperty = NewType("IdOfProperty", RuntimeId)
    ...

    @overload
    def runtime_id(something: "Class") -> IdOfClass: ...
    @overload
    def runtime_id(something: "Property") -> IdOfProperty: ...
    ...
    def runtime_id(something: object) -> RuntimeId:
        return RuntimeId(id(something))

A ``NewType`` over a ``NewType`` gives the hierarchy its second level: a
class *is* one of our types, so a class ID goes wherever an
``IdOfOurType`` is expected -- into ``ids_of_types_reaching_a_number``,
which holds the IDs of classes and of named unions alike -- while a
container of class IDs refuses the ID of an enumeration. A ``FrozenSet``
is covariant, so no call site had to widen anything by hand.

The overloads are spelled with forward references, which lets the whole
region sit at the top of ``_types.py``, where it is read before anything
which uses it, although ``Class`` and ``OurType`` are defined a thousand
lines below.

``id(self)`` inside a ``__repr__`` stays as it is: it formats an address
and keys nothing. So do ``common.assert_union_of_descendants_exhaustive``
and the di... (continued)

140 of 145 new or added lines in 19 files covered. (96.55%)

2 existing lines in 2 files now uncovered.

35010 of 40759 relevant lines covered (85.9%)

2.58 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
94.7
0.06% aas_core_codegen/intermediate/_types.py
2
85.63
0.0% aas_core_codegen/intermediate/_translate.py

Coverage Regressions

Lines Coverage ∆ File
1
94.7
0.06% aas_core_codegen/intermediate/_types.py
1
76.69
0.0% aas_core_codegen/xsd/main.py
Jobs
ID Job ID Ran Files Coverage
1 3.10 - 35393723831.1 18 Sep 2026 08:59PM UTC 264
85.9
GitHub Action Run
2 3.12 - 35393723831.2 18 Sep 2026 08:59PM UTC 264
85.9
GitHub Action Run
3 3.11 - 35393723831.3 18 Sep 2026 08:59PM UTC 264
85.9
GitHub Action Run
Source Files on build 35393723831
  • Tree
  • List 264
  • Changed 19
  • Source Changed 0
  • Coverage Changed 19
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • a3514d89 on github
  • Prev Build on main (#35379277364)
  • Next Build on main (#35396929406)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc