Skip to content
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
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
105 changes: 105 additions & 0 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
---
name: Build Docs

on: # yamllint disable-line rule:truthy
push:
branches: [main]
tags:
- "v*"
pull_request:
branches:
- "*"
workflow_dispatch:
inputs:
version:
description: Manual Doc Build
default: run-doc-build
required: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
docs:
name: Build & push docs
runs-on: ${{ matrix.os }}
timeout-minutes: 90
strategy:
matrix:
os: ["ubuntu-latest"]
environment-file: [ci/envs/314-latest.yaml]
experimental: [false]
defaults:
run:
shell: bash -l {0}

steps:
- name: Checkout repo
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Setup micromamba
uses: mamba-org/setup-micromamba@v2
with:
environment-file: ${{ matrix.environment-file }}
micromamba-version: "latest"

- name: Install package
run: pip install . --no-deps

- name: Make docs
run: cd docs; make html

- name: Zip documentation
if: ${{ github.event_name == 'pull_request' }}
run: zip docs_artifact.zip docs/build/html -r

- name: Upload artifact
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v7
with:
name: docs_artifact
path: docs_artifact.zip

- name: Publish to Github Pages on main (dev)
if: ${{ github.ref == 'refs/heads/main' }}
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html/
destination_dir: dev
keep_files: false

- name: Publish to Github Pages on release (versioned)
if: ${{ github.ref_type == 'tag' }}
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html/
destination_dir: ${{ github.ref_name }}

- name: Publish to Github Pages on release (stable)
if: ${{ github.ref_type == 'tag' }}
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html/
destination_dir: stable
keep_files: false

- name: Update the versions switcher
if: ${{ github.ref_type == 'tag' }}
run: | # yamllint disable-line rule:line-length
git checkout gh-pages
git fetch
git pull
git config --global user.name 'github-actions[bot]'
git config --global user.email \
'41898282+github-actions[bot]@users.noreply.github.com'
python update_version_json.py --version ${{ github.ref_name }}
git add versions.json
git commit -m "Update versions switcher"
git push
git checkout main
2 changes: 1 addition & 1 deletion .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
fetch-depth: 0 # Fetch all history for all branches and tags.

- name: setup micromamba
uses: mamba-org/setup-micromamba@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_docstrings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
fetch-depth: 0 # Fetch all history for all branches and tags.

- name: setup micromamba
uses: mamba-org/setup-micromamba@v2
Expand Down
39 changes: 0 additions & 39 deletions .github/workflows/test_user_guide.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
fetch-depth: 0 # Fetch all history for all branches and tags.

- name: setup micromamba
uses: mamba-org/setup-micromamba@v2
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ instance/
docs/_build/
docs/generated/
docs/api/
docs/build
docs/source/api/
docs/source/generated

# PyBuilder
target/
Expand Down
42 changes: 22 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# momepy

