Skip to content

Commit

Permalink
Merge pull request #349 from DanielYang59/mpl-backend
Browse files Browse the repository at this point in the history
`matplotlib` use non-interactive agg backend
  • Loading branch information
naik-aakash authored Nov 18, 2024
2 parents 9f165c4 + 975a895 commit 6143273
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ jobs:
- name: Test with pytest and coverage
# run this locally to update tests durations
# pytest --cov=lobsterpy --cov-append --splits 1 --group 1 --durations-path ./tests/test_data/.pytest-split-durations --store-durations
env:
MPLBACKEND: Agg # non-interactive backend for matplotlib
run: |
micromamba activate lobpy
pytest --cov=lobsterpy --cov-report term-missing --cov-append --splits 6 --group ${{ matrix.split }} -vv --durations-path ./tests/test_data/.pytest-split-durations
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ requires-python = ">=3.10,<3.13"
dependencies = [
"pymatgen>=2024.10.22",
"numpy<3.0.0",
"typing",
]

[tool.setuptools.package-data]
Expand Down
4 changes: 2 additions & 2 deletions tests/cli/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ def setup_class(cls):

@pytest.mark.parametrize("args", test_cases)
def test_cli_results(self, args, capsys, inject_mocks, clean_plot):
# Use Ubuntu default backend for consistency across OS
mpl.use("agg")
# Use non-interactive Agg matplotlib backend to get consistent results across OS
mpl.use("Agg")

test = get_parser().parse_args(args)
run(test)
Expand Down

0 comments on commit 6143273

Please sign in to comment.