popcoord 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,29 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ name: Test (Python ${{ matrix.python-version }})
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
17
+
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+
21
+ - uses: actions/setup-python@v5
22
+ with:
23
+ python-version: ${{ matrix.python-version }}
24
+
25
+ - name: Install
26
+ run: pip install -e ".[dev]"
27
+
28
+ - name: Test
29
+ run: pytest -v
@@ -0,0 +1,50 @@
1
+ name: Release
2
+
3
+ # Triggers on any tag of the form v*, e.g. v0.1.0 or v1.2.3
4
+ on:
5
+ push:
6
+ tags: ["v*"]
7
+
8
+ jobs:
9
+ # ------------------------------------------------------------------ build
10
+ build:
11
+ name: Build distribution
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+
16
+ - uses: actions/setup-python@v5
17
+ with:
18
+ python-version: "3.12"
19
+
20
+ - name: Install build
21
+ run: pip install build
22
+
23
+ - name: Build wheel and sdist
24
+ run: python -m build
25
+
26
+ - name: Upload artifacts
27
+ uses: actions/upload-artifact@v4
28
+ with:
29
+ name: dist
30
+ path: dist/
31
+
32
+ # ------------------------------------------------------------- publish-pypi
33
+ publish-pypi:
34
+ name: Publish to PyPI
35
+ needs: build
36
+ runs-on: ubuntu-latest
37
+ environment:
38
+ name: pypi
39
+ url: https://pypi.org/p/popcoord
40
+ permissions:
41
+ id-token: write # required for Trusted Publishing
42
+
43
+ steps:
44
+ - uses: actions/download-artifact@v4
45
+ with:
46
+ name: dist
47
+ path: dist/
48
+
49
+ - name: Publish to PyPI
50
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,27 @@
1
+ # Virtual environments
2
+ venv/
3
+ .venv/
4
+ env/
5
+
6
+ # Python cache
7
+ __pycache__/
8
+ *.py[cod]
9
+ *.pyo
10
+ *.pyd
11
+
12
+ # Build / distribution
13
+ dist/
14
+ build/
15
+ *.egg-info/
16
+ *.egg
17
+
18
+ # Test cache
19
+ .pytest_cache/
20
+ .coverage
21
+ htmlcov/
22
+
23
+ # Editor / OS
24
+ .DS_Store
25
+ .idea/
26
+ .vscode/
27
+ *.swp
@@ -0,0 +1,12 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0 (2026-03-21)
4
+
5
+ Initial release.
6
+
7
+ - `population()`: total headcount within a radius
8
+ - `demographics()`: age x sex breakdown (18 cohorts)
9
+ - `density()`: mean / min / max persons per km2
10
+ - Two backends: `"api"` (lightweight) and `"raster"` (pixel-level)
11
+ - Computed properties: `sex_ratio`, `dependency_ratio`, `median_age_bucket`
12
+ - WorldPop data coverage: 2000–2020, ~1 km global resolution