ssb-libtest22 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.

Potentially problematic release.


This version of ssb-libtest22 might be problematic. Click here for more details.

@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright © 2023 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.1
2
+ Name: ssb-libtest22
3
+ Version: 0.0.1
4
+ Summary: SSB Libtest22
5
+ Home-page: https://github.com/statisticsnorway/ssb-libtest22
6
+ License: MIT
7
+ Author: Kristian Lønø
8
+ Author-email: krl@ssb.no
9
+ Requires-Python: >=3.9,<4.0
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Requires-Dist: click (>=8.0.1)
18
+ Project-URL: Changelog, https://github.com/statisticsnorway/ssb-libtest22/releases
19
+ Project-URL: Documentation, https://statisticsnorway.github.io/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
+
44
+ [sonarcov]: https://sonarcloud.io/summary/overall?id=statisticsnorway_ssb-libtest22
45
+ [sonarquality]: https://sonarcloud.io/summary/overall?id=statisticsnorway_ssb-libtest22
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 Libtest22_ via [pip] from [PyPI]:
61
+
62
+ ```console
63
+ pip install ssb-libtest22
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 Libtest22_ 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-libtest22/issues
93
+ [pip]: https://pip.pypa.io/
94
+
95
+ <!-- github-only -->
96
+
97
+ [license]: https://github.com/statisticsnorway/ssb-libtest22/blob/main/LICENSE
98
+ [contributor guide]: https://github.com/statisticsnorway/ssb-libtest22/blob/main/CONTRIBUTING.md
99
+ [reference guide]: https://statisticsnorway.github.io/ssb-libtest22/reference.html
100
+
@@ -0,0 +1,77 @@
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
+
22
+ [sonarcov]: https://sonarcloud.io/summary/overall?id=statisticsnorway_ssb-libtest22
23
+ [sonarquality]: https://sonarcloud.io/summary/overall?id=statisticsnorway_ssb-libtest22
24
+ [pre-commit]: https://github.com/pre-commit/pre-commit
25
+ [black]: https://github.com/psf/black
26
+ [poetry]: https://python-poetry.org/
27
+
28
+ ## Features
29
+
30
+ - TODO
31
+
32
+ ## Requirements
33
+
34
+ - TODO
35
+
36
+ ## Installation
37
+
38
+ You can install _SSB Libtest22_ via [pip] from [PyPI]:
39
+
40
+ ```console
41
+ pip install ssb-libtest22
42
+ ```
43
+
44
+ ## Usage
45
+
46
+ Please see the [Reference Guide] for details.
47
+
48
+ ## Contributing
49
+
50
+ Contributions are very welcome.
51
+ To learn more, see the [Contributor Guide].
52
+
53
+ ## License
54
+
55
+ Distributed under the terms of the [MIT license][license],
56
+ _SSB Libtest22_ is free and open source software.
57
+
58
+ ## Issues
59
+
60
+ If you encounter any problems,
61
+ please [file an issue] along with a detailed description.
62
+
63
+ ## Credits
64
+
65
+ This project was generated from [Statistics Norway]'s [SSB PyPI Template].
66
+
67
+ [statistics norway]: https://www.ssb.no/en
68
+ [pypi]: https://pypi.org/
69
+ [ssb pypi template]: https://github.com/statisticsnorway/ssb-pypitemplate
70
+ [file an issue]: https://github.com/statisticsnorway/ssb-libtest22/issues
71
+ [pip]: https://pip.pypa.io/
72
+
73
+ <!-- github-only -->
74
+
75
+ [license]: https://github.com/statisticsnorway/ssb-libtest22/blob/main/LICENSE
76
+ [contributor guide]: https://github.com/statisticsnorway/ssb-libtest22/blob/main/CONTRIBUTING.md
77
+ [reference guide]: https://statisticsnorway.github.io/ssb-libtest22/reference.html
@@ -0,0 +1,124 @@
1
+ [tool.poetry]
2
+ name = "ssb-libtest22"
3
+ version = "0.0.1"
4
+ description = "SSB Libtest22"
5
+ authors = ["Kristian Lønø <krl@ssb.no>"]
6
+ license = "MIT"
7
+ readme = "README.md"
8
+ homepage = "https://github.com/statisticsnorway/ssb-libtest22"
9
+ repository = "https://github.com/statisticsnorway/ssb-libtest22"
10
+ documentation = "https://statisticsnorway.github.io/ssb-libtest22"
11
+ classifiers = ["Development Status :: 3 - Alpha"]
12
+
13
+ [tool.poetry.urls]
14
+ Changelog = "https://github.com/statisticsnorway/ssb-libtest22/releases"
15
+
16
+ [tool.poetry.dependencies]
17
+ python = "^3.9"
18
+ click = ">=8.0.1"
19
+
20
+ [tool.poetry.group.dev.dependencies]
21
+ pygments = ">=2.10.0"
22
+ black = { extras = ["jupyter"], version = ">=23.1.0" }
23
+ coverage = { extras = ["toml"], version = ">=6.2" }
24
+ darglint = ">=1.8.1"
25
+ furo = ">=2021.11.12"
26
+ mypy = ">=0.930"
27
+ pre-commit = ">=2.16.0"
28
+ pre-commit-hooks = ">=4.1.0"
29
+ ruff = ">=0.0.284"
30
+ pytest = ">=6.2.5"
31
+ sphinx = ">=6.2.1"
32
+ sphinx-autobuild = ">=2021.3.14"
33
+ sphinx-autodoc-typehints = ">=1.24.0"
34
+ sphinx-click = ">=3.0.2"
35
+ typeguard = ">=2.13.3"
36
+ xdoctest = { extras = ["colors"], version = ">=0.15.10" }
37
+ myst-parser = { version = ">=0.16.1" }
38
+ ipykernel = ">=6.0.0"
39
+
40
+ [tool.pytest.ini_options]
41
+ pythonpath = ["src"]
42
+
43
+ [tool.poetry.scripts]
44
+ ssb-libtest22 = "ssb_libtest22.__main__:main"
45
+
46
+ [tool.coverage.paths]
47
+ source = ["src", "*/site-packages"]
48
+ tests = ["tests", "*/tests"]
49
+
50
+ [tool.coverage.run]
51
+ branch = true
52
+ source = ["ssb_libtest22", "tests"]
53
+
54
+ [tool.coverage.report]
55
+ show_missing = true
56
+ fail_under = 50
57
+
58
+ [tool.mypy]
59
+ strict = true
60
+ warn_unreachable = true
61
+ pretty = true
62
+ show_column_numbers = true
63
+ show_error_context = true
64
+
65
+ [tool.ruff]
66
+ force-exclude = true # Apply excludes to pre-commit
67
+ show-fixes = true
68
+ src = ["src", "tests"]
69
+ target-version = "py39" # Minimum Python version supported
70
+
71
+ # Ruff rules may be customized as desired: https://docs.astral.sh/ruff/rules/
72
+ select = [
73
+ "A", # prevent using keywords that clobber python builtins
74
+ "B", # bugbear: security warnings
75
+ "D", # documentation
76
+ "E", # pycodestyle
77
+ "F", # pyflakes
78
+ "ISC", # implicit string concatenation
79
+ "I", # sort imports
80
+ "UP", # alert you when better syntax is available in your python version
81
+ "RUF", # the ruff developer's own rules
82
+ ]
83
+ ignore = [
84
+ "ANN101", # Supress missing-type-self.
85
+ "D100", # Supress undocumented-public-module. Only doc of public api required.
86
+ "E402", # Supress module-import-not-at-top-of-file, needed in jupyter notebooks.
87
+ "E501", # Supress line-too-long warnings: trust black's judgement on this one.
88
+ ]
89
+ include = ["*.py", "*.pyi", "**/pyproject.toml", "*.ipynb"]
90
+ extend-exclude = [
91
+ "__pycache__",
92
+ "old",
93
+ ".ipynb_checkpoints",
94
+ "noxfile.py",
95
+ "docs/conf.py",
96
+ ]
97
+
98
+ [tool.ruff.isort]
99
+ force-single-line = true
100
+
101
+ [tool.ruff.mccabe]
102
+ max-complexity = 15
103
+
104
+ [tool.ruff.pydocstyle]
105
+ convention = "google" # You can also use "numpy".
106
+
107
+ [tool.ruff.pep8-naming]
108
+ classmethod-decorators = ["classmethod", "validator", "root_validator", "pydantic.validator"]
109
+
110
+ [tool.ruff.per-file-ignores]
111
+ "*/__init__.py" = ["F401"]
112
+ "**/tests/*" = [
113
+ # asserts are encouraged in pytest
114
+ "S101",
115
+ # return annotations don't add value for test functions
116
+ "ANN201",
117
+ # docstrings are overkill for test functions
118
+ "D103",
119
+ "D100",
120
+ ]
121
+
122
+ [build-system]
123
+ requires = ["poetry-core>=1.0.0"]
124
+ build-backend = "poetry.core.masonry.api"
@@ -0,0 +1 @@
1
+ """SSB Libtest22."""
@@ -0,0 +1,12 @@
1
+ """Command-line interface."""
2
+ import click
3
+
4
+
5
+ @click.command()
6
+ @click.version_option()
7
+ def main() -> None:
8
+ """SSB Libtest22."""
9
+
10
+
11
+ if __name__ == "__main__":
12
+ main(prog_name="ssb-libtest22") # pragma: no cover
@@ -0,0 +1,54 @@
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
+ for i in range(2, int(sqrt(number)) + 1):
23
+ if number % i == 0:
24
+ return False
25
+ return True
26
+
27
+
28
+ def example_function(number1: int, number2: int) -> str:
29
+ """Compare two integers.
30
+
31
+ This is merely an example function can be deleted. It is used to show and test generating
32
+ documentation from code, type hinting, testing, and testing examples
33
+ in the code.
34
+
35
+
36
+ Args:
37
+ number1: The first number.
38
+ number2: The second number, which will be compared to number1.
39
+
40
+ Returns:
41
+ A string describing which number is the greatest.
42
+
43
+ Examples:
44
+ Examples should be written in doctest format, and should illustrate how
45
+ to use the function.
46
+
47
+ >>> example_function(1, 2)
48
+ 1 is less than 2
49
+
50
+ """
51
+ if number1 < number2:
52
+ return f"{number1} is less than {number2}"
53
+
54
+ return f"{number1} is greater than or equal to {number2}"
File without changes