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

Jaded-Encoding-Thaumaturgy / vs-jetpack / 14233061884
66%

Build:
DEFAULT BRANCH: main
Ran 03 Apr 2025 01:40AM UTC
Jobs 2
Files 67
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

03 Apr 2025 01:36AM UTC coverage: 59.591% (+0.4%) from 59.234%
14233061884

push

github

web-flow
vskernels: Replace `__init_subclass__` by a metaclass and instantiation check (#51)

The current implementation of `vskernels` checks the inherited classes
within the `__init_subclass__` method defined in `BaseScaler` when the
classes are constructed.

However, this approach has several issues:
- The `abstract_kernels` list is hardcoded with default values in a
separate location, leading to a cumbersome design where you have to wait
for these abstract classes to load.
- Abstract classes are bypassed and can be instantiated by the user,
even if they haven't specified a kernel radius.
- Declaring "abstract" classes in a `__abstract__` list at the top of
the file is misleading and questionable. These classes aren't truly
abstract since they can still be instantiated, and the kernel radius
check is simply skipped.

My proposed solution:
- Add a metaclass to `BaseScaler` to explicitly define abstract
classes—those that shouldn't be instantiated.
- Introduce a `partial_abstract` argument to bypass the kernel radius
check, preserving the current behavior for classes like
`vsscale.GenericScaler`.
- Classes like `Scaler` or `Kernel` will NOT continue to function as they did before. They will throw an error at class instantiation.
- The `kernel_radius` check will occur during class instantiation rather
than class construction, eliminating the need to explicitly add an
abstract argument when defining the abstract interface.
- All logic will be contained within the same file, avoiding scattered
code across multiple files.

25 of 29 new or added lines in 3 files covered. (86.21%)

3613 of 6063 relevant lines covered (59.59%)

1.19 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
4
54.58
6.36% vskernels/kernels/abstract.py
Jobs
ID Job ID Ran Files Coverage
1 67 - 3.12 - 14233061884.1 03 Apr 2025 01:40AM UTC 67
59.59
GitHub Action Run
2 67 - 3.10 - 14233061884.2 03 Apr 2025 01:40AM UTC 67
59.59
GitHub Action Run
Source Files on build 14233061884
  • Tree
  • List 67
  • Changed 3
  • Source Changed 3
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #14233061884
  • c6e095ea on github
  • Prev Build on main (#14232894077)
  • Next Build on main (#14235354224)
  • Delete
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