Skip to content

Commit 11192ab

Browse files
committed
GridSquare and FoilHole entities persist end-to-end
1 parent 20bd7d3 commit 11192ab

32 files changed

+581
-953
lines changed

docs/how-to/use-core-http-api-client.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,4 +250,4 @@ client.close()
250250
with SmartEMAPIClient("http://localhost:8000") as client:
251251
# Client will be automatically closed when exiting the context
252252
pass
253-
```
253+
```

docs/software-architecture.mermaid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@
4444
class infrastructure infra
4545
class ext ext
4646
%% Link styling
47-
linkStyle 0,1,2,3,4,5,6,7,8 stroke:#666
47+
linkStyle 0,1,2,3,4,5,6,7,8 stroke:#666

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/usr/bin/env python
22
"""Setup script to handle version file copying and dotenv instantiation."""
33

4-
import os
54
import shutil
65
from pathlib import Path
6+
77
from setuptools import setup
88
from setuptools.command.develop import develop
9-
from setuptools.command.install import install
109
from setuptools.command.egg_info import egg_info
10+
from setuptools.command.install import install
1111

1212

1313
def copy_version_files():

src/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
from ._version import __version__
1+
from ._version import __version__ as __version__

src/epu_data_intake/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
from ._version import __version__
1+
from ._version import __version__ as __version__

src/epu_data_intake/__main__.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,18 @@
44
import platform
55
import signal
66
import time
7-
import typer
87
from pathlib import Path
8+
9+
import typer
910
from watchdog.observers import Observer
1011

1112
from src.epu_data_intake.core_http_api_client import SmartEMAPIClient as APIClient
12-
from src.epu_data_intake.model.store import InMemoryDataStore, PersistentDataStore
1313
from src.epu_data_intake.fs_parser import EpuParser
1414
from src.epu_data_intake.fs_watcher import (
1515
DEFAULT_PATTERNS,
1616
RateLimitedFilesystemEventHandler,
1717
)
18+
from src.epu_data_intake.model.store import InMemoryDataStore
1819

1920

2021
# Create a callback to handle the verbose flag at the root level
@@ -50,7 +51,8 @@ def logging_callback(ctx: typer.Context, param: typer.CallbackParam, value: int)
5051
# Add verbose flag to root command
5152
shared_verbosity_option = typer.Option(
5253
0,
53-
"--verbose", "-v",
54+
"--verbose",
55+
"-v",
5456
count=True,
5557
help="Verbosity level: -v for INFO, -vv for DEBUG",
5658
callback=logging_callback,
@@ -67,6 +69,7 @@ def main_callback(verbose: int = shared_verbosity_option):
6769
"""Main callback to enable verbose flag on root command"""
6870
pass
6971

72+
7073
@parse_cli.callback()
7174
def parse_callback(verbose: int = shared_verbosity_option):
7275
"""Parse group callback to enable verbose flag on parse command"""
@@ -75,8 +78,8 @@ def parse_callback(verbose: int = shared_verbosity_option):
7578

7679
@parse_cli.command("dir")
7780
def parse_epu_output_dir(
78-
epu_output_dir: str,
79-
verbose: int = shared_verbosity_option,
81+
epu_output_dir: str,
82+
verbose: int = shared_verbosity_option,
8083
):
8184
"""Parse an entire EPU output directory structure. May contain multiple grids"""
8285
# Rationale here is that parsers don't persist data to API by design - only watch command does that
@@ -103,8 +106,10 @@ def parse_grid(
103106
logging.warning(f"- {error}")
104107
else:
105108
# Rationale here is that parsers don't persist data to API by design - only watch command does that
106-
datastore = InMemoryDataStore(grid_data_dir) # TODO confirm this is the dir expected here - top-level watch dir or grid root dir?
107-
grid_uuid = EpuParser.parse_grid_dir(grid_data_dir, datastore)
109+
datastore = InMemoryDataStore(
110+
grid_data_dir
111+
) # TODO confirm this is the dir expected here - top-level watch dir or grid root dir?
112+
EpuParser.parse_grid_dir(grid_data_dir, datastore)
108113
False and logging.debug(datastore)
109114

110115

0 commit comments

Comments
 (0)