Skip to content
This repository has been archived by the owner on Jan 18, 2025. It is now read-only.

Commit

Permalink
refactor(project): organise project to run with pyproject
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinNitroG committed Dec 22, 2024
1 parent 7a4a82d commit cfe7d79
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 5 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@

```sh
python -m venv .venv
pip install -r requirements.txt
.\.venv\Scripts\activate # For windows
pip install --editable .
gcpn # or "python -m gcpn"
```

> [!NOTE] > **main**.py is optional for another way to run project
### API

<details>
Expand Down
3 changes: 0 additions & 3 deletions main.py

This file was deleted.

11 changes: 11 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[project]
name = 'gha-check-phat-nguoi'
dynamic = ["version"]
dependencies = ["PyYAML == 6.0.2"]

[project.scripts]
gcpn = "gcpn:main"

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
5 changes: 5 additions & 0 deletions src/gcpn/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from .modules.config_reader import get_config


def main():
get_config("config.yml")
4 changes: 4 additions & 0 deletions src/gcpn/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from . import main

if __name__ == "__main__":
main()
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from yaml import safe_load

from src.types.config import Config
from ..types.config import Config


def get_config(file):
Expand Down
File renamed without changes.

0 comments on commit cfe7d79

Please sign in to comment.