Skip to content

Commit

Permalink
Release/v1.0.0 (#138)
Browse files Browse the repository at this point in the history
* fix: deployment for NODEBUG deployments

* fix: docker build added PRODUCTION and NODEBUG to collect static

* fix: install debug toolbar when not in production mode

* chore: enable x forward when PRODUCTION is set

* chore: rev proxy/nginx forwards also send ssl headers

* fix: missing ; in nging conf

* chore: always show the DEBUG TOOLBAR when in DEBUG mode

* chore: update docker compose to support switch for debug toolbar

* fix: issue with staticfiles not collected in NODEBUG mode

* chore: solve issues with debug mode

* chore: enable switch for debug in codefresh

* refactor: rename sentence description to text

* fix: static path

* fix: issue with composer image not found

* fix: issue with composer image not found

* fix: for ssl

* chore: docker-compose production use port 80

* chore: docker-compose production use port 80

* chore: set django ssl

* chore: nginx proxy redirect off

* chore: nginx proxy redirect off

* chore: nginx proxy redirect off

* #57 feat: implement conditions on sentence state transitions for guarding transitions

* #57 feat: implement sentence condition for check transition to compose_now

* #57 refactor: sentence check can_be_composed

* #47 feat: add doi to sentence and refactor doi, pmid, pmcid

* #47 refactor: remove use of format_html in admin.py

* #47 chore: ran black and isort

* #47 chore: remove some code form testing

* #47 feat: added some extra filters for sentence admin

* #47 feat: added some extra filters for connectivity statement admin

* chore: updated serializers openapi generation

* #47 chore: create genapi.sh script for generating the frontend

* #47 chore: updated openapi + js functions

* chore: added missing openapi generator

* fix: resized doi to 100

* chore: added doi to sentence list

* chore: frontend setup

* chore: change the way a user is displayed in forms

* Feature/22 (#62)

* #frontend set up
* #22 add proxy ponting to be server in package.json
* #22 feat: implement temporary development redirect on django backend server for testing
* #22 feat: log the user profile to the JS console
* #22 chore: update package-lock.json
* #22 chore: updated .gitignore
* #22 chore: some backend updates for frontend authentication
* #22 feat: connect frontend to backend login
* #22 fix: delete token on update of ORCID user
* #22 chore: update Dockerfiles to copy frontend build
* #22 refactor: nginx default.conf
* #22 chore: remove default staff assignment to new users
* #22 refactor: change sentences component to sentencedetails component
* #22 chore: logout redirects to orcid logout

Co-authored-by: Anto <“[email protected]”>

* #54 refactor: renamed *View serializers to *WithDetails

* chore: pin basePath to /

* chore: pin basePath to /

* #19 feat: Add sentence filters (#64)

* #19 feat: Add sentence filters
* #19 feat: Add connectivity_statement filters
* #19 feat: Update and add new filters
* #19 feat: Add modified date to model
* #19 feat: Add sorting options
* refactor: filters to use model and modelmultiplechoice

Co-authored-by: Zoran Sinnema <[email protected]>

* chore: pin npm packages

* fix: backend issue getting the profile when (admin) user has no profile

* chore: added /admin to do an ORCID login and redirect to /admin/

* FE-main-components: Main layout, topbar, sidebar (#65)

chore: update logo
FE-main-comp feat: Add Topbar
FE-main-components fix: app main layout
FE-main-components feat: add sidebar content and styling
Co-authored-by: Anto <“[email protected]”>

* SCKAN-32 chore: merged develop + fix merge conflicts (#66)

SCKAN-32 feat: implement dynamic rjsf forms based on the django models

* chore: enabled route to statement

* fix: issues with statement with path not being serialized

* refactor: jsonschemas from per serializer endpoint to one rest endpoint

* fix: many-to-many update fix

* feat: implement&finish rest api for notes and frontend noteform support

* chore: small connectivity statement form change: moved modified by down

* chore: formatted backend with black

* fix: composer admin

* SCKAN-40 feat: implement anatomical entities ingestion (#67)

* fix: for protected fsm state field updates through the rest api

* refactor: remove protected fsmfields from the serializer update

* chore: formatted with black

* fix: ingestion pmid, pmcid, doi set to None if empty or 0

* chore: added steps for anatomical entities ingestion to readme

* refactor: jsonschema generation

* feat: implement disabled forms depending on 'owner' of the data

* SCKAN-15 feat: implement Sentences List (#68)

SCKAN-15 feat: implement Sentences List
SCKAN-15 feat: add retrieve paginated sentence list service
SCKAN-15 feat: add home page routing subject to user profile
SCKAN-15 feat: add MUI DatGrid component at SentenceList
SCKAN-15 feat: server-side pagination at SentenceList
SCKAN-15 fix: conflicts with develop
SCKAN-15 feat: add link to sentence detail on row click
SCKAN-15 feat: WIP server-side sorting
SCKAN-15 refactor: sorting at sentence list
SCKAN-15 refactor: implement useNavigate hook
SCKAN-15 feat: add table columns and fix date format
SCKAN-15 fix: cursor style to pointer at rows
SCKAN-15 feat: add table header and theming
SCKAN-15 feat: add filter by status
SCKAN-15 feat: add Tag service
SCKAN-15 feat: implement filter by tag functionality
SCKAN-15 refact: small refact of states checkboxes
SCKAN-15 fix: small fix on pagination
SCKAN-15 chore: some minor code cleanup

---------

Co-authored-by: Anto <“[email protected]”>
Co-authored-by: Zoran Sinnema <[email protected]>

* Feature/sckan 50 (#69)

* #50 feat: WIP - Add autosave hook
* #50 feat: WIP - Update queue system
* #50 feat: Delete unnecessary hook
* #50 feat: Update useAutoSave
* #50 feat: Simplify autosave
* #50 feat: Block form while saving
* #50 feat: Replace debug values with prod
* SCKAN-50 chore: Remove deprecated dependency, deprecated schemas and schema utilities
* SCKAN-50 chore: some little tweaks on autosaving

---------

Co-authored-by: Anto <“[email protected]”>
Co-authored-by: Zoran Sinnema <[email protected]>

* chore: added () for testing backdrop in FormBase

* chore: replaced NLP Sentences by Sentences

* feat: implement disable and alert for non owners on sentence and statement

* feat: implement take owenership

* chore: a bit friendlier confirm message statement and sentence

* feat: implement tags separation from sentence and statement

* feat: implement Tag form

* Removes lodash dependency (#70)

SCKAN-50 replace lodash debounce

---------
Co-authored-by: Zoran Sinnema <[email protected]>

* SCKAN-62 feat: added batch_name and external_ref to sentence (#72)

* refactor: removed sentence and statement withdetails serializer

* chore: add try catch for ingest NLP sentence due to wrong csv format, skipping sentences with wrong format, e.g. record id 946

* SCKAN-55 refact: implement Redux for sentence states management (#71)

resolve conflicts with develop
SCKAN-55 feat: install redux and store set up
SCKAN-55 feat:add async Redux actions WIP
SCKAN-55 refact: move pagination, sorting and filter logic to redux
SCKAN-55 refac: move search logic to redux
SCKAN-55 fix: minor bug fixes
SCKAN-55 chore: add correct type to available state transistions to generate api enums for state choices
SCKAN-55 refactor: comp breakdown, leave only query options at redux store
SCKAN-55 refactor: tag filter
SCKAN-55 refactor: search, sorting, pagination

Co-authored-by: Anto <“[email protected]”>

* SCKAN-55 chore: update package-lock.json

* Feature/sckan 17 (#73)

* #SCKAN-17 feat: Fix no results alignment
* #SCKAN-17 feat: Fix no results styles
* #SCKAN-17 feat: Add autocomplete fetch
* #SCKAN-17 feat: Add swap entities
* #SCKAN-17 feat: Style duplicates table
* #SCKAN-17 feat: Remove MUI warning on swap entities
* #SCKAN-17 fix: Fix navigation on row selection
* #SCKAN-17 fix: Undo freeSolo fix
* SCKAN-17 chore: fix issues after refactor remove withdetails serializer
* #SCKAN-17 feat: Clean search on close
* #SCKAN-17 feat: Update pmid styles
* SCKAN-17 feat: also use AE aliasses for searching duplicates
* #SCKAN-17 feat: Update theme
* SCKAN-17 refactor: filter CS by AE origin/destination id
* #SCKAN-17 chore: Refactor check for duplicates components and update styles
* #SCKAN-17 feat: Fix double padding
* #SCKAN-17 feat: Align rows and cols
* SCKAN-17 chore: added check for duplicates to SentenceDetail page

---------

Co-authored-by: Zoran Sinnema <[email protected]>

* Feature/sckan 58 (#74)

* #SCKAN-58 feat: Add uri to model
* #SCKAN-58 feat: Make uri field mandatory
* #SCKAN-58 feat: Remove regex validation
* #SCKAN-58 chore: Optimize imports
* #SCKAN-58 feat: Add uri to serializer
* SCKAN-58 refactor: biological sex to be part of the statement serializer and admin and generated new frontend client
* SCKAN-58 chore: updating connectivity statement biological sex

---------

Co-authored-by: Zoran Sinnema <[email protected]>

* SCKAN-15 feat: adjust style at  Sentence list page (#75)

SCKAN-15 feat: adjust style at  sentencelist page
SCKAN-15 feat: styling pagination
SCKAN-15 feat: add custom pagination to check for duplicates
SCKAN-15 feat: sentence cell styling
SCKAN-15 feat: style last_edited column
SCKAN-15 feat: add styling to notes column at sentence list
SCKAN-15 feat: add tag styling at sentence list
SCKAN-15 feat: styling states badges
SCKAN-15 feat:add state badges at filter drawer
SCKAN-15 table headers styling
SCKAN-15 fix search input on focus style
SCKAN-15 feat: add tag input widget at tag filter
SCKAN-15 style checkbox
undo file formatting changes
SCKAN-15 fix double line effect when scrolling
SCKAN-15 chore: remove border-bottom for last row in grid
---------

Co-authored-by: Anto <“[email protected]”>
Co-authored-by: Zoran Sinnema <[email protected]>

* chore: added react types to package.json

* refactor: state into sentencestate and statementstate

* fix: change the color list of the check for duplicates to statement color list instead of sentence color list

* #SCKAN-60 feat: Update title and logo (#76)

* #SCKAN-60 feat: Update title and logo

* #SCKAN-60 feat: Update logo

* chore: changed the icon logo path

* chore: logo change for django backend

* chore: tweaked k8s config resources and probes

* chore: disable SECURE_SSL_REDIRECT

* chore: use /admin/login/ for the probes

* chore: update README

* chore: some performance optimalisations

* SCKAN-18 feat: Implement Statement List (#77)

* SCKAN-18 feat: implement statement list
SCKAN-18 feat: add statement list routing for user with triage op and curator profile
SCKAN-18 chore: create Pages directory
SCKAN-18 feat: add statement reducer at redux store
SCKAN-18 add getList at Statement Service
SCKAN-18 refactor: split datagrid from sentenceList
SCKAN-18 refactor: use EntityDataGrid component at the SentenceList
SCKAN-18 refactor: split datagrid filters from sentencelist
SCKAN-18 feat: create statement list page with working  datagrid
SCKAN-18 fix: state chip color subject to entity
SCKAN-18 feat: add subtitle and adjust caption on Statement list header
SCKAN-18 fix: searchbar input value and comment out the num of statements to be curated
SCKAN-18 feat: add initial compose_now filter on statement list
SCKAN-18 feat: add initial filter by compose_now for curators
* SCKAN-18 feat: hide draft connectivity statements from statement list

---------

Co-authored-by: Anto <“[email protected]”>
Co-authored-by: Zoran Sinnema <[email protected]>

* feat: added default filter for reviewer

* Sckan 59: refactor NLP ingestion get title (#78)

* refactor: NLP ingestion now uses the internet for title look up

* chore: added missing crossref-commons

* chore: README update pip to pip3

* chore: make ingest NLP a bit more robust

* chore: updated the dashboard message for users without any role

* refactor: for sentencelist show sentence text instead of the title

* fix: typo in runserver.sh when in dev mode

* SCKAN-66 feat: add journey compilation (#79)

* chore: updated the frontend open apiclient

* Feature/sckan 68 (#80)

* SCKAN-68 feat: WIP - Update species and tags views and serializers
* SCKAN-68 feature: set specie to readonly=False on CS serializer to allow specie subform
* SCKAN-68 chore: update frontend api client
* SCKAN-68 chore: remove specie mixin from sentence
* SCKAN-68 chore: implement specieservice for retrieving all species
* SCKAN-68 feat: WIP - Update doi serializers
* SCKAN-68 feat: Rollback dois read_only
* SCKAN-68 feat: Regenerate frontend api

---------

Co-authored-by: Zoran Sinnema <[email protected]>

* Feature/sckan 69 (#81)

* SCKAN-69 feat: Add doi schema and mixin

* SCKAN-69 feat: Update frontend api

* SCKAN-69 feat: Update frontend schema model

* SCKAN-63: Add sentence form (#82)

* SCKAN-63 feat: Add sentence dialog
* SCKAN-63 feat: add DOI field to add sentence form
* SCKAN-63 refactor: move post or put logic to service
* SCKAN-63 feat: navigate to sentence details after sucessful submission
* SCKAN-63 refactor: add optional form validation prop at FormBase
* SCKAN-63-b feat: added doi to formvalidation

---------

Co-authored-by: Anto <“[email protected]”>
Co-authored-by: Zoran Sinnema <[email protected]>

* SCKAN-71 feat: use ORCID also for the Django Admin

* SCKAN-71 feat: test on superuser exclude the admin user

* SCKAN-16 triage operator sentence details page (#84)

* SCKAN-16 add textField, textArea, buttonGroup widgets
* add on change function for all the custom components
* SCKAN-16 chore: set CS origin and destination id optional
* SCKAN-16 chore: loop over sentence connectivity statements to create all forms
* merge develop
* SCKAN-16 chore: fix issue with anonymous user
* chore: Fix frontend proxy
* remove KnowledgeStatementsForm.tsx
* add custom widget for chips input + add dois form and service
* add dois form functionality
* add NPL sentece form
* add sentece form
* add sentece form
* fix: Remove species read only attributes
* feat: Update add doi endpoint to add multiple dois
* add notes form
* add notes form style
* chore: Regenerate client api
* feat: Add biological sex GET endpoint
* add species form
* add species form
* add knowledge statemnt form
* feat: Add species name filter
* chore: Update frontend api
* update knowledge statement
* fix: Rollback serializer changes
* update/submit conectivity statement
* update form style
* SCKAN-16 chore: fix doi
* SCKAN-16 chore: specie set ontology_uri to optional
* add remove statement functionality
* SCKAN-16 fix: deletion of draft ConnectivityStatements
* SCKAN-16 chore: some base fixes for doi
* move pages folder to src
* SCKAN-16 feat: implement refresh sentence after statement or doi change
* SCKAN-16 feat: implement del of doi
* SCKAN-16 refactor: only update the statement when adding dois
* SCKAN-16 revert: update sentence on doi insert/delete
* SCKAN-16 fix: rerender dois
* Merge branch 'SCKAN-16-Triage-Operator-sentence-details-page' of https://github.com/MetaCell/sckan-composer into SCKAN-16-Triage-Operator-sentence-details-page
# Conflicts:
#	frontend/src/Pages/SentenceDetails.tsx
* SCKAN-16 fix: set the defaults for the form on useEffect
* Merge branch 'SCKAN-16-Triage-Operator-sentence-details-page' of https://github.com/MetaCell/sckan-composer into SCKAN-16-Triage-Operator-sentence-details-page
# Conflicts:
#	frontend/src/Pages/SentenceDetails.tsx
* refactor notes form component
* update delete button for statement
* add species select
* SCKAN-16 refactored the create new statement + aded required setting to customtextarea
* SCKAN-16 fix: add value to custom text input so the current value will be shown
* SCKAN-16 chore: merged species feature
* SKCAN-16 chore: reverted change of Dockerfile
* SCKAN-16 refac: separate component for statement section within sentence details page
* SCKAN-16 feat: enable save of draft statements from the frontend
* SCKAN-16 fix: issue of sentence being set to statement in sentencedetail form
* SCKAN-16 fix: clear chip input after submission
* SCKAN-16 feat: set species field as chip input
* SCKAN-16 feat: add autocomplete widget for species
* SCKAN-16 fix label styling and spacing
* SCKAN-16 feat: change autocomplete options based on selection
* SCKAN-16 feat: fix clear notes
* SCKAN-16 temporal fix: do not create statement until the user types the knowledge statement field
* SCKAN-16 fix: autocompletewithchips in case no more options are available
* SCKAN-16 refactor: ansdivisions, species and biologicalsexes list retrieval
* SCKAN-16 feat: add pmcid and doi deeplinks of sentence
* SCKAN-16 fix: ordering of notes

---------

Co-authored-by: Salam Dalloul <[email protected]>
Co-authored-by: Zoran Sinnema <[email protected]>
Co-authored-by: afonso <[email protected]>
Co-authored-by: Anto <“[email protected]”>

* feat: sentencedetails set to be reviewed when available as first action

* feat: sentencedetails set to be reviewed when available as first action, if not then use the first in the list of available transitions

* SCKAN-76 fix: sort connectivity statements array by id to display them in the correct order (#85)

Co-authored-by: Anto <“[email protected]”>

* SCKAN-96 feat: implement path chart and journey text (#87)

Co-authored-by: Anto <“[email protected]”>

* chore: updated package-lock.json

* Sckan 92 (#88)

* view notes/tags form + statement header

* SCKAN-92 fix: notes linking to statements

---------

Co-authored-by: Salam Dalloul <[email protected]>
Co-authored-by: Zoran Sinnema <[email protected]>

* SCKAN-77 fix submit form on autosave to work in Firefox and Safari (#86)

* SCKAN-77 fix: prevent referesh onsubmit in Firefox

* SCKAN-77 fix: replace programatically submit not supported by Firefox and Safari

* SCKAN-77 refactor: submit button at form base receiving props

---------

Co-authored-by: Anto <“[email protected]”>

* Sckan 99 (#89)

* view statement details header + transitions button list

* SCKAN-99 fix transition

---------

Co-authored-by: Salam Dalloul <[email protected]>

* chore: add condition for statement transition to be reviewed state

* chore: fix typo in statement spieces

* chore: moved statement condition to be reviewed from compsoe now to curated

* chore: statement move check to be reviewed to curated state

* chore: added doi uri to the rest api and the rest client

* Sckan 93 (#92)

* view statement details header + transitions button list
* SCKAN-95 view statement details
* SCKAN-95 fix style of statement details
* SCKAN-95 view/update statement details section
* SCKAN-93 view related NLP statements
* SCKAN-93 view related NLP statements

---------

Co-authored-by: Salam Dalloul <[email protected]>

* fix: issue with current statement shown in the other statement list

* feat: disable sentence form on statement details

* Feature/sckan 57 (#91)

* SCKAN-57 feat: WIP - Add export csv
* SCKAN-57 feat: Refactor export service
* SCKAN-57 feat: Use type display name; Add review notes
* SCKAN-57 feat: Add has nerve branches column
* SCKAN-57 chore: Add todos
* SCKAN-57 chore: Lint and refactor based on PR feedback
* SCKAN-57 fix: Fix export error on non existent folder
* SCKAN-57 feat: Generalize different note type
* SCKAN-57 feat: Refactor out export from command to service
* SCKAN-57 feat: Add temporary mappings for unclear rows
* SCKAN-57 chore: Apply linting
* SCKAN-57 feat: Update export_connectivity_statements definition

* SCKAN-97: implement KS at proofing tab (#93)

* SCKAN-97: implement KS at proofing tab
* chore: fix sall bug with put on CS
* chore: removed to lower on journey

---------

Co-authored-by: Anto <“[email protected]”>
Co-authored-by: Zoran Sinnema <[email protected]>

* fix: crash after adding tag to CS

* SCKAN-88 feat: implement transitions from NPO APPROVAL & EXPORTED back to COMPOSE NOW (only for staff users) (#94)

* SCKAN-82 feat: implement exported state for statement and update statement after it's been exported

* SCKAN-83 feat: implement export+download statements action in admin

* chore: updated rest api client + fixed issues with id being null

* SCKAN-75 increase the contrast of borders + view placeholder for selects components + fix style for input base placeholders (#97)

Co-authored-by: Salam Dalloul <[email protected]>

* Feature/sckan 57 continuation (#98)

* SCKAN-57 feat: Update destination type options

* SCKAN-57 chore: Fix problematic migration

* SCKAN-57 feat: Updates destination type change migrations

* Feature/sckan 80 (#99)

* SCKAN-80 feat: implement export batch + fix some small issues with exporting of newlines
* SCKAN-80 chore: removed obsolete code
* SCKAN-80 refactor: admin login url config, resolving warning urls.W003 in composer urls
* SCKAN-104 feat: implement logging of transitions of sentences and connectivity statements as notes
* SCKAN-80 feat: implement gexport batch graph

* chore: fixed composer order of migrations

* chore: fixed fix2 composer order of migrations

* chore: fixed fix3 composer order of migrations

* chore: fixed fix4 composer order of migrations

* chore: add composer to nginx proxy to django backend

* SCKAN-111 fix issue of frontend missing transitions (#100)

* SCKAN-111 fix issue of frontend missing transitions

* SCKAN-111 chore: remove exportmetrics from admin and fix issue with state having _ in the export metrix graphs

* sckan-108 added sample test and jest/puppeteer installations

* sckan-108 initial setup of the pipeline

* sckan-108 fixed dockerfile.testing

* sckan-108 remove work_dir

* sckan-108 change base build

* SCKAN-112 chore: squashed all composer migrations (#101)

* chore: added filter for has_notes check to ignore system generated notes (like transitions)

* SCKAN-98 feat: implement Paths builder (#102)

* SCKAN-98 feat: Implement Path Builder
SCKAN-98 add Path Builder container to Proofing tab
SCKAN-98 feat: add origin and destination fields at path builder
SCKAN-98 feat: make inline fields at parth builder destination row
SCKAN-98 fix destination spacing and order
SCKAN-98 feat: implement sortable table component
SCKAN-98 fix spacing at paths builder rows
SCKAN-98 improve path builder styling
SCKAN-98 add via form WIP
chore: add via type field to serializer
chore: add type to via serializer
SCKAN-98 fix select spacing
SCKAN-98 change via serializer and display path field within statement form
SCKAN-98 add via items in path builder
SCKAN-98 refactor: reuse component for destination, origin and via fields
SCKAN-98 fix path builder styling
SCKAN-98 minor fixes
SCKAN-98 implement row sorting at vias table WIP
SCKAN-98 implement via rows sorting
SCKAN-98 add disabled prop down the tree at statement details page
SCKAN-98 disable proofing tab if there is no origin and destination
SCKAN-98: remove error list on the top of the form
SCKAN-98 adapt path builder to new design
SCKAN-98 styling fixes
SCKAN-98 refactor: prevent api calls before the data is loaded
SCKAN-98 fix migration and other minors fixes
SCKAN-98 fix responsive values
* SCKAN-98 remove unused ViaForm
* SCKAN-98 rename migration

---------

Co-authored-by: Anto <“[email protected]”>

* chore: updated package-lock.json

* fix: change name prop by label at AnatomicalEntitiesField (#104)

Co-authored-by: Anto <“[email protected]”>

* linking the two together

* tests change

* added page.title fopr debugging

* timeout

* fix bug at species and path fields (#105)

Co-authored-by: Anto <“[email protected]”>

* SCKAN-89 implement changes at Distillation view (#103)

* SCKAN-89 implement changes at Distillation view
SCKAN-89 chore: change ANSDiv, Sex model name, enums of Laterality and add Projection enum field
SCKAN-89 add projection field and rename BioSex and ANSDivision to Sex and Phenotype
SCKAN-89 resolve conflicts with develop
SCKAN-89 minor fixes
* SCKAN-89 added update of laterality and projection
* minor fix on migration

---------

Co-authored-by: Anto <“[email protected]”>
Co-authored-by: Zoran Sinnema <[email protected]>

* chore: regenerate api

* chore: split migrations

* chore: fix migrations

* SCKAN-114 (#106)

* SCKAN-114 allow null on origin and destination and add border on Dois and KS fields

* fix notes background

---------

Co-authored-by: Anto <“[email protected]”>

* SCKAN-117 feat: rework CS Dois to CS Provenances (#107)

* SCKAN-117 feat: rework CS Dois to CS Provenances

* SCKAN-117 feat: add protocol to Provenance uri when not submitted

* fix paramenters order passed to provenance delete service

---------

Co-authored-by: Anto <“[email protected]”>

* added page title and url for debugging

* SCKAN-119 add additional information field at statement form (#108)

* SCKAN-119 add additional information field at statement form

* SCKAN-119 feat: added additional info to the destillationtab

---------

Co-authored-by: Anto <“[email protected]”>
Co-authored-by: Zoran Sinnema <[email protected]>

* added page title and url for debugging

* changed selector

* changed selector

* changed selector

* changed selector

* changed selector

* changed selector

* puppeteer image + waitUntil

* changed puppeteer version

* added await

* fix: crash during export due to renaming DOI to Provenance

* Feature/sckan 116: add an export CS identifier (#109)

* SCKAN-116 feat: implement export CS numbering

---------

Co-authored-by: Anto <“[email protected]”>

* chore: removed media from nginx mapping

* chore: removed media from nginx mapping

* SCKAN-79 fix: searchbar placeholder (#111)

Co-authored-by: Anto <“[email protected]”>

* SCKAN-105 feat: enable ks and provenance field at distillation and pr… (#110)

* SCKAN-105 feat: enable ks and provenance field at distillation and proofing tab
SCKAN-105 improve Provenance field style
SCKAN-105 improve KS field style
SCKAN-105 feat: enable ks and provenance field at distillation and proofing tab
SCKAN-105 open external link if provenance is a valid url
* fix: debounced onChange on controlled textarea

---------

Co-authored-by: Anto <“[email protected]”>

* SCKAN-90 fix sentence search to filter by title and text (#112)

Co-authored-by: Anto <“[email protected]”>

* SCKAN-118 feat: add important tag to CS when transition from NPO approved or Exported to Compose now (#113)

* refactor: important tag refactor

* admin workspace button to redirect to admin interface

* SCKAN-107 add tooltip on sentence hover at list page

* minor changes to text

* SCKAN-86 add api endpoint to clonate a statement

* SCKAN-86 add clone button at FE and connect to BE

* SCKAN-86 replicate Provenance and Vias at the cloned statement

* SCKAN-86 null proofing tab data on statement cloning

* SCKAN-86 disable delete and cloning KS  button for sentences at compose_now

* SKCAN-85 feat: implement changes to the autosave

SCKAN-85 disable autosave and add save onChange for dropdowns

SCKAN-85 feat: disable autosave and add saving onblur and onchange

SCKAN-85 implement autosave every 2 min for text fields-

* SCKAN-78 add requirements to can_be_compose sentence state service

* Fix: disable state button when there is no transitions available

* undo change at package json

* SCKAN-112 feat: Adds uri to phenotype model

* SCKAN-112 feat: Adds data migration to add default phenotypes

* SCKAN-112 feat: Use same timezone as db to exported filename

* feature/sckan-108 All test steps finished

* sckan-108 changed selectors and fixed import

* sckan-108 removing the test steps from codefresh yaml

* sckan-108 resolving conflicts

* sckan-108 removed unecessary file

* replace setInterval by setTimeout

* fix ks cloning to also clone species

* fixing package-lock out of sync

* SCKAN-123 add tooltip on KS column at statement list page

* SCKAN-124 fix: remove draft state from statement filter options

* SCKN-126 change phenotype on_delete to SET_NULL at statement model

* changes to the pipeline

* fixing build

* SCKAN-112 fix: Update data migration script to create or update

* SCKAN-126 add migration file from previuos phenotype field change (#129)

Co-authored-by: Anto <“[email protected]”>

* feature/SCKAN-128 implement statement ingestion command (#130)

* feature/SCKAN-128 implement statement ingestion command

SCKAN-127 neurons ingestion WIP

SCKAN-128 check if entities already exist in composer db

SCKAN-128 create artifact sentence for each of the statements to be ingested

SCKAN-128 clean unused function

SCKAN-128 fix function name

SCKAN-128 add reference_uri field

SCKAN-128 fix create reference_uri if not provided

SCKAN-128 add functiona circuit and projection phenotype fields

SCKAN-128 directory structure and create sentence changes

SCKAN-128 add alert note type and prepare data for ingestion WIP

SCKAN-128 validate and create statements

SCKAN-128 add many to many fields to new statements

SCKAN-128 add sex and spec validation and  warning for skipped phenotypes

SCKAN-128 add direct sentence transition from OPEN to COMPOSE_NOW if user is system

SCKAN-128 fix multiple provenances and add TODOs

* SCKAN-128 update anatomical_entities resources and create provenance if not provided

* SCKAN-128 refactor: replace circuit type mapping function with a constant

* SCKAN-128 add statement transition to exported

* SCKAN-128 fix do_state_transition

---------

Co-authored-by: Anto <“[email protected]”>

* fix: ingestion speed of anatomical entities

* chore: replaced function index+unique key on AE with a new Unique Functional constraint

* fix: limit the max number of characters for sentence title

* fix: missing neurodm dependency

* SCKAN-130 fix: ingest AE synonyms

* SCKAN-129 untangle relationship-predicate at export (#132)

Co-authored-by: Anto <“[email protected]”>

* SCKAN-129-b add column predicate to export file (#133)

Co-authored-by: Anto <“[email protected]”>

* chore: ingest nlp sentence changed to , as field separator (instead of ;)

* Fix export: skip projection and fcr phenotype rows if none (#134)

Co-authored-by: Anto <“[email protected]”>

* SCKAN-137 change details layout at statement details page (#135)

SCKAN-137 replace details section for accordion at statement details page

SCKAN-137 add other ks section at the bottom of statement details page

SCKAN-137 only show other ks section if any

SCKAN-137 move NLP sentence to the bottom of statement details page

Co-authored-by: Anto <“[email protected]”>

---------

Co-authored-by: Dario <[email protected]>
Co-authored-by: Anto <“[email protected]”>
Co-authored-by: Afonso Pinto <[email protected]>
Co-authored-by: Antonella Rapuano <[email protected]>
Co-authored-by: Salam Dalloul <[email protected]>
Co-authored-by: Salam Dalloul <[email protected]>
Co-authored-by: Simão sá <[email protected]>
Co-authored-by: ddelpiano <[email protected]>
  • Loading branch information
9 people authored Aug 23, 2023
1 parent 186a639 commit 6a7b022
Show file tree
Hide file tree
Showing 216 changed files with 77,499 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*/node_modules
*/build
*/*.egg*
16 changes: 16 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Composer app
PRODUCTION=False
DEBUG=True # set to True to enable debug mode
SKIP_PREFLIGHT_CHECK=true
# Django
DB_NAME=composer
DB_USER=composer
DB_PASSWORD=composer
DB_HOST=composer-db
DB_PORT=5432

# Postgres
POSTGRES_USER=${DB_USER}
POSTGRES_PASSWORD=${DB_PASSWORD}
POSTGRES_DB=${DB_NAME}
PGPORT=${DB_PORT}
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.idea
.vscode
**/__pycache__
**/*.pyc
**/*.egg-info
backend/persistent
backend/static
backend/NIF-Ontology/
backend/neurondm_comp/

49 changes: 49 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
ARG PARENT=python:3.9.15
ARG NODE_PARENT=node:18.12.1
ARG PRODUCTION
ARG DEBUG

####
FROM ${NODE_PARENT} as frontend

ENV APP_DIR=/app

WORKDIR ${APP_DIR}
COPY frontend/package.json ${APP_DIR}
COPY frontend/package-lock.json ${APP_DIR}
RUN npm ci

COPY frontend ${APP_DIR}
RUN npm run build

####
FROM ${PARENT}
ENV MODULE_NAME=backend
ENV PORT=8000
ENV WORKERS=2
ENV APP_DIR=/usr/src/app/

RUN apt update

WORKDIR ${APP_DIR}
RUN mkdir -p ${APP_DIR}static/www

RUN git clone -b neurons https://github.com/SciCrunch/NIF-Ontology.git

COPY backend/requirements.txt ${APP_DIR}
RUN pip3 install --no-cache-dir --upgrade -r requirements.txt

COPY backend/requirements.txt backend/setup.py ${APP_DIR}
RUN python3 -m pip install -e .

RUN ontutils set ontology-local-repo ./NIF-Ontology/

COPY backend ${APP_DIR}
RUN python3 manage.py collectstatic --noinput

COPY --from=frontend /app/build/* ${APP_DIR}/static/

EXPOSE ${PORT}
COPY scripts/runserver.sh /usr/local/bin
RUN chmod 0755 /usr/local/bin/runserver.sh
ENTRYPOINT /usr/local/bin/runserver.sh
16 changes: 16 additions & 0 deletions Dockerfile.testing
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM ghcr.io/puppeteer/puppeteer:16.1.0



COPY frontend/package.json .
COPY frontend/package-lock.json .

RUN npm ci

USER pptruser
COPY --chown=pptruser:pptruser frontend frontend

ENV TEST_URL=https://composer.sckan.dev.metacell.us/



126 changes: 125 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,127 @@
# sckan-composer

##
## Prerequisites

### Python

The deployment process is based on Python 3.9+ scripts. It is recommended to setup a virtual
environment first.

With venv:
```bash
python3 -m venv venv
source venv/bin/activate
```

With pyenv (get it [here](https://github.com/pyenv/pyenv)):
```bash
pyenv virtualenv 3.9.15 composer
pyenv activate composer
```

With (mini)conda (get it [here](https://docs.conda.io/en/latest/miniconda.html)):
```bash
conda create --name composer python=3.9
conda activate composer
```


### Optional: install docker and docker-compose (get it [here](https://docs.docker.com/get-docker/))

docker and docker-compose is needed to build and run the composer and
database images on a Docker virtual environment.
This step is an optional step



## Development setup

### Running locally
```bash
cd backend
# make sure your virtual env is activated
# and install the requirements
pip3 install --upgrade -r requirements.txt
# run the migrations
python3 manage.py migrate
# run the development server (https)
python3 manage.py runsslserver
```

### Running on docker with docker-compose
the command below will start a docker container that maps/uses the backend folder
into the container. It will also start the Django development server with DEBUG=True

```bash
BUILDKIT_PROGRESS=plain docker-compose -f docker-compose-dev.yaml up --build
```

to stop:
```bash
docker-compose -f docker-compose-dev.yaml down
```

### Ingest sample NLP data
The git repository comes with some sample NLP data. This data can be ingested using
the "ingest_nlp_sentence" management command

```bash
cd backend
python3 manage.py ingest_nlp_sentence ./composer/resources/nlp_connectivity_20221025.csv
```

### Ingest sample Anatomical Entities data
The git repository comes with some sampleAnatomical Entities data. This data can be ingested using
the "ingest_anatomical_entities" management command

```bash
cd backend
python3 manage.py ingest_anatomical_entities ./composer/resources/anatomical_entities.csv
```

### Open the admin page
there will be a superuser created with username/password: `admin/admin`

browse the Django [admin](http://127.0.0.1:8000/admin/) interface

### Install openapi generator

For generating the frontend api client use the openapi generator
isntall:

```bash
npm install -g @openapitools/openapi-generator-cli
```

and then run
```bash
cd frontend
./genapi.sh
```

## ORCID login setup

browse to [ORCID dev tools](https://orcid.org/developer-tools) and create a new api
configure settings.py with the new key and secret


## Production setup

Running on docker with docker-compose
the command below will start two docker containers: backend server and database server
the backend server has a persistent disk connected for it's media files
the database server has a persistent disk connected for the data

```bash
docker-compose up --build
```

to stop:
```bash
docker-compose down
```

### Open the admin page
there will be a superuser created with username/password: `admin/admin`

browse the Django [admin](http://127.0.0.1:8000/admin/) interface
Empty file added backend/backend/__init__.py
Empty file.
16 changes: 16 additions & 0 deletions backend/backend/asgi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
ASGI config for backend project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/4.1/howto/deployment/asgi/
"""

import os

from django.core.asgi import get_asgi_application

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "backend.settings")

application = get_asgi_application()
Loading

0 comments on commit 6a7b022

Please sign in to comment.