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

google / sedpack / 17151428559

22 Aug 2025 09:21AM UTC coverage: 87.312% (-0.05%) from 87.364%
17151428559

push

github

web-flow
Set __version__ dynamically in __init__.py (#217)

The version of the Sedpack package is dynamically determined by Maturin
based on the version string in rust/Cargo.toml. Remove the redundancy in
__init__.py file.

Fixes https://github.com/google/sedpack/issues/145

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

3 of 5 new or added lines in 1 file covered. (60.0%)

2498 of 2861 relevant lines covered (87.31%)

0.87 hits per line

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

60.0
/src/sedpack/__init__.py
1
# Copyright 2023 Google LLC
2
#
3
# Licensed under the Apache License, Version 2.0 (the "License");
4
# you may not use this file except in compliance with the License.
5
# You may obtain a copy of the License at
6
#
7
#     https://www.apache.org/licenses/LICENSE-2.0
8
#
9
# Unless required by applicable law or agreed to in writing, software
10
# distributed under the License is distributed on an "AS IS" BASIS,
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
# See the License for the specific language governing permissions and
13
# limitations under the License.
14
"""Dataset library.
15

16
Version format: MAJOR.MINOR.PATCH (see https://pypi.org/project/semver/ for
17
more possibilities).
18
"""
19

20
import importlib
1✔
21

22
# The version of this package is defined by rust/Cargo.toml and dynamically
23
# deduced by Maturin (see
24
# https://www.maturin.rs/metadata.html#dynamic-metadata). To ensure
25
# compatibility with existing code we dynamically set the __version__ attribute
26
# here.
27
try:
1✔
28
    # When package is installed use the version.
29
    __version__ = importlib.metadata.version("sedpack")
1✔
NEW
30
except importlib.metadata.PackageNotFoundError:
×
31
    # Package is not installed. The Rust part of this package is probably not
32
    # going to work in this case (the Rust binding would be probably missing).
NEW
33
    __version__ = "0.0.7-dev"
×
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