[![Documentation Status](https://readthedocs.org/projects/momepy/badge/?version=latest)](http://docs.momepy.org/en/latest/?badge=latest) [![Actions Status](https://github.com/pysal/momepy/workflows/Tests/badge.svg)](https://github.com/pysal/momepy/actions?query=workflow%3ATests)
[![Actions Status](https://github.com/pysal/momepy/workflows/Tests/badge.svg)](https://github.com/pysal/momepy/actions?query=workflow%3ATests)
[![codecov](https://codecov.io/gh/pysal/momepy/branch/main/graph/badge.svg?token=VNn0WR5JWT)](https://codecov.io/gh/pysal/momepy) [![Discord](https://img.shields.io/badge/Discord-join%20chat-7289da?style=flat&logo=discord&logoColor=cccccc&link=https://discord.gg/he6Y8D2ap3)](https://discord.gg/he6Y8D2ap3) [![DOI](https://joss.theoj.org/papers/10.21105/joss.01807/status.svg)](https://doi.org/10.21105/joss.01807)


<img src="https://raw.githubusercontent.com/pysal/momepy/main/docs/_static/logo.png" width="50%">

## Introduction
Expand Down Expand Up @@ -35,12 +34,10 @@ The package is currently maintained by [**@martinfleis**](https://github.com/mar

A quick and easy [getting-started guide](http://docs.momepy.org/en/stable/user_guide/getting_started.html) is part of the [User Guide](http://docs.momepy.org/en/stable/user_guide/intro.html).


## Documentation

Documentation of `momepy` is available at [docs.momepy.org](https://docs.momepy.org/).


## Examples

```py
Expand All @@ -55,35 +52,40 @@ G = momepy.straightness_centrality(G)

![Straightness centrality](https://raw.githubusercontent.com/pysal/momepy/main/docs/_static/centrality_27_0.png)


## How to cite

To cite `momepy` please use the following [software paper](https://doi.org/10.21105/joss.01807)](https://doi.org/10.21105/joss.01807) published in the JOSS.
To cite `momepy` please use the following [software paper](https://doi.org/10.21105/joss.01807)](<https://doi.org/10.21105/joss.01807>) published in the JOSS.

Fleischmann, M. (2019) ‘momepy: Urban Morphology Measuring Toolkit’, Journal of Open Source Software, 4(43), p. 1807. doi: 10.21105/joss.01807.
> Fleischmann, M. (2019) ‘momepy: Urban Morphology Measuring Toolkit’, Journal of Open Source Software, 4(43), p. 1807. doi: 10.21105/joss.01807.

BibTeX:

@article{fleischmann_2019,
author={Fleischmann, Martin},
title={momepy: Urban Morphology Measuring Toolkit},
journal={Journal of Open Source Software},
year={2019},
volume={4},
number={43},
pages={1807},
DOI={10.21105/joss.01807}
}
```bibtex
@article{fleischmann_2019,
author={Fleischmann, Martin},
title={momepy: Urban Morphology Measuring Toolkit},
journal={Journal of Open Source Software},
year={2019},
volume={4},
number={43},
pages={1807},
DOI={10.21105/joss.01807}
}
```

## Install

You can install `momepy` using Conda from `conda-forge` (recommended):

conda install -c conda-forge momepy
```sh
conda install -c conda-forge momepy
```

or from PyPI using `pip`:

pip install momepy
```sh
pip install momepy
```

See the [installation instructions](http://docs.momepy.org/en/latest/install.html) for detailed instructions.
Momepy depends on the Python geospatial stack, which might cause some dependency issues.
Expand All @@ -109,7 +111,7 @@ If you have a question regarding momepy, feel free to open an [issue](https://gi

## Acknowledgments

The initial release of momepy was a result of research of [Urban](http://udsu-strath.com) Design Studies Unit (UDSU)](http://udsu-strath.com) supported by the Axel and Margaret Ax:son Johnson Foundation as a part of “The Urban Form Resilience Project” in partnership with the University of Strathclyde in Glasgow, UK. Further development was supported by the [Geographic Data Science Lab](https://www.liverpool.ac.uk/geographic-data-science/) of the University of Liverpool within the [Urban Grammar AI](https://urbangrammarai.xyz) research project.
The initial release of momepy was a result of research of [Urban Design Studies Unit (UDSU)](<http://udsu-strath.com>) supported by the Axel and Margaret Ax:son Johnson Foundation as a part of “The Urban Form Resilience Project” in partnership with the University of Strathclyde in Glasgow, UK. Further development was supported by the [Geographic Data Science Lab](https://www.liverpool.ac.uk/geographic-data-science/) of the University of Liverpool within the [Urban Grammar AI](https://urbangrammarai.xyz) research project.

---
Copyright (c) 2018-, Martin Fleischmann and PySAL Developers
11 changes: 10 additions & 1 deletion ci/envs/314-latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ dependencies:
- codecov
- pytest
- pytest-cov
- pytest-doctestplus
# user guide testing
- dask
- inequality
Expand All @@ -34,4 +35,12 @@ dependencies:
- geopy
- ipywidgets
- Iprogress
- pytest-doctestplus
- matplotlib
- numpydoc
- sphinxcontrib-bibtex
- sphinx-autosummary-accessors
- sphinx-copybutton
- sphinx-immaterial
- myst-nb
- sphinx
- ipykernel
4 changes: 2 additions & 2 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SOURCEDIR = .
BUILDDIR = _build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
Expand Down
32 changes: 0 additions & 32 deletions docs/_static/custom.css

This file was deleted.

Loading
Loading