Skip to content

Commit

Permalink
Merge b280009 into da34f82
Browse files Browse the repository at this point in the history
  • Loading branch information
nad2000 committed Dec 3, 2019
2 parents da34f82 + b280009 commit 72ab508
Show file tree
Hide file tree
Showing 63 changed files with 4,284 additions and 1,176 deletions.
40 changes: 40 additions & 0 deletions .gitignore
Expand Up @@ -137,4 +137,44 @@ tags.tmp
*.ps1
load_testing/*.csv
output*.json
output*.yaml
output*.html
.env.dev
.swagger-codegen-ignore
*.orig
.*.orig
*.tar.bz2
AUTHORS
CV.odt
CV/
ChangeLog
Pipfile
Pipfile.lock
*.tsv
UltiSnips/
*example_fundings*.json
*funding_sample*.json
git_push.sh
go.mod
go.sum
input.txt
load_testing/login_logout.jmx
loging_logout.jtl
makemp3.php
makemp3.txt
message.json
mypy
neovim
new.env
new.txt
old.env
old.txt
orcid_hub/highlight.css
orcid_hub/sql/auditing.sqlite.sql
output.xml
output00.yaml
pgdata__/
pom.xml
recording.xml
resources.json
rr.json
2 changes: 1 addition & 1 deletion Dockerfile
Expand Up @@ -36,7 +36,7 @@ RUN yum -y install https://centos7.iuscommunity.org/ius-release.rpm \
&& pip3.6 install -U pip \
&& pip install -U mod_wsgi psycopg2-binary \
&& pip install -U -r requirements.txt \
&& /usr/bin/mod_wsgi-express module-config >/etc/httpd/conf.modules.d/10-wsgi.conf \
&& /usr/local/bin/mod_wsgi-express module-config >/etc/httpd/conf.modules.d/10-wsgi.conf \
&& [ -d /var/run/lock ] || mkdir -p /var/run/lock \
&& [ -d /var/lock/subsys/ ] || mkdir -p /var/lock/subsys/ \
&& echo $'export LD_LIBRARY_PATH=/opt/shibboleth/lib64:$LD_LIBRARY_PATH\n' > /etc/sysconfig/shibd \
Expand Down
2 changes: 1 addition & 1 deletion Makefile
@@ -1,5 +1,5 @@
NAME = orcidhub/app
VERSION = 6.4
VERSION = 6.8

.PHONY: all build test tag

Expand Down
1 change: 1 addition & 0 deletions dev_requirements.txt
Expand Up @@ -30,3 +30,4 @@ Faker
Online-W3C-Validator>=0.3.2
twine
fakeredis
coloredlogs
8 changes: 4 additions & 4 deletions docker-compose.yml
Expand Up @@ -3,7 +3,7 @@ version: '3.5'
services:

db:
image: postgres:11.4
image: postgres:11.5
environment:
- PGPASSWORD
- POSTGRES_PASSWORD="${PGPASSWORD:-p455w0rd}"
Expand All @@ -25,7 +25,7 @@ services:
depends_on:
- db
- redis
image: orcidhub/app-dev:6.3
image: orcidhub/app-dev:6.8
environment:
- ENV
# - SHIB_SP_DOMAINNAME
Expand Down Expand Up @@ -65,7 +65,7 @@ services:
ipv4_address: ${SUBNET:-172.33}.0.88

worker:
image: orcidhub/app-dev:6.3
image: orcidhub/app-dev:6.8
depends_on:
- redis
- db
Expand All @@ -80,7 +80,7 @@ services:
restart: always

scheduler:
image: orcidhub/app-dev:6.3
image: orcidhub/app-dev:6.8
depends_on:
- redis
- db
Expand Down
14 changes: 14 additions & 0 deletions docs/sendmail.rst
Expand Up @@ -41,6 +41,20 @@ e.g., for the default container IP (172.33.0.1) add the following to **sendmail.
DAEMON_OPTIONS(`Port=smtp,Addr=172.33.0.1, Name=MTA')dnl
FEATURE(`relay_based_on_MX')dnl

For proper configuration of DMARC:

::
LOCAL_DOMAIN(`orcidhub.org.nz')dnl
FEATURE(masquerade_entire_domain)dnl
MASQUERADE_DOMAIN(orcidhub.org.nz)dnl


And setup the DMARC report recievers in /etc/aliases fiile (and rebuild it with *newaliases*), for example:

::
dmarc: someone@something.something.edu,someoneelse


Grant **relay** access from the docker container network editing
**/etc/mail/access**, e.g.:

