Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various updates #27

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
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
49 changes: 29 additions & 20 deletions .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,38 @@ jobs:
name: "Test Python ${{ matrix.python-version }} & Django ${{ matrix.django-version }}"
strategy:
matrix:
django-version: ["2.2.0", "3.0.0", "3.1.0", "3.2.0", "4.0.0"]
python-version: ["3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
django-version: ["3.2.0", "4.0.0", "4.1.0", "4.2.0"] # "5.0.0"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
exclude:
# 3.0
- django-version: "3.0.0"
python-version: "3.5"
- django-version: "3.0.0"
python-version: "3.10"
# 3.1
- django-version: "3.1.0"
python-version: "3.5"
- django-version: "3.1.0"
python-version: "3.10"
# 3.2
- django-version: "3.2.0"
python-version: "3.5"
python-version: "3.11"
- django-version: "3.2.0"
python-version: "3.12"
# 4.0
- django-version: "4.0.0"
python-version: "3.5"
python-version: "3.7"
- django-version: "4.0.0"
python-version: "3.6"
python-version: "3.11"
- django-version: "4.0.0"
python-version: "3.12"
# 4.1
- django-version: "4.1.0"
python-version: "3.7"
- django-version: "4.1.0"
python-version: "3.12"
# 4.2
- django-version: "4.2.0"
python-version: "3.7"
- django-version: "4.2.0"
python-version: "3.12"
# 5.0
# - django-version: "5.0.0"
# python-version: "3.7"
# - django-version: "5.0.0"
# python-version: "3.8"
# - django-version: "5.0.0"
# python-version: "3.9"
fail-fast: false
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -71,16 +80,16 @@ jobs:
runs-on: ubuntu-latest
needs: [test]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.9"
- uses: actions/cache@v2
python-version: "3.10"
- uses: actions/cache@v3
name: Configure pip caching
with:
path: ~/.cache/pip
key: ${{ runner.os }}-publish-pip-${{ hashFiles('setup.py') }}
key: ${{ runner.os }}-publish-pip-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-publish-pip-
- name: Install dependencies
Expand Down
26 changes: 16 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,24 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.5.0
hooks:
- id: check-toml
- id: check-yaml
- id: check-merge-conflict
- id: check-vcs-permalinks
- id: debug-statements
- id: trailing-whitespace
- id: end-of-file-fixer
- id: mixed-line-ending
- id: no-commit-to-branch
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.1.5
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/psf/black
rev: 21.9b0
rev: 23.11.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: "4.0.1"
hooks:
- id: flake8
- repo: https://github.com/PyCQA/isort
rev: "5.9.3"
hooks:
- id: isort
2 changes: 1 addition & 1 deletion docs/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -239,4 +239,4 @@ if "%1" == "pseudoxml" (
goto end
)

:end
:end
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
.[docs]
.[docs]
1 change: 0 additions & 1 deletion example/example/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


class Migration(migrations.Migration):

dependencies = []

operations = [
Expand Down
1 change: 0 additions & 1 deletion osm_field/static/css/osm_field.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ div.osmfield-map {
top: 30px;
z-index: 1000;
}

2 changes: 1 addition & 1 deletion osm_field/static/js/osm_field.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion osm_field/static/js/vendor/leaflet.js

Large diffs are not rendered by default.

83 changes: 75 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,79 @@
[build-system]
requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=5,<6"]
requires = [
"setuptools>=61.2",
"setuptools_scm",
"wheel",
]
build-backend = "setuptools.build_meta"

[project]
name = "django-osm-field"
authors = [{name = "Markus Holtermann", email = "[email protected]"}]
description = "Django OpenStreetMap Field"
readme = "README.md"
keywords = [
"OpenStreetMap",
"OSM",
"Django",
"Geo",
"Geoposition",
]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
requires-python = ">=3.6"
dependencies = ["Django>=3.2"]
dynamic = ["version"]

[project.urls]
Homepage = "https://github.com/MarkusH/django-osm-field"
CI = "https://github.com/MarkusH/django-osm-field/actions"
Changelog = "https://github.com/MarkusH/django-osm-field/blob/main/CHANGELOG.md"
Issues = "https://github.com/MarkusH/django-osm-field/issues"

[project.optional-dependencies]
dev = ["pre-commit"]
docs = [
"Django",
"sphinx_rtd_theme",
"Sphinx>=3.0,<3.4",
]
test = ["coverage[toml]", "Django", "tox"]

[tool.setuptools]
include-package-data = true

[tool.setuptools.packages.find]
exclude = [
"*.example",
"*.example.*",
"example.*",
"example",
"*.tests",
"*.tests.*",
"tests.*",
"tests",
]
namespaces = false

[tool.black]
target-version = ['py38']
target-version = ['py310']

[tool.coverage.run]
branch = true
Expand All @@ -12,9 +83,5 @@ source = ["osm_field/"]
show_missing = true
fail_under = 100

[tool.isort]
combine_as_imports = true
known_first_party = ["osm_field", "tests"]
profile = "black"

[tool.setuptools_scm]
[tool.ruff]
line-length = 88
2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

69 changes: 0 additions & 69 deletions setup.py

This file was deleted.

1 change: 0 additions & 1 deletion tests/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


class Migration(migrations.Migration):

dependencies = []

operations = [
Expand Down
9 changes: 3 additions & 6 deletions tests/settings.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# -*- coding: utf-8 -*-
import os.path

import django
from pathlib import Path

DEBUG = False

RUNTESTS_DIR = os.path.abspath(os.path.dirname(__file__))
RUNTESTS_DIR = Path(__file__).parent.resolve()

DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3"}}

Expand Down Expand Up @@ -45,5 +43,4 @@

ROOT_URLCONF = "tests.urls"

if django.VERSION[:2] < (1, 6):
TEST_RUNNER = "discover_runner.DiscoverRunner"
DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
Loading
Loading