Skip to content

Commit

Permalink
test rtd yml
Browse files Browse the repository at this point in the history
  • Loading branch information
vergauwenthomas committed Sep 4, 2024
1 parent f14f2a0 commit 3590005
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ build:
- pwd
- ls
- poetry install --with documentation
- poetry run rtdtest.py
- poetry run python rtdtest.py
- poetry run sphinx-build -a -E -v ./docs/ ./docs/_build/


Expand Down
7 changes: 6 additions & 1 deletion rtdtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
print(f"naive df read: {df}")


df = pd.read_csv(demofile, engine="python") # python engine
df = pd.read_csv(demofile, sep=";", engine="python") # python engine

print(f"naive df read: {df}")

Expand All @@ -53,7 +53,9 @@ def _read_csv_to_df(filepath, kwargsdict):
df = pd.read_csv(filepath_or_buffer=filepath, **kwargsdict)
else:
for sep in common_seperators:
print(f" seperator: {sep}")
df = pd.read_csv(filepath, sep=sep)
print(f"df :{df}")
assert not df.empty, f"{filepath} is empty!"

if len(df.columns) > 1:
Expand All @@ -64,3 +66,6 @@ def _read_csv_to_df(filepath, kwargsdict):
), f"Only one column detected from import using these seperators: {common_seperators}. See if csv template is correct."

return df


_read_csv_to_df(demofile, kwargsdict={})

0 comments on commit 3590005

Please sign in to comment.