-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from qresp-code-development/develop
New Release, v2.0.0
- Loading branch information
Showing
498 changed files
with
23,281 additions
and
1,062 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
__pycache__ | ||
.pytest_cache | ||
.vscode | ||
.next | ||
flask_session | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM python:3.6-alpine | ||
|
||
# Add to dump logs to file without buffering | ||
ENV PYTHONUNBUFFERED 1 | ||
|
||
# install ca-certificates so that HTTPS works consistently | ||
# the other runtime dependencies for Python are installed later | ||
RUN apk add --no-cache ca-certificates | ||
|
||
# Create the working directory (and set it as the working directory) | ||
RUN mkdir -p /home/flask/app/web | ||
WORKDIR /home/flask/app/web | ||
|
||
# Install the package dependencies | ||
RUN apk add --no-cache curl pkgconfig openssl-dev libffi-dev musl-dev make gcc libxslt-dev | ||
RUN pip install lxml | ||
|
||
|
||
COPY requirements.txt /home/flask/app/web | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
# Copy the source code into the container | ||
COPY . /home/flask/app/web | ||
COPY project/static /usr/src/app/web/project/static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM python:3.6-alpine | ||
|
||
# Add to dump logs to file without buffering | ||
ENV PYTHONUNBUFFERED 1 | ||
|
||
# install ca-certificates so that HTTPS works consistently | ||
# the other runtime dependencies for Python are installed later | ||
RUN apk add --no-cache ca-certificates | ||
|
||
# Create the working directory (and set it as the working directory) | ||
RUN mkdir -p /home/flask/app/web | ||
WORKDIR /home/flask/app/web | ||
|
||
# Install the package dependencies | ||
RUN apk add --no-cache curl pkgconfig openssl-dev libffi-dev musl-dev make gcc libxslt-dev | ||
RUN pip install lxml | ||
|
||
|
||
COPY requirements.txt /home/flask/app/web | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
# Copy the source code into the container | ||
COPY . /home/flask/app/web | ||
COPY project/static /usr/src/app/web/project/static |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Publish | ||
|
||
## How was it done | ||
|
||
In upto release 1.2.2, there was a strong dependence on Google services because that was the authentication/verification method. | ||
|
||
Basically, on publish we would ask the user to login using a google account and if successful we publish. | ||
|
||
## How it's done currently | ||
|
||
Now, we generate a publish link and send it to the user's email. And when the user clicks on that link in the mailm, it redirects to Qresp and the paper is published. | ||
|
||
## Why ? | ||
|
||
No Google dependence anymore, more fluent. We maintain most of the routes, people with their university emails can curate and publish. | ||
|
||
## Technically | ||
|
||
Let's talk about exaclt what'll happen when the user clicks the publish button | ||
|
||
### Flow | ||
|
||
1. On click, the data comes in a json format as defined in the schema at the route `/api/publish`. We store that data temporarily in the publish folder on disk (This needs to be database in the future, really). | ||
2. We process the data and send back a verify(or the actual) publish link to the curator via email. | ||
3. If there are any errors the user is provided with the error and no email is sent. | ||
|
||
4. The user clicks on the link in the url in the email and is redirected to the GUI of the instance. The link would be like `instance/publish/{id}`, the frontend then takes in the id, calls the api at `/api/verify/{id}`. This is where we nmotify the user that paper is successfully published or if there was error. | ||
|
||
## Contributing | ||
|
||
Always welcome, thanks. Suggestions, pull requests welcome. If you find a bug please, open on issue on Github. |
Oops, something went wrong.