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

Add environment.yml files per directory #43

Merged
merged 13 commits into from
Sep 1, 2023
125 changes: 58 additions & 67 deletions cloud-optimized-geotiffs/cogs-examples.ipynb

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions cloud-optimized-geotiffs/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: coguide-cog
channels:
- conda-forge
dependencies:
- python=3.11
- earthaccess
- ipykernel
- jupyterlab
- matplotlib
- rasterio
- rio-cogeo
4 changes: 2 additions & 2 deletions contributing.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Get Involved
---

We encourage contributions to this guide.
We encourage contributions to this guide.

## Pre-requisites

Expand Down Expand Up @@ -37,7 +37,7 @@ Once the pull request is opened, and the github `preview.yml` workflow runs ("De

1. Create a folder with the formats name and, within that folder, an `intro.qmd`. The `intro.qmd` file should describe the basics about that format.
2. Link to the `intro.qmd` page in the `index.qmd` (the **Welcome** page) file and `_quarto.yml` table of contents.
3. Optionally, add a notebook with examples of creating and accessing (via the cloud) a file of that format.
3. Optionally, add a notebook with examples of creating and accessing (via the cloud) a file of that format. We suggest including an [`environment.yml` file](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#create-env-file-manually) that defines the Conda packages necessary for the given notebook.

### 2. Modify or add to an existing format

Expand Down
10 changes: 10 additions & 0 deletions flatgeobuf/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: coguide-flatgeobuf
channels:
- conda-forge
dependencies:
- python=3.11
- geopandas==0.13.2
- pyogrio==0.6.0
- ipykernel
- jupyterlab
- pyarrow
87 changes: 51 additions & 36 deletions flatgeobuf/flatgeobuf.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,24 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Versions\n",
"## Environment\n",
"\n",
"The versions of `pyogrio` and `geopandas` used in this notebook are as follows:\n",
"The packages needed for this notebook can be installed with `conda` or `mamba`. Using the [`environment.yml` from this folder](./environment.yml) run:\n",
"\n",
"```bash\n",
"!pip install pyogrio==0.6.0 geopandas==0.13.2\n",
"conda create -f environment.yml\n",
"```\n",
"\n",
"or\n",
"\n",
"```bash\n",
"mamba create -f environment.yml\n",
"```\n",
"\n",
"Alternatively, you can install the versions of `pyogrio` and `geopandas` used in this notebook with pip:\n",
"\n",
"```bash\n",
"pip install pyogrio==0.6.0 geopandas==0.13.2\n",
"```"
]
},
Expand All @@ -61,7 +73,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -83,7 +95,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -108,14 +120,15 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"518 ms ± 6.57 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)\n"
"CPU times: user 565 ms, sys: 16.9 ms, total: 582 ms\n",
"Wall time: 685 ms\n"
]
}
],
Expand All @@ -132,14 +145,15 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"28.9 ms ± 468 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)\n"
"CPU times: user 25.3 ms, sys: 6.84 ms, total: 32.1 ms\n",
"Wall time: 31.3 ms\n"
]
}
],
Expand All @@ -156,14 +170,15 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"24 ms ± 351 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)\n"
"CPU times: user 19.7 ms, sys: 10.1 ms, total: 29.7 ms\n",
"Wall time: 29.1 ms\n"
]
}
],
Expand All @@ -184,15 +199,15 @@
},
{
"cell_type": "code",
"execution_count": 31,
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 354 ms, sys: 32 ms, total: 386 ms\n",
"Wall time: 394 ms\n"
"CPU times: user 362 ms, sys: 44.4 ms, total: 407 ms\n",
"Wall time: 418 ms\n"
]
}
],
Expand All @@ -202,15 +217,15 @@
},
{
"cell_type": "code",
"execution_count": 32,
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 61 ms, sys: 23.5 ms, total: 84.5 ms\n",
"Wall time: 94 ms\n"
"CPU times: user 60.8 ms, sys: 23.4 ms, total: 84.2 ms\n",
"Wall time: 83.5 ms\n"
]
}
],
Expand All @@ -231,7 +246,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -247,7 +262,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 10,
"metadata": {},
"outputs": [
{
Expand All @@ -270,7 +285,7 @@
" 'dataset_metadata': None}"
]
},
"execution_count": 3,
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -294,7 +309,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -312,15 +327,15 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 12,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 154 ms, sys: 44 ms, total: 198 ms\n",
"Wall time: 4.75 s\n"
"CPU times: user 144 ms, sys: 21.4 ms, total: 165 ms\n",
"Wall time: 6 s\n"
]
}
],
Expand All @@ -337,15 +352,15 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 13,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 40.6 ms, sys: 16.5 ms, total: 57 ms\n",
"Wall time: 2 s\n"
"CPU times: user 26.9 ms, sys: 2.98 ms, total: 29.9 ms\n",
"Wall time: 490 ms\n"
]
}
],
Expand All @@ -362,7 +377,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 14,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -511,7 +526,7 @@
"4 MULTIPOLYGON (((4.41135 44.85476, 4.41134 44.8... "
]
},
"execution_count": 7,
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -522,7 +537,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 15,
"metadata": {},
"outputs": [
{
Expand All @@ -531,7 +546,7 @@
"(415, 11)"
]
},
"execution_count": 8,
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -549,15 +564,15 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 16,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 29 ms, sys: 2.63 ms, total: 31.6 ms\n",
"Wall time: 439 ms\n"
"CPU times: user 25 ms, sys: 2.47 ms, total: 27.4 ms\n",
"Wall time: 706 ms\n"
]
}
],
Expand All @@ -568,7 +583,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 17,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -654,7 +669,7 @@
"4 MULTIPOLYGON (((4.41135 44.85476, 4.41134 44.8... "
]
},
"execution_count": 12,
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
Expand Down
18 changes: 18 additions & 0 deletions geoparquet/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: coguide-geoparquet
channels:
- conda-forge
dependencies:
- python=3.11
- aiohttp
# TODO: how to define "fsspec[http]", so we don't have to manually install aiohttp
- fsspec
- geopandas==0.13.2
- ipykernel
- jupyterlab
- libgdal-arrow-parquet
- requests
# This is a hack to install pyarrow via pip because libgdal-arrow-parquet constrains libarrow to
# v10, which constrains pyarrow to v10, which is too old for the `filesystem` parameter at the end
# of the file
- pip:
- pyarrow
Comment on lines +14 to +18
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This hack should be able to be removed after conda-forge/gdal-feedstock#796 is merged

Loading