ssb-libtest22 0.0.2__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,99 @@
1
+ Metadata-Version: 2.4
2
+ Name: ssb-libtest22
3
+ Version: 0.0.2
4
+ Summary: SSB Libtest22
5
+ License-Expression: MIT
6
+ License-File: LICENSE
7
+ Author: Inger Grünbeck
8
+ Author-email: iag@ssb.no
9
+ Requires-Python: >=3.12
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: 3.13
14
+ Classifier: Programming Language :: Python :: 3.14
15
+ Classifier: Programming Language :: Python :: 3.15
16
+ Requires-Dist: click (>=8.0.1)
17
+ Project-URL: Changelog, https://github.com/statisticsnorway/ssb-libtest22/releases
18
+ Project-URL: Documentation, https://statisticsnorway.github.io/ssb-libtest22
19
+ Project-URL: Homepage, https://github.com/statisticsnorway/ssb-libtest22
20
+ Project-URL: Repository, https://github.com/statisticsnorway/ssb-libtest22
21
+ Description-Content-Type: text/markdown
22
+
23
+ # SSB Libtest22
24
+
25
+ [![PyPI](https://img.shields.io/pypi/v/ssb-libtest22.svg)][pypi status]
26
+ [![Status](https://img.shields.io/pypi/status/ssb-libtest22.svg)][pypi status]
27
+ [![Python Version](https://img.shields.io/pypi/pyversions/ssb-libtest22)][pypi status]
28
+ [![License](https://img.shields.io/pypi/l/ssb-libtest22)][license]
29
+
30
+ [![Documentation](https://github.com/statisticsnorway/ssb-libtest22/actions/workflows/docs.yml/badge.svg)][documentation]
31
+ [![Tests](https://github.com/statisticsnorway/ssb-libtest22/actions/workflows/tests.yml/badge.svg)][tests]
32
+ [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=statisticsnorway_ssb-libtest22&metric=coverage)][sonarcov]
33
+ [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=statisticsnorway_ssb-libtest22&metric=alert_status)][sonarquality]
34
+
35
+ [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)][pre-commit]
36
+ [![Black](https://img.shields.io/badge/code%20style-black-000000.svg)][black]
37
+ [![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)
38
+ [![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)][poetry]
39
+
40
+ [pypi status]: https://pypi.org/project/ssb-libtest22/
41
+ [documentation]: https://statisticsnorway.github.io/ssb-libtest22
42
+ [tests]: https://github.com/statisticsnorway/ssb-libtest22/actions?workflow=Tests
43
+ [sonarcov]: https://sonarcloud.io/summary/overall?id=statisticsnorway_ssb-libtest22
44
+ [sonarquality]: https://sonarcloud.io/summary/overall?id=statisticsnorway_ssb-libtest22
45
+ [pre-commit]: https://github.com/pre-commit/pre-commit
46
+ [black]: https://github.com/psf/black
47
+ [poetry]: https://python-poetry.org/
48
+
49
+ ## Features
50
+
51
+ - TODO
52
+
53
+ ## Requirements
54
+
55
+ - TODO
56
+
57
+ ## Installation
58
+
59
+ You can install _SSB Libtest22_ via [pip] from [PyPI]:
60
+
61
+ ```console
62
+ pip install ssb-libtest22
63
+ ```
64
+
65
+ ## Usage
66
+
67
+ Please see the [Reference Guide] for details.
68
+
69
+ ## Contributing
70
+
71
+ Contributions are very welcome.
72
+ To learn more, see the [Contributor Guide].
73
+
74
+ ## License
75
+
76
+ Distributed under the terms of the [MIT license][license],
77
+ _SSB Libtest22_ is free and open source software.
78
+
79
+ ## Issues
80
+
81
+ If you encounter any problems,
82
+ please [file an issue] along with a detailed description.
83
+
84
+ ## Credits
85
+
86
+ This project was generated from [Statistics Norway]'s [SSB PyPI Template].
87
+
88
+ [statistics norway]: https://www.ssb.no/en
89
+ [pypi]: https://pypi.org/
90
+ [ssb pypi template]: https://github.com/statisticsnorway/ssb-pypitemplate
91
+ [file an issue]: https://github.com/statisticsnorway/ssb-libtest22/issues
92
+ [pip]: https://pip.pypa.io/
93
+
94
+ <!-- github-only -->
95
+
96
+ [license]: https://github.com/statisticsnorway/ssb-libtest22/blob/main/LICENSE
97
+ [contributor guide]: https://github.com/statisticsnorway/ssb-libtest22/blob/main/CONTRIBUTING.md
98
+ [reference guide]: https://statisticsnorway.github.io/ssb-libtest22/reference.html
99
+
@@ -0,0 +1,76 @@
1
+ # SSB Libtest22
2
+
3
+ [![PyPI](https://img.shields.io/pypi/v/ssb-libtest22.svg)][pypi status]
4
+ [![Status](https://img.shields.io/pypi/status/ssb-libtest22.svg)][pypi status]
5
+ [![Python Version](https://img.shields.io/pypi/pyversions/ssb-libtest22)][pypi status]
6
+ [![License](https://img.shields.io/pypi/l/ssb-libtest22)][license]
7
+
8
+ [![Documentation](https://github.com/statisticsnorway/ssb-libtest22/actions/workflows/docs.yml/badge.svg)][documentation]
9
+ [![Tests](https://github.com/statisticsnorway/ssb-libtest22/actions/workflows/tests.yml/badge.svg)][tests]
10
+ [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=statisticsnorway_ssb-libtest22&metric=coverage)][sonarcov]
11
+ [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=statisticsnorway_ssb-libtest22&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-libtest22/
19
+ [documentation]: https://statisticsnorway.github.io/ssb-libtest22
20
+ [tests]: https://github.com/statisticsnorway/ssb-libtest22/actions?workflow=Tests
21
+ [sonarcov]: https://sonarcloud.io/summary/overall?id=statisticsnorway_ssb-libtest22
22
+ [sonarquality]: https://sonarcloud.io/summary/overall?id=statisticsnorway_ssb-libtest22
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 Libtest22_ via [pip] from [PyPI]:
38
+
39
+ ```console
40
+ pip install ssb-libtest22
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 Libtest22_ 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-libtest22/issues
70
+ [pip]: https://pip.pypa.io/
71
+
72
+ <!-- github-only -->
73
+
74
+ [license]: https://github.com/statisticsnorway/ssb-libtest22/blob/main/LICENSE
75
+ [contributor guide]: https://github.com/statisticsnorway/ssb-libtest22/blob/main/CONTRIBUTING.md
76
+ [reference guide]: https://statisticsnorway.github.io/ssb-libtest22/reference.html
@@ -0,0 +1,169 @@
1
+ [project]
2
+ name = "ssb-libtest22"
3
+ version = "0.0.2"
4
+ description = "SSB Libtest22"
5
+ authors = [{ name = "Inger Grünbeck", email = "iag@ssb.no" }]
6
+ license = "MIT"
7
+ readme = "README.md"
8
+ requires-python = ">=3.12"
9
+ dynamic = ["classifiers"]
10
+ dependencies = [
11
+ "click>=8.0.1",
12
+ ]
13
+
14
+ [project.urls]
15
+ homepage = "https://github.com/statisticsnorway/ssb-libtest22"
16
+ repository = "https://github.com/statisticsnorway/ssb-libtest22"
17
+ documentation = "https://statisticsnorway.github.io/ssb-libtest22"
18
+ Changelog = "https://github.com/statisticsnorway/ssb-libtest22/releases"
19
+
20
+ [project.scripts]
21
+ ssb-libtest22 = "ssb_libtest22.__main__:main"
22
+
23
+ [dependency-groups]
24
+ lint = [
25
+ "black[jupyter]>=25.11.0",
26
+ "pre-commit>=4.4.0",
27
+ "pre-commit-hooks>=6.0.0",
28
+ "pydoclint>=0.8.3",
29
+ "ruff>=0.14.5",
30
+ ]
31
+ doc = [
32
+ "furo>=2025.9.25",
33
+ "myst-parser>=4.0.1",
34
+ "sphinx>=8.2.3",
35
+ "sphinx-autobuild>=2025.8.25",
36
+ "sphinx-autodoc-typehints>=3.5.2",
37
+ "sphinx-click>=6.1.0",
38
+ ]
39
+
40
+ # Type hint stubs should be placed in the dev dependency group
41
+ dev = [
42
+ {include-group = "lint"},
43
+ {include-group = "doc"},
44
+ "coverage[toml]>=7.11.3",
45
+ "deptry>=0.24.0; python_version < '4.0'",
46
+ "mypy>=1.18.2",
47
+ "pygments>=2.19.0",
48
+ "pytest>=9.0.0",
49
+ "typeguard>=2.13.3",
50
+ "xdoctest[colors]>=1.3.0",
51
+ ]
52
+
53
+ [tool.poetry]
54
+ classifiers = ["Development Status :: 4 - Beta"]
55
+ requires-poetry = ">=2.3"
56
+
57
+ [tool.poetry.requires-plugins]
58
+ poetry-plugin-export = ">=1.9"
59
+
60
+ [tool.pytest.ini_options]
61
+ pythonpath = ["src"]
62
+
63
+ [tool.coverage.paths]
64
+ source = ["src", "*/site-packages"]
65
+ tests = ["tests", "*/tests"]
66
+
67
+ [tool.coverage.run]
68
+ branch = true
69
+ source = ["ssb_libtest22", "tests"]
70
+ relative_files = true
71
+
72
+ [tool.coverage.report]
73
+ show_missing = true
74
+ fail_under = 50
75
+
76
+ [tool.deptry.per_rule_ignores]
77
+ DEP001 = ["nox", "nox_poetry"] # packages available by default
78
+
79
+ [tool.mypy]
80
+ strict = true
81
+ warn_unreachable = true
82
+ pretty = true
83
+ show_column_numbers = true
84
+ show_error_context = true
85
+
86
+ [tool.pydoclint]
87
+ style = "google"
88
+ exclude = '\.git|\.nox'
89
+ arg-type-hints-in-docstring = false
90
+ check-return-types = false
91
+ check-yield-types = false
92
+ allow-init-docstring = true
93
+ quiet = true
94
+
95
+ [tool.ruff]
96
+ force-exclude = true # Apply excludes to pre-commit
97
+ show-fixes = true
98
+ src = ["src", "tests"]
99
+ target-version = "py313" # Minimum Python version supported
100
+ include = ["*.py", "*.pyi", "**/pyproject.toml", "*.ipynb"]
101
+ extend-exclude = [
102
+ "__pycache__",
103
+ "old",
104
+ ".ipynb_checkpoints",
105
+ "noxfile.py",
106
+ "docs/conf.py",
107
+ ]
108
+
109
+ # Ruff rules may be customized as desired: https://docs.astral.sh/ruff/rules/
110
+ [tool.ruff.lint]
111
+ select = [
112
+ "A", # prevent using keywords that clobber python builtins
113
+ "ANN", # check type annotations
114
+ "B", # bugbear: security warnings
115
+ "D", # documentation
116
+ "E", # pycodestyle
117
+ "F", # pyflakes
118
+ "ISC", # implicit string concatenation
119
+ "I", # sort imports
120
+ "UP", # alert you when better syntax is available in your python version
121
+ "RUF", # the ruff developer's own rules
122
+ ]
123
+ ignore = [
124
+ "ANN202", # Don't require return type annotation for private functions.
125
+ "ANN401", # Allow type annotation with type Any.
126
+ "D100", # Supress undocumented-public-module. Only doc of public api required.
127
+ "FBT001", # Allow boolean positional arguments in a function.
128
+ "FBT002", # Allow boolean default positional arguments in a function.
129
+ "E402", # Supress module-import-not-at-top-of-file, needed in jupyter notebooks.
130
+ "E501", # Supress line-too-long warnings: trust black's judgement on this one.
131
+ "PLR2004", # Allow to compare with unnamed numerical constants.
132
+ ]
133
+ external = ["DOC"] # Avoiding removing any codes starting with `DOC` from any `# noqa` directives.
134
+
135
+ [tool.ruff.lint.isort]
136
+ force-single-line = true
137
+
138
+ [tool.ruff.lint.mccabe]
139
+ max-complexity = 15
140
+
141
+ [tool.ruff.lint.pydocstyle]
142
+ convention = "google" # You can also use "numpy".
143
+
144
+ [tool.ruff.lint.pylint]
145
+ max-args = 8
146
+
147
+ [tool.ruff.lint.pep8-naming]
148
+ classmethod-decorators = ["classmethod", "validator", "root_validator", "pydantic.validator"]
149
+
150
+ [tool.ruff.lint.per-file-ignores]
151
+ "*/__init__.py" = ["F401"]
152
+ "**/tests/*" = [
153
+ "ANN001", # type annotations don't add value for test functions
154
+ "ANN002", # type annotations don't add value for test functions
155
+ "ANN003", # type annotations don't add value for test functions
156
+ "ANN201", # type annotations don't add value for test functions
157
+ "ANN204", # type annotations don't add value for test functions
158
+ "ANN205", # type annotations don't add value for test functions
159
+ "ANN206", # type annotations don't add value for test functions
160
+ "D100", # docstrings are overkill for test functions
161
+ "D101",
162
+ "D102",
163
+ "D103",
164
+ "S101", # asserts are encouraged in pytest
165
+ ]
166
+
167
+ [build-system]
168
+ requires = ["poetry-core>=2.0.0,<3.0.0"]
169
+ build-backend = "poetry.core.masonry.api"
@@ -0,0 +1 @@
1
+ """SSB Libtest22."""
@@ -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 Libtest22."""
10
+
11
+
12
+ if __name__ == "__main__":
13
+ main(prog_name="ssb-libtest22") # 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