Skip to content

Commit acac12d

Browse files
Initial project: brain_games
1 parent f5a1b65 commit acac12d

5 files changed

Lines changed: 41 additions & 51 deletions

File tree

README.md

Lines changed: 10 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,13 @@
11
### Hexlet tests and linter status:
22
[![Actions Status](https://github.com/UlianaPythonBackendDeveloper/python-project-49/actions/workflows/hexlet-check.yml/badge.svg)](https://github.com/UlianaPythonBackendDeveloper/python-project-49/actions)
33

4-
# python-package
5-
6-
[![Github Actions Status](https://github.com/hexlet-boilerplates/python-package/workflows/Python%20CI/badge.svg)](https://github.com/hexlet-boilerplates/python-package/actions)
7-
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=hexlet-boilerplates_python-package&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=hexlet-boilerplates_python-package)
8-
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=hexlet-boilerplates_python-package&metric=coverage)](https://sonarcloud.io/summary/new_code?id=hexlet-boilerplates_python-package)
9-
10-
### Links
11-
12-
This project was built using these tools:
13-
14-
| Tool | Description |
15-
|------------------------------------------------------------------------|---------------------------------------------------------|
16-
| [uv](https://docs.astral.sh/uv/) | "An extremely fast Python package and project manager, written in Rust"
17-
| [Pytest](https://pytest.org) | "A mature full-featured Python testing tool" |
18-
| [ruff](https://docs.astral.sh/ruff/) | "An extremely fast Python linter and code formatter, written in Rust" |
19-
20-
---
21-
22-
### Setup
23-
24-
```bash
25-
make install
26-
```
27-
28-
### Examples
29-
30-
```bash
31-
uv run hexlet-python-package 5
32-
33-
2.5
34-
```
35-
36-
### Run tests
37-
38-
```bash
39-
make test
40-
```
41-
42-
[![Hexlet Ltd. logo](https://raw.githubusercontent.com/Hexlet/assets/master/images/hexlet_logo128.png)](https://hexlet.io/?utm_source=github&utm_medium=link&utm_campaign=python-package)
43-
44-
This repository is created and maintained by the team and the community of Hexlet, an educational project. [Read more about Hexlet](https://hexlet.io/?utm_source=github&utm_medium=link&utm_campaign=python-package).
45-
46-
See most active contributors on [hexlet-friends](https://friends.hexlet.io/)
4+
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=UlianaPythonBackendDeveloper_python-project-49&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=UlianaPythonBackendDeveloper_python-project-49)
5+
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=UlianaPythonBackendDeveloper_python-project-49&metric=bugs)](https://sonarcloud.io/summary/new_code?id=UlianaPythonBackendDeveloper_python-project-49)
6+
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=UlianaPythonBackendDeveloper_python-project-49&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=UlianaPythonBackendDeveloper_python-project-49)
7+
[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=UlianaPythonBackendDeveloper_python-project-49&metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=UlianaPythonBackendDeveloper_python-project-49)
8+
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=UlianaPythonBackendDeveloper_python-project-49&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=UlianaPythonBackendDeveloper_python-project-49)
9+
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=UlianaPythonBackendDeveloper_python-project-49&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=UlianaPythonBackendDeveloper_python-project-49)
10+
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=UlianaPythonBackendDeveloper_python-project-49&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=UlianaPythonBackendDeveloper_python-project-49)
11+
[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=UlianaPythonBackendDeveloper_python-project-49&metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=UlianaPythonBackendDeveloper_python-project-49)
12+
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=UlianaPythonBackendDeveloper_python-project-49&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=UlianaPythonBackendDeveloper_python-project-49)
13+
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=UlianaPythonBackendDeveloper_python-project-49&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=UlianaPythonBackendDeveloper_python-project-49)

brain_games/cli.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import prompt
2+
3+
def welcome_user():
4+
print("Welcome to the Brain Games!")
5+
name = prompt.string("May I have your name? ")
6+
print(f"Hello, {name}!")

brain_games/scripts/brain_games.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
def welcome_user():
2-
print("Welcome to the Brain Games!")
3-
4-
1+
# ruff: noqa: F401
2+
from brain_games.cli import welcome_user # noqa: PYL-E1101
3+
54
def main():
65
welcome_user()
6+
7+
if __name__ == '__main__':
8+
main()
79

8-
if __name__ == '__main__':
9-
main()

hexlet-code.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ version = "0.1.0"
44
description = "Add your description here"
55
readme = "README.md"
66
requires-python = ">=3.13"
7-
dependencies = []
7+
dependencies = [
8+
"prompt>=0.4.1",
9+
]
810

911
[build-system]
1012
requires = ["hatchling"]
@@ -14,4 +16,4 @@ build-backend = "hatchling.build"
1416
packages = ["brain_games"]
1517

1618
[project.scripts]
17-
brain-games = "brain_games.scripts.brain_games:main"
19+
brain-games = "brain_games.scripts.brain_games:main"

uv.lock

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)