Skip to content

Commit

Permalink
Merge pull request #63 from RockefellerArchiveCenter/v0.4
Browse files Browse the repository at this point in the history
v0.4
  • Loading branch information
helrond authored Oct 21, 2019
2 parents a726341 + 08b1f01 commit 338fb5b
Show file tree
Hide file tree
Showing 16 changed files with 849 additions and 682 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ local_settings.py
db.sqlite3
media
env/
static/
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,6 @@ aquarius has six services, all of which are exposed via HTTP endpoints (see [Rou
|GET|/schema.json||200|Returns the OpenAPI schema for this application|


### Logging

aquarius uses `structlog` to output structured JSON logs. Logging can be configured in `aquarius/settings.py`.


### ArchivesSpace configuration

In order to successfully save data to ArchivesSpace, you will have to make some changes to some of the default enumerations:
Expand Down
2 changes: 2 additions & 0 deletions aquarius/config.py.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
DEBUG = True

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
Expand Down
17 changes: 1 addition & 16 deletions aquarius/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"""

import os
import structlog
import aquarius.config as CF

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
Expand All @@ -25,7 +24,7 @@
SECRET_KEY = '9d*g(#ya!0ho+l+ela_y0$zs@k)h1f0#p*bi9520l0h$u)7go0'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
DEBUG = CF.DEBUG

ALLOWED_HOSTS = CF.ALLOWED_HOSTS

Expand All @@ -40,7 +39,6 @@
'django.contrib.staticfiles',
'rest_framework',
'health_check',
'drf_yasg',
'transformer',
]

Expand Down Expand Up @@ -129,16 +127,3 @@
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
'PAGE_SIZE': 25,
}

structlog.configure(
processors=[
structlog.stdlib.add_logger_name,
structlog.stdlib.add_log_level,
structlog.stdlib.PositionalArgumentsFormatter(),
structlog.processors.StackInfoRenderer(),
structlog.processors.format_exc_info,
structlog.processors.UnicodeDecoder(),
structlog.processors.TimeStamper(fmt='iso', utc=True),
structlog.processors.JSONRenderer()
],
)
17 changes: 5 additions & 12 deletions aquarius/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,14 @@
from transformer.models import Package
from transformer.views import *
from rest_framework import routers
from drf_yasg.views import get_schema_view
from drf_yasg import openapi
from rest_framework.schemas import get_schema_view

router = routers.DefaultRouter()
router.register(r'packages', PackageViewSet, 'package')

schema_view = get_schema_view(
openapi.Info(
title="Aquarius API",
default_version='v1',
description="API for Aquarius.",
contact=openapi.Contact(email="[email protected]"),
license=openapi.License(name="MIT License"),
),
validators=['flex', 'ssv'],
public=True,
description="Endpoints for Aquarius microservice application."
)

urlpatterns = [
Expand All @@ -43,8 +35,9 @@
url(r'^grouping-components/', ProcessGroupingComponentsView.as_view(), name="grouping-components"),
url(r'^transfer-components/', ProcessTransferComponentsView.as_view(), name="transfer-components"),
url(r'^digital-objects/', ProcessDigitalObjectsView.as_view(), name="digital-objects"),
url(r'^send-update/', UpdateRequestView.as_view(), name="send-update"),
url(r'^send-update/', TransferUpdateRequestView.as_view(), name="send-update"),
url(r'^send-accession-update/', AccessionUpdateRequestView.as_view(), name="send-accession-update"),
url(r'^status/', include('health_check.api.urls')),
url(r'^admin/', admin.site.urls),
url(r'^schema(?P<format>\.json|\.yaml)$', schema_view.without_ui(cache_timeout=None), name='schema-json'),
url(r'^schema/', schema_view, name='schema'),
]
300 changes: 300 additions & 0 deletions fixtures/cassettes/send_accession_update.json

Large diffs are not rendered by default.

48 changes: 17 additions & 31 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,50 +1,36 @@
ArchivesSnake==0.3.0
attrs==18.1.0
boltons==18.0.0
certifi==2018.4.16
ArchivesSnake==0.8.2
attrs==19.1.0
boltons==19.1.0
certifi==2018.8.24
chardet==3.0.4
click==6.7
clinner==1.9.4
colorama==0.3.9
clinner==1.12.3
colorlog==3.1.4
coreapi==2.3.3
coreschema==0.0.4
Django==2.0.13
django-common-helpers==0.9.1
djangorestframework==3.9.1
drf-yasg==1.11.0
Django==2.2.5
djangorestframework==3.10.2
ElectronBonder==0.5
flex==6.14.0
future==0.16.0
git+https://github.com/RockefellerArchiveCenter/[email protected]#egg=asterism
gitdb2==2.0.3
GitPython==2.1.9
health-check==3.4.1
idna==2.6
inflection==0.3.1
idna==2.7
iso-639==0.4.5
iso8601==0.1.12
itypes==1.1.0
Jinja2==2.10.1
jsonpointer==1.14
jsonschema==2.6.0
MarkupSafe==1.0
multidict==4.3.1
openapi-codec==1.3.2
more-itertools==7.2.0
multidict==4.5.2
psycopg2-binary==2.7.4
pytz==2018.4
PyYAML==4.2b4
requests==2.20.0
pytz==2019.2
PyYAML==5.1.2
requests==2.22.0
rfc3987==1.3.7
ruamel.yaml==0.15.37
six==1.11.0
smmap2==2.0.3
strict-rfc3339==0.7
structlog==18.1.0
swagger-spec-validator==2.1.0
uritemplate==3.0.0
urllib3==1.24.2
uuid==1.30
validate-email==1.3
vcrpy==1.11.1
urllib3==1.25.3
vcrpy==2.1.0
wrapt==1.10.11
yarl==1.2.4
yarl==1.3.0
Loading

0 comments on commit 338fb5b

Please sign in to comment.