Revamp repo to match openstack repos
Get the repo in a working state so that it works with the new and improved openstack CI system. Change-Id: I80661c35fa7109a7ee9b1d00f89ca521a469eed0
This commit is contained in:
parent
468a9923b5
commit
d71b6cf8b4
4
.gitreview
Normal file
4
.gitreview
Normal file
@ -0,0 +1,4 @@
|
||||
[gerrit]
|
||||
host=review.openstack.org
|
||||
port=29418
|
||||
project=openstack/automaton.git
|
8
.testr.conf
Normal file
8
.testr.conf
Normal file
@ -0,0 +1,8 @@
|
||||
[DEFAULT]
|
||||
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
|
||||
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
|
||||
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
|
||||
${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION
|
||||
test_id_option=--load-list $IDFILE
|
||||
test_list_option=--list
|
||||
|
18
.travis.yml
18
.travis.yml
@ -1,18 +0,0 @@
|
||||
language: python
|
||||
python:
|
||||
- "2.6"
|
||||
- "2.7"
|
||||
- "3.3"
|
||||
- "3.4"
|
||||
# command to install dependencies
|
||||
install:
|
||||
- "if [[ $TRAVIS_PYTHON_VERSION == 2.6 ]]; then pip install -r requirements-py2.txt; fi"
|
||||
- "if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then pip install -r requirements-py2.txt; fi"
|
||||
- "if [[ $TRAVIS_PYTHON_VERSION == 3.3 ]]; then pip install -r requirements-py3.txt; fi"
|
||||
- "if [[ $TRAVIS_PYTHON_VERSION == 3.4 ]]; then pip install -r requirements-py3.txt; fi"
|
||||
- "pip install -r test-requirements.txt"
|
||||
- "pip install ."
|
||||
# command to run tests
|
||||
script: nosetests
|
||||
|
||||
|
17
CONTRIBUTING.rst
Normal file
17
CONTRIBUTING.rst
Normal file
@ -0,0 +1,17 @@
|
||||
If you would like to contribute to the development of OpenStack, you must
|
||||
follow the steps in this page:
|
||||
|
||||
http://docs.openstack.org/infra/manual/developers.html
|
||||
|
||||
If you already have a good understanding of how the system works and your
|
||||
OpenStack accounts are set up, you can skip to the development workflow
|
||||
section of this documentation to learn how changes to OpenStack should be
|
||||
submitted for review via the Gerrit tool:
|
||||
|
||||
http://docs.openstack.org/infra/manual/developers.html#development-workflow
|
||||
|
||||
Pull requests submitted through GitHub will be ignored.
|
||||
|
||||
Bugs should be filed on Launchpad, not GitHub:
|
||||
|
||||
https://bugs.launchpad.net/automaton
|
5
HACKING.rst
Normal file
5
HACKING.rst
Normal file
@ -0,0 +1,5 @@
|
||||
Automaton Style Commandments
|
||||
===============================================
|
||||
|
||||
Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/
|
||||
|
6
MANIFEST.in
Normal file
6
MANIFEST.in
Normal file
@ -0,0 +1,6 @@
|
||||
include AUTHORS
|
||||
include ChangeLog
|
||||
exclude .gitignore
|
||||
exclude .gitreview
|
||||
|
||||
global-exclude *.pyc
|
30
README.rst
30
README.rst
@ -2,31 +2,9 @@
|
||||
Automaton
|
||||
=========
|
||||
|
||||
.. image:: https://travis-ci.org/harlowja/automaton.png?branch=master
|
||||
:target: https://travis-ci.org/harlowja/automaton
|
||||
|
||||
Friendly state machines for python.
|
||||
|
||||
Examples
|
||||
~~~~~~~~
|
||||
|
||||
**Squirrel**::
|
||||
|
||||
>>> from automaton import machines
|
||||
>>> f = machines.FiniteMachine("sits")
|
||||
>>> f.add_state("sits")
|
||||
>>> f.add_state("barks")
|
||||
>>> f.add_state("wags tail")
|
||||
>>> f.add_transition("sits", "barks", "squirrel!")
|
||||
>>> f.add_transition("barks", "wags tail", "gets petted")
|
||||
>>> f.add_transition("wags tail", "sits", "gets petted")
|
||||
>>> f.add_transition("wags tail", "barks", "squirrel!")
|
||||
>>> print(f.pformat())
|
||||
+-----------+-------------+-----------+----------+---------+
|
||||
| Start | Event | End | On Enter | On Exit |
|
||||
+-----------+-------------+-----------+----------+---------+
|
||||
| barks | gets petted | wags tail | . | . |
|
||||
| sits[^] | squirrel! | barks | . | . |
|
||||
| wags tail | gets petted | sits | . | . |
|
||||
| wags tail | squirrel! | barks | . | . |
|
||||
+-----------+-------------+-----------+----------+---------+
|
||||
* Free software: Apache license
|
||||
* Documentation: http://docs.openstack.org/developer/automaton
|
||||
* Source: http://git.openstack.org/cgit/openstack/automaton
|
||||
* Bugs: http://bugs.launchpad.net/automaton
|
||||
|
30
doc/source/api.rst
Normal file
30
doc/source/api.rst
Normal file
@ -0,0 +1,30 @@
|
||||
===
|
||||
API
|
||||
===
|
||||
|
||||
--------
|
||||
Machines
|
||||
--------
|
||||
|
||||
.. autoclass:: automaton.machines.FiniteMachine
|
||||
:members:
|
||||
|
||||
.. autoclass:: automaton.machines.HierarchicalFiniteMachine
|
||||
:members:
|
||||
|
||||
-------
|
||||
Runners
|
||||
-------
|
||||
|
||||
.. autoclass:: automaton.machines._FiniteRunner
|
||||
:members:
|
||||
|
||||
.. autoclass:: automaton.machines._HierarchicalRunner
|
||||
:members:
|
||||
|
||||
----------
|
||||
Exceptions
|
||||
----------
|
||||
|
||||
.. automodule:: automaton.exceptions
|
||||
:members:
|
75
doc/source/conf.py
Executable file
75
doc/source/conf.py
Executable file
@ -0,0 +1,75 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
# implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, os.path.abspath('../..'))
|
||||
# -- General configuration ----------------------------------------------------
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||
extensions = [
|
||||
'sphinx.ext.autodoc',
|
||||
#'sphinx.ext.intersphinx',
|
||||
'oslosphinx'
|
||||
]
|
||||
|
||||
# autodoc generation is a bit aggressive and a nuisance when doing heavy
|
||||
# text edit cycles.
|
||||
# execute "export SPHINX_DEBUG=1" in your terminal to disable
|
||||
|
||||
# The suffix of source filenames.
|
||||
source_suffix = '.rst'
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'automaton'
|
||||
copyright = u'2013, OpenStack Foundation'
|
||||
|
||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||
add_function_parentheses = True
|
||||
|
||||
# If true, the current module name will be prepended to all description
|
||||
# unit titles (such as .. function::).
|
||||
add_module_names = True
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'sphinx'
|
||||
|
||||
# -- Options for HTML output --------------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. Major themes that come with
|
||||
# Sphinx are currently 'default' and 'sphinxdoc'.
|
||||
# html_theme_path = ["."]
|
||||
# html_theme = '_theme'
|
||||
# html_static_path = ['static']
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = '%sdoc' % project
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title, author, documentclass
|
||||
# [howto/manual]).
|
||||
latex_documents = [
|
||||
('index',
|
||||
'%s.tex' % project,
|
||||
u'%s Documentation' % project,
|
||||
u'OpenStack Foundation', 'manual'),
|
||||
]
|
||||
|
||||
# Example configuration for intersphinx: refer to the Python standard library.
|
||||
#intersphinx_mapping = {'http://docs.python.org/': None}
|
5
doc/source/contributing.rst
Normal file
5
doc/source/contributing.rst
Normal file
@ -0,0 +1,5 @@
|
||||
============
|
||||
Contributing
|
||||
============
|
||||
|
||||
.. include:: ../../CONTRIBUTING.rst
|
8
doc/source/features.rst
Normal file
8
doc/source/features.rst
Normal file
@ -0,0 +1,8 @@
|
||||
========
|
||||
Features
|
||||
========
|
||||
|
||||
* A :py:class:`.automaton.machines.FiniteMachine` state machine.
|
||||
* A :py:class:`.automaton.machines.HierarchicalFiniteMachine` hierarchical
|
||||
state machine.
|
||||
|
20
doc/source/index.rst
Normal file
20
doc/source/index.rst
Normal file
@ -0,0 +1,20 @@
|
||||
Welcome to automaton's documentation!
|
||||
========================================================
|
||||
|
||||
Friendly state machines for python.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
features
|
||||
api
|
||||
installation
|
||||
contributing
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`modindex`
|
||||
* :ref:`search`
|
||||
|
12
doc/source/installation.rst
Normal file
12
doc/source/installation.rst
Normal file
@ -0,0 +1,12 @@
|
||||
============
|
||||
Installation
|
||||
============
|
||||
|
||||
At the command line::
|
||||
|
||||
$ pip install automaton
|
||||
|
||||
Or, if you have virtualenvwrapper installed::
|
||||
|
||||
$ mkvirtualenv automaton
|
||||
$ pip install automaton
|
6
openstack-common.conf
Normal file
6
openstack-common.conf
Normal file
@ -0,0 +1,6 @@
|
||||
[DEFAULT]
|
||||
|
||||
# The list of modules to copy from oslo-incubator.git
|
||||
|
||||
# The base module to hold the copy of openstack.common
|
||||
base=automaton
|
@ -1,11 +0,0 @@
|
||||
# Build sanity
|
||||
pbr>=0.6
|
||||
|
||||
# Python 2->3 compatibility library.
|
||||
six>=1.7.0
|
||||
|
||||
# Only needed on python 2.6
|
||||
ordereddict
|
||||
|
||||
# For pretty formatting machines/state tables...
|
||||
PrettyTable>=0.7
|
@ -1,8 +0,0 @@
|
||||
# Build sanity
|
||||
pbr>=0.6
|
||||
|
||||
# Python 2->3 compatibility library.
|
||||
six>=1.7.0
|
||||
|
||||
# For pretty formatting machines/state tables...
|
||||
PrettyTable>=0.7
|
15
requirements.txt
Normal file
15
requirements.txt
Normal file
@ -0,0 +1,15 @@
|
||||
# The order of packages is significant, because pip processes them in the order
|
||||
# of appearance. Changing the order has an impact on the overall integration
|
||||
# process, which may cause wedges in the gate later.
|
||||
|
||||
# See: https://bugs.launchpad.net/pbr/+bug/1384919 for why this is here...
|
||||
pbr>=0.11,<2.0
|
||||
|
||||
# Python 2->3 compatibility library.
|
||||
six>=1.9.0
|
||||
|
||||
# Only needed on python 2.6
|
||||
ordereddict
|
||||
|
||||
# For pretty formatting machines/state tables...
|
||||
PrettyTable>=0.7,<0.8
|
@ -2,9 +2,9 @@
|
||||
name = automaton
|
||||
summary = Friendly state machines for python.
|
||||
requires-python = >=2.6
|
||||
author = Joshua Harlow
|
||||
author-email = harlowja@gmail.com
|
||||
home-page = https://github.com/harlowja/automaton
|
||||
author = OpenStack
|
||||
author-email = openstack-dev@lists.openstack.org
|
||||
home-page = http://www.openstack.org/
|
||||
description-file =
|
||||
README.rst
|
||||
classifier =
|
||||
|
2
setup.py
2
setup.py
@ -26,4 +26,4 @@ except ImportError:
|
||||
|
||||
setuptools.setup(
|
||||
setup_requires=['pbr'],
|
||||
pbr=True)
|
||||
pbr=True)
|
||||
|
@ -1,4 +1,15 @@
|
||||
hacking>=0.9.2
|
||||
nose
|
||||
testtools>=0.9.36,!=1.2.0
|
||||
# The order of packages is significant, because pip processes them in the order
|
||||
# of appearance. Changing the order has an impact on the overall integration
|
||||
# process, which may cause wedges in the gate later.
|
||||
|
||||
hacking<0.11,>=0.10.0
|
||||
|
||||
coverage>=3.6
|
||||
discover
|
||||
python-subunit>=0.0.18
|
||||
sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3
|
||||
oslosphinx>=2.5.0 # Apache-2.0
|
||||
oslotest>=1.5.1 # Apache-2.0
|
||||
testrepository>=0.0.18
|
||||
testscenarios>=0.4
|
||||
testtools>=0.9.36,!=1.2.0
|
||||
|
37
tox.ini
37
tox.ini
@ -1,32 +1,31 @@
|
||||
[tox]
|
||||
minversion = 1.6
|
||||
skipsdist = True
|
||||
envlist = docs,py33,py34,py26,py27,pypy,pep8,venv
|
||||
|
||||
[tox:jenkins]
|
||||
downloadcache = ~/cache/pip
|
||||
|
||||
[testenv:docs]
|
||||
basepython = python2.7
|
||||
commands = python setup.py build_sphinx
|
||||
|
||||
[testenv]
|
||||
usedevelop = True
|
||||
install_command = pip install {opts} {packages}
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
commands = nosetests {posargs}
|
||||
|
||||
[testenv:py27]
|
||||
deps = {[testenv]deps}
|
||||
-r{toxinidir}/requirements-py2.txt
|
||||
|
||||
[testenv:py26]
|
||||
deps = {[testenv]deps}
|
||||
-r{toxinidir}/requirements-py2.txt
|
||||
|
||||
[testenv:py33]
|
||||
deps = {[testenv]deps}
|
||||
-r{toxinidir}/requirements-py3.txt
|
||||
|
||||
[testenv:py34]
|
||||
deps = {[testenv]deps}
|
||||
-r{toxinidir}/requirements-py3.txt
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
commands = python setup.py test --slowest --testr-args='{posargs}'
|
||||
|
||||
[testenv:pep8]
|
||||
commands = flake8 {posargs}
|
||||
|
||||
[testenv:venv]
|
||||
basepython = python2.7
|
||||
commands = {posargs}
|
||||
|
||||
[flake8]
|
||||
exclude = .venv,.tox,dist,doc,.git,build,tools
|
||||
show-source = True
|
||||
builtins = _
|
||||
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
|
||||
|
Loading…
x
Reference in New Issue
Block a user