Expand Down
8 changes: 8 additions & 0 deletions orcid_api_v3/api/development_member_api_v3_0_api.py
Expand Up @@ -6763,6 +6763,14 @@ def view_emailsv3_with_http_info(self, orcid, **kwargs): # noqa: E501

body_params = None
# Authentication setting
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/vnd.orcid+xml; qs=5', 'application/orcid+xml; qs=3', 'application/xml', 'application/vnd.orcid+json; qs=4', 'application/orcid+json; qs=2', 'application/json']) # noqa: E501

# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/vnd.orcid+xml; qs=5', 'application/orcid+xml; qs=3', 'application/xml', 'application/vnd.orcid+json; qs=4', 'application/orcid+json; qs=2', 'application/json']) # noqa: E501

auth_settings = ['orcid_auth'] # noqa: E501

return self.api_client.call_api(
Expand Down
14 changes: 9 additions & 5 deletions orcid_api_v3/models/group_id_record.py
Expand Up @@ -6,7 +6,7 @@
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: Latest
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

Expand Down Expand Up @@ -52,10 +52,14 @@ def __init__(self, name=None, group_id=None, description=None, type=None, put_co
self._type = None
self._put_code = None
self.discriminator = None
self.name = name
self.group_id = group_id
self.description = description
self.type = type
if name is not None:
self.name = name
if group_id is not None:
self.group_id = group_id
if description is not None:
self.description = description
if type is not None:
self.type = type
if put_code is not None:
self.put_code = put_code

Expand Down
10 changes: 7 additions & 3 deletions orcid_hub/__init__.py
Expand Up @@ -31,14 +31,16 @@
# disable Sentry if there is no SENTRY_DSN:
import sentry_sdk
from sentry_sdk.integrations.flask import FlaskIntegration
from sentry_sdk.integrations.redis import RedisIntegration
from sentry_sdk.integrations.rq import RqIntegration

from . import config
from .failover import PgDbWithFailover
from flask_admin import Admin
from flask_limiter import Limiter
from flask_limiter.util import get_ipaddr
from werkzeug.contrib.cache import SimpleCache
from flask_caching import Cache
# from werkzeug.contrib.cache import SimpleCache
IDENT = "$Id$"


Expand All @@ -56,12 +58,13 @@
# pass


cache = SimpleCache()
# instance_relative_config=True ## Instance directory relative to the app scrip or app module
instance_path = os.path.join(os.getcwd(), "instance")
settings_filename = os.path.join(instance_path, "settings.cfg")
app = Flask(__name__, instance_path=instance_path)
app.config.from_object(config)
cache = Cache(app)

if not app.config.from_pyfile(settings_filename, silent=True) and app.debug:
print(f"*** WARNING: Failed to load local application configuration from '{settings_filename}'")
# if "DATABASE_URL" in os.environ:
Expand Down Expand Up @@ -138,6 +141,7 @@ def default(self, o):
return super().default(o)


app.config["JSON_AS_ASCII"] = False
app.json_encoder = JSONEncoder


Expand Down Expand Up @@ -215,7 +219,7 @@ def configure_routes(self): # noqa: D102
if SENTRY_DSN:
sentry_sdk.init(
SENTRY_DSN,
integrations=[FlaskIntegration(), RqIntegration()],
integrations=[FlaskIntegration(), RqIntegration(), RedisIntegration()],
debug=app.debug,
environment=app.config.get("ENV"),
send_default_pii=True)
Expand Down

0 comments on commit 72ab508

Please sign in to comment.