grid4earth 2026.5.5__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,2 @@
1
+ # SCM syntax highlighting & preventing 3-way merges
2
+ pixi.lock merge=binary linguist-language=YAML linguist-generated=true -diff
@@ -0,0 +1,112 @@
1
+ name: Release
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ pull_request:
8
+ branches:
9
+ - main
10
+
11
+ permissions: {}
12
+
13
+ concurrency:
14
+ group: ${{ github.workflow }}-${{ github.ref }}
15
+ cancel-in-progress: true
16
+
17
+ jobs:
18
+ build:
19
+ name: Create release artifacts
20
+ if: github.repository_owner == 'GRID4EARTH'
21
+ runs-on: ubuntu-latest
22
+
23
+ steps:
24
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
25
+ with:
26
+ persist-credentials: false
27
+ - uses: prefix-dev/setup-pixi@1b2de7f3351f171c8b4dfeb558c639cb58ed4ec0 # v0.9.5
28
+ with:
29
+ cache: false
30
+ environments: export
31
+
32
+ - name: generate artifacts
33
+ run: |
34
+ pixi run conda-environment env.yml
35
+ pixi run requirements requirements.txt
36
+
37
+ - name: build release artifacts
38
+ run: |
39
+ pixi run build-package
40
+
41
+ - name: save artifacts (environment files)
42
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
43
+ with:
44
+ name: release artifacts
45
+ path: |
46
+ env.yml
47
+ requirements.txt
48
+ if-no-files-found: error
49
+
50
+ - name: save artifacts (packages)
51
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
52
+ with:
53
+ name: built packages
54
+ path: dist/*
55
+ if-no-files-found: error
56
+
57
+ extend-release:
58
+ needs: build
59
+
60
+ name: Upload release artifacts
61
+ if: github.event_name == 'release'
62
+ runs-on: ubuntu-latest
63
+
64
+ permissions:
65
+ contents: write # to edit the created release
66
+
67
+ steps:
68
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
69
+ with:
70
+ persist-credentials: false
71
+
72
+ - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
73
+ with:
74
+ name: release artifacts
75
+ path: artifacts/
76
+
77
+ - name: edit release
78
+ env:
79
+ GITHUB_TAG: ${{ github.ref_name }}
80
+ GH_TOKEN: ${{ github.token }}
81
+ run: |
82
+ gh release upload $GITHUB_TAG artifacts/env.yml artifacts/requirements.txt
83
+
84
+ publish-to-pypi:
85
+ needs: build
86
+ name: Upload PyPI package
87
+ if: github.event_name == 'release'
88
+
89
+ runs-on: ubuntu-latest
90
+
91
+ environment:
92
+ name: pypi
93
+ url: https://pypi.org/p/grid4earth
94
+
95
+ permissions:
96
+ id-token: write # allow uploads to pypi.org
97
+ attestations: write # allow generating attestations
98
+
99
+ steps:
100
+ - name: download artifacts
101
+ uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
102
+ with:
103
+ name: built packages
104
+ path: dist
105
+
106
+ - name: Generate artifact attestation
107
+ uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0
108
+ with:
109
+ subject-path: "dist/*.whl"
110
+
111
+ - name: Publish to PyPI
112
+ uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
@@ -0,0 +1,9 @@
1
+ # pixi environments
2
+ .pixi/*
3
+ !.pixi/config.toml
4
+
5
+ # auto-generated files
6
+ /requirements.txt
7
+ /env.yml
8
+ /dist/
9
+ /grid4earth.egg-info/
@@ -0,0 +1,9 @@
1
+ Metadata-Version: 2.4
2
+ Name: grid4earth
3
+ Version: 2026.5.5
4
+ License-Expression: Apache-2.0
5
+ Requires-Python: >=3.11
6
+ Requires-Dist: healpix-geo==0.1.2
7
+ Requires-Dist: healpix-plot==2026.5.1
8
+ Requires-Dist: healpix-analyse==2026.5.1
9
+ Requires-Dist: healpix-resample==2026.5.1
@@ -0,0 +1,42 @@
1
+ # grid4earth packages
2
+
3
+ This repository provides requirement files that can be used to install a curated set of the packages developed as part of the Grid4Earth project.
4
+
5
+ ## Usage
6
+
7
+ To install a particular version with `pip`, use (replacing `2026.05.4` with the desired release):
8
+
9
+ ```sh
10
+ wget -q https://github.com/GRID4EARTH/packages/releases/download/v2026.05.4/requirements.txt
11
+ pip install -r requirements.txt
12
+ ```
13
+
14
+ Or, with conda:
15
+
16
+ ```sh
17
+ wget -q https://github.com/GRID4EARTH/packages/releases/download/v2026.05.4/env.yml
18
+ conda env update -f env.yml -n <env>
19
+ ```
20
+
21
+ ## How to update
22
+
23
+ To update the registry, run `pixi update` in a new branch:
24
+
25
+ ```sh
26
+ git pull
27
+ git switch -c bump
28
+ pixi update
29
+ git add pixi.lock
30
+ git commit -m "bump grid4earth packages"
31
+ git push origin bump
32
+ ```
33
+
34
+ Then create a pull request and merge it after CI passes.
35
+
36
+ After that, all that is necessary is create a release using github's web interface or the CLI:
37
+
38
+ ```sh
39
+ gh release create v<version> -n "Release v<version>"
40
+ ```
41
+
42
+ The CI will then add the necessary release artifacts.
@@ -0,0 +1,44 @@
1
+ import json
2
+ import pathlib
3
+ import re
4
+ import subprocess
5
+
6
+ import rich_click as click
7
+
8
+ dependencies_re = re.compile(r"(?P<name>[-a-z]+)==(?P<version>[0-9]+(?:\.[0-9]+)*)")
9
+
10
+
11
+ def replace_version(match, packages):
12
+ name = match.group("name")
13
+
14
+ return f"{name}=={packages[name]}"
15
+
16
+
17
+ @click.command
18
+ def main():
19
+ proc = subprocess.run(
20
+ ["pixi", "ls", "-x", "-e", "default", "--json"],
21
+ check=True,
22
+ stdout=subprocess.PIPE,
23
+ )
24
+ package_info = json.loads(proc.stdout)
25
+ exclude = {"python"}
26
+
27
+ filtered = {
28
+ p["name"].replace("_", "-"): p["version"]
29
+ for p in package_info
30
+ if p["name"] not in exclude
31
+ }
32
+
33
+ pyproject_path = pathlib.Path("pyproject.toml")
34
+
35
+ package_metadata = pyproject_path.read_text()
36
+ replaced = dependencies_re.sub(
37
+ lambda m: replace_version(m, filtered), package_metadata
38
+ )
39
+
40
+ pyproject_path.write_text(replaced)
41
+
42
+
43
+ if __name__ == "__main__":
44
+ main()
@@ -0,0 +1,92 @@
1
+ import json
2
+ import subprocess
3
+ import textwrap
4
+ from typing import Any
5
+
6
+ import rich_click as click
7
+
8
+
9
+ @click.group()
10
+ def main():
11
+ pass
12
+
13
+
14
+ def environment_information(name: str) -> list[dict[str, Any]]:
15
+ proc = subprocess.run(
16
+ ["pixi", "ls", "-x", "-e", name, "--json"], check=True, stdout=subprocess.PIPE
17
+ )
18
+ return json.loads(proc.stdout)
19
+
20
+
21
+ def drop_item(mapping: dict[str, Any], name: str) -> dict[str, Any]:
22
+ copy = dict(mapping)
23
+ copy.pop(name, None)
24
+
25
+ return copy
26
+
27
+
28
+ def format_requirements(info: list[dict[str, str]]) -> str:
29
+ return (
30
+ "\n".join([f"{package['name']}=={package['version']}" for package in info])
31
+ + "\n"
32
+ )
33
+
34
+
35
+ def format_conda_environment(
36
+ conda: list[dict[str, str]], pypi: list[dict[str, str]]
37
+ ) -> str:
38
+ conda_items = [
39
+ f"{p['name']}={p['version']}" if "version" in p else f"{p['name']}"
40
+ for p in conda + [{"name": "pip"}]
41
+ ]
42
+ pypi_items = [f"{p['name']}=={p['version']}" for p in pypi]
43
+
44
+ sections = [
45
+ "name: grid4earth",
46
+ "\n".join(["channels:", "- conda-forge"]),
47
+ "\n".join(
48
+ [
49
+ "dependencies:",
50
+ textwrap.indent("\n".join(conda_items), prefix="- "),
51
+ "- pip:",
52
+ textwrap.indent("\n".join(pypi_items), prefix=" - "),
53
+ ]
54
+ ),
55
+ ]
56
+ return "\n".join(sections) + "\n"
57
+
58
+
59
+ @main.command("requirements")
60
+ @click.argument("output", default="-", type=click.File("w"))
61
+ def requirements(output):
62
+ package_info = environment_information("default")
63
+ exclude = {"python"}
64
+
65
+ filtered = [
66
+ {"name": package["name"], "version": package["version"]}
67
+ for package in package_info
68
+ if package["name"] not in exclude
69
+ ]
70
+ formatted = format_requirements(filtered)
71
+ output.write(formatted)
72
+
73
+
74
+ @main.command("conda-environment")
75
+ @click.argument("output", default="-", type=click.File("w"))
76
+ def conda_environment(output):
77
+ package_info = environment_information("default")
78
+ exclude = {"python"}
79
+
80
+ filtered = [
81
+ {"name": p["name"], "version": p["version"], "kind": p["kind"]}
82
+ for p in package_info
83
+ if p["name"] not in exclude
84
+ ]
85
+ conda_packages = [drop_item(p, "kind") for p in filtered if p["kind"] == "conda"]
86
+ pypi_packages = [drop_item(p, "kind") for p in filtered if p["kind"] == "pypi"]
87
+ formatted = format_conda_environment(conda_packages, pypi_packages)
88
+ output.write(formatted)
89
+
90
+
91
+ if __name__ == "__main__":
92
+ main()
@@ -0,0 +1,9 @@
1
+ Metadata-Version: 2.4
2
+ Name: grid4earth
3
+ Version: 2026.5.5
4
+ License-Expression: Apache-2.0
5
+ Requires-Python: >=3.11
6
+ Requires-Dist: healpix-geo==0.1.2
7
+ Requires-Dist: healpix-plot==2026.5.1
8
+ Requires-Dist: healpix-analyse==2026.5.1
9
+ Requires-Dist: healpix-resample==2026.5.1
@@ -0,0 +1,15 @@
1
+ .gitattributes
2
+ .gitignore
3
+ README.md
4
+ bump-dependencies.py
5
+ export-environment.py
6
+ pixi.lock
7
+ pixi.toml
8
+ prek.toml
9
+ pyproject.toml
10
+ .github/workflows/release.yml
11
+ grid4earth.egg-info/PKG-INFO
12
+ grid4earth.egg-info/SOURCES.txt
13
+ grid4earth.egg-info/dependency_links.txt
14
+ grid4earth.egg-info/requires.txt
15
+ grid4earth.egg-info/top_level.txt
@@ -0,0 +1,4 @@
1
+ healpix-geo==0.1.2
2
+ healpix-plot==2026.5.1
3
+ healpix-analyse==2026.5.1
4
+ healpix-resample==2026.5.1