Skip to content

Commit 3a758c5

Browse files
committed
tmp disable estimate-cu command
1 parent 3e96d3c commit 3a758c5

File tree

3 files changed

+6
-54
lines changed

3 files changed

+6
-54
lines changed

README.md

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -45,30 +45,6 @@ Note, Windows is not officially supported at this time.
4545
Windows users need to install [GDAL](http://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal) and [rasterio](http://www.lfd.uci.edu/~gohlke/pythonlibs/#rasterio).
4646
Then `pip install 'mapbox-tilesets[estimate-area]'`
4747

48-
## Installing optional `estimate-cu` command
49-
50-
If you are using an x86 Mac or Linux machine, run:
51-
`pip install 'mapbox-tilesets[estimate-cu]'`
52-
53-
Otherwise, you will need to install some dependencies.
54-
55-
### arm64 MacOS
56-
57-
If you're on an arm64 Mac (e.g., with an M1 chip), you'll need to install [GDAL](https://gdal.org/) first. On Mac, a simple way is to use [Homebrew](https://brew.sh/):
58-
59-
```sh
60-
$ brew install gdal
61-
...
62-
$ pip install 'mapbox-tilesets[estimate-cu]'
63-
```
64-
65-
### Windows
66-
67-
Note, Windows is not officially supported at this time.
68-
69-
Windows users need to install [GDAL](http://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal) and [rasterio](http://www.lfd.uci.edu/~gohlke/pythonlibs/#rasterio).
70-
Then `pip install 'mapbox-tilesets[estimate-cu]'`
71-
7248
## Mapbox Access Tokens
7349

7450
In order to use the tilesets endpoints, you need a Mapbox Access Token with `tilesets:write`, `tilesets:read`, and `tilesets:list` scopes. This is a secret token, so do not share it publicly!
@@ -95,7 +71,6 @@ export MAPBOX_ACCESS_TOKEN=my.token
9571
- [`list-sources`](#list-sources)
9672
- [`delete-source`](#delete-source)
9773
- [`estimate-area`](#estimate-area)
98-
- [`estimate-cu`](#estimate-cu)
9974
- Recipes
10075
- [`view-recipe`](#view-recipe)
10176
- [`validate-recipe`](#validate-recipe)
@@ -247,33 +222,6 @@ Usage
247222
tilesets delete-source user source_id
248223
```
249224

250-
### estimate-cu
251-
252-
```shell
253-
tilesets estimate-cu <tileset> -s/--sources <sources> -b/--num-bands <number> --raw
254-
```
255-
256-
Estimates the CU value of a tileset before publishing it. This is useful to understand the estimated cost a given tileset before you start processing the data. Note: This is currently only available to tileset recipes with type `raster` or `rasterarray`.
257-
258-
See https://docs.mapbox.com/help/glossary/compute-unit/ for more information.
259-
260-
Flags:
261-
- `-s` or `--sources` [optional]: Local path to the sources that your recipe points at. This is highly recommeneded.
262-
- `-b` or `--num-bands` [optional]: The number of bands you expect your recipe to select across all layers. This is recommended.
263-
- `--minzoom` [optional]: Use this flag if your recipe does not contain a minzoom value.
264-
- `--maxzoom` [optional]: Use this flag if your recipe does not contain a maxzoom value.
265-
- `--raw` [optional]: This will toggle the pretty print output.
266-
267-
Usage
268-
269-
```shell
270-
# Estimate the CUs for 'account.tileset' with sources located in 'path/to/sources/' and a band count of 20.
271-
tilesets estimate-cu account.tileset -s 'path/to/sources/*.grib2' -b 20
272-
273-
# Estimate the CUs for 'account.tileset' for a single source and a band count of 10 (pretty print the results)
274-
tilesets estimate-cu account.tileset -s 'path/to/sources/helloworld.grib2' -b 10 --raw
275-
```
276-
277225
### estimate-area
278226

279227
```shell

mapbox_tilesets/scripts/cli.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -841,8 +841,7 @@ def validate_stream(features):
841841
utils.validate_geojson(index, feature)
842842
yield feature
843843

844-
845-
@cli.command("estimate-cu")
844+
# @cli.command("estimate-cu")
846845
@click.argument("tileset", required=True, type=str)
847846
@click.option(
848847
"--sources",

tests/test_cli_estimate_cu.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from mapbox_tilesets.scripts.cli import estimate_cu
88

99

10+
@pytest.mark.skip
1011
@pytest.mark.usefixtures("token_environ")
1112
@pytest.mark.usefixtures("api_environ")
1213
@mock.patch("requests.Session.get")
@@ -34,6 +35,7 @@ def test_cli_estimate_cu_tileset_no_sources(mock_request_get, MockResponse):
3435
)
3536

3637

38+
@pytest.mark.skip
3739
@pytest.mark.usefixtures("token_environ")
3840
@pytest.mark.usefixtures("api_environ")
3941
@mock.patch("requests.Session.get")
@@ -64,6 +66,7 @@ def test_cli_estimate_cu_tileset_with_sources_raw(
6466
assert json.loads(result.output) == msg
6567

6668

69+
@pytest.mark.skip
6770
@pytest.mark.usefixtures("token_environ")
6871
@pytest.mark.usefixtures("api_environ")
6972
@mock.patch("requests.Session.get")
@@ -95,6 +98,7 @@ def test_cli_estimate_cu_tileset_with_sources(
9598
)
9699

97100

101+
@pytest.mark.skip
98102
@pytest.mark.usefixtures("token_environ")
99103
@pytest.mark.usefixtures("api_environ")
100104
@mock.patch("requests.Session.get")
@@ -131,6 +135,7 @@ def test_cli_estimate_cu_tileset_with_zoom_overrides(
131135
)
132136

133137

138+
@pytest.mark.skip
134139
@pytest.mark.usefixtures("token_environ")
135140
@pytest.mark.usefixtures("api_environ")
136141
@mock.patch("requests.Session.get")

0 commit comments

Comments
 (0)