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

justin-millman / Kvasir / 13468337505
99%
master: 98%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 22 Feb 2025 01:45AM UTC
Jobs 2
Files 159
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

22 Feb 2025 01:44AM UTC coverage: 98.688% (+0.04%) from 98.651%
13468337505

push

github

justin-millman
Pre-Defined Entities

This commit implements support for Pre-Defined Entities in the Translation, Extraction, and Reconstitution layer. A
Pre-Defined Entity is an Entity type that exposes a discrete number of static instances of itself and prevents creation
of arbitrary additional instances. Data for a Pre-Defined Entity is expected to be hard-coded in-source; in this way,
Pre-Defined Entities serve a similar role to enumerations, but prevent arbitrary extension (e.g. by casting a random
integer) and allow for attached metadata. A type is made a Pre-Defined Entity with the new [PreDefined] annotation.

Pre-Defined Entities are translated much like a regular Entity, though there are some limitations. All properties of a
Pre-Defined Entity that contribute to the data model must be read-only, and a Pre-Defined Entity cannot have any public
constructors. At least 2 static instances of the Pre-Defined Entity's own type must be exposed; public ones are part of
the data model by default (but can be excluded via [CodeOnly]), and non-public ones cannot be elevated (unlike with
non-public properties for Fields). Reference-type Fields on a Pre-Defined Entity may only resolve against other
Pre-Defined Entities; this includes via Relations. The prohibition against cyclical references still applies. Other
than [CodeOnly] and [IncludeInDataModel] (the latter being redundant), no annotations are allowed on the static
propertie that identify the pre-defined instances.

Extraction of data for a Pre-Defined Entity is the same as for regular Entities. Reconstitution uses the existing
infrastructure, leveraging the KeyLookupCreator normally used for Reference resolution to ensure that instances are
placed into the appropriate depot by the select-all query in the Transaction Layer.

3757 of 3868 branches covered (97.13%)

Branch coverage included in aggregate %.

165 of 165 new or added lines in 14 files covered. (100.0%)

6019 of 6038 relevant lines covered (99.69%)

5139.22 hits per line

Jobs
ID Job ID Ran Files Coverage
1 Release - 13468337505.1 22 Feb 2025 01:46AM UTC 159
99.27
GitHub Action Run
2 Debug - 13468337505.2 22 Feb 2025 01:45AM UTC 159
98.42
GitHub Action Run
Source Files on build 13468337505
  • Tree
  • List 159
  • Changed 105
  • Source Changed 0
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 5acb44b9 on github
  • Prev Build on main (#13427266619)
  • Next Build on main (#15376610331)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc