diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..a618ea26f --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,40 @@ +# Changelog + +## Version 2.0.0 (2015-11-23) + +### New Features: + +* Renamed library and package from DroneAPI to DroneKit on pip +* DroneKit Python is now a standalone library and no longer requires use of MAVProxy +* Connect multiple vehicles in one script by creating separate vehicle instances +* Removed NumPy, ProtoBuf as dependencies +* Add MAVLink message listeners using `add_message_listener` methods +* Added `on_attribute` and `on_message` function decorator shorthands +* Added `mount_status`, `system_status`, `ekf_ok`, `is_armable`, `heading` +* Made settable `groundspeed`, `airspeed` +* Moved `dronekit.lib` entries to root package `dronekit` +* Added `parameters.set` and `parameters.get` for fine-tuned parameter access +* `parameters` now observable and iterable (#442) +* Added `last_heartbeat` attribute, updated every event loop with time since last heartbeat (#451) +* Await attributes through `wait_ready` method and `connect` method parameter +* Adds subclassable Vehicle class, used by `vehicle_class` parameter in `connect` + +### Updated Features: + +* local_connect renamed to connect(), accepting a connection path, link configuration, and timeout settings +* Removed `.set_mavrx_callback`. Use `vehicle.on_message('*', obj)` methods +* Renamed `add_attribute_observer` methods to `add_attribute_listener`, etc. (#420) +* Renamed `wait_init` and `wait_valid` to `wait_ready` +* Split `home_location` is a separate attribute from `commands` waypoint array +* Moved RC channels into `.channels` object (#427) +* Split location information into `local_frame`, `global_frame`, and `global_relative_frame` (and removed `is_relative`) (#445) +* Renamed `flush` to `commands.upload`, as it only impacts waypoints (#276) +* `commands.goto` and `commands.takeoff` renamed to `simple_goto` and `simple_takeoff` + +### Bug Fixes: + +* `armed` and `mode` attributes updated constantly (#60, #446) +* Parameter setting times out (#12) +* `battery` access can throw exception (#298) +* Vehicle.location reports incorrect is_relative value for Copter (#130) +* Excess arming message when already armed diff --git a/docs/about/github_latest_release.txt b/docs/about/github_latest_release.txt index 90a1b229f..8c4697121 100644 --- a/docs/about/github_latest_release.txt +++ b/docs/about/github_latest_release.txt @@ -1,30 +1,63 @@ .. This document was auto-generated by the get_release_notes.py script using latest-release information from github -Release 1.5.0 (August 12, 2015) -=============================== - - -**Features:** - -* Added methods to unset `mavlink_callback`. (#115, #240) -* Publishing scripts now live in `scripts/` (#259) - -**Documentation:** - -* Documented clearing of `mavlink_callback`. (#245) - -Source Code ------------ - - -Source code is available `here `_. - -* View `**commits** included in this release `_ -* View `**bugs** closed by this release `_ -* View `**pull requests** merged into this release `_ - -Notes ------ - - -Thanks to @hamishwillee, @mrpollo, @tcr3dr \ No newline at end of file +Changelog +========= + +Version 2.0.0 (2015-11-23) +-------------------------- + +New Features: +~~~~~~~~~~~~~ + +- Renamed library and package from DroneAPI to DroneKit on pip +- DroneKit Python is now a standalone library and no longer requires + use of MAVProxy +- Connect multiple vehicles in one script by creating separate vehicle + instances +- Removed NumPy, ProtoBuf as dependencies +- Add MAVLink message listeners using ``add_message_listener`` methods +- Added ``on_attribute`` and ``on_message`` function decorator + shorthands +- Added ``mount_status``, ``system_status``, ``ekf_ok``, + ``is_armable``, ``heading`` +- Made settable ``groundspeed``, ``airspeed`` +- Moved ``dronekit.lib`` entries to root package ``dronekit`` +- Added ``parameters.set`` and ``parameters.get`` for fine-tuned + parameter access +- ``parameters`` now observable and iterable (`#442 `_) +- Added ``last_heartbeat`` attribute, updated every event loop with + time since last heartbeat (`#451 `_) +- Await attributes through ``wait_ready`` method and ``connect`` method + parameter +- Adds subclassable Vehicle class, used by ``vehicle_class`` parameter + in ``connect`` + +Updated Features: +~~~~~~~~~~~~~~~~~ + +- local\_connect renamed to connect(), accepting a connection path, + link configuration, and timeout settings +- Removed ``.set_mavrx_callback``. Use ``vehicle.on_message('*', obj)`` + methods +- Renamed ``add_attribute_observer`` methods to + ``add_attribute_listener``, etc. (`#420 `_) +- Renamed ``wait_init`` and ``wait_valid`` to ``wait_ready`` +- Split ``home_location`` is a separate attribute from ``commands`` + waypoint array +- Moved RC channels into ``.channels`` object (`#427 `_) +- Split location information into ``local_frame``, ``global_frame``, + and ``global_relative_frame`` (and removed ``is_relative``) (`#445 `_) +- Renamed ``flush`` to ``commands.upload``, as it only impacts + waypoints (`#276 `_) +- ``commands.goto`` and ``commands.takeoff`` renamed to ``simple_goto`` + and ``simple_takeoff`` + +Bug Fixes: +~~~~~~~~~~ + +- ``armed`` and ``mode`` attributes updated constantly (`#60 `_, `#446 `_) +- Parameter setting times out (`#12 `_) +- ``battery`` access can throw exception (`#298 `_) +- Vehicle.location reports incorrect is\_relative value for Copter + (`#130 `_) +- Excess arming message when already armed diff --git a/scripts/get_release_notes.py b/scripts/get_release_notes.py deleted file mode 100755 index acdf524f8..000000000 --- a/scripts/get_release_notes.py +++ /dev/null @@ -1,110 +0,0 @@ -#!/usr/bin/env python - -""" -This script gets the latest release notes from a specfied github repo, converts it from markdown to -reStructured Text format, and writes it to a text file. - -The text file can be auto-imported by Sphinx into the official release notes. - ----- - -The script uses the "Requests" module to make the API requests: http://docs.python-requests.org/en/latest/ - -Github API doc for getting latest release: https://developer.github.com/v3/repos/releases/#get-the-latest-release - GET /repos/:owner/:repo/releases/latest - -Where our release is: https://github.com/dronekit/dronekit-python/releases/tag/1.1.1 -""" - -import os -import requests # for making API requests -import re # regular expressions to convert markup to reStructuredText -from optparse import OptionParser # for command line options - - -def convert_markup_to_rst(text): - """ - Convert mardown to rst format. Currently converts only (up to level 5) headings and links to rst format. - """ - - def fixheadings(matchobj): - """ - Convert mardown headings to rst headings. - """ - #print 'matched' - #print matchobj.group(0) - #print matchobj.group(1) - #print matchobj.group(2) - #print 'endmatched' - heading_level=len(matchobj.group(1)) - heading_text=matchobj.group(2).strip() - heading_length= len(heading_text) - #print heading_level - #print heading_text - #print heading_length - - heading_char='=' - if heading_level == 1 : - heading_char = '=' - if heading_level == 2 : - heading_char = '-' - if heading_level == 3 : - heading_char = '~' - if heading_level == 4 : - heading_char = '+' - if heading_level == 5 : - heading_char = '*' - heading_underline=heading_char*heading_length - return heading_text+'\n'+heading_underline+'\n' - - - def fixlinks(matchobj): - """ - Convert mardown links to rst links. - """ - #print 'matched' - #print matchobj.group(0) - #print matchobj.group(1) - #print matchobj.group(2) - #print 'endmatched' - link_url=matchobj.group(2) - link_text=matchobj.group(1) - return '`%s <%s>`_' % (link_text,link_url) - - text=re.sub(r'^(\#+)\s+(.*)', fixheadings, text, flags=re.MULTILINE) - text=re.sub(r'\[(.*?)\]\((.*?)\)', fixlinks, text, flags=re.MULTILINE) - - return text - - -curpath = os.path.realpath(os.path.dirname(__file__)) - -#parser options -parser = OptionParser(version="%prog 0.0.1", usage="Usage: %prog [options] version") -parser.add_option("-o", "--gitowner", dest="owner", default="diydrones", help="Owner of github repository") -parser.add_option("-r", "--repo", dest="repo", default="dronekit-python", help="Repo name") -parser.add_option("-f" , "--file", dest="file", default=os.path.join(curpath, "../docs/about/github_latest_release.txt"), help="File path put output file") - -(options, args) = parser.parse_args() - -latest_release_url='https://api.github.com/repos/'+options.owner+'/'+options.repo+'/releases/latest' - -print 'Fetching release notes: %s' % latest_release_url - -r = requests.get(latest_release_url) -bodytext_markdown=r.json()[u'body'] -#print bodytext_markdown -print ' Converting markdown to reStructured text' -bodytext_rst = convert_markup_to_rst(bodytext_markdown) - -#Prefix with some documentation -bodytext_rst = ".. This document was auto-generated by the get_release_notes.py script using latest-release information from github \n\n" + bodytext_rst - -#print "RST" -#print bodytext_rst -release_notes_file=open(options.file,'w') -release_notes_file.write(bodytext_rst) -release_notes_file.close() - -print ' Complete' - diff --git a/scripts/update-docs.sh b/scripts/update-docs.sh index a651404d6..50459adad 100755 --- a/scripts/update-docs.sh +++ b/scripts/update-docs.sh @@ -1,22 +1,3 @@ #!/bin/bash -cd $(dirname $0) -cd .. - -rm -r /tmp/autodocs -set -e -python ./setup.py build -echo Switching to doc tree -cd docs -make html -cp -a _build/html /tmp/autodocs -cd .. -git checkout gh-pages -cp -a /tmp/autodocs/* . -set +e -find . | xargs git add -set -e -git commit -m "Update docs" -git push -git checkout -f master - +ssh dronekit.io "./update_python.sh" diff --git a/scripts/update-releasenotes.sh b/scripts/update-releasenotes.sh new file mode 100755 index 000000000..789aa9fc9 --- /dev/null +++ b/scripts/update-releasenotes.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env python + +""" +This script gets the release notes, converts it from markdown to +reStructured Text format, and writes it to a text file. + +The text file can be auto-imported by Sphinx into the official release notes. +""" + +import os +from pypandoc import convert +from optparse import OptionParser +import re + +curpath = os.path.realpath(os.path.dirname(__file__)) + +#parser options +parser = OptionParser(version="%prog 1.0.0", usage="Usage: %prog [options] version") +parser.add_option("-i" , "--input", dest="input", default=os.path.join(curpath, "../CHANGELOG.md"), help="Input file") +parser.add_option("-f" , "--file", dest="file", default=os.path.join(curpath, "../docs/about/github_latest_release.txt"), help="Output file") + +(options, args) = parser.parse_args() + +rst_content = convert(options.input, 'rst') + +# Hyperlink Github issues +rst_content = re.sub(r'#\d+', lambda m: '`' + m.group() + ' `_', rst_content) + +# Prefix with some documentation +rst_content = ".. This document was auto-generated by the get_release_notes.py script using latest-release information from github \n\n" + rst_content + +release_notes_file = open(options.file,'w') +release_notes_file.write(rst_content) +release_notes_file.close() + +print 'complete.' + diff --git a/setup.py b/setup.py index 218721f38..544f3dda5 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, Extension import platform -version = '2.0.0rc13' +version = '2.0.0' setup(name='dronekit', zip_safe=True, @@ -16,7 +16,7 @@ ], author_email='tim@3drobotics.com, kevinh@geeksville.com', classifiers=[ - 'Development Status :: 4 - Beta', + 'Development Status :: 5 - Production/Stable', 'Environment :: Console', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: Apache Software License',