Skip to content

Commit

Permalink
Fix app start up (#171)
Browse files Browse the repository at this point in the history
* Move external sources call to get_app

* Release v0.5.1
  • Loading branch information
mmwinther authored Feb 19, 2024
1 parent 7f0fad4 commit 4603a44
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "ssb-datadoc"
version = "0.5.0"
version = "0.5.1"
description = "Document dataset metadata. For use in Statistics Norway's metadata system."
authors = ["Statistics Norway <stat-dev@ssb.no>"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion src/datadoc/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def build_app(app: type[Dash]) -> Dash:
def get_app(dataset_path: str | None = None) -> tuple[Dash, int]:
"""Centralize all the ugliness around initializing the app."""
logger.info("Datadoc version v%s", get_app_version())
collect_data_from_external_sources()
state.current_metadata_language = SupportedLanguages.NORSK_BOKMÅL
state.metadata = DataDocMetadata(
state.statistic_subject_mapping,
Expand Down Expand Up @@ -121,7 +122,6 @@ def collect_data_from_external_sources() -> None:

def main(dataset_path: str | None = None) -> None:
"""Entrypoint when running as a script."""
collect_data_from_external_sources()
if dataset_path:
logger.info("Starting app with dataset_path = %s", dataset_path)
app, port = get_app(dataset_path)
Expand Down

0 comments on commit 4603a44

Please sign in to comment.