From d32df604da7e67e266c33b65aaa321b7c3065dd7 Mon Sep 17 00:00:00 2001 From: Eli <43382407+eli64s@users.noreply.github.com> Date: Tue, 29 Aug 2023 07:05:32 -0500 Subject: [PATCH] Closes #41: include conf/*.toml in pyproject.toml --- pyproject.toml | 5 +---- readmeai/conf.py | 3 ++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 16c3b5f8..9fe6128f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "readmeai" -version = "0.1.96" +version = "0.1.97" description = "🚀 Generate awesome README.md files from the terminal, powered by OpenAI's GPT language model APIs 💫" authors = ["Eli <0x.eli.64s@gmail.com>"] license = "MIT" @@ -63,9 +63,6 @@ click = "^8.1.6" [tool.poetry.scripts] readmeai = "readmeai.main:cli" -[tool.poetry.package] -include = ["conf/*.toml"] - [tool.ruff] line-length = 88 target-version = "py39" diff --git a/readmeai/conf.py b/readmeai/conf.py index 8071a577..1bab2ede 100644 --- a/readmeai/conf.py +++ b/readmeai/conf.py @@ -214,7 +214,8 @@ def __post_init__(self): def _get_config_dict(handler: factory.FileHandler, path: str) -> dict: """Get configuration dictionary from TOML file.""" - path = Path("conf/") / path + package_dir = os.path.dirname(os.path.abspath(__file__)) + path = os.path.join(package_dir, "conf", path) return handler.read(path)