Skip to content

Commit

Permalink
adjusted cache dir definition to be dependent on the config
Browse files Browse the repository at this point in the history
  • Loading branch information
tholzheim committed Jul 16, 2024
1 parent f25a954 commit 90cdb1d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ceurws/volume_neo4j.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from typing import Optional

import requests
from ceurws.ceur_ws import CEURWS
from neo4j import GraphDatabase
from neo4j.exceptions import AuthError, ConfigurationError, ServiceUnavailable

Expand Down Expand Up @@ -140,7 +141,7 @@ def default_source(cls) -> str:
"""
get the default source
"""
default_source = os.path.expanduser("~/.ceurws/volumes.json")
default_source = CEURWS.CACHE_DIR / "volumes.json"
return default_source

@classmethod
Expand Down
4 changes: 3 additions & 1 deletion tests/test_loctime.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import json
from pathlib import Path

from ceurws.ceur_ws import CEURWS

from ceurws.loctime import LoctimeParser, PercentageTable
from tests.basetest import Basetest

Expand All @@ -21,7 +23,7 @@ def setUp(self, debug=False, profile=True):
setUp the test case
"""
Basetest.setUp(self, debug=debug, profile=profile)
self.ceurws_path = Path.home() / ".ceurws"
self.ceurws_path = CEURWS.CACHE_DIR
self.volumes_path = self.ceurws_path / "volumes.json"
self.volumes = self.get_volumes()
self.loctime_parser = LoctimeParser()
Expand Down

0 comments on commit 90cdb1d

Please sign in to comment.