Skip to content

Commit

Permalink
Merge branch 'release/next-djangole'
Browse files Browse the repository at this point in the history
  • Loading branch information
sloria committed Dec 6, 2017
2 parents 5a743d5 + b058889 commit 5710186
Show file tree
Hide file tree
Showing 375 changed files with 9,399 additions and 4,934 deletions.
12 changes: 12 additions & 0 deletions .docker-compose.mfr.env
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,16 @@ SERVER_CONFIG_HMAC_SECRET=changeme
SERVER_CONFIG_ADDRESS=0.0.0.0
SERVER_CONFIG_ALLOWED_PROVIDER_DOMAINS='http://192.168.168.167:5000/ http://192.168.168.167:7777/'

UNOCONV_PORT_2002_TCP_ADDR=192.168.168.167

# Related settings from MFR mfr/extensions/settings.py
# These settings are used for changing URI in templates for renderers that download from
# waterbutler in template. e.g. 192.168.168.167 -> localhost
# LOCAL_DEVELOPMENT = config.get_bool('LOCAL_DEVELOPMENT', 0)
# DOCKER_LOCAL_HOST = config.get('DOCKER_LOCAL_HOST', '192.168.168.167')
# LOCAL_HOST = config.get('LOCAL_HOST', 'localhost')

# Indicates use of local docker development setup
EXTENSION_CONFIG_LOCAL_DEVELOPMENT=1

#PYTHONUNBUFFERED=0 # This when set to 0 will allow print statements to be visible in the Docker logs
3 changes: 3 additions & 0 deletions .pyup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pin: True
# schedule: "every week"
search: True
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ env:
- WHEELHOUSE="$HOME/.cache/wheelhouse"
- LIBXML2_DEB="libxml2-dbg_2.9.1+dfsg1-3ubuntu4.9_amd64.deb"
- POSTGRES_DEB="postgresql-9.6_9.6.3-1.pgdg12.4+1_amd64.deb"
- ELASTICSEARCH_ARCHIVE="elasticsearch-1.5.0.tar.gz"
- ELASTICSEARCH_ARCHIVE="elasticsearch-2.4.5.tar.gz"
- LIBJEMALLOC_DEB="libjemalloc1_3.5.1-2_amd64.deb"
- LIBPCRE_DEB="libpcre3_8.31-2ubuntu2.3_amd64.deb"
# - VARNISH_DEB="varnish_4.1.0-1~trusty_amd64.deb"
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@
Changelog
*********

0.125.0 (2017-12-05)
====================

- Add GitLab addon
- Add OneDrive addon
- Upgrade a number of Python dependencies
- Use django-celery-beat for managing periodic tasks
- Optimizations for files grid and adding contributors
- APIv2 optimizations
- Admin: Add custom taxonomy UI
- Quick files UI on profile pages
- APIv2 immediately returns preprint DOIs
- Add `created` and `modified` fields to all models
- Address Django deprecation warnings
- Remove modularmodm as a dependency
- Remove redundant osf.utils.auth module

0.124.0 (2017-11-13)
====================

