Skip to content

Commit

Permalink
2.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaudis committed Dec 28, 2024
1 parent 600e133 commit c7ea2c0
Show file tree
Hide file tree
Showing 711 changed files with 425,457 additions and 9,615 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/mk-bycon-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ jobs:
- run: pip install pymdown-extensions
- run: pip install mkdocs-mermaid2-plugin
- run: pip install mdx_gh_links
- run: pip install mkdocstrings-python
- run: pip install mkdocs-include-markdown-plugin
- run: mkdocs gh-deploy --force
15 changes: 7 additions & 8 deletions .gitignore
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

4 changes: 4 additions & 0 deletions beaconServer/README.md
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.
48 changes: 48 additions & 0 deletions beaconServer/beacon.py
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()
3 changes: 3 additions & 0 deletions beaconplusWeb/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["next/babel"]
}
34 changes: 34 additions & 0 deletions beaconplusWeb/.eslintrc.json
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"
}
}
6 changes: 6 additions & 0 deletions beaconplusWeb/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "none",
"tabWidth": 2,
"semi": false,
"singleQuote": false
}
3 changes: 3 additions & 0 deletions beaconplusWeb/env/development
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/
5 changes: 5 additions & 0 deletions beaconplusWeb/env/local
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/
3 changes: 3 additions & 0 deletions beaconplusWeb/env/production
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/
5 changes: 5 additions & 0 deletions beaconplusWeb/env/staging
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
8 changes: 8 additions & 0 deletions beaconplusWeb/jest.config.js
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/"]
}
12 changes: 12 additions & 0 deletions beaconplusWeb/next.config.js
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
}
Loading

0 comments on commit c7ea2c0

Please sign in to comment.