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

jyablonski / python_docker / 14424918611

13 Apr 2025 01:50AM UTC coverage: 82.139%. First build
14424918611

Pull #94

github

web-flow
Merge 791203fbb into 265e9c2b5
Pull Request #94: Ingestion v2.0.0

432 of 572 new or added lines in 13 files covered. (75.52%)

860 of 1047 relevant lines covered (82.14%)

0.82 hits per line

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

62.5
/src/feature_flags.py
1
import logging
1✔
2

3
import pandas as pd
1✔
4
from sqlalchemy.engine import Connection, Engine
1✔
5

6

7
def get_feature_flags(connection: Connection | Engine) -> pd.DataFrame:
1✔
NEW
8
    flags = pd.read_sql_query(sql="select * from marts.feature_flags;", con=connection)
×
9

NEW
10
    logging.info(f"Retrieving {len(flags)} Feature Flags")
×
NEW
11
    return flags
×
12

13

14
class FeatureFlagManager:
1✔
15
    _flags = {}
1✔
16

17
    @classmethod
1✔
18
    def load(cls, engine):
1✔
NEW
19
        df = get_feature_flags(connection=engine)
×
NEW
20
        cls._flags = df.set_index("flag")["is_enabled"].to_dict()
×
21

22
    @classmethod
1✔
23
    def get(cls, flag):
1✔
NEW
24
        return cls._flags.get(flag, False)
×
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