Skip to content

Commit e3e5f40

Browse files
authored
Merge pull request #64 from arXiv/develop
Pre-release merge for submission core v0.7.1
2 parents f14552b + 265dbfa commit e3e5f40

File tree

480 files changed

+25980
-57834
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

480 files changed

+25980
-57834
lines changed

.coveragerc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ omit =
44
setup.py
55
docs/*
66
test*
7+
*/test*
78
*/app.py
89
*/wsgi.py

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ ENV/
100100
# mypy
101101
.mypy_cache/
102102

103+
.pytest_cache/
104+
103105
.DS_Store
104106

105107
submissions.tsv

.travis.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ language: python
22
sudo: required
33
services:
44
- docker
5-
cache: pip
5+
#cache: pip
66
env:
77
MIN_PYLINT_SCORE: 8
88
os:
@@ -11,10 +11,11 @@ python:
1111
- "3.6"
1212
script:
1313
- pip install pipenv
14-
- pipenv install
1514
- pipenv install --dev
16-
- pipenv run nose2 --with-coverage
17-
- tests/lint.sh
18-
- tests/docstyle.sh
15+
- pipenv install ./core
16+
- pipenv run pip show arxiv-base
17+
- pipenv run pytest --cov=agent/agent --cov=core/arxiv --cov-report=term-missing agent/agent core/arxiv
1918
after_success:
2019
- coveralls
20+
# - tests/lint.sh
21+
- tests/docstyle.sh

Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# arxiv/submission-agent
2+
3+
ARG BASE_VERSION=ARXIVNG-2462
4+
5+
FROM arxiv/base:${BASE_VERSION}
6+
7+
WORKDIR /opt/arxiv
8+
9+
ENV KINESIS_STREAM="SubmissionEvents" \
10+
KINESIS_SHARD_ID="0" \
11+
KINESIS_START_TYPE="TRIM_HORIZON" \
12+
SUBMISSION_AGENT_DATABASE_URI="" \
13+
LOGLEVEL=10 \
14+
JWT_SECRET="foo"
15+
16+
COPY Pipfile Pipfile.lock /opt/arxiv/
17+
COPY core/ /opt/arxiv/core/
18+
RUN pipenv install /opt/arxiv/core/ && rm -rf ~/.cache/pip
19+
COPY agent/agent/ /opt/arxiv/agent/
20+
21+
ENTRYPOINT ["pipenv", "run"]
22+
23+
CMD ["python", "-m", "agent.consumer"]
24+
# CMD ["celery", "worker", "-A", "agent.worker.worker_app", "--loglevel=INFO", "-E", "--concurrency=2"]

Dockerfile-metadata

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# arxiv/submission-api
22

3-
FROM arxiv/base:0.7.1
3+
FROM arxiv/base
44

55
WORKDIR /opt/arxiv
66

@@ -12,14 +12,14 @@ ENV LANG en_US.utf8
1212
RUN yum -y install mariadb-devel
1313

1414
# Add Python consumer and configuration.
15-
ADD Pipfile /opt/arxiv/Pipfile
16-
ADD Pipfile.lock /opt/arxiv/Pipfile.lock
15+
ADD metadata/Pipfile /opt/arxiv/Pipfile
1716
RUN pip install pipenv
1817
RUN pipenv install
1918

19+
ADD core/ /opt/arxiv/core/
20+
RUN pipenv install /opt/arxiv/core/
21+
2022
ADD metadata/ /opt/arxiv/
21-
ADD authorization/authorization/ /opt/arxiv/authorization/
22-
ADD core/events/ /opt/arxiv/events/
2323
ADD metadata/bin/entrypoint.sh /opt/arxiv/entrypoint.sh
2424

2525
ENV JWT_SECRET "foo"
@@ -29,5 +29,6 @@ EXPOSE 8000
2929

3030
CMD ./entrypoint.sh --http-socket :8000 -w wsgi -M \
3131
-t 3000 --manage-script-name \
32+
--buffer-size 65535 \
3233
--processes 8 --threads 1 --async 100 --ugreen \
3334
--mount /submission=wsgi.py

Pipfile

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,50 @@
11
[[source]]
2-
32
url = "https://pypi.python.org/simple"
43
verify_ssl = true
54
name = "pypi"
65

7-
86
[packages]
9-
10-
flask = "*"
11-
dataclasses = "*"
12-
pyjwt = "*"
13-
jsonschema = "*"
14-
arxiv-base = "==0.7.1"
15-
sqlalchemy = "*"
16-
pyyaml = "*"
17-
pytz = "*"
18-
uwsgi = "*"
19-
mysqlclient = "*"
20-
mimesis = "*"
21-
7+
flask = "==1.0.2"
8+
dataclasses = "==0.6"
9+
pyjwt = "==1.6.4"
10+
jsonschema = "==2.6.0"
11+
sqlalchemy = ">=1.3.0"
12+
pytz = "==2018.7"
13+
uwsgi = "==2.0.17.1"
14+
mysqlclient = "==1.3.13"
15+
mimesis = "==2.1.0"
16+
bleach = ">=3.0.2"
17+
python-dateutil = "*"
18+
unidecode = "*"
19+
celery = "==4.1.0"
20+
arxiv-auth = "==0.3.2rc5"
21+
mypy_extensions = "*"
22+
kombu = "==4.1.0"
23+
semver = "*"
24+
flask-sqlalchemy = "*"
25+
retry = "*"
26+
backports-datetime-fromisoformat = "*"
27+
arxiv-base = "==0.15.8rc4"
28+
alembic = "*"
29+
urllib3 = ">=1.24.2"
30+
Jinja2 = ">=2.10.1"
31+
pyyaml = ">=4.2b1"
32+
arxiv-vault = "==0.1.1rc15"
33+
redis = "==2.10.6"
2234

2335
[dev-packages]
24-
2536
"nose2" = "*"
2637
openapi-spec-validator = "*"
27-
coverage = "*"
38+
coverage = "==4.5"
2839
coveralls = "*"
29-
pylint = "*"
30-
pydocstyle = "*"
31-
mypy = "*"
40+
pylint = "<2"
41+
mypy = "==0.660"
3242
mimesis = "*"
43+
sphinx = "*"
44+
sphinx-autodoc-typehints = "*"
45+
pydocstyle = "==3.0.0"
46+
pytest = "*"
47+
pytest-cov = "*"
48+
49+
[pipenv]
50+
allow_prereleases = true

0 commit comments

Comments
 (0)