Skip to content

Commit

Permalink
Merge pull request #40 from qresp-code-development/develop
Browse files Browse the repository at this point in the history
New Release, v2.0.3
  • Loading branch information
mgovoni-devel authored Nov 27, 2020
2 parents aaf4210 + 21da646 commit 61f7ed4
Show file tree
Hide file tree
Showing 14 changed files with 56 additions and 30 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
language: python
matrix:
include:
- os: linux
python: 3.5
env: TOXENV=py35
- os: linux
python: 3.6
env: TOXENV=py36
- os: linux
python: 3.7
env: TOXENV=py37
- os: linux
python: 3.8
env: TOXENV=py38

before_install: |
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Change Log

## v2.0.3 (2020/11/27)

Patch Update

- Fixed missing download paths of papers after publishing on Qresp
- Fixed social preview link image display
- Other minor styling and stability improvements & bugfixes
- Dropped support for Python 3.5, only 3.6 and above supported now
## v2.0.2 (2020/11/16)

Patch Update
Expand Down
6 changes: 3 additions & 3 deletions backend/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
setuptools
jsonschema==2.6.0
jsonschema
Flask
Flask-API
Flask-Cors
Expand All @@ -10,7 +10,7 @@ Flask-Session
Flask-WTF
itsdangerous
Jinja2
mongoengine==0.19.0
mongoengine
paramiko
pre-commit
py3dns
Expand All @@ -21,7 +21,7 @@ swagger-spec-validator
swaggerpy
urllib3
validate-email
Werkzeug==0.16.0
Werkzeug
WTForms
schedule
flask-sitemap
Expand Down
12 changes: 6 additions & 6 deletions backend/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

setup(
name='qresp',
version='2.0.2',
url='http://qresp.org/',
version='2.0.3',
url='https://qresp.org/',
entry_points = {
'console_scripts': ['qresp=project.__main__:main'],
},
license='GNU',
author='Sushant Bansal, Aditya Tanikanti, Marco Govoni',
author_email='[email protected]',
description='Qresp "Curation and Exploration of Reproducible Scientific Papers" is a Python application that facilitates the organization, annotation and exploration of data presented in scientific papers. ',
python_requires='>=3.5',
python_requires='>=3.6',
packages=find_packages(),
install_requires=[
'flask_api',
Expand All @@ -23,12 +23,12 @@
'flask-mongoengine',
'Flask-Session',
'Flask-WTF',
'mongoengine==0.19.0',
'mongoengine',
'cryptography',
'jinja2',
'jsonschema==2.6.0',
'jsonschema',
'pyOpenSSL',
'werkzeug==0.16.0',
'werkzeug',
'itsdangerous',
'python-dateutil',
'expiringdict',
Expand Down
7 changes: 4 additions & 3 deletions frontend/Context/Curator/CuratorState.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import CuratorContext from "./curatorContext";
import WebStore from "../../Utils/Persist";

import {
SET_ALL,
SET_CURATOR_STATE,
SET_CURATORINFO,
SET_FILESERVERPATH,
SET_PAPERINFO,
Expand Down Expand Up @@ -83,9 +83,10 @@ const CuratorState = (props) => {
]);
}, [state.charts, state.scripts, state.datasets, state.tools, state.heads]);

const setAll = (data) => dispatch({ type: SET_ALL, payload: data });
const setAll = (data) => dispatch({ type: SET_CURATOR_STATE, payload: data });

const resetAll = () => dispatch({ type: SET_ALL, payload: initialState });
const resetAll = () =>
dispatch({ type: SET_CURATOR_STATE, payload: initialState });

const setCuratorInfo = (info) =>
dispatch({ type: SET_CURATORINFO, payload: info });
Expand Down
4 changes: 2 additions & 2 deletions frontend/Context/Curator/curatorReducer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
SET_CURATOR_STATE,
SET_CURATORINFO,
SET_ALL,
SET_FILESERVERPATH,
SET_PAPERINFO,
SET_REFERENCE_AUTHORS,
Expand All @@ -24,7 +24,7 @@ export default (state, action) => {
...state,
curatorInfo: action.payload,
};
case SET_ALL:
case SET_CURATOR_STATE:
return action.payload;
case SET_FILESERVERPATH:
return { ...state, fileServerPath: action.payload };
Expand Down
18 changes: 17 additions & 1 deletion frontend/Context/Servers/ServerState.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import serverReducer from "./serverReducer";
import servers from "../../data/qresp_servers";
import httpServers from "../../data/http_servers";

import { SET_SELECTED, SET_SELECTED_HTTP } from "../types";
import { SET_SELECTED, SET_SELECTED_HTTP, SET_SERVER_STATE } from "../types";

import WebStore from "../../Utils/Persist";

