Skip to content

Commit

Permalink
Adds links to packages
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonb5 committed Jun 25, 2024
1 parent 97deb65 commit 40faf06
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 27 deletions.
4 changes: 2 additions & 2 deletions dockerfiles/climate-notebook-gpu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

| ML packages |
| ----------- |
| rapids 0.0.1 |
| cupy 13.2.0 |
| [rapids 0.0.1](https://anaconda.org/conda-forge/rapids 0.0.1) |
| [cupy 13.2.0](https://anaconda.org/conda-forge/cupy 13.2.0) |
20 changes: 10 additions & 10 deletions dockerfiles/climate-notebook/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

| Data packages | Climate packages | Plotting packages |
| ------------- | ---------------- | ----------------- |
| xarray 2024.6.0 | xcdat 0.7.0 | matplotlib 3.8.4 |
| xarray-datatree 0.0.14 | xesmf 0.8.5 | holoviews 1.17.1 |
| pandas 2.2.2 | xgcm 0.8.1 | hvplot 0.10.0 |
| flox 0.9.8 | pcmdi_metrics 3.4.1 | geoviews 1.9.6 |
| netcdf4 1.6.5 | gsw-xarray 0.4.0 | seaborn 0.13.2 |
| s3fs 2024.6.0 | | cartopy 0.23.0 |
| zarr 2.18.2 | | datashader 0.16.2 |
| [xarray 2024.6.0 | xcdat 0.7.0 | matplotlib 3.8.4](https://anaconda.org/conda-forge/xarray 2024.6.0 | xcdat 0.7.0 | matplotlib 3.8.4) |
| [xarray-datatree 0.0.14 | xesmf 0.8.5 | holoviews 1.17.1](https://anaconda.org/conda-forge/xarray-datatree 0.0.14 | xesmf 0.8.5 | holoviews 1.17.1) |
| [pandas 2.2.2 | xgcm 0.8.1 | hvplot 0.10.0](https://anaconda.org/conda-forge/pandas 2.2.2 | xgcm 0.8.1 | hvplot 0.10.0) |
| [flox 0.9.8 | pcmdi_metrics 3.4.1 | geoviews 1.9.6](https://anaconda.org/conda-forge/flox 0.9.8 | pcmdi_metrics 3.4.1 | geoviews 1.9.6) |
| [netcdf4 1.6.5 | gsw-xarray 0.4.0 | seaborn 0.13.2](https://anaconda.org/conda-forge/netcdf4 1.6.5 | gsw-xarray 0.4.0 | seaborn 0.13.2) |
| [s3fs 2024.6.0 | | cartopy 0.23.0](https://anaconda.org/conda-forge/s3fs 2024.6.0 | | cartopy 0.23.0) |
| [zarr 2.18.2 | | datashader 0.16.2](https://anaconda.org/conda-forge/zarr 2.18.2 | | datashader 0.16.2) |

| Computing packages | Discovery packages |
| ------------------ | ------------------ |
| dask-gateway 2024.1.0 | intake-esm 2024.2.6 |
| | intake-stac 0.4.0 |
| | intake-xarray 0.7.0 |
| [dask-gateway 2024.1.0 | intake-esm 2024.2.6](https://anaconda.org/conda-forge/dask-gateway 2024.1.0 | intake-esm 2024.2.6) |
| [ | intake-stac 0.4.0](https://anaconda.org/conda-forge/ | intake-stac 0.4.0) |
| [ | intake-xarray 0.7.0](https://anaconda.org/conda-forge/ | intake-xarray 0.7.0) |
26 changes: 11 additions & 15 deletions dockerfiles/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,35 +20,31 @@ def main():
)

output = subprocess.run(
f"mamba list {search_args!r} --json",
capture_output=True,
shell=True
f"mamba list {search_args!r} --json", capture_output=True, shell=True
)

output_json = json.loads(output.stdout)

versions = {
package["name"]: package["version"] for package in output_json
}
versions = {package["name"]: package["version"] for package in output_json}

table = []
categories = list(categories.items())

for i in range(0, len(categories), 3):
header = " | ".join([x[0] for x in categories[i:i+3]])
separator = " | ".join([f"{'-'*len(x[0])}" for x in categories[i:i+3]])
header = " | ".join([x[0] for x in categories[i : i + 3]])
separator = " | ".join([f"{'-'*len(x[0])}" for x in categories[i : i + 3]])
header = f"| {header} |\n| {separator} |"

rows = itertools.zip_longest(*[x[1] for x in categories[i:i+3]])
rows = itertools.zip_longest(*[x[1] for x in categories[i : i + 3]])
rows = [
" | ".join(
[
"" if y is None else f"{y} {get_version(y, versions)}"
for y in x
]
) for x in rows
["" if y is None else f"{y} {get_version(y, versions)}" for y in x]
)
for x in rows
]
rows = "\n".join(f"| {x} |" for x in rows)
rows = "\n".join(
f"| [{x}](https://anaconda.org/conda-forge/{x}) |" for x in rows
)

table.append(f"{header}\n{rows}\n")

Expand Down

0 comments on commit 40faf06

Please sign in to comment.