Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalize the folder name to command-line-assistant #96

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion command_line_assistant/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@


CONFIG_FILE_DEFINITION: tuple[str, str] = (
"command_line_assistant",
"command-line-assistant",
"config.toml",
)
#: Define the config file path.
Expand Down
6 changes: 3 additions & 3 deletions packaging/command-line-assistant.spec
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ A simple wrapper to interact with RAG

# Create needed directories in buildroot
%{__install} -d %{buildroot}/%{_sbindir}
%{__install} -d %{buildroot}/%{_sysconfdir}/xdg/%{python_package_src}
%{__install} -d %{buildroot}/%{_sysconfdir}/xdg/%{name}
%{__install} -d %{buildroot}/%{_sharedstatedir}/%{name}
%{__install} -d %{buildroot}/%{_mandir}/man1
%{__install} -d %{buildroot}/%{_mandir}/man8
Expand All @@ -61,7 +61,7 @@ A simple wrapper to interact with RAG
%{__install} -D -m 0644 data/release/dbus/com.redhat.lightspeed.history.service %{buildroot}/%{_datadir}/dbus-1/system-services/com.redhat.lightspeed.history.service

# Config file
%{__install} -D -m 0644 data/release/xdg/config.toml %{buildroot}/%{_sysconfdir}/xdg/%{python_package_src}/config.toml
%{__install} -D -m 0644 data/release/xdg/config.toml %{buildroot}/%{_sysconfdir}/xdg/%{name}/config.toml

# History file
%{__install} -D -m 0644 data/release/xdg/history.json %{buildroot}/%{_sharedstatedir}/%{name}/history.json
Expand Down Expand Up @@ -102,7 +102,7 @@ LICENSE
%{_datadir}/dbus-1/system-services/com.redhat.lightspeed.history.service

# Config file
%config %{_sysconfdir}/xdg/%{python_package_src}/config.toml
%config %{_sysconfdir}/xdg/%{name}/config.toml

# History file
%{_sharedstatedir}/%{name}/history.json
Expand Down
4 changes: 2 additions & 2 deletions tests/config/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def get_config_template(tmp_path) -> str:

def test_load_config_file(tmp_path, monkeypatch, get_config_template):
config_file_path = tmp_path
config_file = config_file_path / "command_line_assistant" / "config.toml"
config_file = config_file_path / "command-line-assistant" / "config.toml"
config_file.parent.mkdir()
config_file.write_text(get_config_template)

Expand All @@ -65,7 +65,7 @@ def test_load_config_file_not_found(tmp_path, monkeypatch):

def test_load_config_file_decoded_error(tmp_path, monkeypatch):
config_file_path = tmp_path
config_file = config_file_path / "command_line_assistant" / "config.toml"
config_file = config_file_path / "command-line-assistant" / "config.toml"
config_file.parent.mkdir()
config_file.write_text("""
[output]
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def mock_config(tmp_path):
"""Fixture to create a mock configuration"""
cert_file = tmp_path / "cert.pem"
key_file = tmp_path / "key.pem"
history_file = tmp_path / "command_line_assistant" / "history.json"
history_file = tmp_path / "command-line-assistant" / "history.json"

cert_file.write_text("cert")
key_file.write_text("key")
Expand Down
Loading