Expand Down
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,10 @@ COPY ./addons/dropbox/requirements.txt ./addons/dropbox/
#COPY ./addons/figshare/requirements.txt ./addons/figshare/
#COPY ./addons/forward/requirements.txt ./addons/forward/
COPY ./addons/github/requirements.txt ./addons/github/
COPY ./addons/gitlab/requirements.txt ./addons/gitlab/
#COPY ./addons/googledrive/requirements.txt ./addons/googledrive/
COPY ./addons/mendeley/requirements.txt ./addons/mendeley/
COPY ./addons/onedrive/requirements.txt /code/addons/onedrive/
#COPY ./addons/osfstorage/requirements.txt ./addons/osfstorage/
COPY ./addons/owncloud/requirements.txt ./addons/owncloud/
COPY ./addons/s3/requirements.txt ./addons/s3/
Expand Down Expand Up @@ -152,8 +154,10 @@ COPY ./addons/dropbox/static/ ./addons/dropbox/static/
COPY ./addons/figshare/static/ ./addons/figshare/static/
COPY ./addons/forward/static/ ./addons/forward/static/
COPY ./addons/github/static/ ./addons/github/static/
COPY ./addons/gitlab/static/ ./addons/gitlab/static/
COPY ./addons/googledrive/static/ ./addons/googledrive/static/
COPY ./addons/mendeley/static/ ./addons/mendeley/static/
COPY ./addons/onedrive/static/ /code/addons/onedrive/static/
COPY ./addons/osfstorage/static/ ./addons/osfstorage/static/
COPY ./addons/owncloud/static/ ./addons/owncloud/static/
COPY ./addons/s3/static/ ./addons/s3/static/
Expand Down
19 changes: 15 additions & 4 deletions addons.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
"figshare",
"forward",
"github",
"gitlab",
"mendeley",
"zotero",
"osfstorage",
"owncloud",
"onedrive",
"s3",
"twofactor",
"wiki",
Expand All @@ -24,7 +26,9 @@
"figshare": "partial",
"forward": "full",
"googledrive": "partial",
"onedrive": "partial",
"github": "partial",
"gitlab": "partial",
"owncloud": "partial",
"s3": "partial",
"wiki": "full",
Expand All @@ -37,14 +41,17 @@
"dropbox",
"figshare",
"github",
"gitlab",
"googledrive",
"owncloud",
"s3",
"bitbucket"
"bitbucket",
"onedrive"
],
"addons_based_on_ids": [
"osfstorage",
"box"
"box",
"onedrive"
],
"addons_description": {
"box": "Box is a file storage add-on. Connect your Box account to an OSF project to interact with files hosted on Box via the OSF.",
Expand All @@ -53,6 +60,7 @@
"figshare": "Figshare is an online digital repository. Connect your figshare account to share your figshare files along with other materials in your OSF project.",
"forward": "The External Link add-on allows you to provide a link to a website outside of the OSF.",
"github": "GitHub is a web-based Git repository hosting service. Connect your GitHub repo to your OSF project to share your code alongside other materials in your OSF project.",
"gitlab": "GitLab is an open-source web-based Git repository hosting tool and service. Connect your GitLab repo to your OSF project to share your code alongside other materials in your OSF project.",
"mendeley": "Mendeley is a reference management tool. Connecting Mendeley folders to OSF projects allows you and others to view, copy, and download citations that are relevant to your project from the Project Overview page.",
"zotero": "Zotero is a reference management tool. Connecting Zotero folders to OSF projects allows you and others to view, copy, and download citations that are relevant to your project from the Project Overview page.",
"osfstorage": "OSF Storage is the default storage provider for OSF projects.",
Expand All @@ -61,19 +69,22 @@
"twofactor": "Two-factor authentication is a security add-on. By using two-factor authentication, you'll protect your OSF account with both your password and your mobile phone.",
"wiki": "The wiki is a versatile communication tool. Wikis can be used to explain the main points of your project and can contain information like lab notes or contact information.",
"googledrive": "Google Drive is a file storage add-on. Connect your Google Drive account to an OSF project to interact with files hosted on Google Drive via the OSF.",
"bitbucket": "Bitbucket is a web-based Git repository hosting service. Connect your Bitbucket repo to your OSF project to share your code alongside other materials in your OSF project."
"bitbucket": "Bitbucket is a web-based Git repository hosting service. Connect your Bitbucket repo to your OSF project to share your code alongside other materials in your OSF project.",
"onedrive": "Microsoft OneDrive is a file storage add-on. Connect your Microsoft OneDrive account to an OSF project to interact with files hosted on Microsoft OneDrive via the OSF."
},
"addons_url": {
"box": "http://www.box.com",
"dataverse": "https://dataverse.harvard.edu/",
"dropbox": "http://www.dropbox.com",
"figshare": "http://www.figshare.com",
"github": "http://www.github.com",
"gitlab": "https://www.gitlab.com",
"mendeley": "http://www.mendeley.com",
"owncloud": "https://owncloud.org/",
"zotero": "http://www.zotero.org",
"s3": "https://aws.amazon.com/s3/",
"googledrive": "https://drive.google.com",
"bitbucket": "https://bitbucket.org/"
"bitbucket": "https://bitbucket.org/",
"onedrive": "https://onedrive.live.com"
}
}
11 changes: 7 additions & 4 deletions addons/base/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ def on_delete(self):


