biocompute-objects / bco_api Goto Github PK
View Code? Open in Web Editor NEWThe master repository for the JSON API.
License: MIT License
The master repository for the JSON API.
License: MIT License
does not include etag generated
does not include any URIs from description or execution domain
In builder:
{
"object_id": "https://test.portal.biochemistry.gwu.edu/BCO_000006/DRAFT",
"spec_version": "https://w3id.org/ieee/ieee-2791-schema/2791object.json",
"etag": "62f5997735c5b443b76197d3b418c1ba02bd5ca0",
"provenance_domain": {
"name": "test",
"version": "1.0",
"created": "2022-04-01T18:20:09.474Z",
"modified": "2022-04-01T18:34:33.390Z",
"review": [
{
"date": "2022-04-01T18:26:25.598Z",
"status": "unreviewed",
"reviewer": {
"name": "tddd",
"affiliation": "",
"email": "[email protected]",
"contribution": [
"createdBy"
]
},
"reviewer_comment": ""
}
],
"contributors": [
{
"contribution": [
"createdBy"
],
"name": "test",
"affiliation": "GW",
"email": "[email protected]"
}
],
"license": "att4.0"
},
"usability_domain": [],
"description_domain": {
"keywords": [
"hello",
"test"
],
"platform": [
"HIVE",
"R",
"CGC"
],
"pipeline_steps": [
{
"step_number": -1,
"name": "hello",
"description": "dddddd",
"prerequisite": [
{
"name": "",
"uri": {
"uri": "https://www.test.com"
}
}
],
"input_list": [
{
"uri": "https://www.test.com"
}
],
"output_list": [
{
"uri": "https://www.test.com"
}
],
"version": ""
}
]
},
"execution_domain": {
"script": [
{
"uri": {
"uri": "https://www.test.com",
"filename": "d"
}
}
],
"script_driver": "dddd",
"software_prerequisites": [
{
"name": "et",
"version": "11.11",
"uri": {
"uri": "http://www.google.com"
}
}
],
"external_data_endpoints": [
{
"name": "google",
"url": "www.google.com"
}
],
"environment_variables": {
"dd": "dd"
}
},
"io_domain": {
"input_subdomain": [],
"output_subdomain": []
}
}
Below and here draftBCO.txt
is from downloaded draft
f{"object_id":"https://test.portal.biochemistry.gwu.edu/BCO_000006/DRAFT","spec_version":"https://w3id.org/ieee/ieee-2791-schem
a/2791object.json","etag":"","provenance_domain":{"name":"test","version":"1.0","created":"2022-04-01T18:20:09.474Z","modified"
:"2022-04-01T18:26:25.598Z","review":[{"date":"","status":"unreviewed","reviewer":{"name":"t","affiliation":"","email":"","cont
ribution":["createdBy"]},"reviewer_comment":""}],"contributors":[{"contribution":["createdBy"],"name":"test","affiliation":"GW"
,"email":"[email protected]"},{"name":"","contribution":["createdBy"],"affiliation":"","email":"","orcid":""},{"name":"","co
ntribution":["createdBy"],"affiliation":"","email":"","orcid":""},{"name":"","contribution":["createdBy"],"affiliation":"","ema
il":"","orcid":""},{"name":"","contribution":["createdBy"],"affiliation":"","email":"","orcid":""}],"license":"att4.0"},"usabil
ity_domain":[],"description_domain":{"keywords":["hello","test","api"],"platform":["HIVE","R","CGC"],"pipeline_steps":[{"step_n
umber":-1,"name":"d","description":"d","prerequisite":[{"name":"","uri":{"uri":""}}],"input_list":[{"uri":""}],"output_list":[{
"uri":""}]},{"step_number":0,"name":"","description":"","prerequisite":[{"name":"","uri":{"uri":""}}],"input_list":[{"uri":""}]
,"output_list":[{"uri":""}]},{"step_number":1,"name":"","description":"","prerequisite":[{"name":"","uri":{"uri":""}}],"input_l
ist":[{"uri":""}],"output_list":[{"uri":""}]},{"step_number":2,"name":"","description":"","prerequisite":[{"name":"","uri":{"ur
i":""}}],"input_list":[{"uri":""}],"output_list":[{"uri":""}]},{"step_number":3,"name":"","description":"","prerequisite":[{"na
me":"","uri":{"uri":""}}],"input_list":[{"uri":""}],"output_list":[{"uri":""}]}]},"execution_domain":{"script":[{"uri":{"uri":"
dd","filename":"d"}}],"script_driver":"dddd","software_prerequisites":[{"name":"","version":"","uri":{"uri":""}}],"external_dat
a_endpoints":[{"name":"","url":""}]},"io_domain":{"input_subdomain":[],"output_subdomain":[]}}
For 22.06 testing. Unable to validate draft .
For a BCO draft, after editing and saving the current draft.
[PASTE IMAGE HERE. OPTIONALLY ADD DESCRIPTION]
MacOS Monterey - Firefox
The "Open Portal in new tab" button is not responsive.
Failed to load resource: the server responded with a status of 424 (Failed Dependency)
Inspect
Meeting with @anton-golikov:
Users able to save as draft, however unable to publish as object---> Lack of validation process on backend prevents publishing.
API Unit testing is needed to be added to the django test set.
Fill out the "Desired Behavior" on the Requirements Doc. These will be used to construct the unit tests.
Test and document /api/prefixes/update/
, which updates a prefix with additional or new information.
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
Need something in best practices to make it clear that any version previous to the current version of a BCO not be edited. Temporary solution until a software feature change is implemented.
Right now we don't have a way to set object versioning numbers in the api using metafixtures.json. Someone needs to create a script to allow 1) the existing numbers to be pulled, and 2) to update a new installation of the API. This is related to creating object backups as well, which is already done in cag.sh.
Describe the bug
Doesn't appear to have any sample BCO bootstrapped in the DB. Is there another loaddata that we can run to get these? Or can this be added?
Document and test api/prefix/permissions/set
which sets the permissions available for a specified prefix.
** Fix outstanding security issues **
Upgrade urllib3 to version 1.26.5 or later.
For example, in POST_api_prefixes_permissions_set.py, there is a lot of looping to check that users exist. This is expensive and can be replaced with filters (probably added to UserUtils).
After seeing confirmation pop up of publishing,m page redirects here: https://test.portal.biochemistry.gwu.edu/objects/view/https/test.portal.biochemistry.gwu.edu/BCO_000006/1.0
react-dom.production.min.js:209 TypeError: Cannot use 'in' operator to search for 'step' in
at ParametricDomain.js:62:19
at Array.map ()
at ParametricDomain.js:61:44
at Array.map ()
at $n (ParametricDomain.js:58:15)
at Go (react-dom.production.min.js:153:146)
at vs (react-dom.production.min.js:261:496)
at lc (react-dom.production.min.js:246:265)
at sc (react-dom.production.min.js:246:194)
at Zs (react-dom.production.min.js:239:172)
es @ react-dom.production.min.js:209
ParametricDomain.js:62 Uncaught (in promise) TypeError: Cannot use 'in' operator to search for 'step' in
at ParametricDomain.js:62:19
at Array.map ()
at ParametricDomain.js:61:44
at Array.map ()
at $n (ParametricDomain.js:58:15)
at Go (react-dom.production.min.js:153:146)
at vs (react-dom.production.min.js:261:496)
at lc (react-dom.production.min.js:246:265)
at sc (react-dom.production.min.js:246:194)
at Zs (react-dom.production.min.js:239:172)
There are a number of different way to deploy software. One common way is through containerization (Docker). To facilitate this, we should generate a CI/CD pipeline action to automatically generate and push a container to the registry when a new version is minted.
Document and test api/prefix/delete
which deletes a prefix for BCOs.
Document and test /api/prefixes/token/
, which gets all available prefixes for a given token.
The evaluations for the BCO search function are too permissive. The search returns all available BCOs, and does not filter based on assigned user permissions.
Add view to search SQL database using regex.
Describe the bug
The object listing [/api/objects/token/] should only return the most RECENT version by default.
Document and test api/prefixes/create
, which creates a prefix to be used to classify BCOs and to determine permissions.
Test and add OpenAPI docs to the views.py
file for each of the Prefix Management API endpoints:
This request should return all published ones if not token is provided, all published and user ones if a token is. May need to add a separate endpoint though to do this (i.e. api/objects/published) or something like that.
Add in a CI/CD pipeline that will automatically run the django (and other) tests with commits.
MVP => need a callback to implement publication
This would be tools in the https://github.com/biocompute-objects/bcotool repo.
Currently calling an object (https://biocomputeobject.org/BCO_000001/1.5) returns a string.
Calling an object in JSON format returns a "stringified" JSON (https://biocomputeobject.org/BCO_000001/1.5?format=json)
The return function needs to be fixed so that the object returned is in JSON format with out escaped characters.
Basically allow the API to be:
<object_id>/DRAFT - for draft items
<object_id> - for published latest version
<object_id>/<object_version> - for published by version
Current API documentation is incomplete. Generated for redoc via swagger (also open api version). The full API should be documented out.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Want to avoid a GitHub scenario.
We need to program the ALLOWED_HOSTS
variable from server.conf
to be rendered for the link on the account activation page, account_activation_message.html
See this StackOverflow thread for a start.
Describe the bug
There is no authorization step for a new account request. The function only checks for the presence of the required fields.
To Reproduce
Steps to reproduce the behavior:
curl -X POST "http://localhost:8000/api/accounts/new/" -H "accept: application/json" -H "Content-Type: application/json" -H "X-CSRFToken: 1dmjFqYtwTOyCjb9xfVhVNQWs4s5E0OlupRT92h4iDuAtF1AiJ7MSYknnta5uq4s" -d "{ \"hostname\": \"http://localhost:8000\", \"email\": \"[email protected]\", \"token\": \"ImadeThisTokenUpToTestFunctionality\"}"
{
"message": "Account has been requested. Activation email was not sent. Check with your database administrator for activation of your api account"
}
After clicking "OK", not redirected or given confirmation of publishing
Failed to load resource: net::ERR_CONNECTION_TIMED_OUT
https://test.portal.biochemistry.gwu.edu/api/objects/drafts/publish/
DevTools failed to load source map: Could not load content for https://test.portal.biochemistry.gwu.edu/static/css/2.64381d14.chunk.css.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://test.portal.biochemistry.gwu.edu/static/js/2.6b61627d.chunk.js.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://test.portal.biochemistry.gwu.edu/static/js/main.2b568bb5.chunk.js.map: Load canceled due to load timeout
It is more secure to place the server configuration in a root-protected location. Would have to adjust gunicorn and the like to do this.
add meta tag Referenced in Publication
The BCO_API should handle versioning the way NCBI does for GenBank records.
For Example:
should be different object in the DB but available by requesting that specific URL or object...
but https://biocomputeobject.org/BCO_28 should ONLY return https://biocomputeobject.org/BCO_28/1.1 as that is the most RECENT version.
Also the object listing [/api/objects/token/
] should only return the most RECENT version by default.
The post migrate function to add default groups/wheel user doesn't seem to be working.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.