mesa / mesa/mesa-examples

Clarify or conditionally skip GIS tests when optional GIS dependencies are missing

Open
#351 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
252
Forks
279
Avg merge
8d 9h
Merged PRs (30d)
2

Description

While setting up a clean development environment for contributing to mesa-examples, I ran the full test suite locally using:

**python -m pytest**

This resulted in a failure during collection of **test_gis_examples.py** due to missing optional GIS dependencies such as geopandas.

From reviewing the GitHub Actions workflow, it appears that CI runs **test_examples.py** but does not execute **test_gis_examples.py**, which suggests that GIS tests may be considered optional.

Would it make sense to either:

Document that GIS tests require additional optional dependencies, or

Conditionally skip GIS tests when dependencies such as geopandas are not available (for example, using pytest.importorskip)

This could help contributors working on non-GIS examples run the test suite without needing to install the full GIS stack.

Happy to explore a PR if this would be helpful.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with test_gis_examples.py and the GitHub Actions workflow, then run python -m pytest in an environment without geopandas. Decide whether the GIS dependency requirement should be documented or the tests conditionally skipped, and verify that the full suite can run for contributors without the optional GIS stack.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation, testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.