Skip to content

Commit

Permalink
Merge pull request #203 from mavlink/pr-readme
Browse files Browse the repository at this point in the history
Generate API docs in CI
  • Loading branch information
JonasVautherin authored Jun 2, 2020
2 parents b45f3d7 + 52dfd41 commit 3f51dd8
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 12 deletions.
12 changes: 12 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ install:
- set -e
- pip3 install -r requirements.txt -r requirements-dev.txt
- pip3 install auditwheel twine
- if [[ "${BUILD_TARGET}" = "linux" ]]; then
pip3 install sphinx numpydoc s3cmd;
fi
- if [[ "${BUILD_TARGET}" = "macos" ]]; then
pip3 install delocate;
fi
Expand All @@ -89,6 +92,7 @@ script:
fi
- if [[ "${BUILD_TARGET}" = "linux" ]]; then
auditwheel repair --plat manylinux2010_x86_64 dist/*.whl;
make -C mavsdk html;
fi
- if [[ "${BUILD_TARGET}" = "macos" ]]; then
delocate-wheel -w wheelhouse -v dist/*.whl;
Expand All @@ -110,7 +114,15 @@ script:
else
echo "Not deploying without git tag.";
fi
- if [[ "${BUILD_TARGET}" = "linux" ]] && [[ ! -z "${TRAVIS_TAG}" ]]; then
echo "Uploading docs";
other/tools/upload_docs.sh;
else
echo "Not uploading docs without git tag.";
fi
env:
global:
- secure: cpJLKiOqUTYB1ozkVus4SlPBP/XJ1uUxfMKos+XLWxEVOTguLIW+bKhLfquY9+PlY2rajl5jxxzrX5RZOgZR0fbHHh9FAzioWhzEEUQb76IKnDD7St8J6Pq65bO1Vk8o0sdtQ+ht8+RK54TJL6d8jxVh4RNV3txBB6wFzkFcw5WTDxgWr/+HsYfC9IQkIXGf8NJmvdCUBunL2xDULZ3rlPzEG/YmXjR79g51juNWvZjDKFjLmpHe/qN8VSws1QrI7tKtTtNrNutlAVnOWSlcnJspzex0WfG4EINyjJH7WQZppLiax55jWSBAzxee3/7jXyDVDOJBPl8JT/GyqoQL/qHDmiJuHm53Ktpgg0saGlcSuYuA643PVVJ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arcvBeh6ERThO33bcTpF1GVWYdFxS4p9xoggtz5mra+nddNS1jrVJYa4P1AL9HFKcu7wjCRZFSLHL1lPP+4p2N4nIRxiWmjX5aG2gASDO/qld5ZtwhePyI5JxAMp0vMBTx9aFEbc7y2F0SlyPtUKin0RQ1SRG8q+P37Jug936EAbhsVm3/Wi/KtDCGxyM0zqMs06ANidU=
35 changes: 25 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,6 @@ Run the following helper script. It will generate the Python wrappers for each p
./other/tools/run_protoc.sh
```

### Generate the API documentation

```
pip3 install sphinx numpydoc
make -C mavsdk html
```


### Update `mavsdk_server` version

[MAVSDK_SERVER_VERSION](./MAVSDK_SERVER_VERSION) contains exactly the tag name of the `mavsdk_server` release corresponding to the version of MAVSDK-Python. When the [proto](./proto) submodule is updated here, chances are that `mavsdk_server` should be updated, too. Just edit this file, and the corresponding binary will be downloaded by the `setup.py` script (see below).
Expand All @@ -112,6 +104,29 @@ pip3 install -e .

Note: MAVDSK-Python runs `mavsdk/bin/mavsdk_server` when `await drone.connect()` is called. This binary comes from [MAVSDK](https://github.com/mavlink/MAVSDK/releases) and is downloaded during the `setup.py` step above.

### Release to PyPi repository

The CI will create and push a wheel for Windows, Linux and macOS whenever a release tag is created.
### Generate the API documentation

Make sure the version tag is set correctly before generating new documentation.

```
pip3 install sphinx numpydoc
make -C mavsdk html
```


### Release steps

1. Check all required pull requests are merged to master
2. Check [MAVSDK_SERVER_VERSION](MAVSDK_SERVER_VERSION) is set to the correct version of mavsdk_server.
3. Create git tag on laster master, e.g.:
```
git switch master
git pull
git tag X.Y.Z
git push --tags
```
4. Go to [releases page](https://github.com/mavlink/MAVSDK-Python/releases) and create new release.
The CI will now:
- Create and push a wheel for Windows, Linux and macOS to PyPi.
- Generate the latest docs and push them to s3.
7 changes: 5 additions & 2 deletions mavsdk/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,18 @@
# import sys
# sys.path.insert(0, os.path.abspath('.'))


# -- Project information -----------------------------------------------------
import subprocess

project = 'MAVSDK-Python'
copyright = '2020, Jonas Vautherin, Julian Oes'
author = 'Jonas Vautherin, Julian Oes'

result = subprocess.run(['git', 'describe', '--tag', '--abbrev=0'],
stdout=subprocess.PIPE)

# The full version, including alpha/beta/rc tags
release = '0.7.0'
release = result.stdout.decode('utf-8')


# -- General configuration ---------------------------------------------------
Expand Down

0 comments on commit 3f51dd8

Please sign in to comment.