From 3317ed65716fa8e8058286783f46005013fc97e5 Mon Sep 17 00:00:00 2001 From: tengqm Date: Wed, 10 Dec 2014 15:47:34 +0800 Subject: [PATCH] Initial copy of project files from Heat Initial copy of project files from Heat. --- .coveragerc | 7 +++++++ .gitignore | 18 ++++++++++++++++++ .testr.conf | 6 ++++++ CONTRIBUTING.rst | 16 ++++++++++++++++ HACKING.rst | 43 +++++++++++++++++++++++++++++++++++++++++++ MANIFEST.in | 22 ++++++++++++++++++++++ README.rst | 22 ++++++++++++++++++++++ babel.cfg | 1 + pylintrc | 29 +++++++++++++++++++++++++++++ 9 files changed, 164 insertions(+) create mode 100644 .coveragerc create mode 100644 .gitignore create mode 100644 .testr.conf create mode 100644 CONTRIBUTING.rst create mode 100644 HACKING.rst create mode 100644 MANIFEST.in create mode 100644 README.rst create mode 100644 babel.cfg create mode 100644 pylintrc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 000000000..f9a38278d --- /dev/null +++ b/.coveragerc @@ -0,0 +1,7 @@ +[run] +branch = True +source = senlin +omit = */tests/*,senlin/openstack/* + +[report] +ignore-errors = True diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..7d771d602 --- /dev/null +++ b/.gitignore @@ -0,0 +1,18 @@ +*.pyc +*.swp +*~ +build +dist +*.egg-info +tags +*.log +.venv +AUTHORS +ChangeLog +.tox +.coverage +.coverage.* +cover +.testrepository +.project +.pydevproject diff --git a/.testr.conf b/.testr.conf new file mode 100644 index 000000000..ec138ed33 --- /dev/null +++ b/.testr.conf @@ -0,0 +1,6 @@ +[DEFAULT] +test_command= + PYTHON=$(echo ${PYTHON:-python} | sed 's/--source senlin//g') + ${PYTHON} -m subunit.run discover -s . $LISTOPT $IDOPTION +test_id_option=--load-list $IDFILE +test_list_option=--list diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst new file mode 100644 index 000000000..568c3daaf --- /dev/null +++ b/CONTRIBUTING.rst @@ -0,0 +1,16 @@ +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 + +Once those steps have been completed, changes to OpenStack +should be submitted for review via the Gerrit tool, following +the workflow documented at: + + 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/senlin diff --git a/HACKING.rst b/HACKING.rst new file mode 100644 index 000000000..7eb036b8c --- /dev/null +++ b/HACKING.rst @@ -0,0 +1,43 @@ +Senlin Style Commandments +========================= + +- Step 1: Read the OpenStack Style Commandments + http://docs.openstack.org/developer/hacking/ +- Step 2: Read on + +Senlin Specific Commandments +---------------------------- + +None so far + +Creating Unit Tests +------------------- +For every new feature, unit tests should be created that both test and +(implicitly) document the usage of said feature. If submitting a patch for a +bug that had no unit test, a new passing unit test should be added. If a +submitted bug fix does have a unit test, be sure to add a new one that fails +without the patch and passes with the patch. + +For more information on creating unit tests and utilizing the testing +infrastructure in OpenStack Senlin, please read senlin/tests/testing-overview.txt. + + +Running Tests +------------- +The testing system is based on a combination of tox and testr. The canonical +approach to running tests is to simply run the command `tox`. This will +create virtual environments, populate them with dependencies and run all of +the tests that OpenStack CI systems run. Behind the scenes, tox is running +`testr run --parallel`, but is set up such that you can supply any additional +testr arguments that are needed to tox. For example, you can run: +`tox -- --analyze-isolation` to cause tox to tell testr to add +--analyze-isolation to its argument list. + +It is also possible to run the tests inside of a virtual environment +you have created, or it is possible that you have all of the dependencies +installed locally already. In this case, you can interact with the testr +command directly. Running `testr run` will run the entire test suite. `testr +run --parallel` will run it in parallel (this is the default incantation tox +uses.) More information about testr can be found at: +http://wiki.openstack.org/testr + diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 000000000..e8edbc277 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,22 @@ +include AUTHORS +include ChangeLog +include CONTRIBUTING.rst +include HACKING.rst +include LICENSE +include README.rst +include MANIFEST.in pylintrc +include openstack-common.conf +include babel.cfg install.sh run_tests.sh tox.ini uninstall.sh +include senlin/db/sqlalchemy/migrate_repo/migrate.cfg +include senlin/db/sqlalchemy/migrate_repo/README +include senlin/openstack/common/README +include senlin/testing/README.rst +include senlin/tests/examples/tags.txt +include senlin/tests/testing-overview.txt +include senlin/tests/v1_1/testfile.txt +include senlin/tests/policy/deny_stack_user.json +include senlin/tests/policy/notallowed.json +graft contrib +graft etc +graft doc +graft tools diff --git a/README.rst b/README.rst new file mode 100644 index 000000000..3ba6852d8 --- /dev/null +++ b/README.rst @@ -0,0 +1,22 @@ +====== +SENLIN +====== + +Senlin is a service to orchestrate multiple composite cloud applications using +templates. + +Getting Started +--------------- + +If you'd like to run from the master branch, you can clone the git repo: + + git clone git@github.com:openstack/senlin.git + + +* Wiki: http://wiki.openstack.org/Senlin +* Developer docs: http://docs.openstack.org/developer/senlin + + +Python client +------------- +https://github.com/openstack/python-senlinclient diff --git a/babel.cfg b/babel.cfg new file mode 100644 index 000000000..efceab818 --- /dev/null +++ b/babel.cfg @@ -0,0 +1 @@ +[python: **.py] diff --git a/pylintrc b/pylintrc new file mode 100644 index 000000000..ad3ace9c4 --- /dev/null +++ b/pylintrc @@ -0,0 +1,29 @@ +[Messages Control] +# W0511: TODOs in code comments are fine. +# W0142: *args and **kwargs are fine. +# W0622: Redefining id is fine. +disable-msg=W0511,W0142,W0622 + +[Basic] +# Variable names can be 1 to 31 characters long, with lowercase and underscores +variable-rgx=[a-z_][a-z0-9_]{0,30}$ + +# Argument names can be 2 to 31 characters long, with lowercase and underscores +argument-rgx=[a-z_][a-z0-9_]{1,30}$ + +# Method names should be at least 3 characters long +# and be lowecased with underscores +method-rgx=[a-z_][a-z0-9_]{2,50}$ + +# Module names matching nova-* are ok (files in bin/) +module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+)|(nova-[a-z0-9_-]+))$ + +# Don't require docstrings on tests. +no-docstring-rgx=((__.*__)|([tT]est.*)|setUp|tearDown)$ + +# Exclude variable names that conflict with debugger +bad-names=c +[Design] +max-public-methods=100 +min-public-methods=0 +max-args=6