class BaseUserSettings(BaseAddonSettings):
owner = models.OneToOneField(OSFUser, blank=True, null=True, related_name='%(app_label)s_user_settings')
owner = models.OneToOneField(OSFUser, related_name='%(app_label)s_user_settings',
blank=True, null=True, on_delete=models.CASCADE)

class Meta:
abstract = True
Expand Down Expand Up @@ -347,7 +348,8 @@ def on_delete(self):


class BaseNodeSettings(BaseAddonSettings):
owner = models.OneToOneField(AbstractNode, null=True, blank=True, related_name='%(app_label)s_node_settings')
owner = models.OneToOneField(AbstractNode, related_name='%(app_label)s_node_settings',
null=True, blank=True, on_delete=models.CASCADE)

class Meta:
abstract = True
Expand Down Expand Up @@ -540,7 +542,7 @@ class GenericRootNode(object):
name = ''


class BaseStorageAddon(BaseModel):
class BaseStorageAddon(object):
"""
Mixin class for traversing file trees of addons with files
"""
Expand Down Expand Up @@ -607,7 +609,8 @@ class BaseOAuthNodeSettings(BaseNodeSettings):
# TODO: Validate this field to be sure it matches the provider's short_name
# NOTE: Do not set this field directly. Use ``set_auth()``
external_account = models.ForeignKey(ExternalAccount, null=True, blank=True,
related_name='%(app_label)s_node_settings')
related_name='%(app_label)s_node_settings',
on_delete=models.CASCADE)

# NOTE: Do not set this field directly. Use ``set_auth()``
# user_settings = fields.AbstractForeignField()
Expand Down
40 changes: 40 additions & 0 deletions addons/bitbucket/migrations/0002_auto_20170808_1140.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-08-08 16:40
from __future__ import unicode_literals
import datetime
import pytz

from django.db import migrations
import django_extensions.db.fields


class Migration(migrations.Migration):

dependencies = [
('addons_bitbucket', '0001_initial'),
]

operations = [
migrations.AddField(
model_name='nodesettings',
name='created',
field=django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, default=datetime.datetime(1970, 1, 1, 0, 0, tzinfo=pytz.utc), verbose_name='created'),
preserve_default=False,
),
migrations.AddField(
model_name='nodesettings',
name='modified',
field=django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified'),
),
migrations.AddField(
model_name='usersettings',
name='created',
field=django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, default=datetime.datetime(1970, 1, 1, 0, 0, tzinfo=pytz.utc), verbose_name='created'),
preserve_default=False,
),
migrations.AddField(
model_name='usersettings',
name='modified',
field=django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified'),
),
]
6 changes: 3 additions & 3 deletions addons/bitbucket/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def fetch_access_token(self, force_refresh=False):
return self.account.oauth_key


