Skip to content

Commit c86d011

Browse files
committed
feat: first commit, add stub project, license
0 parents  commit c86d011

30 files changed

+2115
-0
lines changed

.dockerignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Ignore everything
2+
**
3+
4+
# Allow files and directories
5+
!pg_nearest_city
6+
!tests
7+
!pyproject.toml
8+
!uv.lock
9+
!README.md
10+
!LICENSE.md
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ""
5+
labels: ""
6+
assignees: ""
7+
---
8+
9+
**Describe the bug**
10+
A clear and concise description of what the bug is.
11+
12+
**To Reproduce**
13+
Steps to reproduce the behavior.
14+
15+
**Expected behavior**
16+
A clear and concise description of what you expected to happen.
17+
18+
**Screenshots**
19+
If applicable, add screenshots to help explain your problem.
20+
21+
**System info**
22+
Details of your coding environment.
23+
24+
- OS: [e.g. iOS]
25+
- Python version [e.g. 3.10]
26+
- Version [e.g. 0.1.0]
27+
28+
**Additional context**
29+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ""
5+
labels: ""
6+
assignees: ""
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
A clear and concise description of what the problem is.
11+
Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/labeler.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
bug:
2+
# Branch starts with `fix` or has a `fix` in the name
3+
- head-branch: ["^fix", "fix"]
4+
enhancement:
5+
- head-branch:
6+
["^feature", "feature", "^feat", "feat", "^refactor", "refactor"]
7+
devops:
8+
- changed-files:
9+
- any-glob-to-any-file:
10+
- .github/**
11+
dependency:
12+
- changed-files:
13+
- any-glob-to-any-file:
14+
- pyproject.toml
15+
- uv.lock
16+
docs:
17+
- changed-files:
18+
- any-glob-to-any-file:
19+
- docs/**
20+
- mkdocs.yml
21+
- README.md
22+
version:
23+
- changed-files:
24+
- any-glob-to-any-file: pg_nearest_city/__version__.py

.github/workflows/docs.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: 📖 Publish Docs
2+
3+
on:
4+
push:
5+
paths:
6+
- docs/**
7+
- pg_nearest_city/**
8+
- mkdocs.yml
9+
branches: [main]
10+
# Allow manual trigger (workflow_dispatch)
11+
workflow_dispatch:
12+
13+
jobs:
14+
publish_docs:
15+
uses: hotosm/gh-workflows/.github/workflows/[email protected]

.github/workflows/pr_label.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: 🏷️ PR Label
2+
3+
on:
4+
pull_request_target:
5+
6+
jobs:
7+
pr-label:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/labeler@v5
12+
# Uses .github/labeler.yml definitions
13+
with:
14+
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/publish.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: 🚩 Publish to PyPi.org
2+
3+
on:
4+
release:
5+
types: [published]
6+
# Allow manual trigger (workflow_dispatch)
7+
workflow_dispatch:
8+
9+
jobs:
10+
publish_to_pypi:
11+
uses: hotosm/gh-workflows/.github/workflows/[email protected]
12+
secrets:
13+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

.github/workflows/pytest.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: 🧪 PyTest
2+
3+
on:
4+
push:
5+
branches: [main]
6+
# Run tests on PR, prior to merge to main & development
7+
pull_request:
8+
branches: [main]
9+
# Allow manual trigger (workflow_dispatch)
10+
workflow_dispatch:
11+
12+
jobs:
13+
pytest:
14+
uses: hotosm/gh-workflows/.github/workflows/[email protected]
15+
with:
16+
image_name: ghcr.io/${{ github.repository }}
17+
tag_override: ci
18+
compose_file: compose.yml
19+
compose_service: code
20+
compose_command: pytest

.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# gdb_history
2+
TAGS
3+
*~
4+
.deps
5+
.libs
6+
py-compile
7+
NEWS
8+
*__pycache__/
9+
10+
# output files
11+
*.txt
12+
*.xml
13+
*.geojson
14+
*.pbf
15+
*.xml
16+
*.html
17+
18+
# Python builds
19+
build
20+
dist
21+
*.egg-info
22+
23+
# Docs
24+
site
25+
.cache

.pre-commit-config.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
repos:
2+
# Versioning: Commit messages & changelog
3+
- repo: https://github.com/commitizen-tools/commitizen
4+
rev: v4.1.0
5+
hooks:
6+
- id: commitizen
7+
stages: [commit-msg]
8+
9+
# Lint / autoformat: Python code
10+
- repo: https://github.com/astral-sh/ruff-pre-commit
11+
# Ruff version.
12+
rev: "v0.8.2"
13+
hooks:
14+
# Run the linter
15+
- id: ruff
16+
args: [--fix, --exit-non-zero-on-fix]
17+
# Run the formatter
18+
- id: ruff-format
19+
20+
# Autoformat: YAML, JSON, Markdown, etc.
21+
- repo: https://github.com/pre-commit/mirrors-prettier
22+
rev: v4.0.0-alpha.8
23+
hooks:
24+
- id: prettier
25+
entry: env PRETTIER_LEGACY_CLI=1 prettier
26+
args: [--ignore-unknown, --no-error-on-unmatched-pattern]
27+
28+
# Lint: Markdown
29+
- repo: https://github.com/igorshubovych/markdownlint-cli
30+
rev: v0.43.0
31+
hooks:
32+
- id: markdownlint
33+
args: [--fix, --ignore, CHANGELOG.md]

0 commit comments

Comments
 (0)