Skip to content

Commit fa029c6

Browse files
refactor: rename project to 'ossin' and implement system information CLI tool (#1)
1 parent e5e6a11 commit fa029c6

File tree

11 files changed

+605
-82
lines changed

11 files changed

+605
-82
lines changed

.github/workflows/workflow.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
.DS_Store
66
.AppleDouble
77
.LSOverride
8-
Icon[]
98

109
# Thumbnails
1110
._*

PYPI_README.md

Lines changed: 0 additions & 27 deletions
This file was deleted.

README.md

Lines changed: 124 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,126 @@
1-
# python-ankara-paketleme-101
1+
# ossin
22

3-
Python Ankara Topluluğu Workshop'u için hazırlanmıştır. Bu template üzerinden Python Packaging 🐍, PyPI 📦, GitHub Actions 🤖 ve Trusted Publishing ⭐️ gibi konulara değineceğiz. Sonunda hep birlikte https://test.pypi.org üzerinden paket dağıtımı yapmış olacağız! 🚀
3+
[![PyPI - Version](https://img.shields.io/pypi/v/ossin.svg)](https://pypi.org/project/ossin)
4+
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ossin.svg)](https://pypi.org/project/ossin)
45

5-
<!-- TODO hasansezertasan: Burayı doldur. -->
6+
What is OS's sin? 🤔 A beautiful system information utility that displays basic information about your operating system, Python environment, and platform details using Rich for stunning terminal output.
7+
8+
---
9+
10+
## Table of Contents
11+
12+
- [Installation](#installation)
13+
- [Usage](#usage)
14+
- [Features](#features)
15+
- [Development](#development)
16+
- [License](#license)
17+
18+
## Installation
19+
20+
### Using uv (recommended)
21+
22+
```sh
23+
uv add ossin
24+
```
25+
26+
### Using pip
27+
28+
```sh
29+
pip install ossin
30+
```
31+
32+
## Usage
33+
34+
### Basic Usage
35+
36+
Display system information in the default table format:
37+
38+
```sh
39+
ossin
40+
```
41+
42+
### Output Formats
43+
44+
Choose from different output formats:
45+
46+
**Table format (default):**
47+
48+
```sh
49+
ossin --format table
50+
```
51+
52+
**Panel format:**
53+
54+
```sh
55+
ossin --format panels
56+
```
57+
58+
**JSON format:**
59+
60+
```sh
61+
ossin --format json
62+
```
63+
64+
### Options
65+
66+
- `--format, -f`: Output format (`table`, `panels`, `json`) [default: table]
67+
- `--no-color`: Disable colored output
68+
- `--version`: Show version and exit
69+
- `--help`: Show help message
70+
71+
### Examples
72+
73+
```sh
74+
# Display system info in table format
75+
ossin
76+
77+
# Display system info in panel format
78+
ossin --format panels
79+
80+
# Display system info in JSON format
81+
ossin --format json
82+
83+
# Display without colors
84+
ossin --no-color
85+
86+
# Show version
87+
ossin --version
88+
89+
# Show help
90+
ossin --help
91+
```
92+
93+
## Features
94+
95+
- **Beautiful Output**: Uses Rich library for stunning terminal formatting
96+
- **Multiple Formats**: Support for table, panel, and JSON output formats
97+
- **System Information**: Displays OS name, version, architecture, and platform details
98+
- **Python Environment**: Shows Python version and implementation details
99+
- **Modern CLI**: Built with Typer for excellent CLI experience with type hints and auto-completion
100+
- **Cross-platform**: Works on Windows, macOS, and Linux
101+
102+
## Development
103+
104+
### Setup
105+
106+
Clone the repository and install dependencies using uv:
107+
108+
```sh
109+
uv sync
110+
```
111+
112+
### Running the CLI
113+
114+
```sh
115+
uv run ossin
116+
```
117+
118+
### Running tests
119+
120+
```sh
121+
uv run pytest
122+
```
123+
124+
## License
125+
126+
`ossin` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.

pyproject.toml

Lines changed: 40 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,54 @@
11
[project]
2-
name = "hasansezertasan"
3-
version = "0.1.0"
4-
description = "Python Ankara Topluluğu Workshop'u için hazırlanmıştır."
2+
name = "ossin"
3+
description = "What is OS's sin? 🤔 A beautiful system information utility that displays basic information about your operating system, Python environment, and platform details using Rich for stunning terminal output."
54
readme = "README.md"
5+
license = "MIT"
66
authors = [
77
{ name = "Hasan Sezer Taşan", email = "hasansezertasan@gmail.com" }
88
]
9+
dynamic = ["version"]
10+
keywords = ["system", "information", "cli", "monitoring"]
11+
classifiers = [
12+
"Development Status :: 1 - Planning",
13+
"Programming Language :: Python",
14+
"Programming Language :: Python :: 3.8",
15+
"Programming Language :: Python :: 3.9",
16+
"Programming Language :: Python :: 3.10",
17+
"Programming Language :: Python :: 3.11",
18+
"Programming Language :: Python :: 3.12",
19+
"Programming Language :: Python :: 3.13",
20+
"Programming Language :: Python :: 3.14",
21+
"Programming Language :: Python :: Implementation :: CPython",
22+
"Programming Language :: Python :: Implementation :: PyPy",
23+
]
924
requires-python = ">=3.8"
10-
dependencies = []
25+
dependencies = ["typer"]
26+
27+
28+
[project.urls]
29+
Documentation = "https://github.com/ankara-python-toplulugu/ossin#readme"
30+
Issues = "https://github.com/ankara-python-toplulugu/ossin/issues"
31+
Source = "https://github.com/ankara-python-toplulugu/ossin"
1132

1233

1334
[project.scripts]
14-
hasansezertasan = "hasansezertasan.main:main"
35+
ossin = "ossin.cli:app"
1536

1637

1738
[build-system]
18-
requires = ["uv_build>=0.8.3,<0.9.0"]
19-
build-backend = "uv_build"
39+
requires = ["hatchling", "hatch-vcs"]
40+
build-backend = "hatchling.build"
41+
42+
43+
[tool.hatch.version]
44+
source = "vcs"
45+
fallback-version = "0.1.0"
46+
47+
48+
[tool.hatch.build]
49+
hooks.vcs.version-file = "src/ossin/_version.py"
2050

2151

22-
[[tool.uv.index]]
23-
name = "testpypi"
24-
url = "https://test.pypi.org/simple/"
25-
publish-url = "https://test.pypi.org/legacy/"
26-
explicit = true
52+
[tool.hatch.version.raw-options]
53+
version_scheme = "only-version"
54+
local_scheme = "no-local-version"

src/hasansezertasan/main.py

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/ossin/_version.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# file generated by setuptools-scm
2+
# don't change, don't track in version control
3+
4+
__all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
5+
6+
TYPE_CHECKING = False
7+
if TYPE_CHECKING:
8+
from typing import Tuple
9+
from typing import Union
10+
11+
VERSION_TUPLE = Tuple[Union[int, str], ...]
12+
else:
13+
VERSION_TUPLE = object
14+
15+
version: str
16+
__version__: str
17+
__version_tuple__: VERSION_TUPLE
18+
version_tuple: VERSION_TUPLE
19+
20+
__version__ = version = '0.0'
21+
__version_tuple__ = version_tuple = (0, 0)

0 commit comments

Comments
 (0)