class UserSettings(BaseStorageAddon, BaseOAuthUserSettings):
class UserSettings(BaseOAuthUserSettings):
"""Stores user-specific bitbucket information
Quirks::
Expand All @@ -101,14 +101,14 @@ def public_id(self):
return None


class NodeSettings(BaseStorageAddon, BaseOAuthNodeSettings):
class NodeSettings(BaseOAuthNodeSettings, BaseStorageAddon):
oauth_provider = BitbucketProvider
serializer = BitbucketSerializer

user = models.TextField(blank=True, null=True)
repo = models.TextField(blank=True, null=True)
hook_id = models.TextField(blank=True, null=True)
user_settings = models.ForeignKey(UserSettings, null=True, blank=True)
user_settings = models.ForeignKey(UserSettings, null=True, blank=True, on_delete=models.CASCADE)

_api = None

Expand Down
40 changes: 40 additions & 0 deletions addons/box/migrations/0003_auto_20170713_1125.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-07-13 16:25
from __future__ import unicode_literals
import pytz

import datetime
from django.db import migrations
import django_extensions.db.fields


class Migration(migrations.Migration):

dependencies = [
('addons_box', '0002_auto_20170323_1534'),
]

operations = [
migrations.AddField(
model_name='nodesettings',
name='created',
field=django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, default=datetime.datetime(1970, 1, 1, 0, 0, tzinfo=pytz.utc), verbose_name='created'),
preserve_default=False,
),
migrations.AddField(
model_name='nodesettings',
name='modified',
field=django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified'),
),
migrations.AddField(
model_name='usersettings',
name='created',
field=django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, default=datetime.datetime(1970, 1, 1, 0, 0, tzinfo=pytz.utc), verbose_name='created'),
preserve_default=False,
),
migrations.AddField(
model_name='usersettings',
name='modified',
field=django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified'),
),
]
2 changes: 1 addition & 1 deletion addons/box/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class NodeSettings(BaseOAuthNodeSettings, BaseStorageAddon):
folder_id = models.TextField(null=True, blank=True)
folder_name = models.TextField(null=True, blank=True)
folder_path = models.TextField(null=True, blank=True)
user_settings = models.ForeignKey(UserSettings, null=True, blank=True)
user_settings = models.ForeignKey(UserSettings, null=True, blank=True, on_delete=models.CASCADE)

_api = None

Expand Down
40 changes: 40 additions & 0 deletions addons/dataverse/migrations/0003_auto_20170713_1125.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-07-13 16:25
from __future__ import unicode_literals
import pytz

import datetime
from django.db import migrations
import django_extensions.db.fields


class Migration(migrations.Migration):

dependencies = [
('addons_dataverse', '0002_auto_20170323_1534'),
]

operations = [
migrations.AddField(
model_name='nodesettings',
name='created',
field=django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, default=datetime.datetime(1970, 1, 1, 0, 0, tzinfo=pytz.utc), verbose_name='created'),
preserve_default=False,
),
migrations.AddField(
model_name='nodesettings',
name='modified',
field=django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified'),
),
migrations.AddField(
model_name='usersettings',
name='created',
field=django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, default=datetime.datetime(1970, 1, 1, 0, 0, tzinfo=pytz.utc), verbose_name='created'),
preserve_default=False,
),
migrations.AddField(
model_name='usersettings',
name='modified',
field=django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified'),
),
]
6 changes: 3 additions & 3 deletions addons/dataverse/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from framework.auth.decorators import Auth
from framework.exceptions import HTTPError
from osf.models.files import File, Folder, FileVersion, BaseFileNode
from osf.utils.auth import _get_current_user
from framework.auth.core import _get_current_user
from addons.base import exceptions
from addons.dataverse.client import connect_from_settings_or_401
from addons.dataverse.serializer import DataverseSerializer
Expand Down Expand Up @@ -74,7 +74,7 @@ class UserSettings(BaseOAuthUserSettings):
serializer = DataverseSerializer


class NodeSettings(BaseStorageAddon, BaseOAuthNodeSettings):
class NodeSettings(BaseOAuthNodeSettings, BaseStorageAddon):
oauth_provider = DataverseProvider
serializer = DataverseSerializer

Expand All @@ -83,7 +83,7 @@ class NodeSettings(BaseStorageAddon, BaseOAuthNodeSettings):
dataset_doi = models.TextField(blank=True, null=True)
_dataset_id = models.TextField(blank=True, null=True)
dataset = models.TextField(blank=True, null=True)
user_settings = models.ForeignKey(UserSettings, null=True, blank=True)
user_settings = models.ForeignKey(UserSettings, null=True, blank=True, on_delete=models.CASCADE)

@property
def folder_name(self):
Expand Down
Loading

0 comments on commit 5710186

Please sign in to comment.