mirror of
https://github.com/ansible/awx.git
synced 2026-05-14 12:57:40 -02:30
Updates to setup/requirements, add Makefile target for running tests with coverage.
This commit is contained in:
25
.coveragerc
Normal file
25
.coveragerc
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
[run]
|
||||||
|
source = ansibleworks
|
||||||
|
branch = True
|
||||||
|
omit = ansibleworks/main/migrations/*
|
||||||
|
|
||||||
|
[report]
|
||||||
|
# Regexes for lines to exclude from consideration
|
||||||
|
exclude_lines =
|
||||||
|
# Have to re-enable the standard pragma
|
||||||
|
pragma: no cover
|
||||||
|
|
||||||
|
# Don't complain about missing debug-only code:
|
||||||
|
def __repr__
|
||||||
|
if self\.debug
|
||||||
|
|
||||||
|
# Don't complain if tests don't hit defensive assertion code:
|
||||||
|
raise AssertionError
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
|
# Don't complain if non-runnable code isn't run:
|
||||||
|
if 0:
|
||||||
|
if __name__ == .__main__.:
|
||||||
|
|
||||||
|
ignore_errors = True
|
||||||
|
|
||||||
8
.gitignore
vendored
8
.gitignore
vendored
@@ -1,10 +1,16 @@
|
|||||||
ansibleworks/settings/local_settings.py*
|
ansibleworks/settings/local_settings.py*
|
||||||
ansibleworks/acom.sqlite3
|
ansibleworks/*.sqlite3
|
||||||
ansibleworks/projects
|
ansibleworks/projects
|
||||||
ansibleworks/public/media
|
ansibleworks/public/media
|
||||||
ansibleworks/public/static
|
ansibleworks/public/static
|
||||||
env/*
|
env/*
|
||||||
build
|
build
|
||||||
dist
|
dist
|
||||||
|
htmlcov
|
||||||
|
*.egg-info
|
||||||
*.py[c,o]
|
*.py[c,o]
|
||||||
*.swp
|
*.swp
|
||||||
|
.coverage
|
||||||
|
coverage.xml
|
||||||
|
pep8.txt
|
||||||
|
|
||||||
|
|||||||
8
Makefile
8
Makefile
@@ -58,6 +58,14 @@ dbshell:
|
|||||||
test:
|
test:
|
||||||
python manage.py test main
|
python manage.py test main
|
||||||
|
|
||||||
|
test_coverage:
|
||||||
|
# Run tests with coverage enabled.
|
||||||
|
coverage run manage.py test main
|
||||||
|
|
||||||
|
coverage_html:
|
||||||
|
# Output test coverage as HTML (into htmlcov directory).
|
||||||
|
coverage html
|
||||||
|
|
||||||
dev_build:
|
dev_build:
|
||||||
python setup.py dev_build
|
python setup.py dev_build
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,11 @@
|
|||||||
- python-devel # only because pexpect comes from pip
|
- python-devel # only because pexpect comes from pip
|
||||||
- python-lxml # xml for ?format=xml instead of json (optional)
|
- python-lxml # xml for ?format=xml instead of json (optional)
|
||||||
|
|
||||||
- name: install python modules from pip
|
# python-setuptools package is old (0.6.10, ~2009) vs. latest distribute (0.6.40)
|
||||||
|
- name: install latest distribute from pypi
|
||||||
|
pip: name=distribute state=latest
|
||||||
|
|
||||||
|
- name: install python modules via pip
|
||||||
pip: requirements=${working_dir}/requirements.txt
|
pip: requirements=${working_dir}/requirements.txt
|
||||||
|
|
||||||
- name: configure the database authentication more or less open for setup
|
- name: configure the database authentication more or less open for setup
|
||||||
|
|||||||
@@ -1,21 +1,7 @@
|
|||||||
# Local Django settings for Ansible Commander project.
|
|
||||||
|
|
||||||
# Copyright (c) 2013 AnsibleWorks, Inc.
|
# Copyright (c) 2013 AnsibleWorks, Inc.
|
||||||
#
|
# All Rights Reserved.
|
||||||
# This file is part of Ansible Commander.
|
|
||||||
#
|
|
||||||
# Ansible Commander is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, version 3 of the License.
|
|
||||||
#
|
|
||||||
# Ansible Commander is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with Ansible Commander. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
|
# Local Django settings for AnsibleWorks project.
|
||||||
|
|
||||||
from development import *
|
from development import *
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,26 @@
|
|||||||
Django==1.5.1
|
# PIP requirements for AnsibleWorks development/build environment.
|
||||||
django-celery==3.0.11
|
# Install using "pip -r requirements.txt"
|
||||||
django-devserver==0.5.0
|
|
||||||
django-extensions==1.1.1
|
Django>=1.5
|
||||||
django-jsonfield==0.9.2
|
django-celery
|
||||||
ipython==0.13.1
|
django-devserver
|
||||||
pexpect==2.4
|
django-extensions
|
||||||
# psycopg2==2.4.6
|
|
||||||
python-dateutil==1.5
|
|
||||||
# PyYAML==3.10
|
|
||||||
South==0.7.6
|
|
||||||
requests
|
|
||||||
djangorestframework
|
|
||||||
markdown
|
|
||||||
django-filter
|
django-filter
|
||||||
|
django-jsonfield
|
||||||
|
djangorestframework
|
||||||
|
ipython
|
||||||
|
markdown
|
||||||
|
pexpect
|
||||||
|
python-dateutil
|
||||||
|
PyYAML
|
||||||
|
South
|
||||||
|
|
||||||
|
# You may also need to install the following extra packages using the OS
|
||||||
|
# package manager, or pip if you're running inside a virtualenv.
|
||||||
|
# - ansible (via yum, pip or source checkout)
|
||||||
|
# - distribute (Use the latest version via "pip install -U distribute"; the
|
||||||
|
# default python-setuptools package is old.)
|
||||||
|
# - psycopg2 (via "yum install python-psycopg2")
|
||||||
|
# - coverage (if you want to check test coverage, via "pip install coverage";
|
||||||
|
# the default python-coverage package is old.)
|
||||||
|
# - readline (for using the ipython interactive shell)
|
||||||
|
|||||||
Reference in New Issue
Block a user