const ServerState = (props) => {
const initialState = {
Expand All @@ -17,6 +19,20 @@ const ServerState = (props) => {

const [state, dispatch] = useReducer(serverReducer, initialState);

useEffect(() => {
const data = WebStore.get("srvr");
if (data !== null) {
setServerState(data);
}
}, []);

useEffect(() => {
WebStore.set("srvr", state);
}, [state]);

const setServerState = (state) =>
dispatch({ type: SET_SERVER_STATE, payload: state });

const setSelected = (selected) => {
dispatch({ type: SET_SELECTED, payload: selected });
};
Expand Down
4 changes: 3 additions & 1 deletion frontend/Context/Servers/serverReducer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { SET_SELECTED, SET_SELECTED_HTTP } from "../types";
import { SET_SELECTED, SET_SELECTED_HTTP, SET_SERVER_STATE } from "../types";

export default (state, action) => {
switch (action.type) {
case SET_SERVER_STATE:
return action.payload;
case SET_SELECTED:
return { ...state, selected: action.payload };
case SET_SELECTED_HTTP:
Expand Down
3 changes: 2 additions & 1 deletion frontend/Context/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const SHOW_LOADER = "SHOW_LOADER";
export const HIDE_LOADER = "HIDE_LOADER";

// Server Actions
export const SET_SERVER_STATE = "SET_SERVER_STATE";
export const SET_SELECTED = "SET_SELECTED";
export const SET_SELECTED_HTTP = "SET_SELECTED_HTTP";

Expand All @@ -25,7 +26,7 @@ export const SET_CHILDREN = "SET_CHILDREN";
export const SET_TITLE = "SET_TITLE";

// Curator Actions
export const SET_ALL = "SET_ALL";
export const SET_CURATOR_STATE = "SET_CURATOR_STATE";
export const SET_CURATORINFO = "SET_CURATORINFO";
export const SET_FILESERVERPATH = "SET_FILESERVERPATH";
export const SET_PAPERINFO = "SET_PAPERINFO";
Expand Down
4 changes: 2 additions & 2 deletions frontend/components/CuratorForms/ReferenceInfoForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const ReferenceInfoForm = ({ editor }) => {
.required("Required"),
year: Yup.number()
.min(1750, "Cannot be less than 1700")
.integer("Plese enter a valid year")
.required("Required"),
url: Yup.string().url("Please enter a valid url"),
});
Expand Down Expand Up @@ -351,11 +352,10 @@ const ReferenceInfoForm = ({ editor }) => {
placeholder="Enter url"
name="url"
helperText="Enter paper url"
label="URLs"
label="URL"
inputRef={register}
error={errors.url}
defaultValue={referenceInfo.url}
required
/>
</Grid>
<Grid item>
Expand Down
5 changes: 1 addition & 4 deletions frontend/components/seo.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ const SEO = (props) => {
<title>{title}</title>
<meta property="og:title" content={title} key="title" />
<meta property="og:description" content={description} key="description" />
<meta
property="og:image"
content="https://github.com/anti-mony/qresp/raw/ReWrite/frontend/public/images/QrespLogoDark.png"
/>
<meta property="og:image" content="/images/QrespLogoColor.png" />
<meta property="og:type" content="website" key="type" />
{author ? (
<meta property="twitter:creator" content={author} key="twitterauthor" />
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "qresp",
"version": "2.0.2",
"version": "2.0.3",
"private": true,
"scripts": {
"dev": "next dev",
Expand Down
7 changes: 4 additions & 3 deletions frontend/pages/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Container, Typography, Box, Divider } from "@material-ui/core";

import SEO from "../components/seo";

import { SmallStyledButton } from "../components/button";
import { RegularStyledButton } from "../components/button";
import RecordTable from "../components/Table/Table";
import AdvancedSearch from "../components/AdvancedSearch";
import Summary from "../components/Paper/Summary";
Expand Down Expand Up @@ -96,7 +96,7 @@ const search = ({ initialdata, error, selectedservers }) => {
setAlert(
"Search Error !",
error.msg,
<SmallStyledButton onClick={refresh}>Retry</SmallStyledButton>
<RegularStyledButton onClick={refresh}>Retry</RegularStyledButton>
);
}
}, []);
Expand Down Expand Up @@ -145,9 +145,10 @@ export async function getServerSideProps(ctx) {
};

if (!query.servers || query.servers.length == 0) {
error.is = true;
error["msg"] = "No servers selected to be searched";
return {
props: { initialdata: data, error: true, servers: query.servers },
props: { initialdata: data, error: error, servers: null },
};
}

Expand Down
Binary file added frontend/public/images/QrespLogoColor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 61f7ed4

Please sign in to comment.