Skip to content

Commit

Permalink
Merge branch 'main' into ds_3039_sumstats_update
Browse files Browse the repository at this point in the history
  • Loading branch information
DSuveges authored Nov 21, 2023
2 parents 55ac5ad + 4997432 commit 0acb106
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ repos:
- id: python-check-blanket-noqa

- repo: https://github.com/hadialqattan/pycln
rev: v2.3.0
rev: v2.4.0
hooks:
- id: pycln
args: [--all]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.5
rev: v0.1.6
hooks:
- id: ruff

Expand All @@ -50,7 +50,7 @@ repos:
- id: black

- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.8.0
rev: v9.9.0
hooks:
- id: commitlint
additional_dependencies: ["@commitlint/config-conventional"]
Expand Down
22 changes: 11 additions & 11 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ruff = "^0.1.3"

[tool.poetry.group.docs.dependencies]
mkdocs = "^1.5.3"
mkdocstrings-python = "^1.7.3"
mkdocstrings-python = "^1.7.4"
mkdocs-material = "*"
mkdocs-section-index = "^0.3.4"
mkdocs-git-revision-date-localized-plugin = "^1.2.1"
Expand Down
5 changes: 5 additions & 0 deletions src/otg/dataset/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,14 @@ def from_parquet(
Returns:
Self: Dataset with the parquet file contents
Raises:
ValueError: Parquet file is empty
"""
schema = cls.get_schema()
df = session.read_parquet(path=path, schema=schema, **kwargs)
if df.isEmpty():
raise ValueError(f"Parquet file is empty: {path}")
return cls(_df=df, _schema=schema)

def validate_schema(self: Dataset) -> None:
Expand Down

0 comments on commit 0acb106

Please sign in to comment.