onekit 0.0.0__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.
onekit-0.0.0/LICENSE ADDED
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2023, onekit developers.
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ * Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ * Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ * Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
onekit-0.0.0/PKG-INFO ADDED
@@ -0,0 +1,56 @@
1
+ Metadata-Version: 2.1
2
+ Name: onekit
3
+ Version: 0.0.0
4
+ Summary: One package for utility functions.
5
+ Home-page: https://github.com/estripling/onekit
6
+ License: BSD 3-Clause
7
+ Keywords: onekit
8
+ Author: onekit developers
9
+ Requires-Python: >=3.8.1,<4.0
10
+ Classifier: License :: Other/Proprietary License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Project-URL: Documentation, https://onekit.readthedocs.io/en/stable/
17
+ Project-URL: Repository, https://github.com/estripling/onekit
18
+ Description-Content-Type: text/markdown
19
+
20
+ <p align="center">
21
+ <img src="https://raw.githubusercontent.com/estripling/onekit/main/docs/source/_static/onekitlogo.png" width="180" alt="onekit logo.">
22
+ </p>
23
+
24
+ <p align="center">
25
+ <a href="https://pypi.org/project/onekit"><img alt="pypi" src="https://img.shields.io/pypi/v/onekit"></a>
26
+ <a href="https://readthedocs.org/projects/onekit/?badge=latest"><img alt="docs" src="https://readthedocs.org/projects/onekit/badge/?version=latest"></a>
27
+ <a href="https://github.com/estripling/onekit/actions/workflows/ci.yml"><img alt="ci status" src="https://github.com/estripling/onekit/actions/workflows/ci.yml/badge.svg?branch=main"></a>
28
+ <a href="https://codecov.io/gh/estripling/onekit"><img alt="coverage" src="https://codecov.io/github/estripling/onekit/coverage.svg?branch=main"></a>
29
+ <a href="https://github.com/estripling/onekit/blob/main/LICENSE"><img alt="license" src="https://img.shields.io/pypi/l/onekit"></a>
30
+ </p>
31
+
32
+ ## About
33
+
34
+ One package for utility functions:
35
+
36
+ - [Documentation](https://onekit.readthedocs.io/en/stable/index.html)
37
+ - [Example usage](https://onekit.readthedocs.io/en/stable/example.html)
38
+ - [API Reference](https://onekit.readthedocs.io/en/stable/autoapi/onekit/index.html)
39
+
40
+ ## Installation
41
+
42
+ `onekit` is available on [PyPI](https://pypi.org/project/onekit/) for Python 3.8+:
43
+
44
+ ```console
45
+ pip install onekit
46
+ ```
47
+
48
+ ## License
49
+
50
+ `onekit` was created by onekit developers.
51
+ It is licensed under the terms of the BSD 3-Clause license.
52
+
53
+ ## Examples
54
+
55
+ - TODO
56
+
onekit-0.0.0/README.md ADDED
@@ -0,0 +1,36 @@
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/estripling/onekit/main/docs/source/_static/onekitlogo.png" width="180" alt="onekit logo.">
3
+ </p>
4
+
5
+ <p align="center">
6
+ <a href="https://pypi.org/project/onekit"><img alt="pypi" src="https://img.shields.io/pypi/v/onekit"></a>
7
+ <a href="https://readthedocs.org/projects/onekit/?badge=latest"><img alt="docs" src="https://readthedocs.org/projects/onekit/badge/?version=latest"></a>
8
+ <a href="https://github.com/estripling/onekit/actions/workflows/ci.yml"><img alt="ci status" src="https://github.com/estripling/onekit/actions/workflows/ci.yml/badge.svg?branch=main"></a>
9
+ <a href="https://codecov.io/gh/estripling/onekit"><img alt="coverage" src="https://codecov.io/github/estripling/onekit/coverage.svg?branch=main"></a>
10
+ <a href="https://github.com/estripling/onekit/blob/main/LICENSE"><img alt="license" src="https://img.shields.io/pypi/l/onekit"></a>
11
+ </p>
12
+
13
+ ## About
14
+
15
+ One package for utility functions:
16
+
17
+ - [Documentation](https://onekit.readthedocs.io/en/stable/index.html)
18
+ - [Example usage](https://onekit.readthedocs.io/en/stable/example.html)
19
+ - [API Reference](https://onekit.readthedocs.io/en/stable/autoapi/onekit/index.html)
20
+
21
+ ## Installation
22
+
23
+ `onekit` is available on [PyPI](https://pypi.org/project/onekit/) for Python 3.8+:
24
+
25
+ ```console
26
+ pip install onekit
27
+ ```
28
+
29
+ ## License
30
+
31
+ `onekit` was created by onekit developers.
32
+ It is licensed under the terms of the BSD 3-Clause license.
33
+
34
+ ## Examples
35
+
36
+ - TODO
@@ -0,0 +1,73 @@
1
+ [tool.poetry]
2
+ name = "onekit"
3
+ version = "0.0.0"
4
+ description = "One package for utility functions."
5
+ authors = ["onekit developers"]
6
+ license = "BSD 3-Clause"
7
+ readme = "README.md"
8
+ repository = "https://github.com/estripling/onekit"
9
+ documentation = "https://onekit.readthedocs.io/en/stable/"
10
+ keywords = ["onekit"]
11
+ classifiers = [
12
+ "Programming Language :: Python :: 3",
13
+ ]
14
+
15
+ [tool.poetry.dependencies]
16
+ python = ">=3.8.1,<4.0"
17
+
18
+ [tool.poetry.group.precommit.dependencies]
19
+ autoflake = "^2.2.1"
20
+ black = {extras = ["jupyter"], version = "^23.10.1"}
21
+ isort = "^5.12.0"
22
+ flake8 = "^6.1.0"
23
+ pre-commit = "^3.5.0"
24
+ pre-commit-hooks = "^4.5.0"
25
+
26
+ [tool.poetry.group.testing.dependencies]
27
+ pytest = "^7.4.3"
28
+ pytest-cov = "^4.1.0"
29
+
30
+ [tool.poetry.group.docs.dependencies]
31
+ furo = "^2023.9.10"
32
+ jupyterlab = "^4.0.8"
33
+ myst-parser = "^2.0.0"
34
+ nbsphinx = "^0.9.3"
35
+ sphinx-autoapi = "^3.0.0"
36
+ sphinx-copybutton = "^0.5.2"
37
+ time-machine = "^2.13.0"
38
+
39
+ [tool.poetry.group.packaging.dependencies]
40
+ python-semantic-release = "^8.3.0"
41
+
42
+ [tool.black]
43
+ line-length = 88
44
+ target-version = ["py38"]
45
+
46
+ [tool.isort]
47
+ py_version = "auto"
48
+ profile = "black"
49
+ atomic = true
50
+ skip_gitignore = true
51
+ line_length = 88
52
+ force_grid_wrap = 2
53
+ multi_line_output = 3
54
+
55
+ [tool.semantic_release]
56
+ version_variable = "pyproject.toml:version"
57
+ branch = "main"
58
+ changelog_file = "CHANGELOG.md"
59
+ build_command = "poetry build"
60
+ dist_path = "dist/"
61
+ upload_to_release = true
62
+ upload_to_pypi = true
63
+ remove_dist = false
64
+ patch_without_tag = true
65
+ commit_parser = "scipy"
66
+ tag_format = "v{version}"
67
+
68
+ [tool.semantic_release.remote.token]
69
+ env = "GH_TOKEN"
70
+
71
+ [build-system]
72
+ requires = ["poetry-core>=1.0.0"]
73
+ build-backend = "poetry.core.masonry.api"
@@ -0,0 +1,10 @@
1
+ from importlib import metadata
2
+
3
+ __version__ = metadata.version("onekit")
4
+
5
+ from .core import *
6
+
7
+ del (
8
+ metadata,
9
+ core,
10
+ )
@@ -0,0 +1,23 @@
1
+ import inspect
2
+
3
+ __all__ = ("get_function_name",)
4
+
5
+
6
+ def get_function_name():
7
+ """Get name of the function when in its body.
8
+
9
+ Returns
10
+ -------
11
+ str
12
+ Name of the function.
13
+
14
+ Examples
15
+ --------
16
+ >>> import onekit
17
+ >>> def my_test_function():
18
+ ... return onekit.get_function_name()
19
+ ...
20
+ >>> my_test_function()
21
+ 'my_test_function'
22
+ """
23
+ return inspect.stack()[1].function