Git Product home page Git Product logo

bco_api's People

Contributors

acoleman2000 avatar carmstrong1gw avatar chrisarmstrong151 avatar dependabot[bot] avatar escauley avatar hadleyking avatar reeya123 avatar syntheticgio avatar tianywan819 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

syntheticgio

bco_api's Issues

Downloaded validated draft BCO missing values

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":[]}}

Validate draft

Describe the bug

For 22.06 testing. Unable to validate draft .

To Reproduce

For a BCO draft, after editing and saving the current draft.

  1. Click on 'SAVE CURRENT DRAFT'
  2. Select Display Validation
  3. Click on 'VALIDATE DRAFT'
  4. See Error message: Save Draft Failed! Error:500

Screenshots

Screen Shot 2022-06-21 at 16 53 27

[PASTE IMAGE HERE. OPTIONALLY ADD DESCRIPTION]

Desktop (please complete the following information):

MacOS Monterey - Firefox

Publish object

Users able to save as draft, however unable to publish as object---> Lack of validation process on backend prevents publishing.

Update a Prefix

Test and document /api/prefixes/update/, which updates a prefix with additional or new information.

add tk==0.1.0 to requirements.txt

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

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):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Create script to manually set object versioning numbers

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.

Return Published Object ID

When "POST /api/objects/drafts/publish/ HTTP/1.1" 200 225 the response object should at least contain the object_id for the newly created object.

Screen Shot 2021-11-16 at 7 00 38 PM

No sample BCOs bootstrapped in DB

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?

Set Prefix Permission

Document and test api/prefix/permissions/set which sets the permissions available for a specified prefix.

Published draft does not load

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

image

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)

CI pipeline for Container build & Push

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.

Delete a Prefix

Document and test api/prefix/delete which deletes a prefix for BCOs.

Get Prefixes

Document and test /api/prefixes/token/, which gets all available prefixes for a given token.

Search permissions are not correct

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.

API Object Token issue

Describe the bug

The object listing [/api/objects/token/] should only return the most RECENT version by default.

Create a Prefix

Document and test api/prefixes/create, which creates a prefix to be used to classify BCOs and to determine permissions.

Prefix Management

Test and add OpenAPI docs to the views.py file for each of the Prefix Management API endpoints:

  • api/prefixes/create Issue #61
  • api/prefixes/delete Issue biocompute-objects/portal#103
  • api/prefixes/permissions/set Issue biocompute-objects/portal#104
  • api/prefixes/token Issue biocompute-objects/portal#105
  • api/prefixes/update Issue #62

api/objects/token should not require a token

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.

CI/CD Pipeline

Add in a CI/CD pipeline that will automatically run the django (and other) tests with commits.

Playbook MVP

MVP => need a callback to implement publication

Fix for how draft items are pulled

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

API documentation

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.

Link on Account Activation Page

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.

No authorization for new account request

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:

Request

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\"}"

Response

{
  "message": "Account has been requested. Activation email was not sent. Check with your database administrator for activation of your api account"
}

Publish Draft

image

After clicking "OK", not redirected or given confirmation of publishing

image

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

Object ID Versioning

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.