Skip to content

Add xdist to image compare #266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 36 commits into from
Jun 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
7f5fd39
add xdist compatible code
cvanelteren Jun 17, 2025
17aa814
update conftest
cvanelteren Jun 17, 2025
e59bdce
update environment
cvanelteren Jun 17, 2025
84a0a16
update workflow
cvanelteren Jun 17, 2025
1050d6c
spelling
cvanelteren Jun 17, 2025
8f7c6d1
fix test
cvanelteren Jun 17, 2025
81da41f
Merge branch 'hotfix-tests' into xdist
cvanelteren Jun 17, 2025
d6512fb
fix issue where dict was mutated causing weird side effects
cvanelteren Jun 17, 2025
410cd2d
correct expectation for plot
cvanelteren Jun 17, 2025
d972bc4
refactor test and loosen constaint
cvanelteren Jun 17, 2025
9019639
Merge branch 'hotfix-tests' into xdist
cvanelteren Jun 17, 2025
9a7d738
relax constraint
cvanelteren Jun 17, 2025
e00265b
Merge branch 'main' into xdist
cvanelteren Jun 17, 2025
23d480c
attempt fix
cvanelteren Jun 17, 2025
41d1980
thread safety checks
cvanelteren Jun 17, 2025
3de337e
mv removal to single worker
cvanelteren Jun 17, 2025
3245cd5
style output
cvanelteren Jun 17, 2025
a1a9eb4
further styling
cvanelteren Jun 17, 2025
5d4a658
refactor into plugin
cvanelteren Jun 17, 2025
2447435
multiline import
cvanelteren Jun 17, 2025
e90bfe7
attempt thread safe access to rng
cvanelteren Jun 17, 2025
4dd23cb
simplify rng injection
cvanelteren Jun 17, 2025
c998517
spelling
cvanelteren Jun 17, 2025
5bb01f4
update tests with parse rng
cvanelteren Jun 17, 2025
38bc97f
isolate rc changes to the test
cvanelteren Jun 17, 2025
425a867
isolate rc to within the test
cvanelteren Jun 17, 2025
276256a
change styling and turn on failed only first
cvanelteren Jun 17, 2025
211843e
add thread safety to context managing
cvanelteren Jun 17, 2025
e65df11
separate html template from generator for clarity
cvanelteren Jun 17, 2025
512c402
update html and move template outside for cleaner separation
cvanelteren Jun 17, 2025
1cb9b0b
change default generator to numpy default function
cvanelteren Jun 17, 2025
8927e05
rm dead code
cvanelteren Jun 17, 2025
a65a536
rm dead code again
cvanelteren Jun 17, 2025
d2884a1
add locks to configurator
cvanelteren Jun 17, 2025
114310b
Merge branch 'main' into xdist
cvanelteren Jun 17, 2025
cc352a9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 18, 2025
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
6 changes: 3 additions & 3 deletions .github/workflows/build-ultraplot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:

- name: Test Ultraplot
run: |
pytest --cov=ultraplot --cov-branch --cov-report term-missing --cov-report=xml ultraplot
pytest -n auto --cov=ultraplot --cov-branch --cov-report term-missing --cov-report=xml ultraplot

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
Expand Down Expand Up @@ -76,14 +76,14 @@ 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 -n auto -W ignore --mpl-generate-path=baseline --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 -n auto -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

# Return the html output of the comparison even if failed
- name: Upload comparison failures
Expand Down
35 changes: 18 additions & 17 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,32 @@ name: ultraplot-dev
channels:
- conda-forge
dependencies:
- python>=3.10,<3.14
- numpy
- matplotlib>=3.9
- basemap >=1.4.1
- cartopy
- xarray
- seaborn
- jupyter
- jupytext
- matplotlib>=3.9
- nbsphinx
- networkx
- numpy
- pandas
- pint
- pip
- pre-commit
- pyarrow
- pytest
- pytest-mpl
- pytest-cov
- jupyter
- pip
- pint
- pytest-mpl
- pytest-xdist
- python>=3.10,<3.14
- seaborn
- sphinx
- nbsphinx
- jupytext
- sphinx-copybutton
- sphinx-autoapi
- sphinx-automodapi
- sphinx-copybutton
- sphinx-design
- sphinx-rtd-theme
- typing-extensions
- basemap >=1.4.1
- pre-commit
- sphinx-design
- networkx
- pyarrow
- xarray
- pip:
- git+https://github.com/ultraplot/UltraTheme.git
Loading
Loading