Skip to content
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

GitHub Actions: use Agg backend for matplotlib #261

Merged
merged 6 commits into from
Nov 25, 2021
Merged

GitHub Actions: use Agg backend for matplotlib #261

merged 6 commits into from
Nov 25, 2021

Conversation

calebrob6
Copy link
Member

@calebrob6 calebrob6 commented Nov 24, 2021

No description provided.

@calebrob6
Copy link
Member Author

calebrob6 commented Nov 24, 2021

The recent series of commits on this PR were to check to see if matplotlib would behave as expected with environment variables set in the github actions yaml files.

Specifically, I added a new tests/tmp action to "tests.yaml" that ran a tmp.py script that printed the backend that matplotlib was using. Without the MPLBACKEND: Agg environment variable set, then the Ubuntu machines would use "agg", the macOS machines would use "MacOSX", and the Windows machines would use "TkAgg" (see https://github.com/microsoft/torchgeo/runs/4316379792). With the environment variable set, then all machines would use "agg".

I've reverted the temp testing code and added the environment variable to "tests.yaml".

@adamjstewart

@adamjstewart adamjstewart added the datasets Geospatial or benchmark datasets label Nov 24, 2021
@adamjstewart adamjstewart marked this pull request as draft November 24, 2021 22:52
@adamjstewart
Copy link
Collaborator

Can we move the MPLBACKEND stuff into a separate PR (or just merge this PR now) so that other PRs can benefit from this change without having to wait for this PR to be finished?

@calebrob6 calebrob6 marked this pull request as ready for review November 25, 2021 05:11
@calebrob6
Copy link
Member Author

calebrob6 commented Nov 25, 2021

Yeah sure, just merge this! (note: I do not know if the env variable should go elsewhere, just figured out how it works)

@adamjstewart adamjstewart changed the title Updates for plotting GitHub Actions: use Agg backend for matplotlib Nov 25, 2021
@adamjstewart
Copy link
Collaborator

I do not know if the env variable should go elsewhere

I think this location is fine. We could only enable it for the actual pytest step and only on Windows, but I don't see any issues with using Agg on macOS too.

@adamjstewart adamjstewart merged commit 6cc61e5 into main Nov 25, 2021
@adamjstewart adamjstewart deleted the plotting branch November 25, 2021 17:05
@adamjstewart adamjstewart added this to the 0.2.0 milestone Nov 25, 2021
@adamjstewart adamjstewart modified the milestones: 0.2.0, 0.1.1 Dec 19, 2021
yichiac pushed a commit to yichiac/torchgeo that referenced this pull request Apr 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datasets Geospatial or benchmark datasets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants