-
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.
- Loading branch information
Showing
711 changed files
with
425,457 additions
and
9,615 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
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 |
---|---|---|
@@ -1,18 +1,17 @@ | ||
.DS_Store | ||
rsrc/remnants | ||
*remnants | ||
remnants | ||
*~lock* | ||
*.ods# | ||
*__pycache__* | ||
site | ||
logs | ||
build | ||
bycon.egg-info | ||
dist | ||
bycon/beaconServer/local/* | ||
.idea/bycon.iml | ||
.idea/misc.xml | ||
.idea/vcs.xml | ||
.idea/bycon.iml | ||
.idea/bycon.iml | ||
.idea/misc.xml | ||
.idea/vcs.xml | ||
.idea | ||
beaconplusWeb/.next | ||
beaconplusWeb/node_modules | ||
beaconplusWeb/out | ||
|
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,4 @@ | ||
## `bycon/beaconServer` directory | ||
|
||
This directory contains the Beacon app, calling the individual v2 | ||
endpoints. |
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,48 @@ | ||
#!/usr/local/bin/python3 | ||
|
||
from bycon import ( | ||
BYC, | ||
BeaconDataResponse, | ||
BeaconErrorResponse, | ||
BeaconInfoResponse, | ||
prdbug, | ||
print_json_response | ||
) | ||
|
||
################################################################################ | ||
|
||
def main(): | ||
""" | ||
The type of execution depends on the requested entity defined in the | ||
`request_entity_path_id` (or aliases) in `entity_defaults`. | ||
The entity is determined from different potential inputs and overwritten | ||
by the next one in the order, if existing: | ||
1. from the path (element after "beacon", e.g. `biosamples` from | ||
`/beacon/biosamples/...`) | ||
2. from a form value, e.g. `?requestEntityPathId=biosamples` | ||
3. from a command line argument, e.g. `--requestEntityPathId biosamples` | ||
Fallback is `/info` - so the 422 shouldn't be a thing... | ||
""" | ||
|
||
b_r_c = BYC.get("bycon_response_class", "___none___") | ||
|
||
r = None | ||
if b_r_c == "BeaconInfoResponse": | ||
r = BeaconInfoResponse().populatedInfoResponse() | ||
elif b_r_c == "BeaconDataResponse": | ||
r = BeaconDataResponse().dataResponseFromEntry() | ||
BeaconErrorResponse().respond_if_errors() | ||
if r: | ||
print_json_response(r) | ||
|
||
BYC["ERRORS"].append("No correct service path provided. Please refer to the documentation at http://docs.progenetix.org") | ||
BeaconErrorResponse().respond_if_errors() | ||
|
||
|
||
################################################################################ | ||
################################################################################ | ||
|
||
if __name__ == '__main__': | ||
main() |
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,3 @@ | ||
{ | ||
"presets": ["next/babel"] | ||
} |
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,34 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2020": true, | ||
"jest": true, | ||
"node": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:react-hooks/recommended" | ||
], | ||
"parserOptions": { | ||
"ecmaFeatures": { | ||
"jsx": true | ||
}, | ||
"ecmaVersion": 11, | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["react"], | ||
"rules": { | ||
"react/react-in-jsx-scope": "off", | ||
"react/prop-types": "off", | ||
"no-unused-vars": [ | ||
"error", | ||
{ | ||
"ignoreRestSiblings": true | ||
} | ||
] | ||
}, | ||
"globals": { | ||
"React": "writable" | ||
} | ||
} |
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 @@ | ||
{ | ||
"trailingComma": "none", | ||
"tabWidth": 2, | ||
"semi": false, | ||
"singleQuote": false | ||
} |
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,3 @@ | ||
NEXT_PUBLIC_API_PATH=/api/ | ||
NEXT_PUBLIC_USE_PROXY=true | ||
NEXT_PUBLIC_SITE_URL=http://beaconplus.test/ |
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,5 @@ | ||
SERVER=http://beaconplus.test/ | ||
NEXT_PUBLIC_API_PATH=http://beaconplus.test/ | ||
NEXT_PUBLIC_PREFETCH_API_PATH=http://beaconplus.test/ | ||
NEXT_PUBLIC_USE_PROXY=false | ||
NEXT_PUBLIC_SITE_URL=http://beaconplus.test/ |
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,3 @@ | ||
NEXT_PUBLIC_API_PATH=/ | ||
NEXT_PUBLIC_USE_PROXY=false | ||
NEXT_PUBLIC_SITE_URL=https://beaconplus.progenetix.org/ |
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,5 @@ | ||
SERVER=https://staging.beaconplus.org/ | ||
NEXT_PUBLIC_API_PATH=/ | ||
NEXT_PUBLIC_PREFETCH_API_PATH=$SERVER | ||
NEXT_PUBLIC_USE_PROXY=false | ||
NEXT_PUBLIC_SITE_URL=$SERVER |
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,8 @@ | ||
module.exports = { | ||
collectCoverageFrom: ["**/*.{js,jsx}", "!**/node_modules/**"], | ||
testPathIgnorePatterns: ["/node_modules/", "/.next/"], | ||
transform: { | ||
"^.+\\.(js|jsx)$": "<rootDir>/node_modules/babel-jest" | ||
}, | ||
transformIgnorePatterns: ["/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module.exports = { | ||
// eslint-disable-next-line no-unused-vars | ||
webpack(config, options) { | ||
config.module.rules.push({ | ||
test: /\.ya?ml$/, | ||
use: "js-yaml-loader" | ||
}) | ||
return config | ||
}, | ||
trailingSlash: true, | ||
productionBrowserSourceMaps: true | ||
} |
Oops, something went wrong.