Skip to content

Commit

Permalink
flatten dir structure
Browse files Browse the repository at this point in the history
  • Loading branch information
azuline committed Oct 11, 2023
1 parent 292c750 commit 172798f
Show file tree
Hide file tree
Showing 30 changed files with 578 additions and 604 deletions.
7 changes: 4 additions & 3 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
import pytest
from click.testing import CliRunner

from rose.foundation.conf import SCHEMA_PATH, Config
from rose.cache import CACHE_SCHEMA_PATH
from rose.config import Config

logger = logging.getLogger(__name__)

Expand All @@ -31,10 +32,10 @@ def config(isolated_dir: Path) -> Config:

cache_database_path = cache_dir / "cache.sqlite3"
with sqlite3.connect(cache_database_path) as conn:
with SCHEMA_PATH.open("r") as fp:
with CACHE_SCHEMA_PATH.open("r") as fp:
conn.executescript(fp.read())
conn.execute("CREATE TABLE _schema_hash (value TEXT PRIMARY KEY)")
with SCHEMA_PATH.open("rb") as fp:
with CACHE_SCHEMA_PATH.open("rb") as fp:
latest_schema_hash = hashlib.sha256(fp.read()).hexdigest()
conn.execute("INSERT INTO _schema_hash (value) VALUES (?)", (latest_schema_hash,))

Expand Down
5 changes: 2 additions & 3 deletions rose/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@

import click

from rose.cache.database import migrate_database
from rose.cache.update import update_cache_for_all_releases
from rose.foundation.conf import Config
from rose.cache import migrate_database, update_cache_for_all_releases
from rose.config import Config
from rose.virtualfs import mount_virtualfs, unmount_virtualfs


Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 172798f

Please sign in to comment.