From 8013816d3077883955a79de5bbb9fb9cdc0948ab Mon Sep 17 00:00:00 2001 From: Xavier Antoviaque Date: Mon, 14 Sep 2015 17:25:05 +0200 Subject: [PATCH 01/11] Update build to use Python 3.5 --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index 6aedf7032..440106c37 100644 --- a/circle.yml +++ b/circle.yml @@ -1,6 +1,6 @@ machine: python: - version: 3.4.3 + version: 3.5.0 dependencies: pre: - pip install --upgrade pip From ede58ab5e40f9f304c17aeffe7ba11405137a62a Mon Sep 17 00:00:00 2001 From: Xavier Antoviaque Date: Tue, 29 Mar 2016 18:06:08 +0200 Subject: [PATCH 02/11] Upgrade Ubuntu to 16.04 (Xenial) --- Makefile | 4 +--- README.md | 4 ++-- Vagrantfile | 9 ++++++++- bin/bootstrap | 17 +++++++++++------ circle.yml | 2 +- debian_db_packages.lst | 2 +- 6 files changed, 24 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index cde6cb416..70c99651c 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ WORKERS = 4 SHELL = /bin/bash -HONCHO_MANAGE := honcho run python3 manage.py +HONCHO_MANAGE := honcho run python3 manage.py # Parameters ################################################################## @@ -37,8 +37,6 @@ all: rundev apt_get_update: - sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 - echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list sudo apt-get update clean: diff --git a/README.md b/README.md index d5a07a4cc..f7822c5b6 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ First, install [VirtualBox](https://www.virtualbox.org/wiki/Downloads) and vagrant up -This will provision a virtual machine running Ubuntu 14.04, set up local +This will provision a virtual machine running Ubuntu 16.04, set up local Postgres, MySQL, MongoDB and Redis, install the dependencies and run the tests. Once the virtual machine is up and running, you can ssh into it with this @@ -45,7 +45,7 @@ web browser. If you prefer not to use Vagrant, you can install OpenCraft manually. Refer to the [bootstrap](bin/bootstrap) script used by Vagrant for an example. -Instructions based on Ubuntu 14.04. +Instructions based on Ubuntu 16.04. Install the system package dependencies & virtualenv: diff --git a/Vagrantfile b/Vagrantfile index d038dbe3c..7f94e6eb4 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -2,11 +2,18 @@ # vi: set ft=ruby : Vagrant.configure(2) do |config| - config.vm.box = 'ubuntu/trusty64' + # TODO: Switch back to the official box once it is released + config.vm.box = 'opencraft/xenial64' + config.vm.box_url = 'http://opencraft.com/files/vagrant-opencraft-xenial64.box' + config.vm.synced_folder '.', '/vagrant', disabled: true + config.vm.synced_folder '.', '/home/vagrant/opencraft' + config.vm.network 'forwarded_port', guest: 2001, host: 2001 config.vm.network 'forwarded_port', guest: 5000, host: 5000 config.vm.network 'forwarded_port', guest: 8888, host: 8888 + config.ssh.forward_x11 = true + config.vm.provision 'shell', path: 'bin/bootstrap', privileged: false, diff --git a/bin/bootstrap b/bin/bootstrap index 31eab647b..a02241252 100755 --- a/bin/bootstrap +++ b/bin/bootstrap @@ -1,13 +1,13 @@ #!/bin/bash # This script provisions a development environment with local postgres and -# redis servers for development and testing. Assumes ubuntu 14.04 +# redis servers for development and testing. Assumes Ubuntu 16.04 set -e -# If this is a vagrant VM, cd to /vagrant on login +# If this is a vagrant VM, cd to ~/opencraft on login if [[ $USER == 'vagrant' ]]; then - cd /vagrant - grep -Fq 'cd /vagrant' ~/.bashrc || echo 'cd /vagrant' >> ~/.bashrc + cd ~/opencraft + grep -Fq 'cd ~/opencraft' ~/.bashrc || echo 'cd ~/opencraft' >> ~/.bashrc fi # Install system packages @@ -28,14 +28,19 @@ if [[ $USER == 'vagrant' ]]; then fi # Install python dependencies -pip3 install -r requirements.txt +pip install -r requirements.txt + +# TODO: Should only be needed for the unofficial vagrant image +# Remove when switching to the official, when vagrant release a xenial box +echo "update user set plugin='mysql_native_password' where user='root' and host='localhost'; flush privileges;" \ + | sudo -H -u root mysql mysql # Create postgres user sudo -u postgres createuser -d $USER || echo "Could not create postgres user '$USER' - it probably already exists" # Allow access to postgres from localhost without password -cat << EOF | sudo tee /etc/postgresql/9.3/main/pg_hba.conf +cat << EOF | sudo tee /etc/postgresql/9.5/main/pg_hba.conf local all postgres peer local all all trust host all all 127.0.0.1/32 trust diff --git a/circle.yml b/circle.yml index 440106c37..d649dc752 100644 --- a/circle.yml +++ b/circle.yml @@ -1,6 +1,6 @@ machine: python: - version: 3.5.0 + version: 3.5.1 dependencies: pre: - pip install --upgrade pip diff --git a/debian_db_packages.lst b/debian_db_packages.lst index 5bd262dd6..32902c425 100644 --- a/debian_db_packages.lst +++ b/debian_db_packages.lst @@ -1,3 +1,3 @@ postgresql mysql-server -mongodb-org +mongodb From 55ff620e86e1f662676951bd5e8a01e61645604a Mon Sep 17 00:00:00 2001 From: Xavier Antoviaque Date: Sat, 10 Oct 2015 14:18:59 +0200 Subject: [PATCH 03/11] Updated dependencies --- opencraft/settings.py | 3 +- requirements.txt | 176 +++++++++++++++++++++++------------------- 2 files changed, 96 insertions(+), 83 deletions(-) diff --git a/opencraft/settings.py b/opencraft/settings.py index c397b49d4..9651ead0e 100644 --- a/opencraft/settings.py +++ b/opencraft/settings.py @@ -194,7 +194,6 @@ # Huey (redis task queue) ##################################################### HUEY = { - 'backend': 'huey.backends.redis_backend', 'name': 'opencraft', 'connection': { 'host': REDIS_URL_OBJ.hostname, @@ -204,7 +203,7 @@ 'always_eager': env.bool('HUEY_ALWAYS_EAGER', default=False), # Options to pass into the consumer when running ``manage.py run_huey`` - 'consumer_options': {'workers': 1, 'loglevel': logging.DEBUG}, + 'consumer': {'workers': 1, 'loglevel': logging.DEBUG}, } diff --git a/requirements.txt b/requirements.txt index 463aa29c8..f0987c15c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,111 +1,125 @@ -astroid==1.3.8 -Babel==2.1.1 -CherryPy==3.8.0 -cliff==1.15.0 +appdirs==1.4.0 +astroid==1.4.5 +Babel==2.3.4 +backports.shutil-get-terminal-size==1.0.0 +chardet==2.3.0 +CherryPy==3.8.2 +cliff==2.0.0 cmd2==0.6.8 +colorama==0.3.7 cookies==2.2.1 -coverage==4.0 -debtcollector==0.8.0 -decorator==4.0.4 +coverage==4.0.3 +ddt==1.0.1 +debtcollector==1.3.0 +decorator==4.0.9 dj-static==0.0.6 -Django==1.8.5 -django-angular==0.7.15 -django-appconf==1.0.1 -django-compressor==1.5 -django-debug-toolbar==1.3.2 +Django==1.9.5 +django-angular==0.8.1 +django-appconf==1.0.2 +django-compressor==2.0 +django-debug-toolbar==1.4 django-environ==0.4.0 -django-extensions==1.5.7 -django-filter==0.11.0 -django-grappelli==2.7.1 -django-libsass==0.4 -django-redis==4.2.0 +django-extensions==1.6.1 +django-filter==0.13.0 +django-grappelli==2.8.1 +django-libsass==0.6 +django-redis==4.4.2 django-zurb-foundation==5.5.0 -djangorestframework==3.2.4 -dodgy==0.1.7 -ddt==1.0.1 -factory-boy==2.5.2 +djangorestframework==3.3.3 +dodgy==0.1.9 +factory-boy==2.7.0 +fake-factory==0.5.7 Flask==0.10.1 -freezegun==0.3.5 +freezegun==0.3.7 +futures==3.0.5 gitdb==0.6.4 -GitPython==1.0.1 +GitPython==2.0.0 glob2==0.4.1 -gunicorn==19.3.0 -honcho==0.6.6 -huey==0.4.9 -ipdb==0.8.1 -ipython==4.0.0 +gunicorn==19.4.5 +honcho==0.7.1 +huey==1.1.1 +ipdb==0.9.3 +ipython==4.2.0 ipython-genutils==0.1.0 -iso8601==0.1.10 +iso8601==0.1.11 itsdangerous==0.24 -jasmine==2.3.0 -jasmine-core==2.3.4 +jasmine==2.4.0 +jasmine-core==2.4.0 Jinja2==2.8 -jira==0.50 -libsass==0.8.3 -logilab-common==1.0.2 -Markdown==2.6.2 +jira==1.0.3 +keystoneauth1==2.6.0 +lazy-object-proxy==1.2.2 +libsass==0.11.1 +logilab-common==1.2.0 +Markdown==2.6.6 MarkupSafe==0.23 -mccabe==0.3.1 -mock==1.3.0 -monotonic==0.3 -msgpack-python==0.4.6 -mysqlclient==1.3.6 +mccabe==0.4.0 +mock==2.0.0 +monotonic==1.0 +msgpack-python==0.4.7 +mysqlclient==1.3.7 netaddr==0.7.18 netifaces==0.10.4 oauthlib==1.0.3 ordereddict==1.1 -oslo.config==2.4.0 -oslo.i18n==2.6.0 -oslo.serialization==1.9.0 -oslo.utils==2.5.0 -path.py==8.1.2 -pbr==1.8.0 -pep257==0.6.0 -pep8==1.6.2 +os-client-config==1.17.0 +oslo.config==3.9.0 +oslo.i18n==3.6.0 +oslo.serialization==2.4.0 +oslo.utils==3.8.0 +path.py==8.2.1 +pbr==1.9.1 +pep257==0.7.0 +pep8==1.7.0 pep8-naming==0.3.3 -pexpect==4.0 -pickleshare==0.5 +pexpect==4.0.1 +pickleshare==0.7.2 +positional==1.1.0 prettytable==0.7.2 --e git+https://github.com/antoviaque/prospector.git@a62c73b41eaee0c92bde51438268cecd13acbc18#egg=prospector-origin_pylint-extconfig-plugins +prospector==0.11.7 psycopg2==2.6.1 -ptyprocess==0.5 -pyflakes==1.0.0 -pylint==1.4.4 +ptyprocess==0.5.1 +pyflakes==1.1.0 +pylint==1.5.5 pylint-celery==0.3 -pylint-common==0.2.1 -pylint-django==0.6.1 +pylint-common==0.2.2 +pylint-django==0.7.1 +pylint-flask==0.3 pylint-plugin-utils==0.2.3 -pymongo==2.7.2 -pyparsing==2.0.3 -python-dateutil==2.4.2 -python-keystoneclient==1.7.1 -python-neutronclient==3.1.0 -python-novaclient==2.31.0 +pymongo==3.2.2 +pyparsing==2.1.1 +python-dateutil==2.5.3 +python-keystoneclient==2.3.1 +python-neutronclient==4.2.0 +python-novaclient==4.0.0 python-swiftclient==3.0.0 -pytz==2015.6 +pytz==2016.4 PyYAML==3.10 -redis==2.10.3 -requests==2.7.0 -requests-oauthlib==0.5.0 -requests-toolbelt==0.4.0 -requirements-detector==0.4 -responses==0.4.0 -selenium==2.52.0 +rcssmin==1.0.6 +redis==2.10.5 +requests==2.9.1 +requests-oauthlib==0.6.1 +requests-toolbelt==0.6.0 +requestsexceptions==1.1.3 +requirements-detector==0.4.1 +responses==0.5.1 +rjsmin==1.0.12 +selenium==2.53.2 setoptconf==0.2.0 simplegeneric==0.8.1 -simplejson==3.8.0 -six==1.9.0 +simplejson==3.8.2 +six==1.10.0 smmap==0.9.0 -sockjs-tornado==1.0.2 -sqlparse==0.1.16 +sockjs-tornado==1.0.3 +sqlparse==0.1.19 static3==0.6.1 -stevedore==1.8.0 --e git+https://github.com/jonashagstedt/swampdragon.git@067d0bd6419238e1936ca187440b68a94ea71cf8#egg=SwampDragon-master +stevedore==1.12.0 +-e git+https://github.com/jonashagstedt/swampdragon.git@061b2b1e4a57b7aa32d2fbc0824f070a52c1e300#egg=SwampDragon tlslite==0.4.9 -tornado==4.2.1 +tornado==4.3 tornado-redis==2.4.18 -traitlets==4.0.0 +traitlets==4.2.1 unicodecsv==0.14.1 -virtualenv==13.1.2 -Werkzeug==0.10.4 -wrapt==1.10.5 +virtualenv==15.0.1 +Werkzeug==0.11.1 +wrapt==1.10.8 From 4d843ab06133cf8f08331dba481f08be76fb02d3 Mon Sep 17 00:00:00 2001 From: Xavier Antoviaque Date: Tue, 29 Mar 2016 20:42:29 +0200 Subject: [PATCH 04/11] Django 1.9 Upgrade - Fix incompatible changes --- instance/tests/views/test_index.py | 2 +- opencraft/settings.py | 2 +- opencraft/urls.py | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/instance/tests/views/test_index.py b/instance/tests/views/test_index.py index 3d88afa1d..d4eebe873 100644 --- a/instance/tests/views/test_index.py +++ b/instance/tests/views/test_index.py @@ -36,7 +36,7 @@ def test_index_unauthenticated(self): Index view - Unauthenticated users go to login page """ response = self.client.get('/') - self.assertRedirects(response, 'http://testserver/admin/login/?next=/') + self.assertRedirects(response, '/admin/login/?next=/') def test_index_authenticated(self): """ diff --git a/opencraft/settings.py b/opencraft/settings.py index 9651ead0e..61f8f03da 100644 --- a/opencraft/settings.py +++ b/opencraft/settings.py @@ -106,7 +106,7 @@ 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', - 'django.core.context_processors.request', + 'django.template.context_processors.request', ], }, }, diff --git a/opencraft/urls.py b/opencraft/urls.py index 02aabf032..06e500ba8 100644 --- a/opencraft/urls.py +++ b/opencraft/urls.py @@ -26,6 +26,8 @@ from django.contrib import admin from django.views.generic.base import RedirectView +import instance + # URL Patterns ################################################################ @@ -35,5 +37,5 @@ url(r'^api/', include('api.urls', namespace="api")), url(r'^instance/', include('instance.urls', namespace="instance")), url(r'^favicon\.ico$', RedirectView.as_view(url='/static/img/favicon/favicon.ico', permanent=False)), - url(r'^$', 'instance.views.index'), + url(r'^$', instance.views.index), ] From 8eaf6699a2ba5bf6de49aa057c0618212bd2af97 Mon Sep 17 00:00:00 2001 From: Xavier Antoviaque Date: Tue, 29 Mar 2016 22:05:19 +0200 Subject: [PATCH 05/11] Pylint 1.5 upgrade - Fix new warnings --- instance/admin.py | 1 + instance/ansible.py | 7 +++-- instance/gandi.py | 6 ++--- instance/github.py | 6 ++--- instance/logging.py | 5 ++-- instance/models/instance.py | 2 +- instance/models/mixins/ansible.py | 6 +++++ instance/models/mixins/database.py | 12 ++++++--- instance/models/mixins/utilities.py | 5 ++++ instance/models/mixins/version_control.py | 8 +++--- instance/models/server.py | 8 +++--- instance/models/utils.py | 5 ++++ instance/repo.py | 8 +++--- instance/tasks.py | 4 +-- instance/tests/api/test_instance.py | 5 ++-- instance/tests/base.py | 11 ++++---- instance/tests/decorators.py | 5 ++++ instance/tests/integration/base.py | 2 +- .../tests/integration/factories/instance.py | 1 + instance/tests/models/factories/server.py | 6 +++-- instance/tests/models/test_instance.py | 13 +++++----- instance/tests/models/test_instance_mixins.py | 11 +++++--- instance/tests/models/test_log_entry.py | 3 ++- instance/tests/models/test_server.py | 8 +++--- instance/tests/models/test_utils.py | 26 ++++++++++++------- instance/tests/test_ansible.py | 3 ++- instance/tests/test_github.py | 4 +-- instance/tests/test_openstack.py | 4 +-- instance/tests/test_repo.py | 1 - instance/tests/test_tasks.py | 3 +-- instance/tests/test_utils.py | 3 +-- instance/tests/utils.py | 7 +++-- instance/utils.py | 4 +-- instance/views/__init__.py | 2 +- opencraft/settings.py | 6 ++--- pylintrc | 18 ------------- requirements.txt | 1 - websocket.py | 7 ++--- 38 files changed, 129 insertions(+), 108 deletions(-) diff --git a/instance/admin.py b/instance/admin.py index 231cfc988..a3a9ec7f1 100644 --- a/instance/admin.py +++ b/instance/admin.py @@ -23,6 +23,7 @@ # Imports ##################################################################### from django.contrib import admin + from instance.models.instance import SingleVMOpenEdXInstance from instance.models.log_entry import GeneralLogEntry, InstanceLogEntry, ServerLogEntry from instance.models.server import OpenStackServer diff --git a/instance/ansible.py b/instance/ansible.py index 3201a966b..e82af5531 100644 --- a/instance/ansible.py +++ b/instance/ansible.py @@ -22,20 +22,19 @@ # Imports ##################################################################### +from contextlib import contextmanager +import logging import os import shutil import subprocess -import yaml - -from contextlib import contextmanager from tempfile import mkdtemp, NamedTemporaryFile +import yaml from django.conf import settings # Logging ##################################################################### -import logging logger = logging.getLogger(__name__) diff --git a/instance/gandi.py b/instance/gandi.py index c5d85a085..19f193d91 100644 --- a/instance/gandi.py +++ b/instance/gandi.py @@ -22,6 +22,7 @@ # Imports ##################################################################### +import logging import time import xmlrpc.client @@ -31,7 +32,6 @@ # Logging ##################################################################### -import logging logger = logging.getLogger(__name__) @@ -45,14 +45,14 @@ def __init__(self, api_url='https://rpc.gandi.net/xmlrpc/'): self.client = xmlrpc.client.ServerProxy(api_url) @property - def api_key(self): #pylint: disable=no-self-use + def api_key(self): """ Gandi API key """ return settings.GANDI_API_KEY @property - def zone_id(self): #pylint: disable=no-self-use + def zone_id(self): """ Gandi Zone ID of the domain """ diff --git a/instance/github.py b/instance/github.py index 4206c95b2..5895d575e 100644 --- a/instance/github.py +++ b/instance/github.py @@ -22,19 +22,19 @@ # Imports ##################################################################### +import logging import functools import operator import re -import requests -import yaml from django.conf import settings from django.template.defaultfilters import truncatewords +import requests +import yaml # Logging ##################################################################### -import logging logger = logging.getLogger(__name__) diff --git a/instance/logging.py b/instance/logging.py index 89b029ad4..db00b2c7b 100644 --- a/instance/logging.py +++ b/instance/logging.py @@ -22,14 +22,13 @@ # Imports ##################################################################### +from functools import wraps import logging import traceback -from functools import wraps -from swampdragon.pubsub_providers.data_publisher import publish_data - from django.apps import apps from django.db import models +from swampdragon.pubsub_providers.data_publisher import publish_data from instance.serializers.logentry import LogEntrySerializer diff --git a/instance/models/instance.py b/instance/models/instance.py index 875914049..00856e7a4 100644 --- a/instance/models/instance.py +++ b/instance/models/instance.py @@ -22,6 +22,7 @@ # Imports ##################################################################### +from functools import partial import logging import string @@ -32,7 +33,6 @@ from django.utils import timezone from django.utils.crypto import get_random_string from django_extensions.db.models import TimeStampedModel -from functools import partial from instance.gandi import GandiAPI from instance.logger_adapter import InstanceLoggerAdapter diff --git a/instance/models/mixins/ansible.py b/instance/models/mixins/ansible.py index 36ea263c8..615a6e38f 100644 --- a/instance/models/mixins/ansible.py +++ b/instance/models/mixins/ansible.py @@ -19,7 +19,11 @@ """ Instance app model mixins - Ansible """ + +# Imports ##################################################################### + import os + from django.conf import settings from django.core.validators import MinValueValidator from django.db import models @@ -30,6 +34,8 @@ from instance.utils import poll_streams +# Classes ##################################################################### + class AnsibleInstanceMixin(models.Model): """ An instance that relies on Ansible to deploy its services diff --git a/instance/models/mixins/database.py b/instance/models/mixins/database.py index cd7d4434c..82a05362e 100644 --- a/instance/models/mixins/database.py +++ b/instance/models/mixins/database.py @@ -20,6 +20,8 @@ Instance app model mixins - Database """ +# Imports ##################################################################### + from django.conf import settings from django.db import models import MySQLdb as mysql @@ -29,6 +31,8 @@ from instance import openstack +# Functions ################################################################### + def _get_mysql_cursor(): """ Get a database cursor. @@ -42,6 +46,8 @@ def _get_mysql_cursor(): return connection.cursor(), connection +# Classes ##################################################################### + class MySQLInstanceMixin(models.Model): """ An instance that uses mysql databases @@ -54,7 +60,7 @@ class Meta: abstract = True @property - def mysql_database_names(self): # pylint: disable=no-self-use + def mysql_database_names(self): """ An iterable of database names """ @@ -104,7 +110,7 @@ class Meta: abstract = True @property - def mongo_database_names(self): # pylint: disable=no-self-use + def mongo_database_names(self): """ An iterable of database names """ @@ -149,7 +155,7 @@ class Meta: abstract = True @property - def swift_container_names(self): # pylint: disable=no-self-use + def swift_container_names(self): """ An iterable of Swift container names. """ diff --git a/instance/models/mixins/utilities.py b/instance/models/mixins/utilities.py index 99b5a3408..70588c9d9 100644 --- a/instance/models/mixins/utilities.py +++ b/instance/models/mixins/utilities.py @@ -19,6 +19,9 @@ """ Instance app model mixins - Utilities """ + +# Imports ##################################################################### + import sys from django.conf import settings @@ -26,6 +29,8 @@ from django.views.debug import ExceptionReporter +# Classes ##################################################################### + class EmailInstanceMixin(object): """ An instance class that can send emails diff --git a/instance/models/mixins/version_control.py b/instance/models/mixins/version_control.py index 0b5e3d911..5dfe60772 100644 --- a/instance/models/mixins/version_control.py +++ b/instance/models/mixins/version_control.py @@ -19,6 +19,9 @@ """ Instance app model mixins - Version Control """ + +# Imports ##################################################################### + from django.conf import settings from django.core.validators import RegexValidator from django.db import models @@ -124,7 +127,7 @@ class Meta: abstract = True @property - def default_fork(self): #pylint: disable=no-self-use + def default_fork(self): """ Name of the fork to use by default, when no repository is specified """ @@ -221,7 +224,6 @@ def set_to_branch_tip(self, branch_name=None, ref_type=None, commit=True): # Update the hash in the instance title if it is present there # TODO: Find a better way to handle this - include the hash dynamically? if self.name and old_commit_short_id: - #pylint: disable=attribute-defined-outside-init self.name = self.name.replace(old_commit_short_id, self.commit_short_id) if commit: @@ -248,6 +250,6 @@ def update_from_pr(self, pr): """ Update this instance with settings from the given pull request """ - self.name = ('PR#{pr.number}: {pr.truncated_title}' + #pylint: disable=attribute-defined-outside-init + self.name = ('PR#{pr.number}: {pr.truncated_title}' + ' ({pr.username}) - {i.reference_name}').format(pr=pr, i=self) self.github_pr_url = pr.github_pr_url diff --git a/instance/models/server.py b/instance/models/server.py index 631b3f9b8..138ce43d6 100644 --- a/instance/models/server.py +++ b/instance/models/server.py @@ -23,25 +23,23 @@ # Imports ##################################################################### import logging -import novaclient import time -from swampdragon.pubsub_providers.data_publisher import publish_data - from django.conf import settings from django.db import models from django.db.models import Q from django.db.models.signals import post_save from django_extensions.db.models import TimeStampedModel +import novaclient +from swampdragon.pubsub_providers.data_publisher import publish_data from instance import openstack from instance.logger_adapter import ServerLoggerAdapter -from instance.utils import is_port_open, to_json - from instance.models.instance import SingleVMOpenEdXInstance from instance.models.utils import ( ValidateModelMixin, ResourceState, ModelResourceStateDescriptor, SteadyStateException ) +from instance.utils import is_port_open, to_json # Logging ##################################################################### diff --git a/instance/models/utils.py b/instance/models/utils.py index f8bb69cf8..2bf760010 100644 --- a/instance/models/utils.py +++ b/instance/models/utils.py @@ -69,6 +69,8 @@ def save(self, *args, **kwargs): class ClassProperty(property): """ Same as built-in 'property' global but also works when accessed as a class attribute """ def __get__(self, cls, owner): + # TODO: Requires astroid 2.0+ to pass pylint + # https://bitbucket.org/logilab/pylint/issues/439/confused-by-descriptors return self.fget.__get__(None, owner)() # pylint: disable=no-member @@ -241,6 +243,7 @@ def require_valid_state(resource): """ state = self.__get__(resource) if not isinstance(state, accepted_states): + #TODO: why is no-member disabled? raise WrongStateException("The method '{}' cannot be called in this state ({} / {}).".format( method.__name__, state.name, state.__class__.__name__ # pylint: disable=no-member )) @@ -262,6 +265,7 @@ def wrapped_method(*args, **kwargs): return method(resource, *args, **kwargs) wrapped_method.is_available = lambda: isinstance(descriptor.__get__(resource), accepted_states) return wrapped_method + return MagicWrapper() return wrap @@ -281,6 +285,7 @@ def do_transition(resource): """ The method that performs a specific transition """ current_state = self.__get__(resource) if from_states and not isinstance(current_state, from_states): + #TODO: why is no-member disabled? raise WrongStateException("This transition cannot be used to move from {} to {}".format( current_state.name, to_state.name # pylint: disable=no-member )) diff --git a/instance/repo.py b/instance/repo.py index 739d714d0..9c33248e2 100644 --- a/instance/repo.py +++ b/instance/repo.py @@ -22,16 +22,16 @@ # Imports ##################################################################### -import git -import tempfile +from contextlib import contextmanager +import logging import shutil +import tempfile -from contextlib import contextmanager +import git # Logging ##################################################################### -import logging logger = logging.getLogger(__name__) diff --git a/instance/tasks.py b/instance/tasks.py index 6b9351f3b..b7067f519 100644 --- a/instance/tasks.py +++ b/instance/tasks.py @@ -22,9 +22,10 @@ # Imports ##################################################################### -from huey.djhuey import crontab, db_periodic_task, db_task +import logging from django.conf import settings +from huey.contrib.djhuey import crontab, db_periodic_task, db_task from instance.github import get_username_list_from_team, get_pr_list_from_username from instance.models.instance import SingleVMOpenEdXInstance @@ -32,7 +33,6 @@ # Logging ##################################################################### -import logging logger = logging.getLogger(__name__) diff --git a/instance/tests/api/test_instance.py b/instance/tests/api/test_instance.py index b05e9c2d3..86c444e9e 100644 --- a/instance/tests/api/test_instance.py +++ b/instance/tests/api/test_instance.py @@ -22,10 +22,9 @@ # Imports ##################################################################### -from ddt import ddt, data - -from mock import call, patch +from unittest.mock import call, patch +from ddt import ddt, data from rest_framework import status from instance import github diff --git a/instance/tests/base.py b/instance/tests/base.py index e8ef7eb4e..ee69b3b2b 100644 --- a/instance/tests/base.py +++ b/instance/tests/base.py @@ -22,15 +22,14 @@ # Imports ##################################################################### -import huey import json import os.path import re - -from mock import Mock +from unittest.mock import Mock from django.contrib.auth.models import User from django.test import Client, TestCase as DjangoTestCase +import huey # Functions ################################################################### @@ -94,12 +93,12 @@ def setUp(self): # Don't close tasks DB connections in tests, this conflicts with the atomic transaction blocks # used by the test runner to isolate DB operations from each test - self.orig_db_connection_close = huey.djhuey.connection.close + self.orig_db_connection_close = huey.contrib.djhuey.connection.close self.mock_db_connection_close = Mock() - huey.djhuey.connection.close = self.mock_db_connection_close + huey.contrib.djhuey.connection.close = self.mock_db_connection_close def tearDown(self): - huey.djhuey.connection.close = self.orig_db_connection_close + huey.contrib.djhuey.connection.close = self.orig_db_connection_close super().tearDown() diff --git a/instance/tests/decorators.py b/instance/tests/decorators.py index ba460f344..61ab0dddc 100644 --- a/instance/tests/decorators.py +++ b/instance/tests/decorators.py @@ -19,10 +19,15 @@ """ Decorators - Useful decorators for unit tests """ + +# Imports ##################################################################### + from functools import wraps from unittest import mock +# Functions ################################################################### + def patch_git_checkout(func): """ Patch git checkout process in order to allow mocking up the checkout diff --git a/instance/tests/integration/base.py b/instance/tests/integration/base.py index 68806c9a2..d316cf461 100644 --- a/instance/tests/integration/base.py +++ b/instance/tests/integration/base.py @@ -22,7 +22,7 @@ # Imports ##################################################################### -from huey import djhuey +from huey.contrib import djhuey from instance.models.instance import SingleVMOpenEdXInstance from instance.models.server import OpenStackServer diff --git a/instance/tests/integration/factories/instance.py b/instance/tests/integration/factories/instance.py index 9345e8312..8b64f9af1 100644 --- a/instance/tests/integration/factories/instance.py +++ b/instance/tests/integration/factories/instance.py @@ -21,6 +21,7 @@ """ # Imports ##################################################################### + import uuid import factory diff --git a/instance/tests/models/factories/server.py b/instance/tests/models/factories/server.py index a906cbd2a..5257392da 100644 --- a/instance/tests/models/factories/server.py +++ b/instance/tests/models/factories/server.py @@ -22,10 +22,11 @@ # Imports ##################################################################### +from functools import wraps +from unittest.mock import MagicMock, Mock, patch + import factory from factory.django import DjangoModelFactory -from functools import wraps -from mock import MagicMock, Mock, patch from instance.models.server import OpenStackServer from instance.tests.base import add_fixture_to_object @@ -120,6 +121,7 @@ def _adjust_kwargs(cls, **kwargs): if 'status' in kwargs: kwargs['_status'] = kwargs.pop('status').state_id if hasattr(cls, '_status') and '_status' not in kwargs: + #TODO: why is no-member disabled? kwargs['_status'] = cls._status # pylint: disable=no-member return kwargs diff --git a/instance/tests/models/test_instance.py b/instance/tests/models/test_instance.py index 9278f598d..71a139b1f 100644 --- a/instance/tests/models/test_instance.py +++ b/instance/tests/models/test_instance.py @@ -22,15 +22,15 @@ # Imports ##################################################################### +import re +from unittest.mock import call, patch, Mock from urllib.parse import urlparse -import re -import novaclient -import yaml from ddt import ddt, data from django.conf import settings from django.test import override_settings -from mock import call, patch, Mock +import novaclient +import yaml from instance.models.instance import InconsistentInstanceState, Instance, SingleVMOpenEdXInstance from instance.models.server import Server @@ -49,7 +49,6 @@ # Factory boy doesn't properly support pylint+django #pylint: disable=no-member - class InstanceTestCase(TestCase): """ Test cases for instance models @@ -607,7 +606,9 @@ def test_invalid_status_transitions(self, transition): """ Test that invalid status transitions raise exception """ - invalid_from_states = (state for state in Instance.Status.states if state not in transition['from_states']) + # TODO: Get pylint to see state as an iterable + invalid_from_states = (state for state in Instance.Status.states #pylint: disable=not-an-iterable + if state not in transition['from_states']) for invalid_from_state in invalid_from_states: instance = SingleVMOpenEdXInstanceFactory(status=invalid_from_state) self.assertEqual(instance.status, invalid_from_state) diff --git a/instance/tests/models/test_instance_mixins.py b/instance/tests/models/test_instance_mixins.py index 29337f7f8..bd06e9f5c 100644 --- a/instance/tests/models/test_instance_mixins.py +++ b/instance/tests/models/test_instance_mixins.py @@ -19,14 +19,17 @@ """ Model Mixins - Tests """ -import subprocess + +# Imports ##################################################################### import os +import subprocess +from unittest.mock import patch, call + import pymongo from django.conf import settings from django.core import mail as django_mail from django.test.utils import override_settings -from mock import patch, call from instance.models.instance import SingleVMOpenEdXInstance from instance.tests.base import TestCase @@ -36,8 +39,10 @@ BootingOpenStackServerFactory, OpenStackServerFactory, ReadyOpenStackServerFactory ) -#pylint: disable=no-member +# Tests ####################################################################### + +#pylint: disable=no-member class GitHubInstanceTestCase(TestCase): """ diff --git a/instance/tests/models/test_log_entry.py b/instance/tests/models/test_log_entry.py index 30db2733b..ca03276c5 100644 --- a/instance/tests/models/test_log_entry.py +++ b/instance/tests/models/test_log_entry.py @@ -22,9 +22,10 @@ # Imports ##################################################################### +from unittest.mock import patch + from django.test import override_settings from freezegun import freeze_time -from mock import patch from instance.models.log_entry import GeneralLogEntry from instance.tests.base import TestCase diff --git a/instance/tests/models/test_server.py b/instance/tests/models/test_server.py index 48580cfe8..5117e6707 100644 --- a/instance/tests/models/test_server.py +++ b/instance/tests/models/test_server.py @@ -24,10 +24,10 @@ import http.client import io +from unittest.mock import Mock, call, patch -import novaclient from ddt import ddt, data, unpack -from mock import Mock, call, patch +import novaclient from instance.models.server import OpenStackServer, Status as ServerStatus from instance.models.utils import SteadyStateException, WrongStateException @@ -493,7 +493,9 @@ def test_invalid_status_transitions(self, transition): """ Test that invalid status transitions raise exception """ - invalid_from_states = (state for state in ServerStatus.states if state not in transition['from_states']) + # TODO: Get pylint to see state as an iterable + invalid_from_states = (state for state in ServerStatus.states #pylint: disable=not-an-iterable + if state not in transition['from_states']) for invalid_from_state in invalid_from_states: instance = OpenStackServerFactory(status=invalid_from_state) self.assertEqual(instance.status, invalid_from_state) diff --git a/instance/tests/models/test_utils.py b/instance/tests/models/test_utils.py index ac9ad781c..3aa6e6f0e 100644 --- a/instance/tests/models/test_utils.py +++ b/instance/tests/models/test_utils.py @@ -23,7 +23,7 @@ # Imports ##################################################################### from unittest import TestCase -from mock import Mock +from unittest.mock import Mock from django.db import models @@ -289,13 +289,13 @@ def test_unique_state_ids(self): It is forbidden to declare a ResourceStateDescriptor which has multiple states with the same state_id. """ - with self.assertRaisesRegexp(AssertionError, "A resource's states must each have a unique state_id"): + with self.assertRaisesRegex(AssertionError, "A resource's states must each have a unique state_id"): ResourceStateDescriptor(state_classes=(State1, State1, State3), default_state=State1) class ChildState(State2): """ A child of state2 with the same state_id """ - with self.assertRaisesRegexp(AssertionError, "A resource's states must each have a unique state_id"): + with self.assertRaisesRegex(AssertionError, "A resource's states must each have a unique state_id"): ResourceStateDescriptor(state_classes=(State1, State2, ChildState), default_state=State1) def test_missing_state_ids(self): @@ -303,7 +303,7 @@ def test_missing_state_ids(self): It is forbidden to declare ResourceStateDescriptor using states that have no state_id """ self.assertEqual(BaseState.state_id, None) - with self.assertRaisesRegexp(AssertionError, "A resource's states must each declare a state_id string"): + with self.assertRaisesRegex(AssertionError, "A resource's states must each declare a state_id string"): ResourceStateDescriptor(state_classes=(State1, BaseState), default_state=State1) def test_cannot_assign_state(self): @@ -371,22 +371,26 @@ def test_method_only_for(self): # In State 1, we can call method_one(): res.return_value = 'A' self.assertEqual(res.method_one(), 'A') - self.assertEqual(res.method_one.is_available(), True) + # TODO: Why do we need to disable no-member for `is_available`? + self.assertEqual(res.method_one.is_available(), True) #pylint: disable=no-member # In State 1, we can call method_one_with_args(): self.assertEqual(res.method_one_with_args(4, 5, c=6), 32) - self.assertEqual(res.method_one_with_args.is_available(), True) + # TODO: Why do we need to disable no-member for `is_available`? + self.assertEqual(res.method_one_with_args.is_available(), True) #pylint: disable=no-member # But not method_two() expected_message = "The method 'method_two' cannot be called in this state \\(State 1 / State1\\)." with self.assertRaisesRegex(WrongStateException, expected_message): res.method_two() - self.assertEqual(res.method_two.is_available(), False) + # TODO: Why do we need to disable no-member for `is_available`? + self.assertEqual(res.method_two.is_available(), False) #pylint: disable=no-member # In State 1, we can call method_odd(): res.return_value = 'B' self.assertEqual(res.method_odd(), 'B') - self.assertEqual(res.method_odd.is_available(), True) + # TODO: Why do we need to disable no-member for `is_available`? + self.assertEqual(res.method_odd.is_available(), True) #pylint: disable=no-member # Go to State 2: res.increment_state() @@ -395,11 +399,13 @@ def test_method_only_for(self): expected_message = "The method 'method_one' cannot be called in this state \\(State 2 / State2\\)." with self.assertRaisesRegex(WrongStateException, expected_message): res.method_one() - self.assertEqual(res.method_one.is_available(), False) + # TODO: Why do we need to disable no-member for `is_available`? + self.assertEqual(res.method_one.is_available(), False) #pylint: disable=no-member res.return_value = 'C' self.assertEqual(res.method_two(), 'C') - self.assertEqual(res.method_two.is_available(), True) + # TODO: Why do we need to disable no-member for `is_available`? + self.assertEqual(res.method_two.is_available(), True) #pylint: disable=no-member def test_property_only_for(self): """ diff --git a/instance/tests/test_ansible.py b/instance/tests/test_ansible.py index 5b0ee4485..a205ecb6c 100644 --- a/instance/tests/test_ansible.py +++ b/instance/tests/test_ansible.py @@ -25,6 +25,7 @@ import os.path from unittest import mock from unittest.mock import patch + import yaml from instance import ansible @@ -70,7 +71,7 @@ def test_yaml_merge(self): Merge of two yaml strings with overlapping variables """ yaml_result_str = ansible.yaml_merge(self.yaml_str1, self.yaml_str2) - self.assertEquals(yaml.load(yaml_result_str), { + self.assertEqual(yaml.load(yaml_result_str), { 'testa': 'firsta with unicode «ταБЬℓσ»', 'testb': 'secondb with unicode «ταБЬℓσ2»', 'testc': 'secondc', diff --git a/instance/tests/test_github.py b/instance/tests/test_github.py index 6b7b0d8fc..5966c320c 100644 --- a/instance/tests/test_github.py +++ b/instance/tests/test_github.py @@ -23,9 +23,9 @@ # Imports ##################################################################### import json -import responses +from unittest.mock import patch -from mock import patch +import responses from instance import github from instance.tests.base import TestCase, get_raw_fixture diff --git a/instance/tests/test_openstack.py b/instance/tests/test_openstack.py index 691ca8d9c..48f5131cb 100644 --- a/instance/tests/test_openstack.py +++ b/instance/tests/test_openstack.py @@ -22,11 +22,11 @@ # Imports ##################################################################### -import requests - from collections import namedtuple from unittest.mock import Mock, call, patch +import requests + from instance import openstack from instance.tests.base import TestCase diff --git a/instance/tests/test_repo.py b/instance/tests/test_repo.py index 5cade48d7..6dc866fee 100644 --- a/instance/tests/test_repo.py +++ b/instance/tests/test_repo.py @@ -23,7 +23,6 @@ # Imports ##################################################################### import os.path - from unittest.mock import call, patch from instance import repo diff --git a/instance/tests/test_tasks.py b/instance/tests/test_tasks.py index a4b911789..0b85ed09c 100644 --- a/instance/tests/test_tasks.py +++ b/instance/tests/test_tasks.py @@ -23,8 +23,7 @@ # Imports ##################################################################### import textwrap - -from mock import patch +from unittest.mock import patch from instance import tasks from instance.models.instance import SingleVMOpenEdXInstance diff --git a/instance/tests/test_utils.py b/instance/tests/test_utils.py index 174e2a389..3e5ce7b3f 100644 --- a/instance/tests/test_utils.py +++ b/instance/tests/test_utils.py @@ -24,8 +24,7 @@ import itertools import subprocess - -from mock import patch +from unittest.mock import patch from instance.tests.base import TestCase from instance.utils import poll_streams, _line_timeout_generator diff --git a/instance/tests/utils.py b/instance/tests/utils.py index 5846e36cb..3c09ce6eb 100644 --- a/instance/tests/utils.py +++ b/instance/tests/utils.py @@ -20,13 +20,16 @@ Test utils """ -from contextlib import ExitStack +# Imports ##################################################################### -from mock import Mock, patch +from contextlib import ExitStack +from unittest.mock import Mock, patch from instance.tests.models.factories.server import OSServerMockManager +# Functions ################################################################### + def patch_services(func): """ Mock most external services so that things 'seem to work' when provisioning a server. diff --git a/instance/utils.py b/instance/utils.py index 11f889f2a..d6572061b 100644 --- a/instance/utils.py +++ b/instance/utils.py @@ -24,12 +24,12 @@ import itertools import json -import requests import selectors import socket import time +from unittest.mock import Mock -from mock import Mock +import requests # Functions ################################################################### diff --git a/instance/views/__init__.py b/instance/views/__init__.py index 9148a4d36..459c25b5c 100644 --- a/instance/views/__init__.py +++ b/instance/views/__init__.py @@ -22,8 +22,8 @@ # Imports ##################################################################### -from django.shortcuts import render from django.contrib.auth.decorators import login_required +from django.shortcuts import render from instance.models.instance import SingleVMOpenEdXInstance diff --git a/opencraft/settings.py b/opencraft/settings.py index 61f8f03da..747ce35b5 100644 --- a/opencraft/settings.py +++ b/opencraft/settings.py @@ -25,12 +25,12 @@ # Imports ##################################################################### -import environ import logging import os - from urllib.parse import urlparse +import environ + # Functions ################################################################### @@ -77,7 +77,7 @@ 'compressor', 'djangular', 'rest_framework', - 'huey.djhuey', + 'huey.contrib.djhuey', 'swampdragon', 'debug_toolbar', ) + LOCAL_APPS diff --git a/pylintrc b/pylintrc index ec060c3be..ff6075fed 100644 --- a/pylintrc +++ b/pylintrc @@ -7,9 +7,6 @@ # pygtk.require(). #init-hook= -# Profiled execution. -profile=no - # Add files or directories to the blacklist. They should be base names, not # paths. ignore=migrations @@ -64,10 +61,6 @@ reports=no # (RP0004). evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) -# Add a comment according to your evaluation note. This is used by the global -# evaluation report (RP0004). -comment=no - # Template used to display messages. This is a python new-style format string # used to format the message information. See doc for all details #msg-template= @@ -189,9 +182,6 @@ callbacks=cb_,_cb [BASIC] -# Required attributes for module, separated by a comma -required-attributes= - # List of builtins function names that should not be used, separated by a comma bad-functions=map,filter @@ -299,10 +289,6 @@ ignored-modules=responses # (useful for classes with attributes dynamically set). ignored-classes=SQLObject -# When zope mode is activated, add a predefined set of Zope acquired attributes -# to generated-members. -zope=no - # List of members which are set dynamically and missed by pylint inference # system, and so shouldn't trigger E0201 when accessed. Python regular # expressions are accepted. @@ -345,10 +331,6 @@ max-public-methods=22 [CLASSES] -# List of interface methods to ignore, separated by a comma. This is used for -# instance to not check methods defines in Zope's Interface base class. -ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by - # List of method names used to declare (i.e. assign) instance attributes. defining-attr-methods=__init__,__new__,setUp diff --git a/requirements.txt b/requirements.txt index f0987c15c..6f7156406 100644 --- a/requirements.txt +++ b/requirements.txt @@ -54,7 +54,6 @@ logilab-common==1.2.0 Markdown==2.6.6 MarkupSafe==0.23 mccabe==0.4.0 -mock==2.0.0 monotonic==1.0 msgpack-python==0.4.7 mysqlclient==1.3.7 diff --git a/websocket.py b/websocket.py index 99dd6b2a3..f72b3a54e 100755 --- a/websocket.py +++ b/websocket.py @@ -26,13 +26,10 @@ import os import sys -from swampdragon.swampdragon_server import run_server - - -# Django ###################################################################### - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "opencraft.settings") + from django.conf import settings +from swampdragon.swampdragon_server import run_server # Main ######################################################################## From f2e09b5afec0adf04e454edc0f82a66253177b5c Mon Sep 17 00:00:00 2001 From: Xavier Antoviaque Date: Tue, 29 Mar 2016 22:21:21 +0200 Subject: [PATCH 06/11] Djangular 0.8.0 - Fix backward incompatible name change --- opencraft/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencraft/settings.py b/opencraft/settings.py index 747ce35b5..b1ec6778b 100644 --- a/opencraft/settings.py +++ b/opencraft/settings.py @@ -75,7 +75,7 @@ 'django_extensions', 'foundation', 'compressor', - 'djangular', + 'djng', 'rest_framework', 'huey.contrib.djhuey', 'swampdragon', From cbb0b09c1ea6bc444a4486f41e94cc65c311cdf4 Mon Sep 17 00:00:00 2001 From: Xavier Antoviaque Date: Sun, 24 Apr 2016 16:56:01 +0200 Subject: [PATCH 07/11] Add `make manage <...>` command for easier access to Django's manage.py --- Makefile | 5 ++++- README.md | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 70c99651c..ba0d82162 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ HONCHO_MANAGE := honcho run python3 manage.py # Parameters ################################################################## # For `test_one` use the rest as arguments and turn them into do-nothing targets -ifeq (test_one,$(firstword $(MAKECMDGOALS))) +ifeq ($(firstword $(MAKECMDGOALS)),$(filter $(firstword $(MAKECMDGOALS)),test_one manage)) RUN_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS)) $(eval $(RUN_ARGS):;@:) endif @@ -58,6 +58,9 @@ install_virtualenv_system: collectstatic: clean static_external honcho run ./manage.py collectstatic --noinput +manage: + $(HONCHO_MANAGE) $(RUN_ARGS) + migrate: clean $(HONCHO_MANAGE) migrate diff --git a/README.md b/README.md index f7822c5b6..da9b89f4c 100644 --- a/README.md +++ b/README.md @@ -258,7 +258,7 @@ Creating a user In order to login to the development server locally you will need to create a superuser by running: - honcho run ./manage.py createsuperuser + make manage createsuperuser Once created, you will be able to login with the username and password you set up. @@ -432,6 +432,10 @@ manage.py You can also access the Django `manage.py` command directly, using Honcho to load the environment: + make manage + +Or run any command using the application environment: + honcho run ./manage.py From b56e4a7d78298a49149624d8d6750c2151c1cc0e Mon Sep 17 00:00:00 2001 From: Xavier Antoviaque Date: Sat, 30 Apr 2016 10:35:36 +0200 Subject: [PATCH 08/11] Move the vagrant xenial base image to the Vagrant Atlas repository To better handle box versioning and updates. --- Vagrantfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index 7f94e6eb4..c0eb5a1e9 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -4,7 +4,6 @@ Vagrant.configure(2) do |config| # TODO: Switch back to the official box once it is released config.vm.box = 'opencraft/xenial64' - config.vm.box_url = 'http://opencraft.com/files/vagrant-opencraft-xenial64.box' config.vm.synced_folder '.', '/vagrant', disabled: true config.vm.synced_folder '.', '/home/vagrant/opencraft' From cc3479ce15ced5fbc5514e862df5e5e8b0f9da61 Mon Sep 17 00:00:00 2001 From: Xavier Antoviaque Date: Sat, 30 Apr 2016 11:33:48 +0200 Subject: [PATCH 09/11] Update copyright notice - Add 2016 & switch email to contact@opencraft Commands: ``` $ for i in `git grep -l xavier@opencraft`; do sed -e 's/xavier@opencraft/contact@opencraft/' $i > /tmp/rename && mv /tmp/rename $i ; done $ for i in `git grep -l '2015 OpenCraft'`; do sed -e 's/2015 OpenCraft/2015-2016 OpenCraft/' $i > /tmp/rename && mv /tmp/rename $i ; done ``` --- Makefile | 2 +- api/router.py | 2 +- api/urls.py | 2 +- instance/admin.py | 2 +- instance/ansible.py | 2 +- instance/api/instance.py | 2 +- instance/api/server.py | 2 +- instance/gandi.py | 2 +- instance/github.py | 2 +- instance/logger_adapter.py | 2 +- instance/logging.py | 2 +- instance/models/instance.py | 2 +- instance/models/log_entry.py | 2 +- instance/models/mixins/__init__.py | 2 +- instance/models/mixins/ansible.py | 2 +- instance/models/mixins/database.py | 2 +- instance/models/mixins/utilities.py | 2 +- instance/models/mixins/version_control.py | 2 +- instance/models/server.py | 2 +- instance/models/utils.py | 2 +- instance/openstack.py | 2 +- instance/repo.py | 2 +- instance/routers.py | 2 +- instance/serializers/instance.py | 2 +- instance/serializers/logentry.py | 2 +- instance/serializers/server.py | 2 +- instance/static/js/src/instance.js | 2 +- instance/tasks.py | 2 +- instance/tests/api/base.py | 2 +- instance/tests/api/test_instance.py | 2 +- instance/tests/base.py | 2 +- instance/tests/decorators.py | 2 +- instance/tests/factories/pr.py | 2 +- instance/tests/integration/base.py | 2 +- instance/tests/integration/factories/instance.py | 2 +- instance/tests/integration/integration_instance.py | 2 +- instance/tests/js/helpers/fixtures.js | 2 +- instance/tests/js/helpers/http.js | 2 +- instance/tests/js/helpers/restangular.js | 2 +- instance/tests/js/instance_app_spec.js | 2 +- instance/tests/models/factories/instance.py | 2 +- instance/tests/models/factories/server.py | 2 +- instance/tests/models/test_instance.py | 2 +- instance/tests/models/test_instance_mixins.py | 2 +- instance/tests/models/test_log_entry.py | 2 +- instance/tests/models/test_server.py | 2 +- instance/tests/models/test_utils.py | 2 +- instance/tests/test_ansible.py | 2 +- instance/tests/test_gandi.py | 2 +- instance/tests/test_github.py | 2 +- instance/tests/test_openstack.py | 2 +- instance/tests/test_repo.py | 2 +- instance/tests/test_tasks.py | 2 +- instance/tests/test_utils.py | 2 +- instance/tests/utils.py | 2 +- instance/tests/views/test_index.py | 2 +- instance/urls.py | 2 +- instance/utils.py | 2 +- instance/views/__init__.py | 2 +- manage.py | 2 +- opencraft/settings.py | 2 +- opencraft/urls.py | 2 +- opencraft/wsgi.py | 2 +- static/external/Makefile | 2 +- static/external/css/Makefile | 2 +- static/external/fonts/Makefile | 2 +- static/external/js/Makefile | 2 +- websocket.py | 2 +- 68 files changed, 68 insertions(+), 68 deletions(-) mode change 100755 => 100644 manage.py mode change 100755 => 100644 websocket.py diff --git a/Makefile b/Makefile index ba0d82162..fd10408cb 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/api/router.py b/api/router.py index fcb3b233b..addf107ea 100644 --- a/api/router.py +++ b/api/router.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/api/urls.py b/api/urls.py index 5f619a58b..12df01204 100644 --- a/api/urls.py +++ b/api/urls.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/admin.py b/instance/admin.py index a3a9ec7f1..32f2982fd 100644 --- a/instance/admin.py +++ b/instance/admin.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/ansible.py b/instance/ansible.py index e82af5531..15177ff99 100644 --- a/instance/ansible.py +++ b/instance/ansible.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/api/instance.py b/instance/api/instance.py index 19238b856..0f9f06e76 100644 --- a/instance/api/instance.py +++ b/instance/api/instance.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/api/server.py b/instance/api/server.py index 1bcfe56de..2951bf052 100644 --- a/instance/api/server.py +++ b/instance/api/server.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/gandi.py b/instance/gandi.py index 19f193d91..202f555ae 100644 --- a/instance/gandi.py +++ b/instance/gandi.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/github.py b/instance/github.py index 5895d575e..0c6a8dda2 100644 --- a/instance/github.py +++ b/instance/github.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/logger_adapter.py b/instance/logger_adapter.py index ed46fb3ab..f2777bdd0 100644 --- a/instance/logger_adapter.py +++ b/instance/logger_adapter.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/logging.py b/instance/logging.py index db00b2c7b..fbfa911ed 100644 --- a/instance/logging.py +++ b/instance/logging.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/models/instance.py b/instance/models/instance.py index 00856e7a4..742165473 100644 --- a/instance/models/instance.py +++ b/instance/models/instance.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/models/log_entry.py b/instance/models/log_entry.py index 2896e0e38..b1c8fde2e 100644 --- a/instance/models/log_entry.py +++ b/instance/models/log_entry.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/models/mixins/__init__.py b/instance/models/mixins/__init__.py index 0ea4e1f2e..0ee8cf1a9 100644 --- a/instance/models/mixins/__init__.py +++ b/instance/models/mixins/__init__.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/models/mixins/ansible.py b/instance/models/mixins/ansible.py index 615a6e38f..ea1c32541 100644 --- a/instance/models/mixins/ansible.py +++ b/instance/models/mixins/ansible.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/models/mixins/database.py b/instance/models/mixins/database.py index 82a05362e..5d0661442 100644 --- a/instance/models/mixins/database.py +++ b/instance/models/mixins/database.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/models/mixins/utilities.py b/instance/models/mixins/utilities.py index 70588c9d9..eb9e86820 100644 --- a/instance/models/mixins/utilities.py +++ b/instance/models/mixins/utilities.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/models/mixins/version_control.py b/instance/models/mixins/version_control.py index 5dfe60772..ef6535bfd 100644 --- a/instance/models/mixins/version_control.py +++ b/instance/models/mixins/version_control.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/models/server.py b/instance/models/server.py index 138ce43d6..bba8e6259 100644 --- a/instance/models/server.py +++ b/instance/models/server.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/models/utils.py b/instance/models/utils.py index 2bf760010..7e6afa3eb 100644 --- a/instance/models/utils.py +++ b/instance/models/utils.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/openstack.py b/instance/openstack.py index 0bd9f95e2..cdee18f15 100644 --- a/instance/openstack.py +++ b/instance/openstack.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/repo.py b/instance/repo.py index 9c33248e2..7acb6099f 100644 --- a/instance/repo.py +++ b/instance/repo.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/routers.py b/instance/routers.py index 61384c7da..7834bc063 100644 --- a/instance/routers.py +++ b/instance/routers.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/serializers/instance.py b/instance/serializers/instance.py index 97c1d7aa0..3a2ff79cd 100644 --- a/instance/serializers/instance.py +++ b/instance/serializers/instance.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/serializers/logentry.py b/instance/serializers/logentry.py index a7a9c3b2f..9594f7709 100644 --- a/instance/serializers/logentry.py +++ b/instance/serializers/logentry.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/serializers/server.py b/instance/serializers/server.py index c237cfd52..177b1c10a 100644 --- a/instance/serializers/server.py +++ b/instance/serializers/server.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/static/js/src/instance.js b/instance/static/js/src/instance.js index 94f32277c..cee979c7b 100644 --- a/instance/static/js/src/instance.js +++ b/instance/static/js/src/instance.js @@ -1,5 +1,5 @@ // OpenCraft -- tools to aid developing and hosting free software projects -// Copyright (C) 2015 OpenCraft +// Copyright (C) 2015-2016 OpenCraft // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/instance/tasks.py b/instance/tasks.py index b7067f519..8360dd7fc 100644 --- a/instance/tasks.py +++ b/instance/tasks.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/tests/api/base.py b/instance/tests/api/base.py index 2dcfd79ba..0e0b70c77 100644 --- a/instance/tests/api/base.py +++ b/instance/tests/api/base.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/tests/api/test_instance.py b/instance/tests/api/test_instance.py index 86c444e9e..571d5a864 100644 --- a/instance/tests/api/test_instance.py +++ b/instance/tests/api/test_instance.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/tests/base.py b/instance/tests/base.py index ee69b3b2b..3520f0fef 100644 --- a/instance/tests/base.py +++ b/instance/tests/base.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/tests/decorators.py b/instance/tests/decorators.py index 61ab0dddc..5779e5661 100644 --- a/instance/tests/decorators.py +++ b/instance/tests/decorators.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/tests/factories/pr.py b/instance/tests/factories/pr.py index 9774918e2..f224f8915 100644 --- a/instance/tests/factories/pr.py +++ b/instance/tests/factories/pr.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/tests/integration/base.py b/instance/tests/integration/base.py index d316cf461..e595aeb61 100644 --- a/instance/tests/integration/base.py +++ b/instance/tests/integration/base.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/tests/integration/factories/instance.py b/instance/tests/integration/factories/instance.py index 8b64f9af1..51e5e8cbd 100644 --- a/instance/tests/integration/factories/instance.py +++ b/instance/tests/integration/factories/instance.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/tests/integration/integration_instance.py b/instance/tests/integration/integration_instance.py index ec569bee9..c79300c38 100644 --- a/instance/tests/integration/integration_instance.py +++ b/instance/tests/integration/integration_instance.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/tests/js/helpers/fixtures.js b/instance/tests/js/helpers/fixtures.js index a212f99b8..d436e0760 100644 --- a/instance/tests/js/helpers/fixtures.js +++ b/instance/tests/js/helpers/fixtures.js @@ -1,5 +1,5 @@ // OpenCraft -- tools to aid developing and hosting free software projects -// Copyright (C) 2015 OpenCraft +// Copyright (C) 2015-2016 OpenCraft // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/instance/tests/js/helpers/http.js b/instance/tests/js/helpers/http.js index b97fc21dd..ba60f5d5e 100644 --- a/instance/tests/js/helpers/http.js +++ b/instance/tests/js/helpers/http.js @@ -1,5 +1,5 @@ // OpenCraft -- tools to aid developing and hosting free software projects -// Copyright (C) 2015 OpenCraft +// Copyright (C) 2015-2016 OpenCraft // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/instance/tests/js/helpers/restangular.js b/instance/tests/js/helpers/restangular.js index 8e2ed993d..be6b92c6d 100644 --- a/instance/tests/js/helpers/restangular.js +++ b/instance/tests/js/helpers/restangular.js @@ -1,5 +1,5 @@ // OpenCraft -- tools to aid developing and hosting free software projects -// Copyright (C) 2015 OpenCraft +// Copyright (C) 2015-2016 OpenCraft // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/instance/tests/js/instance_app_spec.js b/instance/tests/js/instance_app_spec.js index b8fcfc759..6b6aa9700 100644 --- a/instance/tests/js/instance_app_spec.js +++ b/instance/tests/js/instance_app_spec.js @@ -1,5 +1,5 @@ // OpenCraft -- tools to aid developing and hosting free software projects -// Copyright (C) 2015 OpenCraft +// Copyright (C) 2015-2016 OpenCraft // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as diff --git a/instance/tests/models/factories/instance.py b/instance/tests/models/factories/instance.py index 8d8328ff5..db0bfb0b1 100644 --- a/instance/tests/models/factories/instance.py +++ b/instance/tests/models/factories/instance.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/tests/models/factories/server.py b/instance/tests/models/factories/server.py index 5257392da..e5032afb5 100644 --- a/instance/tests/models/factories/server.py +++ b/instance/tests/models/factories/server.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/tests/models/test_instance.py b/instance/tests/models/test_instance.py index 71a139b1f..73d19818d 100644 --- a/instance/tests/models/test_instance.py +++ b/instance/tests/models/test_instance.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/tests/models/test_instance_mixins.py b/instance/tests/models/test_instance_mixins.py index bd06e9f5c..0b899c130 100644 --- a/instance/tests/models/test_instance_mixins.py +++ b/instance/tests/models/test_instance_mixins.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/tests/models/test_log_entry.py b/instance/tests/models/test_log_entry.py index ca03276c5..e671f2dc6 100644 --- a/instance/tests/models/test_log_entry.py +++ b/instance/tests/models/test_log_entry.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/tests/models/test_server.py b/instance/tests/models/test_server.py index 5117e6707..e1a563989 100644 --- a/instance/tests/models/test_server.py +++ b/instance/tests/models/test_server.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/tests/models/test_utils.py b/instance/tests/models/test_utils.py index 3aa6e6f0e..774f101f0 100644 --- a/instance/tests/models/test_utils.py +++ b/instance/tests/models/test_utils.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/tests/test_ansible.py b/instance/tests/test_ansible.py index a205ecb6c..b82be9617 100644 --- a/instance/tests/test_ansible.py +++ b/instance/tests/test_ansible.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/tests/test_gandi.py b/instance/tests/test_gandi.py index b32380d8e..9470ce4aa 100644 --- a/instance/tests/test_gandi.py +++ b/instance/tests/test_gandi.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/tests/test_github.py b/instance/tests/test_github.py index 5966c320c..8a39bbe04 100644 --- a/instance/tests/test_github.py +++ b/instance/tests/test_github.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/tests/test_openstack.py b/instance/tests/test_openstack.py index 48f5131cb..bba38d9bc 100644 --- a/instance/tests/test_openstack.py +++ b/instance/tests/test_openstack.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/tests/test_repo.py b/instance/tests/test_repo.py index 6dc866fee..afa6e4bfa 100644 --- a/instance/tests/test_repo.py +++ b/instance/tests/test_repo.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/tests/test_tasks.py b/instance/tests/test_tasks.py index 0b85ed09c..1f07afb31 100644 --- a/instance/tests/test_tasks.py +++ b/instance/tests/test_tasks.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/tests/test_utils.py b/instance/tests/test_utils.py index 3e5ce7b3f..4bbf20bff 100644 --- a/instance/tests/test_utils.py +++ b/instance/tests/test_utils.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/tests/utils.py b/instance/tests/utils.py index 3c09ce6eb..36915934b 100644 --- a/instance/tests/utils.py +++ b/instance/tests/utils.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/tests/views/test_index.py b/instance/tests/views/test_index.py index d4eebe873..cab0795da 100644 --- a/instance/tests/views/test_index.py +++ b/instance/tests/views/test_index.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/urls.py b/instance/urls.py index 23e04c85f..24a90ef72 100644 --- a/instance/urls.py +++ b/instance/urls.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/utils.py b/instance/utils.py index d6572061b..2d1eb119c 100644 --- a/instance/utils.py +++ b/instance/utils.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/instance/views/__init__.py b/instance/views/__init__.py index 459c25b5c..b7441d6f6 100644 --- a/instance/views/__init__.py +++ b/instance/views/__init__.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/manage.py b/manage.py old mode 100755 new mode 100644 index adf68034c..508117282 --- a/manage.py +++ b/manage.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/opencraft/settings.py b/opencraft/settings.py index b1ec6778b..3f3737f43 100644 --- a/opencraft/settings.py +++ b/opencraft/settings.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/opencraft/urls.py b/opencraft/urls.py index 06e500ba8..30d0b9c40 100644 --- a/opencraft/urls.py +++ b/opencraft/urls.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/opencraft/wsgi.py b/opencraft/wsgi.py index eefadf39d..8d084806d 100644 --- a/opencraft/wsgi.py +++ b/opencraft/wsgi.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/static/external/Makefile b/static/external/Makefile index 523044417..970934196 100644 --- a/static/external/Makefile +++ b/static/external/Makefile @@ -1,5 +1,5 @@ # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/static/external/css/Makefile b/static/external/css/Makefile index 86707cea7..284dc8662 100644 --- a/static/external/css/Makefile +++ b/static/external/css/Makefile @@ -1,5 +1,5 @@ # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/static/external/fonts/Makefile b/static/external/fonts/Makefile index 3d4551734..e9cbce5a7 100644 --- a/static/external/fonts/Makefile +++ b/static/external/fonts/Makefile @@ -1,5 +1,5 @@ # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/static/external/js/Makefile b/static/external/js/Makefile index 26a9be7b0..ef6f3ce52 100644 --- a/static/external/js/Makefile +++ b/static/external/js/Makefile @@ -1,5 +1,5 @@ # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/websocket.py b/websocket.py old mode 100755 new mode 100644 index f72b3a54e..9947602b1 --- a/websocket.py +++ b/websocket.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects -# Copyright (C) 2015 OpenCraft +# Copyright (C) 2015-2016 OpenCraft # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as From ab3cffada1b6615e170ecc43db53d40a04ae3706 Mon Sep 17 00:00:00 2001 From: Xavier Antoviaque Date: Sat, 30 Apr 2016 11:59:00 +0200 Subject: [PATCH 10/11] Make manage.py executable to fix new CircleCI complaint --- manage.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 manage.py diff --git a/manage.py b/manage.py old mode 100644 new mode 100755 From 0d16032945745d8eb81712aaf32a81b56cdf506c Mon Sep 17 00:00:00 2001 From: Xavier Antoviaque Date: Sun, 1 May 2016 08:52:16 +0200 Subject: [PATCH 11/11] Add vagrant vbguest plugin to ensure matching guest additions --- Vagrantfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Vagrantfile b/Vagrantfile index c0eb5a1e9..c6766a40c 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,12 +1,19 @@ # -*- mode: ruby -*- # vi: set ft=ruby : +unless Vagrant.has_plugin?("vagrant-vbguest") + raise "Please install the vagrant-vbguest plugin by running `vagrant plugin install vagrant-vbguest`" +end + Vagrant.configure(2) do |config| # TODO: Switch back to the official box once it is released config.vm.box = 'opencraft/xenial64' config.vm.synced_folder '.', '/vagrant', disabled: true config.vm.synced_folder '.', '/home/vagrant/opencraft' + config.vbguest.auto_update = true + config.vbguest.auto_reboot = true + config.vm.network 'forwarded_port', guest: 2001, host: 2001 config.vm.network 'forwarded_port', guest: 5000, host: 5000 config.vm.network 'forwarded_port', guest: 8888, host: 8888