-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add Git LFS configuration, .gitattributes. - Add metadata specimen. - Clone LFS files in "pytest" CI workflow.
- Loading branch information
Showing
4 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
# Reduce the number of merge/rebase conflicts | ||
doc/whatsnew.rst merge=union | ||
# Git LFS | ||
*.xlsx filter=lfs diff=lfs merge=lfs -text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,8 @@ jobs: | |
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
lfs: true | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
|
Git LFS file not shown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,33 @@ | ||
from transport_data.org import get_agencyscheme, refresh | ||
from transport_data.org.metadata import read_workbook, summarize_metadataset | ||
|
||
|
||
def test_get_agencyscheme() -> None: | ||
get_agencyscheme() | ||
|
||
|
||
def test_read_workbook(test_data_path) -> None: | ||
# Function runs successfully | ||
result = read_workbook(test_data_path.joinpath("metadata-input.xlsx")) | ||
|
||
# Result has a certain number of metadata reports | ||
assert 47 == len(result.report) | ||
|
||
|
||
def test_summarize_metadataset(capsys, test_data_path) -> None: | ||
mds = read_workbook(test_data_path.joinpath("metadata-input.xlsx")) | ||
|
||
# Function runs successfully | ||
summarize_metadataset(mds) | ||
|
||
captured = capsys.readouterr() | ||
# pathlib.Path("debug.txt").write_text(captured.out) # DEBUG Write to a file | ||
|
||
# Output contains certain text | ||
assert "MEASURE: 40 unique values" in captured.out | ||
|
||
# TODO expand with further assertions | ||
|
||
|
||
def test_refresh() -> None: | ||
refresh() |