Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9-slim
FROM python:3.10-slim

# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
Expand Down
2 changes: 1 addition & 1 deletion .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if ! ruff format --check; then
fi

echo "Lint with Ruff..."
ruff check || { echo "FAIL"; exit 1; }
ruff check --exclude map_machine/doc/moire_manager.py || { echo "FAIL"; exit 1; }

echo "Check with ty..."
ty check || { echo "FAIL"; exit 1; }
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: "3.10"
cache: pip
- name: Install dependencies
run: |
Expand All @@ -36,10 +36,10 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: "3.10"
cache: pip
- name: Install dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9-slim-bullseye
FROM python:3.10-slim-bullseye

WORKDIR /app

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ Every way and node displayed with the random color picked for each author with `

## Installation

Requirements: Python 3.9.
Requirements: Python 3.10.

* Install the [cairo 2D graphic library](https://www.cairographics.org/download/),
* install the [GEOS library](https://libgeos.org),
Expand Down
2 changes: 1 addition & 1 deletion doc/moi/contributing.moi
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This will allow you to automatically check your commit message and code before c

\3 {First configure your workspace} {}

Make sure you have Python 3.9 development tools. E.g., for Ubuntu, run \m {apt install python3.9-dev python3.9-venv}.
Make sure you have Python 3.10 development tools. E.g., for Ubuntu, run \m {apt install python3.10-dev python3.10-venv}.

Activate virtual environment. E.g. for fish shell, run \m {source venv/bin/activate.fish}.

Expand Down
2 changes: 1 addition & 1 deletion doc/moi/install.moi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
\2 {Install} {install}

Map Machine requires \ref {https://www.python.org} {Python} 3.9, \ref {https://pip.pypa.io/en/stable/installation/} {pip}, and two libraries\:
Map Machine requires \ref {https://www.python.org} {Python} 3.10, \ref {https://pip.pypa.io/en/stable/installation/} {pip}, and two libraries\:

\list
{\ref {https://www.cairographics.org/download/} {cairo 2D graphic library},}
Expand Down
2 changes: 1 addition & 1 deletion doc/moi/readme.moi
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ Every way and node displayed with the random color picked for each author with \

\2 {Installation} {installation}

Requirements\: Python 3.9/* or higher*/.
Requirements\: Python 3.10/* or higher*/.

\list
{Install the \ref {https://www.cairographics.org/download/} {cairo 2D graphic library},}
Expand Down
4 changes: 2 additions & 2 deletions map_machine/doc/icons.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import annotations

from pathlib import Path
from typing import TYPE_CHECKING, Callable
from typing import TYPE_CHECKING

from colour import Color

Expand All @@ -17,7 +17,7 @@
from map_machine.workspace import workspace

if TYPE_CHECKING:
from collections.abc import Iterable
from collections.abc import Callable, Iterable

SKIP: bool = True
BLACK: Color = Color("black")
Expand Down
4 changes: 2 additions & 2 deletions map_machine/doc/moire_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import argparse
from abc import ABC
from pathlib import Path
from typing import Any, ClassVar, Union
from typing import Any, ClassVar

from moire.default import Default, DefaultHTML, DefaultMarkdown, DefaultWiki
from moire.moire import Tag
Expand All @@ -17,7 +17,7 @@
__email__ = "me@enzet.ru"

Arguments = list[Any]
Code = Union[str, Tag, list]
Code = str | Tag | list

PREFIX: str = "https://wiki.openstreetmap.org/wiki/"

Expand Down
4 changes: 2 additions & 2 deletions map_machine/drawing.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import annotations

from dataclasses import dataclass
from typing import TYPE_CHECKING, Union
from typing import TYPE_CHECKING

import numpy as np
import svgwrite
Expand All @@ -20,7 +20,7 @@
__author__ = "Sergey Vartanov"
__email__ = "me@enzet.ru"

PathCommands = list[Union[float, str, np.ndarray]]
PathCommands = list[float | str | np.ndarray]

BLACK: Color = Color("black")
DEFAULT_FONT: str = "Helvetica"
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
name = "map-machine"
description = "Map Machine: Python map renderer for OpenStreetMap with custom icon set."
readme = "README.md"
requires-python = ">=3.9"
requires-python = ">=3.10"
license = "MIT"
authors = [{ name = "Sergey Vartanov", email = "me@enzet.ru" }]
classifiers = [
Expand All @@ -18,10 +18,10 @@ dependencies = [
"CairoSVG~=2.5.0",
"colour~=0.1.5",
"numpy~=1.26.0",
"Pillow~=8.2.0",
"Pillow~=12.1.0",
"portolan~=1.0.1",
"PyYAML~=6.0.1",
"Shapely~=1.7.1",
"Shapely~=2.1.2",
"svgwrite~=1.4",
"urllib3~=1.25.6",
]
Expand Down