Skip to content

Commit

Permalink
Normalize the folder name to command-line-assistant (#96)
Browse files Browse the repository at this point in the history
There were a couple of instances where we used the name
command_line_assistant instead of command-line-assistant
  • Loading branch information
r0x0d authored Jan 6, 2025
1 parent 525235f commit 141275a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
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 @@ -41,7 +41,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

0 comments on commit 141275a

Please sign in to comment.