Skip to content

Commit

Permalink
Merge pull request #233 from VorTECHsa/ci-run-examples
Browse files Browse the repository at this point in the history
ci: Run examples as part of ci
  • Loading branch information
KitBurgess committed Aug 5, 2020
2 parents 3bd91fe + 278646f commit 895ffaf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,17 @@ jobs:
. .venv/bin/activate
pytest -v --doctest-modules
- run:
name: "Run all examples"
command: |
set -xe
. .venv/bin/activate
for f in docs/examples/*.py; do cp -v -- "$f" "$f-example.py"; done
cp docs/examples/*-example.py .
for f in *-example.py; do python "$f"; done
rm docs/examples/*-example.py
rm *-example.py
- run:
name: "Confirm that the check_setup script works"
command: |
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/7_custom_excel_charterer_ingestion.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def convert_to_corporation_ids(corporation_name: str) -> List[ID]:

if __name__ == "__main__":
# Read our excel sheet of charterers into a dataframe
charterers_df = pd.read_excel("./resources/my_charterers.xlsx")
charterers_df = pd.read_excel("./docs/examples/resources/my_charterers.xlsx")

# Convert the charterer names into ids
charterers_list_of_lists = charterers_df['charterers'].apply(convert_to_corporation_ids).to_list()
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"pydoc-markdown==2.0.5",
"tabulate==0.8.5",
"six==1.12.0",
"xlrd==1.2.0"
]
},
)

0 comments on commit 895ffaf

Please sign in to comment.