Skip to content

Latest commit

 

History

History
 
 

tests

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

OSMnx tests

First, ensure that you have installed the necessary dependencies for the test suite. Then use the repository's pre-commit hooks and the scripts in this folder to:

  • format the code and docstrings per the project's style
  • lint the code and docstrings
  • type check the code
  • run tests and coverage

Read more about the project's standards in the contributing guidelines.

Code format

Format the code and sort imports per the project's style by running (from the repository root):

bash ./tests/format.sh

Run tests

Lint, type check, and test the code/docstrings by running (from the repository root):

pre-commit install
bash ./tests/lint_test.sh

Continuous integration

Pull requests trigger continuous integration tests via GitHub Actions. See the configuration. This includes the following steps:

  • build the docs
  • check code formatting
  • lint the code and docstrings
  • type check the code
  • run tests and coverage

Releases

To package and release a new version, update CHANGELOG.md and edit the version number in osmnx/_version.py. If necessary, update the dates in LICENSE.txt and docs/source/conf.py and the dependency versions in pyproject.toml. Then change directories to the repository's root and run:

bash -i ./tests/release.sh

This will tag the repository with the new version number, upload the PyPI distribution, and update the conda-forge feedstock. Then, open a pull request at the feedstock to release on conda-forge. Finally, when the new version is available on conda-forge, update the Docker image and the OSMnx Examples Gallery to use the new version.