swippter-cli 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,107 @@
1
+ Metadata-Version: 2.4
2
+ Name: swippter-cli
3
+ Version: 0.1.0
4
+ Summary: Swippter production-ready software foundation CLI
5
+ Requires-Python: >=3.9
6
+ Description-Content-Type: text/markdown
7
+
8
+ # Swippter CLI
9
+
10
+ The `swi` command prints:
11
+
12
+ ```text
13
+ Swippter : Production Ready Software Foundation
14
+
15
+ Ship the Product,
16
+ Skip the Platform rebuild
17
+ ```
18
+
19
+ ## Run locally
20
+
21
+ Requires Python 3.9 or newer.
22
+
23
+ ```bash
24
+ python -m venv .venv
25
+ source .venv/bin/activate
26
+ python -m pip install -e .
27
+ swi
28
+ ```
29
+
30
+ You can also run the Python module without installing the console command:
31
+
32
+ ```bash
33
+ python -m swi
34
+ ```
35
+
36
+ ## Test
37
+
38
+ ```bash
39
+ python -m unittest discover -s tests
40
+ ```
41
+
42
+ ## Build from source
43
+
44
+ When cloning the repository, install the `build` frontend and build the wheel
45
+ and source distribution. The build frontend will install the declared build
46
+ backend (`setuptools`) in an isolated environment as needed.
47
+
48
+ ```bash
49
+ git clone https://github.com/swippter/swi.git
50
+ cd swi
51
+ python3 -m pip install --upgrade build
52
+ python3 -m build
53
+ ```
54
+
55
+ Install the locally built wheel and run the CLI:
56
+
57
+ ```bash
58
+ python3 -m pip install dist/*.whl
59
+ swi
60
+ ```
61
+
62
+ ## Install from PyPI
63
+
64
+ After the package has been published to PyPI, install it with:
65
+
66
+ ```bash
67
+ python3 -m pip install swippter-cli
68
+ ```
69
+
70
+ Then run the command:
71
+
72
+ ```bash
73
+ swi
74
+ ```
75
+
76
+ Committing the code does not publish the package; it becomes installable this
77
+ way only after a successful PyPI upload.
78
+
79
+ ## Build and upload to PyPI
80
+
81
+ The PyPI distribution name is `swippter-cli`, and the installed command is
82
+ `swi`. Confirm that this name is available on PyPI before uploading; if not,
83
+ choose a different unique distribution name.
84
+
85
+ Install the packaging tools, build the source and wheel distributions, and
86
+ check the built metadata:
87
+
88
+ ```bash
89
+ python3 -m pip install --upgrade build twine
90
+ python3 -m build
91
+ python3 -m twine check dist/*
92
+ ```
93
+
94
+ To try the upload on TestPyPI first:
95
+
96
+ ```bash
97
+ python3 -m twine upload --repository testpypi dist/*
98
+ ```
99
+
100
+ After confirming the package there, upload to PyPI:
101
+
102
+ ```bash
103
+ python3 -m twine upload dist/*
104
+ ```
105
+
106
+ Authenticate with a PyPI API token when prompted (or configure it through
107
+ `~/.pypirc`); do not put the token in source control.
@@ -0,0 +1,100 @@
1
+ # Swippter CLI
2
+
3
+ The `swi` command prints:
4
+
5
+ ```text
6
+ Swippter : Production Ready Software Foundation
7
+
8
+ Ship the Product,
9
+ Skip the Platform rebuild
10
+ ```
11
+
12
+ ## Run locally
13
+
14
+ Requires Python 3.9 or newer.
15
+
16
+ ```bash
17
+ python -m venv .venv
18
+ source .venv/bin/activate
19
+ python -m pip install -e .
20
+ swi
21
+ ```
22
+
23
+ You can also run the Python module without installing the console command:
24
+
25
+ ```bash
26
+ python -m swi
27
+ ```
28
+
29
+ ## Test
30
+
31
+ ```bash
32
+ python -m unittest discover -s tests
33
+ ```
34
+
35
+ ## Build from source
36
+
37
+ When cloning the repository, install the `build` frontend and build the wheel
38
+ and source distribution. The build frontend will install the declared build
39
+ backend (`setuptools`) in an isolated environment as needed.
40
+
41
+ ```bash
42
+ git clone https://github.com/swippter/swi.git
43
+ cd swi
44
+ python3 -m pip install --upgrade build
45
+ python3 -m build
46
+ ```
47
+
48
+ Install the locally built wheel and run the CLI:
49
+
50
+ ```bash
51
+ python3 -m pip install dist/*.whl
52
+ swi
53
+ ```
54
+
55
+ ## Install from PyPI
56
+
57
+ After the package has been published to PyPI, install it with:
58
+
59
+ ```bash
60
+ python3 -m pip install swippter-cli
61
+ ```
62
+
63
+ Then run the command:
64
+
65
+ ```bash
66
+ swi
67
+ ```
68
+
69
+ Committing the code does not publish the package; it becomes installable this
70
+ way only after a successful PyPI upload.
71
+
72
+ ## Build and upload to PyPI
73
+
74
+ The PyPI distribution name is `swippter-cli`, and the installed command is
75
+ `swi`. Confirm that this name is available on PyPI before uploading; if not,
76
+ choose a different unique distribution name.
77
+
78
+ Install the packaging tools, build the source and wheel distributions, and
79
+ check the built metadata:
80
+
81
+ ```bash
82
+ python3 -m pip install --upgrade build twine
83
+ python3 -m build
84
+ python3 -m twine check dist/*
85
+ ```
86
+
87
+ To try the upload on TestPyPI first:
88
+
89
+ ```bash
90
+ python3 -m twine upload --repository testpypi dist/*
91
+ ```
92
+
93
+ After confirming the package there, upload to PyPI:
94
+
95
+ ```bash
96
+ python3 -m twine upload dist/*
97
+ ```
98
+
99
+ Authenticate with a PyPI API token when prompted (or configure it through
100
+ `~/.pypirc`); do not put the token in source control.
@@ -0,0 +1,19 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "swippter-cli"
7
+ version = "0.1.0"
8
+ description = "Swippter production-ready software foundation CLI"
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+
12
+ [project.scripts]
13
+ swi = "swi:main"
14
+
15
+ [tool.setuptools]
16
+ package-dir = {"" = "src"}
17
+
18
+ [tool.setuptools.packages.find]
19
+ where = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,10 @@
1
+ """Swippter production-ready software foundation command-line application."""
2
+
3
+
4
+ def main() -> None:
5
+ """Print the Swippter message."""
6
+ print(
7
+ "Swippter : Production Ready Software Foundation\n\n"
8
+ "Ship the Product,\n"
9
+ "Skip the Platform rebuild"
10
+ )
@@ -0,0 +1,4 @@
1
+ from swi import main
2
+
3
+ if __name__ == "__main__":
4
+ main()
@@ -0,0 +1,107 @@
1
+ Metadata-Version: 2.4
2
+ Name: swippter-cli
3
+ Version: 0.1.0
4
+ Summary: Swippter production-ready software foundation CLI
5
+ Requires-Python: >=3.9
6
+ Description-Content-Type: text/markdown
7
+
8
+ # Swippter CLI
9
+
10
+ The `swi` command prints:
11
+
12
+ ```text
13
+ Swippter : Production Ready Software Foundation
14
+
15
+ Ship the Product,
16
+ Skip the Platform rebuild
17
+ ```
18
+
19
+ ## Run locally
20
+
21
+ Requires Python 3.9 or newer.
22
+
23
+ ```bash
24
+ python -m venv .venv
25
+ source .venv/bin/activate
26
+ python -m pip install -e .
27
+ swi
28
+ ```
29
+
30
+ You can also run the Python module without installing the console command:
31
+
32
+ ```bash
33
+ python -m swi
34
+ ```
35
+
36
+ ## Test
37
+
38
+ ```bash
39
+ python -m unittest discover -s tests
40
+ ```
41
+
42
+ ## Build from source
43
+
44
+ When cloning the repository, install the `build` frontend and build the wheel
45
+ and source distribution. The build frontend will install the declared build
46
+ backend (`setuptools`) in an isolated environment as needed.
47
+
48
+ ```bash
49
+ git clone https://github.com/swippter/swi.git
50
+ cd swi
51
+ python3 -m pip install --upgrade build
52
+ python3 -m build
53
+ ```
54
+
55
+ Install the locally built wheel and run the CLI:
56
+
57
+ ```bash
58
+ python3 -m pip install dist/*.whl
59
+ swi
60
+ ```
61
+
62
+ ## Install from PyPI
63
+
64
+ After the package has been published to PyPI, install it with:
65
+
66
+ ```bash
67
+ python3 -m pip install swippter-cli
68
+ ```
69
+
70
+ Then run the command:
71
+
72
+ ```bash
73
+ swi
74
+ ```
75
+
76
+ Committing the code does not publish the package; it becomes installable this
77
+ way only after a successful PyPI upload.
78
+
79
+ ## Build and upload to PyPI
80
+
81
+ The PyPI distribution name is `swippter-cli`, and the installed command is
82
+ `swi`. Confirm that this name is available on PyPI before uploading; if not,
83
+ choose a different unique distribution name.
84
+
85
+ Install the packaging tools, build the source and wheel distributions, and
86
+ check the built metadata:
87
+
88
+ ```bash
89
+ python3 -m pip install --upgrade build twine
90
+ python3 -m build
91
+ python3 -m twine check dist/*
92
+ ```
93
+
94
+ To try the upload on TestPyPI first:
95
+
96
+ ```bash
97
+ python3 -m twine upload --repository testpypi dist/*
98
+ ```
99
+
100
+ After confirming the package there, upload to PyPI:
101
+
102
+ ```bash
103
+ python3 -m twine upload dist/*
104
+ ```
105
+
106
+ Authenticate with a PyPI API token when prompted (or configure it through
107
+ `~/.pypirc`); do not put the token in source control.
@@ -0,0 +1,10 @@
1
+ README.md
2
+ pyproject.toml
3
+ src/swi/__init__.py
4
+ src/swi/__main__.py
5
+ src/swippter_cli.egg-info/PKG-INFO
6
+ src/swippter_cli.egg-info/SOURCES.txt
7
+ src/swippter_cli.egg-info/dependency_links.txt
8
+ src/swippter_cli.egg-info/entry_points.txt
9
+ src/swippter_cli.egg-info/top_level.txt
10
+ tests/test_cli.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ swi = swi:main
@@ -0,0 +1,42 @@
1
+ import contextlib
2
+ import io
3
+ import subprocess
4
+ import sys
5
+ import unittest
6
+ from pathlib import Path
7
+
8
+ source_dir = Path(__file__).resolve().parents[1] / "src"
9
+ sys.path.insert(0, str(source_dir))
10
+
11
+ from swi import main
12
+
13
+
14
+ class SwiCliTests(unittest.TestCase):
15
+ expected_output = (
16
+ "Swippter : Production Ready Software Foundation\n\n"
17
+ "Ship the Product,\n"
18
+ "Skip the Platform rebuild\n"
19
+ )
20
+
21
+ def test_main_prints_message(self) -> None:
22
+ output = io.StringIO()
23
+ with contextlib.redirect_stdout(output):
24
+ main()
25
+
26
+ self.assertEqual(output.getvalue(), self.expected_output)
27
+
28
+ def test_module_entry_point_prints_message(self) -> None:
29
+ result = subprocess.run(
30
+ [sys.executable, "-m", "swi"],
31
+ check=True,
32
+ capture_output=True,
33
+ text=True,
34
+ env={"PYTHONPATH": str(source_dir)},
35
+ )
36
+
37
+ self.assertEqual(result.stdout, self.expected_output)
38
+ self.assertEqual(result.stderr, "")
39
+
40
+
41
+ if __name__ == "__main__":
42
+ unittest.main()