ssb-libtest21 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright © 2026 Statistics Norway
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,100 @@
1
+ Metadata-Version: 2.4
2
+ Name: ssb-libtest21
3
+ Version: 0.0.1
4
+ Summary: SSB Libtest21
5
+ License-Expression: MIT
6
+ License-File: LICENSE
7
+ Author: Arne Sørli
8
+ Author-email: arne.sorli@ssb.no
9
+ Maintainer: Statistics Norway, IT-partner Department (703)
10
+ Requires-Python: >=3.12
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Programming Language :: Python :: 3.14
16
+ Classifier: Programming Language :: Python :: 3.15
17
+ Requires-Dist: click (>=8.0.1)
18
+ Project-URL: Changelog, https://github.com/statisticsnorway/ssb-libtest21/releases
19
+ Project-URL: Documentation, https://statisticsnorway.github.io/ssb-libtest21
20
+ Project-URL: Homepage, https://github.com/statisticsnorway/ssb-libtest21
21
+ Project-URL: Repository, https://github.com/statisticsnorway/ssb-libtest21
22
+ Description-Content-Type: text/markdown
23
+
24
+ # SSB Libtest21
25
+
26
+ [![PyPI](https://img.shields.io/pypi/v/ssb-libtest21.svg)][pypi status]
27
+ [![Status](https://img.shields.io/pypi/status/ssb-libtest21.svg)][pypi status]
28
+ [![Python Version](https://img.shields.io/pypi/pyversions/ssb-libtest21)][pypi status]
29
+ [![License](https://img.shields.io/pypi/l/ssb-libtest21)][license]
30
+
31
+ [![Documentation](https://github.com/statisticsnorway/ssb-libtest21/actions/workflows/docs.yml/badge.svg)][documentation]
32
+ [![Tests](https://github.com/statisticsnorway/ssb-libtest21/actions/workflows/tests.yml/badge.svg)][tests]
33
+ [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=statisticsnorway_ssb-libtest21&metric=coverage)][sonarcov]
34
+ [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=statisticsnorway_ssb-libtest21&metric=alert_status)][sonarquality]
35
+
36
+ [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)][pre-commit]
37
+ [![Black](https://img.shields.io/badge/code%20style-black-000000.svg)][black]
38
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
39
+ [![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)][poetry]
40
+
41
+ [pypi status]: https://pypi.org/project/ssb-libtest21/
42
+ [documentation]: https://statisticsnorway.github.io/ssb-libtest21
43
+ [tests]: https://github.com/statisticsnorway/ssb-libtest21/actions?workflow=Tests
44
+ [sonarcov]: https://sonarcloud.io/summary/overall?id=statisticsnorway_ssb-libtest21
45
+ [sonarquality]: https://sonarcloud.io/summary/overall?id=statisticsnorway_ssb-libtest21
46
+ [pre-commit]: https://github.com/pre-commit/pre-commit
47
+ [black]: https://github.com/psf/black
48
+ [poetry]: https://python-poetry.org/
49
+
50
+ ## Features
51
+
52
+ - TODO
53
+
54
+ ## Requirements
55
+
56
+ - TODO
57
+
58
+ ## Installation
59
+
60
+ You can install _SSB Libtest21_ via [pip] from [PyPI]:
61
+
62
+ ```console
63
+ pip install ssb-libtest21
64
+ ```
65
+
66
+ ## Usage
67
+
68
+ Please see the [Reference Guide] for details.
69
+
70
+ ## Contributing
71
+
72
+ Contributions are very welcome.
73
+ To learn more, see the [Contributor Guide].
74
+
75
+ ## License
76
+
77
+ Distributed under the terms of the [MIT license][license],
78
+ _SSB Libtest21_ is free and open source software.
79
+
80
+ ## Issues
81
+
82
+ If you encounter any problems,
83
+ please [file an issue] along with a detailed description.
84
+
85
+ ## Credits
86
+
87
+ This project was generated from [Statistics Norway]'s [SSB PyPI Template].
88
+
89
+ [statistics norway]: https://www.ssb.no/en
90
+ [pypi]: https://pypi.org/
91
+ [ssb pypi template]: https://github.com/statisticsnorway/ssb-pypitemplate
92
+ [file an issue]: https://github.com/statisticsnorway/ssb-libtest21/issues
93
+ [pip]: https://pip.pypa.io/
94
+
95
+ <!-- github-only -->
96
+
97
+ [license]: https://github.com/statisticsnorway/ssb-libtest21/blob/main/LICENSE
98
+ [contributor guide]: https://github.com/statisticsnorway/ssb-libtest21/blob/main/CONTRIBUTING.md
99
+ [reference guide]: https://statisticsnorway.github.io/ssb-libtest21/reference.html
100
+
@@ -0,0 +1,76 @@
1
+ # SSB Libtest21
2
+
3
+ [![PyPI](https://img.shields.io/pypi/v/ssb-libtest21.svg)][pypi status]
4
+ [![Status](https://img.shields.io/pypi/status/ssb-libtest21.svg)][pypi status]
5
+ [![Python Version](https://img.shields.io/pypi/pyversions/ssb-libtest21)][pypi status]
6
+ [![License](https://img.shields.io/pypi/l/ssb-libtest21)][license]
7
+
8
+ [![Documentation](https://github.com/statisticsnorway/ssb-libtest21/actions/workflows/docs.yml/badge.svg)][documentation]
9
+ [![Tests](https://github.com/statisticsnorway/ssb-libtest21/actions/workflows/tests.yml/badge.svg)][tests]
10
+ [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=statisticsnorway_ssb-libtest21&metric=coverage)][sonarcov]
11
+ [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=statisticsnorway_ssb-libtest21&metric=alert_status)][sonarquality]
12
+
13
+ [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)][pre-commit]
14
+ [![Black](https://img.shields.io/badge/code%20style-black-000000.svg)][black]
15
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
16
+ [![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)][poetry]
17
+
18
+ [pypi status]: https://pypi.org/project/ssb-libtest21/
19
+ [documentation]: https://statisticsnorway.github.io/ssb-libtest21
20
+ [tests]: https://github.com/statisticsnorway/ssb-libtest21/actions?workflow=Tests
21
+ [sonarcov]: https://sonarcloud.io/summary/overall?id=statisticsnorway_ssb-libtest21
22
+ [sonarquality]: https://sonarcloud.io/summary/overall?id=statisticsnorway_ssb-libtest21
23
+ [pre-commit]: https://github.com/pre-commit/pre-commit
24
+ [black]: https://github.com/psf/black
25
+ [poetry]: https://python-poetry.org/
26
+
27
+ ## Features
28
+
29
+ - TODO
30
+
31
+ ## Requirements
32
+
33
+ - TODO
34
+
35
+ ## Installation
36
+
37
+ You can install _SSB Libtest21_ via [pip] from [PyPI]:
38
+
39
+ ```console
40
+ pip install ssb-libtest21
41
+ ```
42
+
43
+ ## Usage
44
+
45
+ Please see the [Reference Guide] for details.
46
+
47
+ ## Contributing
48
+
49
+ Contributions are very welcome.
50
+ To learn more, see the [Contributor Guide].
51
+
52
+ ## License
53
+
54
+ Distributed under the terms of the [MIT license][license],
55
+ _SSB Libtest21_ is free and open source software.
56
+
57
+ ## Issues
58
+
59
+ If you encounter any problems,
60
+ please [file an issue] along with a detailed description.
61
+
62
+ ## Credits
63
+
64
+ This project was generated from [Statistics Norway]'s [SSB PyPI Template].
65
+
66
+ [statistics norway]: https://www.ssb.no/en
67
+ [pypi]: https://pypi.org/
68
+ [ssb pypi template]: https://github.com/statisticsnorway/ssb-pypitemplate
69
+ [file an issue]: https://github.com/statisticsnorway/ssb-libtest21/issues
70
+ [pip]: https://pip.pypa.io/
71
+
72
+ <!-- github-only -->
73
+
74
+ [license]: https://github.com/statisticsnorway/ssb-libtest21/blob/main/LICENSE
75
+ [contributor guide]: https://github.com/statisticsnorway/ssb-libtest21/blob/main/CONTRIBUTING.md
76
+ [reference guide]: https://statisticsnorway.github.io/ssb-libtest21/reference.html
@@ -0,0 +1,170 @@
1
+ [project]
2
+ name = "ssb-libtest21"
3
+ version = "0.0.1"
4
+ description = "SSB Libtest21"
5
+ authors = [{ name = "Arne Sørli", email = "arne.sorli@ssb.no" }]
6
+ maintainers = [{ name = "Statistics Norway, IT-partner Department (703)" }]
7
+ license = "MIT"
8
+ readme = "README.md"
9
+ requires-python = ">=3.12"
10
+ dynamic = ["classifiers"]
11
+ dependencies = [
12
+ "click>=8.0.1",
13
+ ]
14
+
15
+ [project.urls]
16
+ homepage = "https://github.com/statisticsnorway/ssb-libtest21"
17
+ repository = "https://github.com/statisticsnorway/ssb-libtest21"
18
+ documentation = "https://statisticsnorway.github.io/ssb-libtest21"
19
+ Changelog = "https://github.com/statisticsnorway/ssb-libtest21/releases"
20
+
21
+ [project.scripts]
22
+ ssb-libtest21 = "ssb_libtest21.__main__:main"
23
+
24
+ [dependency-groups]
25
+ lint = [
26
+ "black[jupyter]>=25.11.0",
27
+ "pre-commit>=4.4.0",
28
+ "pre-commit-hooks>=6.0.0",
29
+ "pydoclint>=0.8.3",
30
+ "ruff>=0.14.5",
31
+ ]
32
+ doc = [
33
+ "furo>=2025.9.25",
34
+ "myst-parser>=4.0.1",
35
+ "sphinx>=8.2.3",
36
+ "sphinx-autobuild>=2025.8.25",
37
+ "sphinx-autodoc-typehints>=3.5.2",
38
+ "sphinx-click>=6.1.0",
39
+ ]
40
+
41
+ # Type hint stubs should be placed in the dev dependency group
42
+ dev = [
43
+ {include-group = "lint"},
44
+ {include-group = "doc"},
45
+ "coverage[toml]>=7.11.3",
46
+ "deptry>=0.24.0; python_version < '4.0'",
47
+ "mypy>=1.18.2",
48
+ "pygments>=2.19.0",
49
+ "pytest>=9.0.0",
50
+ "typeguard>=2.13.3",
51
+ "xdoctest[colors]>=1.3.0",
52
+ ]
53
+
54
+ [tool.poetry]
55
+ classifiers = ["Development Status :: 4 - Beta"]
56
+ requires-poetry = ">=2.3"
57
+
58
+ [tool.poetry.requires-plugins]
59
+ poetry-plugin-export = ">=1.9"
60
+
61
+ [tool.pytest.ini_options]
62
+ pythonpath = ["src"]
63
+
64
+ [tool.coverage.paths]
65
+ source = ["src", "*/site-packages"]
66
+ tests = ["tests", "*/tests"]
67
+
68
+ [tool.coverage.run]
69
+ branch = true
70
+ source = ["ssb_libtest21", "tests"]
71
+ relative_files = true
72
+
73
+ [tool.coverage.report]
74
+ show_missing = true
75
+ fail_under = 50
76
+
77
+ [tool.deptry.per_rule_ignores]
78
+ DEP001 = ["nox", "nox_poetry"] # packages available by default
79
+
80
+ [tool.mypy]
81
+ strict = true
82
+ warn_unreachable = true
83
+ pretty = true
84
+ show_column_numbers = true
85
+ show_error_context = true
86
+
87
+ [tool.pydoclint]
88
+ style = "google"
89
+ exclude = '\.git|\.nox'
90
+ arg-type-hints-in-docstring = false
91
+ check-return-types = false
92
+ check-yield-types = false
93
+ allow-init-docstring = true
94
+ quiet = true
95
+
96
+ [tool.ruff]
97
+ force-exclude = true # Apply excludes to pre-commit
98
+ show-fixes = true
99
+ src = ["src", "tests"]
100
+ target-version = "py313" # Minimum Python version supported
101
+ include = ["*.py", "*.pyi", "**/pyproject.toml", "*.ipynb"]
102
+ extend-exclude = [
103
+ "__pycache__",
104
+ "old",
105
+ ".ipynb_checkpoints",
106
+ "noxfile.py",
107
+ "docs/conf.py",
108
+ ]
109
+
110
+ # Ruff rules may be customized as desired: https://docs.astral.sh/ruff/rules/
111
+ [tool.ruff.lint]
112
+ select = [
113
+ "A", # prevent using keywords that clobber python builtins
114
+ "ANN", # check type annotations
115
+ "B", # bugbear: security warnings
116
+ "D", # documentation
117
+ "E", # pycodestyle
118
+ "F", # pyflakes
119
+ "ISC", # implicit string concatenation
120
+ "I", # sort imports
121
+ "UP", # alert you when better syntax is available in your python version
122
+ "RUF", # the ruff developer's own rules
123
+ ]
124
+ ignore = [
125
+ "ANN202", # Don't require return type annotation for private functions.
126
+ "ANN401", # Allow type annotation with type Any.
127
+ "D100", # Supress undocumented-public-module. Only doc of public api required.
128
+ "FBT001", # Allow boolean positional arguments in a function.
129
+ "FBT002", # Allow boolean default positional arguments in a function.
130
+ "E402", # Supress module-import-not-at-top-of-file, needed in jupyter notebooks.
131
+ "E501", # Supress line-too-long warnings: trust black's judgement on this one.
132
+ "PLR2004", # Allow to compare with unnamed numerical constants.
133
+ ]
134
+ external = ["DOC"] # Avoiding removing any codes starting with `DOC` from any `# noqa` directives.
135
+
136
+ [tool.ruff.lint.isort]
137
+ force-single-line = true
138
+
139
+ [tool.ruff.lint.mccabe]
140
+ max-complexity = 15
141
+
142
+ [tool.ruff.lint.pydocstyle]
143
+ convention = "google" # You can also use "numpy".
144
+
145
+ [tool.ruff.lint.pylint]
146
+ max-args = 8
147
+
148
+ [tool.ruff.lint.pep8-naming]
149
+ classmethod-decorators = ["classmethod", "validator", "root_validator", "pydantic.validator"]
150
+
151
+ [tool.ruff.lint.per-file-ignores]
152
+ "*/__init__.py" = ["F401"]
153
+ "**/tests/*" = [
154
+ "ANN001", # type annotations don't add value for test functions
155
+ "ANN002", # type annotations don't add value for test functions
156
+ "ANN003", # type annotations don't add value for test functions
157
+ "ANN201", # type annotations don't add value for test functions
158
+ "ANN204", # type annotations don't add value for test functions
159
+ "ANN205", # type annotations don't add value for test functions
160
+ "ANN206", # type annotations don't add value for test functions
161
+ "D100", # docstrings are overkill for test functions
162
+ "D101",
163
+ "D102",
164
+ "D103",
165
+ "S101", # asserts are encouraged in pytest
166
+ ]
167
+
168
+ [build-system]
169
+ requires = ["poetry-core>=2.0.0,<3.0.0"]
170
+ build-backend = "poetry.core.masonry.api"
@@ -0,0 +1 @@
1
+ """SSB Libtest21."""
@@ -0,0 +1,13 @@
1
+ """Command-line interface."""
2
+
3
+ import click
4
+
5
+
6
+ @click.command()
7
+ @click.version_option()
8
+ def main() -> None:
9
+ """SSB Libtest21."""
10
+
11
+
12
+ if __name__ == "__main__":
13
+ main(prog_name="ssb-libtest21") # pragma: no cover
@@ -0,0 +1,51 @@
1
+ """A collection of useful functions.
2
+
3
+ The template and this example uses Google style docstrings as described at:
4
+ https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html
5
+
6
+ """
7
+
8
+ from math import sqrt
9
+
10
+
11
+ def is_prime(number: int) -> bool:
12
+ """Check if the given number is a prime number.
13
+
14
+ Args:
15
+ number: The number to check.
16
+
17
+ Returns:
18
+ True if the number is a prime number. False otherwise.
19
+ """
20
+ if number <= 1:
21
+ return False
22
+ return all(number % i != 0 for i in range(2, int(sqrt(number)) + 1))
23
+
24
+
25
+ def example_function(number1: int, number2: int) -> str:
26
+ """Compare two integers.
27
+
28
+ This is merely an example function can be deleted. It is used to show and test generating
29
+ documentation from code, type hinting, testing, and testing examples
30
+ in the code.
31
+
32
+
33
+ Args:
34
+ number1: The first number.
35
+ number2: The second number, which will be compared to number1.
36
+
37
+ Returns:
38
+ A string describing which number is the greatest.
39
+
40
+ Examples:
41
+ Examples should be written in doctest format, and should illustrate how
42
+ to use the function.
43
+
44
+ >>> example_function(1, 2)
45
+ 1 is less than 2
46
+
47
+ """
48
+ if number1 < number2:
49
+ return f"{number1} is less than {number2}"
50
+
51
+ return f"{number1} is greater than or equal to {number2}"
File without changes