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

Remove the Distance and Surface commands #120

Merged
merged 7 commits into from
May 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ docs/_build/
target/

.*.swp
.pytest_cache/
5 changes: 5 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
0.8.0
-----
- Breaking change: remove the deprecated Distance API
- Breaking change: remove the deprecated Surface API

0.7.1
-----
- Pin to mapbox-sdk-py version 0.14.0, the most recent compatible version
Expand Down
46 changes: 0 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,9 @@ $ mapbox ...
## Usage

* [directions](#directions)
* [distance](#distance)
* [geocoding](#geocoding)
* [mapmatching](#mapmatching)
* [staticmap](#staticmap)
* [surface](#surface)
* [upload](#upload)
* [datasets](#datasets)

Expand Down Expand Up @@ -92,28 +90,6 @@ Options:
--help Show this message and exit.
```

### distance
```
Usage: mapbox distance [OPTIONS] FEATURES...

The Distance API returns all travel times between many points (also known
as Distance Matrix). This is often used as input for solving routing
optimization problems.

$ mapbox distance "[-122.681, 45.528]" "[-122.716, 45.525]"

The output is a json object with a "durations" key containing a 2D array
of travel times between waypoints.

An access token is required, see `mapbox --help`.

Options:
--profile [driving|cycling|walking]
Mapbox direction profile id
-o, --output TEXT Save output to a file.
--help Show this message and exit.
```
**Note**: Distance API is currently in preview. [Contact us](https://mapbox.com/contact/) for access.

### geocoding
```
Expand Down Expand Up @@ -199,28 +175,6 @@ Options:
--help Show this message and exit.
```

### surface
```
Usage: mapbox surface [OPTIONS] MAPID LAYER FIELDS FEATURES...

Mapbox Surface API enables flexible querying of data stored in vector
tiles on Mapbox, to create results like elevation profiles.

$ mapbox surface mapbox.mapbox-terrain-v1 contour ele \ 
"[-122.781, 45.528]" "[-122.716, 45.525]"

An access token is required, see `mapbox --help`.

Options:
-z, --zoom INTEGER Zoom level to query (default: 14)
--interpolate / --no-interpolate
Weighted average interpolation (default:
True)
--geojson / --no-geojson Return geojson feature collection (default:
True)
-o, --output TEXT Save output to a file.
--help Show this message and exit.
```

### upload
```
Expand Down
4 changes: 1 addition & 3 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
* [Directions](directions.md)
* [Distances](distances.md)
* [Geocoding](geocoding.md)
* [Mapmatching](mapmatching.md)
* [Staticmaps](static_maps.md)
* [Surface](surface.md)
* [Geocoding](geocoding.md)
40 changes: 0 additions & 40 deletions examples/distances.md

This file was deleted.

9 changes: 0 additions & 9 deletions examples/surface.md

This file was deleted.

2 changes: 1 addition & 1 deletion mapboxcli/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Command line interface to Mapbox Web Services
__version__ = '0.7.1'
__version__ = '0.8.0a1'
5 changes: 1 addition & 4 deletions mapboxcli/scripts/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
import mapboxcli
from mapboxcli.compat import configparser
from mapboxcli.scripts import (
config, geocoding, directions, distance, mapmatching, uploads, static,
surface, datasets)
config, geocoding, directions, mapmatching, uploads, static, datasets)


def configure_logging(verbosity):
Expand Down Expand Up @@ -99,9 +98,7 @@ def main_group(ctx, verbose, quiet, access_token, config):
main_group.add_command(config.config)
main_group.add_command(geocoding.geocoding)
main_group.add_command(directions.directions)
main_group.add_command(distance.distance)
main_group.add_command(mapmatching.match)
main_group.add_command(uploads.upload)
main_group.add_command(static.staticmap)
main_group.add_command(surface.surface)
main_group.add_command(datasets.datasets)
42 changes: 0 additions & 42 deletions mapboxcli/scripts/distance.py

This file was deleted.

59 changes: 0 additions & 59 deletions mapboxcli/scripts/surface.py

This file was deleted.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
'click',
'click-plugins',
'cligj>=0.4',
'mapbox==0.14.0',
'mapbox==0.16.0',
'six'],
extras_require={
'test': ['coveralls', 'pytest>=2.8', 'pytest-cov', 'responses',
Expand Down
78 changes: 0 additions & 78 deletions tests/test_distance.py

This file was deleted.

Loading