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

pantsbuild / pants / 21378504907

26 Jan 2026 11:48PM UTC coverage: 43.218% (-37.1%) from 80.269%
21378504907

Pull #23038

github

web-flow
Merge a9ec5051e into 09b8ecaa1
Pull Request #23038: remote cache logger - new plugin to help debug the remote cache

0 of 45 new or added lines in 1 file covered. (0.0%)

17212 existing lines in 540 files now uncovered.

26144 of 60493 relevant lines covered (43.22%)

0.86 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/python/pants/backend/codegen/avro/tailor.py
1
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
3

UNCOV
4
from __future__ import annotations
×
5

UNCOV
6
from dataclasses import dataclass
×
7

UNCOV
8
from pants.backend.codegen.avro.avro_subsystem import AvroSubsystem
×
UNCOV
9
from pants.backend.codegen.avro.target_types import AvroSourcesGeneratorTarget
×
UNCOV
10
from pants.core.goals.tailor import (
×
11
    AllOwnedSources,
12
    PutativeTarget,
13
    PutativeTargets,
14
    PutativeTargetsRequest,
15
)
UNCOV
16
from pants.engine.intrinsics import path_globs_to_paths
×
UNCOV
17
from pants.engine.rules import collect_rules, rule
×
UNCOV
18
from pants.engine.unions import UnionRule
×
UNCOV
19
from pants.util.dirutil import group_by_dir
×
UNCOV
20
from pants.util.logging import LogLevel
×
21

22

UNCOV
23
@dataclass(frozen=True)
×
UNCOV
24
class PutativeAvroTargetsRequest(PutativeTargetsRequest):
×
UNCOV
25
    pass
×
26

27

UNCOV
28
@rule(level=LogLevel.DEBUG, desc="Determine candidate Protobuf targets to create")
×
UNCOV
29
async def find_putative_targets(
×
30
    req: PutativeAvroTargetsRequest,
31
    all_owned_sources: AllOwnedSources,
32
    avro_subsystem: AvroSubsystem,
33
) -> PutativeTargets:
34
    if not avro_subsystem.tailor:
×
35
        return PutativeTargets()
×
36

37
    all_avro_files = await path_globs_to_paths(req.path_globs("*.avsc", "*.avpr", "*.avdl"))
×
38
    unowned_avro_files = set(all_avro_files.files) - set(all_owned_sources)
×
39
    pts = [
×
40
        PutativeTarget.for_target_type(
41
            AvroSourcesGeneratorTarget,
42
            path=dirname,
43
            name=None,
44
            triggering_sources=sorted(filenames),
45
        )
46
        for dirname, filenames in group_by_dir(unowned_avro_files).items()
47
    ]
48
    return PutativeTargets(pts)
×
49

50

UNCOV
51
def rules():
×
UNCOV
52
    return [
×
53
        *collect_rules(),
54
        UnionRule(PutativeTargetsRequest, PutativeAvroTargetsRequest),
55
    ]
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