Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .github/workflows/build-ultraplot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,23 @@ jobs:
git fetch origin ${{ github.event.pull_request.base.sha }}
git checkout ${{ github.event.pull_request.base.sha }}
python -c "import ultraplot as plt; plt.config.Configurator()._save_yaml('ultraplot.yml')"
pytest -W ignore --mpl-generate-path=baseline --mpl-default-style="./ultraplot.yml"
pytest -W ignore \
--mpl-generate-path=baseline \
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if we still want to bundle the baseline images

--mpl-generate-hash-library=baseline/comparison_hashes.json \
--mpl-default-style="./ultraplot.yml"
git checkout ${{ github.sha }} # Return to PR branch

- name: Image Comparison Ultraplot
run: |
mkdir -p results
python -c "import ultraplot as plt; plt.config.Configurator()._save_yaml('ultraplot.yml')"
pytest -W ignore --mpl --mpl-baseline-path=baseline --mpl-generate-summary=html --mpl-results-path=./results/ --mpl-default-style="./ultraplot.yml" --store-failed-only ultraplot/tests
pytest -W ignore \
--mpl \
--mpl-hash-library=baseline/comparison_hashes.json \
--mpl-results-path=./results/ \
--mpl-generate-summary=html \
--mpl-default-style="./ultraplot.yml" \
--store-failed-only ultraplot/tests

# Return the html output of the comparison even if failed
- name: Upload comparison failures
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,7 @@ include-package-data = true
[tool.setuptools_scm]
write_to = "ultraplot/_version.py"
write_to_template = "__version__ = '{version}'\n"

[tool.pytest.ini_options]
mpl-baseline-dir = "./baseline"
mpl = "hash"