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

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

Build:
DEFAULT BRANCH: main
Ran 29 Sep 2026 07:32AM UTC
Jobs 3
Files 308
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

29 Sep 2026 07:25AM UTC coverage: 88.665% (+0.07%) from 88.592%
36536520391

push

github

web-flow
Transpile int and str.lstrip (#792)

We transpile the built-in ``int`` on strings and ``str.lstrip`` for all
the targets so that the meta-model can check the ranges of numeric
strings, *e.g.*, ``xs:long``, instead of relying on implementation-
specific snippets.

The transpiled ``int(text)`` accepts only an optional sign followed by
the ASCII digits, and only the safe integers (``|value| <= 2^53 - 1``),
since TypeScript represents the integers as ``number``. Otherwise, it
throws (panics in Go). The native parsers are not used as they differ
in what they accept (*e.g.*, ``Long.parseLong("٥")`` gives 5). Each
target gets a helper ``ParseSafeInt`` in its common module
(``parse_safe_int`` in Python, ``parseSafeInt`` in Java and
TypeScript), so that both the verification and the understood methods
can call it.

The transpiled ``text.lstrip(chars)`` strips the characters (code
points) as Python does, so 😀 does not strip half of 😁 in UTF-16.

In addition, the Python XML reader of ``xs:long`` now counts
the significant digits before it calls ``int``, as Python refuses more
than 4300 digits, leading zeros included, and the conversion is
quadratic in the length.

The new common meta-model ``int_parsing_and_lstrip`` checks the 64-bit
range of ``xs:long`` without passing an unsafe value to ``int``:

    digits = text.lstrip("+-").lstrip("0")
    ...
    head = int(digits[:10])
    tail = int(digits[10:])

Along the way, we fix large integer literals in Java (``L`` suffix),
and the TypeScript smoke test which assumed that all the verification
functions return a boolean.

348 of 354 new or added lines in 40 files covered. (98.31%)

5 existing lines in 5 files now uncovered.

42562 of 48003 relevant lines covered (88.67%)

2.66 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
87.35
-0.12% aas_core_codegen/golang/lib/_generate_types.py
1
78.71
0.08% aas_core_codegen/golang/transpilation.py
1
87.54
-0.08% aas_core_codegen/python/lib/_generate_types.py
1
96.15
aas_core_codegen/python/tests/_generate_test_lstrip_and_int.py
1
75.45
0.11% aas_core_codegen/python/transpilation.py
1
79.23
0.11% aas_core_codegen/typescript/transpilation.py

Coverage Regressions

Lines Coverage ∆ File
1
74.93
0.11% aas_core_codegen/cpp/transpilation.py
1
78.71
0.08% aas_core_codegen/golang/transpilation.py
1
77.65
0.22% aas_core_codegen/java/transpilation.py
1
75.45
0.11% aas_core_codegen/python/transpilation.py
1
79.23
0.11% aas_core_codegen/typescript/transpilation.py
Jobs
ID Job ID Ran Files Coverage
1 3.12 - 36536520391.1 29 Sep 2026 07:33AM UTC 308
88.67
GitHub Action Run
2 3.11 - 36536520391.2 29 Sep 2026 07:33AM UTC 308
88.67
GitHub Action Run
3 3.10 - 36536520391.3 29 Sep 2026 07:33AM UTC 308
88.67
GitHub Action Run
Source Files on build 36536520391
  • Tree
  • List 308
  • Changed 36
  • Source Changed 0
  • Coverage Changed 36
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 54f7de22 on github
  • Prev Build on main (#36476001595)
  • Next Build on main (#36544120769)
  • 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