Skip to content

Commit

Permalink
Merge pull request #1 from QuaererePlatform/release/0.2.1
Browse files Browse the repository at this point in the history
Release/0.2.1
  • Loading branch information
ravenoak committed Oct 26, 2019
2 parents 0cf0d05 + 7651a9f commit ae7ace3
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 12 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.0
0.2.1
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Generated file, do not edit
marshmallow>=2.16.0,<3
quaerere-base-common
marshmallow<3,>=2.16.0
quaerere-base-common>=0.1.1
pytest-runner
Sphinx>=1.8.0,<2
Sphinx<2,>=1.8.0
sphinx-rtd-theme
setuptools
pytest>=4.2.0
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.2.0
current_version = 0.2.1
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)((?P<pre_release>\.dev|a|b|rc)(?P<pre_release_num>\d+))?
serialize =
{major}.{minor}.{patch}{pre_release}{pre_release_num}
Expand Down
18 changes: 13 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,28 @@
"""Setup for the willamette micro-service, part of the Quaerere Platform
"""
import os
import re
import sys

from setuptools import setup
from setuptools.command.install import install

PROJECT_NAME = 'quaerere-willamette-common'
INSTALL_REQUIRES = [
'marshmallow>=2.16.0,<3',
'quaerere-base-common', ]
'marshmallow<3,>=2.16.0',
'quaerere-base-common>=0.1.1',
]
SETUP_REQUIRES = [
'pytest-runner',
'Sphinx>=1.8.0,<2',
'Sphinx<2,>=1.8.0',
'sphinx-rtd-theme',
'setuptools']
'setuptools',
]
TESTS_REQUIRES = [
'pytest>=4.2.0',
'pytest-cov>=2.6.0',
'pytest-flake8', ]
'pytest-flake8',
]


def get_version():
Expand All @@ -38,6 +42,10 @@ class VerifyVersionCommand(install):
description = 'verify that the git tag matches our version'

def run(self):
release_regex = re.compile(r'^[0-9]+\.[0-9]+\.[0-9]+$')
if not release_regex.match(PROJECT_RELEASE):
sys.exit(0)

tag = os.getenv('CIRCLE_TAG')

if tag != 'v' + PROJECT_RELEASE:
Expand Down
6 changes: 6 additions & 0 deletions willamette_common/schemas/api_v1/mixins/common.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from marshmallow import fields


class SourceAccounting:
data_origin = fields.String(required=True)
datetime_acquired = fields.DateTime()
5 changes: 4 additions & 1 deletion willamette_common/schemas/api_v1/mixins/web_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

from marshmallow import fields

from .common import SourceAccounting


class WebPageFieldsMixin:
text = fields.String()
source_accounting = fields.Nested(SourceAccounting, required=True)
text = fields.String(required=True)
url = fields.Url(required=True)
web_site_key = fields.String(required=True)
5 changes: 4 additions & 1 deletion willamette_common/schemas/api_v1/mixins/web_sites.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

from marshmallow import fields

from .common import SourceAccounting


class WebSiteFieldsMixin:
inLanguage = fields.String(allow_none=True)
source_accounting = fields.Nested(SourceAccounting, required=True)
url = fields.Url(required=True)
inLanguage = fields.String()

0 comments on commit ae7ace3

Please sign in to comment.