Skip to content

Commit

Permalink
Fix incorrect default configuration filename in package data
Browse files Browse the repository at this point in the history
  • Loading branch information
dzmpr committed Jul 31, 2024
1 parent e7231e1 commit 1aa3be3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 1 addition & 3 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
### Changelog

* Added support for more library and plugin notations in catalog.
* Repositories configuration file replaced with kataloger configuration file, where beside repositories can be specified catalog paths and parameters.
* Minimum required python version lowered to 3.8.
* Fix: Default configuration file now correctly shipped.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "kataloger"
version = "0.3.0"
version = "0.3.1"
dependencies = [
"aiohttp",
"yarl",
Expand Down Expand Up @@ -35,7 +35,7 @@ namespaces = false
where = ["src"]

[tool.setuptools.package-data]
kataloger = ["default.repositories.toml"]
kataloger = ["default.configuration.toml"]

[project.scripts]
kataloger = "kataloger.__main__:main"
Expand Down
7 changes: 5 additions & 2 deletions src/kataloger/cli/configuration_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ def load_configuration_data(configuration_path: Optional[Path]) -> Configuration
if file_exists(configuration_candidate):
configuration_path = configuration_candidate
else:
configuration_path = get_package_file("default.configuration.toml")

configuration_path = get_package_file("defaults.configuration.toml")
if not file_exists(configuration_path):
message: str = ("Can't find default configuration file. "
"Please specify configuration file with -c [PATH] argument.")
raise KatalogerConfigurationException(message)
return load_configuration(configuration_path)

0 comments on commit 1aa3be3

Please sign in to comment.