espsoft 0.1.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.
@@ -0,0 +1,23 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ .eggs/
6
+
7
+ # Виртуальные окружения
8
+ .venv/
9
+ venv/
10
+ env/
11
+
12
+ # Сборка
13
+ dist/
14
+ build/
15
+
16
+ # Тесты
17
+ .pytest_cache/
18
+ .coverage
19
+ htmlcov/
20
+
21
+ # Редакторы
22
+ .idea/
23
+ .vscode/
espsoft-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ivan Ivanov
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.
espsoft-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,74 @@
1
+ Metadata-Version: 2.5
2
+ Name: espsoft
3
+ Version: 0.1.0
4
+ Summary: A silly package that says espsoft
5
+ Project-URL: Homepage, https://gitlab.com/adpypi/espsoft-pypi
6
+ Project-URL: Issues, https://gitlab.com/adpypi/espsoft-pypi/issues
7
+ Author-email: Dmitriy Anisimov <espsoft@mail.ru>
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Keywords: espsoft,example,fun
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3
14
+ Requires-Python: >=3.9
15
+ Description-Content-Type: text/markdown
16
+
17
+ # espsoft
18
+
19
+ Умеет здороваться и повторять слово
20
+ `espsoft` сколько угодно раз.
21
+
22
+ ## Установка
23
+
24
+ ```bash
25
+ pip install espsoft
26
+ ```
27
+
28
+ ## Использование в коде
29
+
30
+ ```python
31
+ from espsoft import greet, espsoft
32
+
33
+ print(greet("мир")) # espsoft, мир!
34
+ print(espsoft(3)) # ['espsoft', 'espsoft', 'espsoft']
35
+ ```
36
+
37
+ ## Использование из командной строки
38
+
39
+ ```bash
40
+ espsoft мир -n 2
41
+ ```
42
+
43
+ Вывод:
44
+
45
+ ```
46
+ espsoft, мир!
47
+ espsoft
48
+ espsoft
49
+ ```
50
+
51
+ ## Разработка
52
+
53
+ ```bash
54
+ # клонировать репозиторий
55
+ git clone https://gitlab.com/adpypi/espsoft-pypi.git
56
+ cd espsoft-pypi
57
+
58
+ # установить в editable-режиме вместе с dev-зависимостями
59
+ python3 -m pip install -e .
60
+ python3 -m pip install pytest build twine
61
+
62
+ # запустить тесты
63
+ pytest
64
+
65
+ # собрать дистрибутивы
66
+ python3 -m build
67
+
68
+ # загрузить на TestPyPI
69
+ python3 -m twine upload --repository testpypi dist/*
70
+ ```
71
+
72
+ ## Лицензия
73
+
74
+ MIT — см. файл [LICENSE](LICENSE).
@@ -0,0 +1,58 @@
1
+ # espsoft
2
+
3
+ Умеет здороваться и повторять слово
4
+ `espsoft` сколько угодно раз.
5
+
6
+ ## Установка
7
+
8
+ ```bash
9
+ pip install espsoft
10
+ ```
11
+
12
+ ## Использование в коде
13
+
14
+ ```python
15
+ from espsoft import greet, espsoft
16
+
17
+ print(greet("мир")) # espsoft, мир!
18
+ print(espsoft(3)) # ['espsoft', 'espsoft', 'espsoft']
19
+ ```
20
+
21
+ ## Использование из командной строки
22
+
23
+ ```bash
24
+ espsoft мир -n 2
25
+ ```
26
+
27
+ Вывод:
28
+
29
+ ```
30
+ espsoft, мир!
31
+ espsoft
32
+ espsoft
33
+ ```
34
+
35
+ ## Разработка
36
+
37
+ ```bash
38
+ # клонировать репозиторий
39
+ git clone https://gitlab.com/adpypi/espsoft-pypi.git
40
+ cd espsoft-pypi
41
+
42
+ # установить в editable-режиме вместе с dev-зависимостями
43
+ python3 -m pip install -e .
44
+ python3 -m pip install pytest build twine
45
+
46
+ # запустить тесты
47
+ pytest
48
+
49
+ # собрать дистрибутивы
50
+ python3 -m build
51
+
52
+ # загрузить на TestPyPI
53
+ python3 -m twine upload --repository testpypi dist/*
54
+ ```
55
+
56
+ ## Лицензия
57
+
58
+ MIT — см. файл [LICENSE](LICENSE).
@@ -0,0 +1,6 @@
1
+ """espsoft — проект для теста """
2
+
3
+ from .core import greet, espsoft
4
+
5
+ __version__ = "0.1.0"
6
+ __all__ = ["greet", "espsoft", "__version__"]
@@ -0,0 +1,45 @@
1
+ """Командная строка пакета papandopala."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import argparse
6
+
7
+ from .core import greet, papandopala
8
+
9
+
10
+ def main() -> None:
11
+ """Точка входа консольной команды ``papandopala``."""
12
+ parser = argparse.ArgumentParser(
13
+ prog="papandopala",
14
+ description="Говорит papandopala и здоровается с указанным именем.",
15
+ )
16
+ parser.add_argument(
17
+ "name",
18
+ nargs="?",
19
+ default="world",
20
+ help="Имя, к которому обращаемся (по умолчанию: world)",
21
+ )
22
+ parser.add_argument(
23
+ "-n",
24
+ "--count",
25
+ type=int,
26
+ default=1,
27
+ help="Сколько раз повторить 'papandopala' (по умолчанию: 1)",
28
+ )
29
+ parser.add_argument(
30
+ "--version",
31
+ action="version",
32
+ version="%(prog)s 0.1.0",
33
+ )
34
+ args = parser.parse_args()
35
+
36
+ if args.count < 0:
37
+ parser.error("--count must be non-negative")
38
+
39
+ print(greet(args.name))
40
+ for word in papandopala(args.count):
41
+ print(word)
42
+
43
+
44
+ if __name__ == "__main__":
45
+ main()
@@ -0,0 +1,42 @@
1
+ """Основные функции пакета papandopala."""
2
+
3
+ from __future__ import annotations
4
+
5
+
6
+ def greet(name: str = "world") -> str:
7
+ """Возвращает приветствие вида ``Papandopala, <name>!``.
8
+
9
+ Параметры
10
+ ---------
11
+ name:
12
+ Имя, к которому обращаемся. По умолчанию ``"world"``.
13
+
14
+ Пример
15
+ ------
16
+ >>> greet("мир")
17
+ 'Papandopala, мир!'
18
+ """
19
+ return f"Papandopala, {name}!"
20
+
21
+
22
+ def papandopala(n: int = 1) -> list[str]:
23
+ """Возвращает список из ``n`` строк ``"papandopala"``.
24
+
25
+ Параметры
26
+ ---------
27
+ n:
28
+ Сколько раз повторить слово. Должно быть >= 0.
29
+
30
+ Исключения
31
+ ----------
32
+ ValueError
33
+ Если ``n`` отрицательное.
34
+
35
+ Пример
36
+ ------
37
+ >>> papandopala(3)
38
+ ['papandopala', 'papandopala', 'papandopala']
39
+ """
40
+ if n < 0:
41
+ raise ValueError("n must be non-negative")
42
+ return ["papandopala"] * n
@@ -0,0 +1,28 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "espsoft"
7
+ version = "0.1.0"
8
+ authors = [
9
+ { name = "Dmitriy Anisimov", email = "espsoft@mail.ru" },
10
+ ]
11
+ description = "A silly package that says espsoft"
12
+ readme = "README.md"
13
+ requires-python = ">=3.9"
14
+ license = "MIT"
15
+ license-files = ["LICENSE"]
16
+ keywords = ["espsoft", "example", "fun"]
17
+ classifiers = [
18
+ "Programming Language :: Python :: 3",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Operating System :: OS Independent",
21
+ ]
22
+
23
+ [project.urls]
24
+ Homepage = "https://gitlab.com/adpypi/espsoft-pypi"
25
+ Issues = "https://gitlab.com/adpypi/espsoft-pypi/issues"
26
+
27
+ [project.scripts]
28
+ espsoft = "espsoft.cli:main"
@@ -0,0 +1,32 @@
1
+ """Тесты для papandopala.core."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import pytest
6
+
7
+ from papandopala import greet, papandopala
8
+
9
+
10
+ def test_greet_default() -> None:
11
+ assert greet() == "Papandopala, world!"
12
+
13
+
14
+ def test_greet_with_name() -> None:
15
+ assert greet("Вася") == "Papandopala, Вася!"
16
+
17
+
18
+ def test_papandopala_positive() -> None:
19
+ assert papandopala(3) == ["papandopala"] * 3
20
+
21
+
22
+ def test_papandopala_zero() -> None:
23
+ assert papandopala(0) == []
24
+
25
+
26
+ def test_papandopala_default() -> None:
27
+ assert papandopala() == ["papandopala"]
28
+
29
+
30
+ def test_papandopala_negative() -> None:
31
+ with pytest.raises(ValueError):
32
+ papandopala(-1)