Skip to content

Commit

Permalink
feat: release (#55)
Browse files Browse the repository at this point in the history
* feat: put endpoint for updating user details

* style: 🎨 fix code style issues with Black

* fix: updated readme

* fix: updated readme

* style: 🎨 fix code style issues with Black

* feat: user details endpoint combines user and user_details table

* refactor: add marshal_with and success model ex for get

* refactor: update spacing for favicon.ico

* chore: remove print statements

* refactor: update username as email if no username

* style: 🎨 fix code style issues with Black

* fix: alembic dir

* style: 🎨 fix code style issues with Black

* refactor: prevent email and username from being changed, comments added

* style: 🎨 fix code style issues with Black

* feat: add revision

* style: 🎨 fix code style issues with Black

* style: formatting

* fix: unused imports

* fix: unused imports and assignments

* fix: auth permission for admin

* fix: fixed flake8 errors

* fix: added string types to models

* fix: update arg types in models/functions

* fix: flake8

* style: 🎨 fix code style issues with Black

* fix: typecheck errors

* fix: typecheck errors for apis

* fix: typecheck errors for apis dataset metadata

* fix: update token exp time

* fix: typecheck errors

* style: 🎨 fix code style issues with Black

* fix: typecheck errors

* style: 🎨 fix code style issues with Black

* fix: union types

* fix: lint error

* fix: lint and flake8 errors

* fix: lint and flake8 errors

* fix: union types

* style: 🎨 fix code style issues with Black

* fix: union types

* fix: none type

* fix: pylint errors

* style: 🎨 fix code style issues with Black

* fix: pylint errors

* fix: pylint errors

* feat: pytest (#13)

* fix: allow config from pytest to be ran in app.py

* dx: ignore deprecation warnings with pytest

* feat: update tests for server, study api

* dx: ignore dependency warnings for all pytest commands

* style: 🎨 fix code style issues with Black

* wip: adding more tests to pytest

* feat: added pyfixture for test_client

* feat: have create_app use pytest-config or config based on testing

* feat: use pytest-config for pytest

* chore: clean app.py

* feat: setup tests and fixtures for study api, create dataset api tests

* wip: share pytest fixtures across tests with updated value

* style: 🎨 fix code style issues with Black

* feat: clear database fixture for testing

* feat: pytest functions added for study, study metadata, datasets

* style: 🎨 fix code style issues with Black

* fix: study arm from new entry is patched

* fix: patched and cleaned arm metadata api (post)

* chore: clean test study api file

* feat: track arm id

* feat: tests added for central contact, ipd, arm metadata

* feat: track arm id through testing

* feat: added file for dataset metadata testing

* fix: removed for loop and just check for id one time for POST cc endpoint

* feat: tests added for collab, cond, desc, design, eligi, id, inter, ipd, link

* style: 🎨 fix code style issues with Black

* fix: central contact tests fixed, one found bug in response

* feat: global variables added for study metadata tests

* chore: remove print statements

* refactor: /study POST endpoint returns content rather than 204

* wip: modifying login to handle config file for pytest

* wip: reworking pytest to login in user once for testing

* style: 🎨 fix code style issues with Black

* refactor: allow login to use different configuration for testing

* style: 🎨 fix code style issues with Black

* refactor: use FAIRHUB_SECRET rather than secret for configuration

* refactor: create user right after database is cleared

* refactor: isort tests folder

* fix: resolve unused arguments for pylint

* chore: remove prints

* feat: add description and payload requirements to ipd endpoint in swagger

* feat: add description and payload requirements to arm endpoint in swagger

* feat: add more tests for pytest

* style: 🎨 fix code style issues with Black

* feat: POST, PUT, DELETE tests added for study metadata

* style: 🎨 fix code style issues with Black

* feat: more tests added for study metadata

* style: 🎨 fix code style issues with Black

* fix: fix intervention metadata test

* chore: gather information on endpoints that aren't working

* fix: failed tests corrected

* 🚨 fix: fix all linter warnings

* 🐛 fix: update secret config

* 👷 ci: add test workflow

* 💚 test: ci workflow

---------

Co-authored-by: Lint Action <[email protected]>
Co-authored-by: Sanjay Soundarajan <[email protected]>

* 👷 ci: update docker compose file

* 💚 ci: add cors route

* 💚 ci: add cors route

* 💚 ci: add cors route

* 💚 ci: add cors route

* 💚 ci: add cors route

* 💚 ci: add cors route

* 💚 ci: add cors route

* 💚 ci: add cors route

* 💚 ci: add cors route

* 💚 ci: add cors route

* feat: add jsonschema validation for backend (#15)

* feat: validation schema for sign up endpoint

* style: 🎨 fix code style issues with Black

* feat: validate email with email_validator

* feat: schema validation for login

* feat: schema validation for user details PUT

* feat: POST, PUT schemas added for /study endpoint

* feat: schema validation added for arm metadata

* style: 🎨 fix code style issues with Black

* feat: schema validation for available ipd

* style: 🎨 fix code style issues with Black

* feat: study contact schema validation added

* feat: schema validation for collaborators

* style: 🎨 fix code style issues with Black

* feat: conditions schema validation added"

* style: 🎨 fix code style issues with Black

* feat: send better error message for invalid email

* feat: schema validation for study description

* feat: schema validation for study design

* feat: schema validation for study intervention

* schema validation for ipd sharing

* feat: schema validation for study link

* fix: fixed import typo

* feat: schema validation for other metadata

* feat: schema validation for study location

* feat: schema validation for oversight endpoint

* feat: schema validation for study reference

* feat: schema validation for sponsors collaborators

* feat: schema validate password meets all criterias on signup

* wip: additional requirements/checks for schema validations

* style: 🎨 fix code style issues with Black

* feat: study design carries additional validations

* feat: study contact carries additional validations

* feat: study eligibility carries additional validations

* feat: study intervention carries additional validations

* feat: overal official has enums and other validations

* feat: enums and other validations for location endpoint

* feat: enums and additional validations for ipd sharing

* feat: additional validations for study_status

* feat: additional validations for study reference

* feat: additional validations for available ipds

* feat: enums added and additional validations for sponsor collaborators

* additional enums and validations for study links

* refactor: removed marshal_with for validation errors

* feat: additional validations added for study contact

* feat: enums added for enrollment_type in design endpoint

* refactor: other metadata validation formatted

* feat: minimum length added for validating sponsor collaborators

* fix: remove double imports

* refactor: isort imports

* style: 🎨 fix code style issues with Black

* feat: intervention schema validation added

* feat: conditional requirements added to status metadata

* feat: conditional validations added for sponsor collaborators

* refactor: endpoint comment added

* feat: additional validations for study identification

* style: 🎨 fix code style issues with Black

* feat: conditional validations and enums added for final endpoints

* style: 🎨 fix code style issues with Black

* fix: re-add study type for conditions endpoint

* fix: remove last marshal_with on put, fix type def for data (overall-official)

* fix: update pytest fixtures for validation schemas

* style: 🎨 fix code style issues with Black

* fix: updated pytests for schema validations

* style: 🎨 fix code style issues with Black

* fix: fix: invalid characters for regex

* fix: update flake8 errors

* style: 🎨 fix code style issues with Black

* fix: update for flake8 errors

* style: 🎨 fix code style issues with Black

* fix: updating for flake8 issues

* style: 🎨 fix code style issues with Black

* fix: correct issues for pyflake8

* style: 🎨 fix code style issues with Black

* fix: type def for request.json

* fix: update for pylint issue

* 🐛 fix: update schemas

---------

Co-authored-by: Lint Action <[email protected]>
Co-authored-by: Sanjay Soundarajan <[email protected]>

* fix: remove allowed_origins

* 🚨 chore: fix flake errors

* 💚 fix: update cors

* 💚 fix: update cors

* 🐛 fix: update study identification schema

* 🐛 fix: update study identification schema

* feat: update dataset metadata endpoints (#16)

* chore: reconfigure dataset metadata

* chore: remove ids from 1-to-1 study metadata

* style: format

* chore: dataset models and endpoints refactored

* chore: study models refactored

* chore: dataset metadata functions were changed

* fix: contributor and creator endpoints

* chore: refactor dataset metadata endpoints

* style: flake8 errors

* style: poe format

* style: pylint format check

* style: 🎨 fix code style issues with Black

* fix: study identification checked

* wip: related item endpoint

* wip: dataset related item endpoint

* wip: pylint errors

* 🔐 fix: update secret key length

* fix: dataset medata relate item title

* wip: related item in dataset metadata

* style: 🎨 fix code style issues with Black

* fix: dataset metadata related item

* fix: study identifiers model

* style: format errors check

* style: pylint format

* style: 🎨 fix code style issues with Black

* style: permissions added to dataset metadata

* style: formatting

* style: 🎨 fix code style issues with Black

* fix: dataset other

* feat: dataset version GET

* fix: study identifiers

* fix: dataset identifier

* fix: dataset related item other field

* style: format

* feat: add version readme to the model

* feat: dataset title permission

* feat: dataset description permission

* style:format

* style: 🎨 fix code style issues with Black

* fix: minor fixes in dataset metadata

* style: 🎨 fix code style issues with Black

* feat: updates to dataset metadata

* fix: dataset metadata and docker file

* style: 🎨 fix code style issues with Black

* fix: dataset metadata

* fix: minor fix for contributor metadata

---------

Co-authored-by: Lint Action <[email protected]>
Co-authored-by: Sanjay Soundarajan <[email protected]>

* feat: redcap api, caching, upgrade python

* merge: authentication into staging (#17)

* feat: added token field to invited contributors

* style: 🎨 fix code style issues with Black

* fix: signup token

* style: 🎨 fix code style issues with Black

* fix: signup token

* style: 🎨 fix code style issues with Black

* fix: signup token

* style: 🎨 fix code style issues with Black

* style: errors

* 🐛 fix: update env read

* fix: authentication errors

* fix: poetry toml

---------

Co-authored-by: Lint Action <[email protected]>
Co-authored-by: Sanjay Soundarajan <[email protected]>

* 🧐 wip: test blob access

* ⚰️ remove: remove migration

* chore: remove output

* 🚑 fix: use a sas token

* wip: redcap api and supporting sql

* feat: add api endpoint to request files from Azure

* ✨ feat: add files endpoint

* ✨ feat: add id to files

* 🐛fix: ignore created time

* ✨ feat: add files endpoint (#18)

* 🧐 wip: test blob access

* chore: remove output

* 🚑 fix: use a sas token

* feat: add api endpoint to request files from Azure

* ✨ feat: add files endpoint

* ✨ feat: add id to files

* 🐛fix: ignore created time

* 🐛 fix: read env into config for endpoints

* 💚 fix: update configs for ci

* ✨ feat: redcap endpoints done

* Merge branch 'staging' of https://github.com/AI-READI/api.fairhub.io into staging - cleanup

* 🚨 chore: fix redcap flake errors

* ✨feat: hide redcap api token

* style: 🎨 fix code style issues with Black

* 🐛 fix: return default port to 5000

* 🚨 fix: fix formatting

* 🚨 fix: fix flake errors

* style: 🎨 fix code style issues with Black

* 🚨 fix: fix mypy errors

* style: 🎨 fix code style issues with Black

* 🚨 fix: fix pylint errors

* ⬆️ chore: update to python 3.10

* ✅ test: update configs for cache

* 💚 ci: update ci test containers

* 👷 chore: update dev compose

* ✨ feat: dashboard crud api

* 🐛 fix: update study metadata input schemas

* ✨ feat: add support for jsonschema validation for dataset metadata (#20)

* ✨ feat: add support for jsonschema validation for dataset metadata

* 🐛 fix: add better validation for related items

* 🐛 fix: study design json schema

* 🐛 fix: update valid identifier type values

* test: ✅ add dataset and dataset metadata tests (#22)

* wip: pytest for dataset/dataset metadata api

* style: 🎨 fix code style issues with Black

* feat: POST test for dataset contributor metadata

* feat: GET and DELETE test for dataset contributor metadata

* feat: dataset creator metadata test for GET, POST, DELETE

* style: 🎨 fix code style issues with Black

* feat: GET and POST test for dataset dates metadata

* feat: DELETE test for dataset dates metadata

* feat: de-identification level tests for GET and PUT

* style: 🎨 fix code style issues with Black

* feat: GET dataset description test created

* style: 🎨 fix code style issues with Black

* feat: dataset description  metadata tests for GET, POST, DELETE

* GET test for dataset funder metadata

* feat: POST test for dataset funder metadata

* feat: delete dataset funder metadata test created

* feat: GET and PUT tests created for other dataset metadata

* GET dataset publisher metadata test created

* feat: PUT dataset publisher test created

* feat: GET and PUT tests created for record keys metadata

* wip: fixes for tests and refactoring fixture to sign in only once

* style: 🎨 fix code style issues with Black

* feat: GET test for dataset related items created

* fix: jsonschema type for publication year in related_items endpoint

* feat: POST test for dataset related_items endpoint

* feat: DELETE test created for dataset related item

* feat: DELETE test created for related item contributor metadata

* feat: DELETE test created for related item creator  metadata

* feat: DELETE test created for related item creator metadata

* feat: DELETE test created for related item title  metadata

* feat: GET test for dataset rights metadata

* POST test created for dataset rights metadata

* DELETE test created for dataset rights metadata

* GET test created for dataset subjects metadata

* feat: POST test created for dataset subjects metadata

* feat: DELETE test created for dataset subjects metadata

* feat: GET test created for dataset title metadata

* feat: DELETE test created for dataset title metadata

* feat: POST test created for dataset title metadata

* feat: created global variables needed for testing

* style: 🎨 fix code style issues with Black

* feat: pytest will log user in once per test session

* fix: GET and PUT readme endpoint patched

* feat: DELETE and PUT tests created for study api

* refactor: variable created for temporary study id

* refactor: update fixtures that are used for test (logged in user persists)

* fix: return study id in PUT study description endpoint

* fix: study other metadata returns study id in GET and PUT request

* refactor: cleaned tests and updated based off endpoint updates

* refactor: DELETE dataset endpoint returns 204 upon success

* feat: DELETE test created for dataset endpoint

* feat: added more global variables for testing

* feat: POST test created for creating a dataset version

* feat: GET test created for getting all dataset versions

* feat: GET test created for getting one dataset version

* wip: PUT test skeleton created for updating dataset version

* refactor: updated fixtures for study metadata

* refactor: line too long fixed

* refactor: fixtures updated for dataset metadata to persistent logged in sessions

* fix: return number for status and message for body in study identification DELETE request

* fix: dataset other metadata returns correct column for standards_followed

* refactor: normalized layout throughout testing files

* fix: create secondary study identifiers to then delete in next test

* feat: sign in user before study tests begins

* chore: remove pylint warning

* chore: remove line too long warnings

* style: 🎨 fix code style issues with Black

* chore: remove uncommented code that is necessary

* 🚨 chore: fix linter issues

---------

Co-authored-by: Lint Action <[email protected]>
Co-authored-by: Sanjay Soundarajan <[email protected]>

* merge: version into staging (#21)

* feat: add study metadata GET endpoint

* fix: study design schema

* feat: GET  version study metadata

* style: format

* fix: dataset overview

* fix: study metadata overview

* style: 🎨 fix code style issues with Black

* fix: format

* style: pylint and flake errors

* feat: changelog and readme endpoints

* fix: dataset dataset version GET

* fix: study version GET

* fix: typo

* style: 🎨 fix code style issues with Black

* fix: schema

* fix: version request

* style: 🎨 fix code style issues with Black

* style: format

* fix: dataset version endpoints

* fix: related items version

* fix: delete dataset readme

* feat: alembic file for deleted dataset readme table

* style: 🎨 fix code style issues with Black

* feat Contributor type return for minimised version metadata

* style: 🎨 fix code style issues with Black

* fix: alembix version

* 👷 ci: add db migrations to dockerfile

* fix: dataset title name became as uppercase

* style: 🎨 fix code style issues with Black

* style: format

* fix: main title

* fix: testing errors

* style: format

* fix: remove comment

* fix: remove comment

---------

Co-authored-by: Lint Action <[email protected]>
Co-authored-by: Sanjay Soundarajan <[email protected]>

* Revert "merge: version into staging (#21)" (#23)

This reverts commit 3236235.

* feat: ✨ add support for dataset version metadata in the API (#24)

* feat: add study metadata GET endpoint

* fix: study design schema

* feat: GET  version study metadata

* style: format

* fix: dataset overview

* fix: study metadata overview

* style: 🎨 fix code style issues with Black

* fix: format

* style: pylint and flake errors

* feat: changelog and readme endpoints

* fix: dataset dataset version GET

* fix: study version GET

* fix: typo

* style: 🎨 fix code style issues with Black

* fix: schema

* fix: version request

* style: 🎨 fix code style issues with Black

* style: format

* fix: dataset version endpoints

* fix: related items version

* fix: delete dataset readme

* feat: alembic file for deleted dataset readme table

* style: 🎨 fix code style issues with Black

* feat Contributor type return for minimised version metadata

* style: 🎨 fix code style issues with Black

* fix: alembix version

* 👷 ci: add db migrations to dockerfile

* fix: dataset title name became as uppercase

* style: 🎨 fix code style issues with Black

* style: format

* fix: main title

* fix: testing errors

* style: format

* fix: remove comment

* fix: remove comment

---------

Co-authored-by: aydawka <[email protected]>
Co-authored-by: Lint Action <[email protected]>

* 💚 ci: update dockerfile

* fix: minor fix on model classes for minimized version pages

* style: 🎨 fix code style issues with Black

* wip: caching & dashboard done; cleanup in progress

* 👷 ci: deploy api to Azure Container Registry (#25)

* 👷 ci: deoploy api to ACR

* 👷 ci: deploy api to ACR

* 👷 ci: update build conditions

* 👷 ci: remove test branch

* 👷 ci: add sha tag to build image

* 💚 ci: remove typo

* 👷 ci: wait for other workflows to complete (#26)

* 👷 ci: wait for other workflows to complete

* 🔨 chore: add a sample env

* 👷 ci: update ref for wait on action

* 👷 ci: update ref for wait on action

* 👷 ci: update workflow names

* 👷 ci: update build variables

* 👷 ci: test concurrency

* ✨ feat: use waitress as a wsgi server (#27)

* ✨ feat: use waitress for server

* 🚩 chore: add a azure check for schema destroy

* style: 🎨 fix code style issues with Black

* 🛂 fix: update cors allowed origins

* style: 🎨 fix code style issues with Black

---------

Co-authored-by: Lint Action <[email protected]>

* 💚 fix: update cors for local development (#28)

* ✨ feat: use waitress for server

* 🚩 chore: add a azure check for schema destroy

* style: 🎨 fix code style issues with Black

* 🛂 fix: update cors allowed origins

* style: 🎨 fix code style issues with Black

* 💚 fix: update cors for local development

---------

Co-authored-by: Lint Action <[email protected]>

* ⬆️ chore: cleaning up poe errors

* style: 🎨 fix code style issues with Black

* 🐛 fix: etl config

* feat: ✨  add test file for version steps (#29)

* feat: add dataset version test

* fix: confest.py password change

* style: 🎨 fix code style issues with Black

* fix: dataset & its metadata http request status code

* fix: study metadata http statuses fixed

* fix: study status test

* style: 🎨 fix code style issues with Black

* fix: password was reverted

* fix: delete endpoint status

* fix: delete endpoints

* fix: study dataset test

* fix: minor dataset typo fixes

* fix: delete endpoints

* fix: dataset relate item test functions

* style: 🎨 fix code style issues with Black

* fix: restored some study metadata fields

* fix: study version minimised endpoint

* style: format

* style: 🎨 fix code style issues with Black

---------

Co-authored-by: Lint Action <[email protected]>

* chore: update readme for better instructions

* 🚨 fix: precommit errors fixed

* style: 🎨 fix code style issues with Black

* feat: ✨ pytest multiple user permissioned clients + bug fixes (#30)

* feat: create multiple accounts for permissions

* style: 🎨 fix code style issues with Black

* refactor: update error messages for access denied on POST/PUT endpoints

* refactor: invite accounts to study after creating study

* fix: check user permissions for Sponsors and Other endpoints

* refactor: update permissions error message on POST/PUT endpoints

* feat: sign up invited users for testing

* refactor: change access denied message for publishing dataset

* wip: create multiple clients for testing session that persists across modules

* style: 🎨 fix code style issues with Black

* feat: create multiple clients to simulate multiple users interacting with server

* feat: all tests have access to all available clients during testing

* feat: test admin, editor, viewer permissions for study endpoints

* feat: admin, editor, viewer tests added to study arm, alt id metadata

* feat: admin, editor, viewer test to update dataset access metadata

* feat: admin, editor, viewer test to delete dataset alt id metadata

* feat: admin, editor, viewer test to GET dataset consent metadata

* feat: admin, editor, viewer test to PUT dataset consent metadata

* feat: admin, editor, viewer test to PUT dataset contributor metadata

* feat: admin, editor, viewer test to DELETE dataset contributor metadata

* feat: admin, editor, viewer test to GET dataset creator metadata

* style: 🎨 fix code style issues with Black

* admin, editor, viewer permission check created for POST arm metadata

* admin, editor, viewer permission check created for GET arm metadata

* admin, editor, viewer permission check created for DELETE arm metadata

* admin, editor, viewer permission check created for POST avail ipd metadata

* admin, editor, viewer permission check created for GET avail ipd metadata

* admin, editor, viewer permission check created for DELETE avail ipd metadata

* admin, editor, viewer permission check created for POST central contact metadata

* admin, editor, viewer permission check created for DELETE central contact metadata

* admin, editor, viewer permission check created for GET collaborators metadata

* admin, editor, viewer permission check created for PUT collaborators metadata

* admin, editor, viewer permission check created for GET conditions metadata

* admin, editor, viewer permission check created for PUT conditions metadata

* admin, editor, viewer permission check created for GET description metadata

* admin, editor, viewer permission check created for PUT description metadata

* admin, editor, viewer permission check created for GET design metadata

* admin, editor, viewer permission check created for PUT design metadata

* admin, editor, viewer permission check created for GET eligibility metadata

* admin, editor, viewer permission check created for PUT eligibility metadata

* admin, editor, viewer permission check created for GET identification metadata

* admin, editor, viewer permission check created for POST identification metadata

* admin, editor, viewer permission check created for DELETE identification metadata

* admin, editor, viewer permission check created for GET intervention metadata

* admin, editor, viewer permission check created for POST intervention metadata

* admin, editor, viewer permission check created for GET link metadata

* admin, editor, viewer permission check created for GET location metadata

* style: 🎨 fix code style issues with Black

* admin, editor, viewer test for PUT ipdsharing metadata

* admin, editor, viewer test for POST link metadata

* admin, editor, viewer test for DELETE link metadata

* admin, editor, viewer test for POST location metadata

* admin, editor, viewer test for DELETE location metadata

* admin, editor, viewer test for PUT other  metadata

* admin, editor, viewer test for GET overall official metadata

* admin, editor, viewer test for POST overall official metadata

* fix: check permissions for deleting dataset alt identifier

* fix: update on list index for admin/editor data responses

* fix: correct available ipd vars for testing

* fix: corrected bug issues throughout study metadata tests

* feat: admin, editor, viewer test for PUT oversight metadata

* feat: admin, editor, viewer test for GET reference metadata

* feat: admin, editor, viewer test for POST reference metadata

* fix: add comma between POST request parameters

* fix: add comma between DELETE request parameters

* feat: admin, editor, viewer test for GET sponsors metadata

* feat: admin, editor, viewer test for PUT sponsors metadata

* feat: admin, editor, viewer test for GET status metadata

* feat: admin, editor, viewer test for PUT status metadata

* fix: correct payload for PUT sponsors endpoint

* style: 🎨 fix code style issues with Black

* admin, editor, viewer test for PUT sponsors metadata

* admin, editor, viewer test for GET all datasets

* admin, editor, viewer test for POST dataset

* admin, editor, viewer test for GET specific dataset

* admin, editor, viewer test for POST creator dataset metadata

* admin, editor, viewer test for DELETE creator dataset metadata

* admin, editor, viewer test for POST date dataset metadata

* admin, editor, viewer test for DELETE date dataset metadata

* admin, editor, viewer test for GET de-identification dataset metadata

* admin, editor, viewer test for PUT de-identification dataset metadata

* admin, editor, viewer test for GET description dataset metadata

* admin, editor, viewer test for POST description dataset metadata

* admin, editor, viewer test for DELETE  dataset metadata

* admin, editor, viewer test for GET funder dataset metadata

* admin, editor, viewer test for POST funder dataset metadata

* refactor: ensure status code is 204 for contributors

* refactor: ensure status code is 204 for dataset

* refactor: import Response and ensure 404 response in study api

* refactor: import Response and ensure 404 response in dataset alt id api

* refactor: import Response and ensure 404 response in dataset contrib api

* refactor: import Response and ensure 404 response in dataset date api

* refactor: import Response and ensure 404 response in dataset descrip api

* refactor: import Response and ensure 404 response in dataset funder api

* refactor: import Response and ensure 404 response in dataset related irms api

* refactor: import Response and ensure 404 response in dataset rights irms api

* refactor: import Response and ensure 404 response in dataset subject irms api

* refactor: import Response and ensure 404 response in study avail ipd api

* refactor: import Response and ensure 404 response in study identification api

* refactor: import Response and ensure 404 response in study intervention api

* refactor: import Response and ensure 204 response in study link api

* refactor: import Response and ensure 204 response in study location api

* refactor: import Response and ensure 204 response in study overall official api

* fix: add import

* fix: typo for investigator name test

* refactor: ensure 204 status is return when deleting

* fix: return Response(status)

* fix: don't return content upon deleting central contact (api)

* fix: dataset contributor status code fix

* style: 🎨 fix code style issues with Black

* 🐛 fix: corrected issues with deleting responses status code

* ✨ feat: verify data in GET response for study api

* ♻️ refactor: GET test after POST for dataset api and differentiate dataset contents for all clients

* ✨ verify all clients in GET datasets api

* ✨ feat: verify content for GET specific dataset endpoint

* ✨ feat: admin, editor, viewer test for DELETE dataset api

* ✨ feat: verify GET dataset access after PUT for all clients

* ✨ feat: verify GET response data for all clients in dataset alt identifier endpoint

* ✨ verify GET dataset consent metadata after POST for all clients

* ✨ verify GET dataset creator metadata after POST for all clients

* ✨ verify GET dataset data metadata after POST for all clients

* ✨ verify GET dataset de-id lvl metadata after POST for all clients

* ✨ verify GET dataset description metadata after POST for all clients

* ✨ verify GET dataset funder metadata after POST for all clients

* ✨ feat: PUT tests for other dataset metadata created for all clients, GET response added after

* ✨ verify GET dataset other metadata after POST for all clients

* ✨ verify GET dataset publisher metadata after POST for all clients

* ✨ feat: PUT dataset publisher metadata added for all clients

* ✨ verify GET dataset record keys metadata after POST for all clients

* ✨ feat: POST tests created for all clients in dataset related items api

* ✨ verify GET dataset related items metadata after POST for all clients

* ✨ feat: DELETE dataset contributor metadata tests created for all clients

* ✨ feat: DELETE dataset related-item identifier metadata tests created for all clients

* ✨ feat: all DELETE dataset related-item metadata tests created for all clients

* style: 🎨 fix code style issues with Black

* 🐛 fix: correcting bugs for global variables and assertment checks

* 🐛 fix: correct variable for response data in GET specific dataset

* ♻️ refactor: create multiple dummy datasets for deleting with different clients

* 🐛 fix: fix list index when going through POST contributor responses

* 🐛 fix: assert correct length of dataset descriptions in GET test

* 🐛 fix: patched multiple tests for pytest

* ✨ feat: GET tests for all clients created for record-keys metadata

* 🐛 fix: final patches to all tests

* ♻️ refactor: move GET dataset metadata responses after POST/PUT

* 🐛 fix: fix merge issues

* ✨ feat: arm metadata GET tests for all clients

* ✨ feat: avail ipd metadata GET tests for all clients

* ✨ feat: central contact metadata GET tests for all clients

* ✨ feat: collaborators metadata GET tests for all clients

* ✨ feat: description metadata GET tests for all clients

* ✨ feat: description  metadata GET tests for all clients

* ✨ feat: design  metadata GET tests for all clients

* ✨ feat: eligibility metadata GET tests for all clients

* ✨ feat: identification metadata GET tests for all clients

* 🐛 fix: correct assert responses

* ✨ feat: intervention metadata GET tests for all clients

* style: 🎨 fix code style issues with Black

* ✨ feat: GET ipdsharing study metadata for all clients created after POST

* ✨ feat: GET study links metadata for all clients created after POST

* ✨ feat: GET study locations metadata for all clients created after POST

* ✨ feat: GET other study metadata for all clients created after POST

* ✨ feat: GET overall official study metadata for all clients created after POST

* ✨ feat: GET oversight study metadata for all clients created after PUT

* ✨ feat: GET reference study metadata for all clients created after POST

* ✨ feat: GET sponsors study metadata for all clients created after PUT

* ✨ feat: GET status study metadata for all clients created after PUT

* 🐛 fix: assertions on failed tests

* ♻️ refactor: remove study/other metadata endpont (not used in frontend)

* ✨ feat: POST dataset rights metadata created for all clients

* ✨ feat: GET dataset rights metadata for all clients

* ✨ feat: DELETE for dataset subjects metadata created for all clients

* ✨ feat: POST for dataset subject metadata created for admin client

* ✨ feat: POST for dataset title create for all clients

* ✨ feat: GET dataset title metadata created for all clients

* ✨ feat: DELETE dataset title metadata created for all clients

* 🚧 wip: correct issue with items having same created_at timestamp

* style: 🎨 fix code style issues with Black

* ✨ feat: viewer client test added for GET study link metadata

* ✨ feat: assert POST responses for version testing before POSTing version

* ✨ feat: GET versioned study tests created for all clients

* ✨ feat: GET versioned dataset metadata tests created for all clients

* ✨ feat: GET versioned dataset readme metadata tests created for all clients

* ✨ feat: PUT dataset readme version test created for all clients

* ✨ feat: PUT dataset changelog version test created for all clients

* ✨ feat: GET dataset changelog version test created for all clients

* 🐛 fix: normalize return response with GET and PUT changelog version api

* ✨ feat: DELETE original datasets created by admin and editor clients

* ✨ feat: GET dataset version test created for all clients

* style: 🎨 fix code style issues with Black

* 🐛 fix: fix permission check for deleting dataset version

* 🐛 fix: patch PUT dataset version to proper permission check

* 🐛 fix: remove jsonify from return response on PUT version endpoint

* ✨ fix: add needed global variables needed for pytest

* ✨ feat: add test POST dataset version to study version file

* ✨ feat: add test GET all dataset versions to study version file

* ✨ feat: add GET specific dataset version test for all clients

* ✨ feat: add PUT dataset version test for all clients

* ♻️ refactor: remove version tests from dataset file and move to version file (pytest)

* 🐛 fix: verify viewer status code for delete dataset descrip

* ✨ feat: DELETE dataset funder metadata test added for all clients

* ✨ feat: DELETE dataset rights metadata for all clients created

* 🐛 fix: add pause between client POST calls for to prevent duplicate time stamps

* ✨ feat: DELETE study intervention metadata test created for all clients

* 🐛 fix: (wip) final fixes before PR

* style: 🎨 fix code style issues with Black

* ✨ feat: README.md instructions for creating pytest created for documentation

* ♻️ refactor: remove jsonify from datasets.py

* ♻️ refactor: update email address for pytest clients

---------

Co-authored-by: Lint Action <[email protected]>

* 🐛 fix: black issue with line length

* ✨ feat: updates for new chart types/modules

* style: 🎨 fix code style issues with Black

* refactor: ♻️ api responses updated for swagger docs (#32)

* ♻️ refactor: update api.docs on 201 success responses

* style: 🎨 fix code style issues with Black

* ♻️ refactor: update PUT contributor owner response changed to 200

* :reycle: refactor: correct api.response success statuses + add api.response for non existing requests

---------

Co-authored-by: Lint Action <[email protected]>

* fix: 🐛 updating user profile (#31)

* 🐛 fix: PUT user profile endpoint patched

* ♻️ refactor: update user.py file

* style: 🎨 fix code style issues with Black

---------

Co-authored-by: Lint Action <[email protected]>

* 🐛 fix: minor fixes

* style: 🎨 fix code style issues with Black

* 🚨 chore: run formatters

* ✨ feat: add support for feature flags (#36)

* ✨ feat: add support for feature flags

* 👷 ci: add growthbook to test workflow

* ➕ chore: add dependency

* feat: ✨ password change endpoint (#33)

* 🚧 wip: endpoint to change user password

* ✨ feat: endpoint to change password

* style: 🎨 fix code style issues with Black

* 🔨 chore: remove print statements

* 🔨 chore: add data type for request.json

* ♻️ refactor: password change endpoint modified and moved to authentication

* ✨ feat: user password change test created for pytest

* style: 🎨 fix code style issues with Black

* ♻️ refactor: password change test only for one client

* ♻️ refactor: password change endpoint modified to POST

* ♻️ refactor: pytest password changed test modified to be post

* ✨ feat: tests for logging in user after password changes

---------

Co-authored-by: Lint Action <[email protected]>

* fix: 🐛 update dataset other model to return needed data (#35)

* 🐛 fix: send id and resource_type back in the dataset/other response PUT/GET

* 🔨 chore: remove prints

* ♻️ refactor: id removed from response in dataset other

* feat: ✨ utils for license text and support to store license (#38)

* feat: added testing license_text dataset metadata

* style: 🎨 fix code style issues with Black

* 🔧 chore: update poetry lock

* ✨ feat: utils endpoint adding for requesting json

* style: 🎨 fix code style issues with Black

---------

Co-authored-by: aydawka <[email protected]>
Co-authored-by: Lint Action <[email protected]>

* feat: added study metadata keywords (#37)

* feat: added testing license_text dataset metadata

* style: 🎨 fix code style issues with Black

* feat: added testing for study keywords

* feat: added study keywords endpoint

* fix: db is getting cleared in test env

* fix: format

* fix: removed comments

---------

Co-authored-by: Lint Action <[email protected]>

* 🚨 fix: fix mypy warning

* feat: DOI reserved for version table (#39)

* feat: added AI identifier column to version

* fix: modified test for DOI column

* fix: format

* fix: alembic version

* style: 🎨 fix code style issues with Black

* fix: identifier name

* fix: unique added to doi column

* style: 🎨 fix code style issues with Black

* fix: doi nullability

---------

Co-authored-by: Lint Action <[email protected]>

* Revert "feat: DOI reserved for version table" (#40)

* 👷 ci: rename container image

* 🐛 fix: update domains to app

* 🚑 fix: disable email deliverability check

* feat: DOI reserved for version table (#41)

* feat: added AI identifier column to version

* fix: modified test for DOI column

* fix: format

* fix: alembic version

* style: 🎨 fix code style issues with Black

* fix: identifier name

* fix: unique added to doi column

* style: 🎨 fix code style issues with Black

* fix: doi nullability

* fix: doi nullability

* fix: doi integrity error

* style:format

* fix: doi format

* style: 🎨 fix code style issues with Black

---------

Co-authored-by: aydawka <[email protected]>
Co-authored-by: Lint Action <[email protected]>

* 🐛 fix: minor fixes

* 🐛 fix: minor fixes

* no message

* style: 🎨 fix code style issues with Black

* 🐛 fix: minor fixes

* style: 🎨 fix code style issues with Black

* 🐛 fix: minor fixes

* style: 🎨 fix code style issues with Black

* 🐛 fix: minor fixes

* style: 🎨 fix code style issues with Black

* 🐛 fix: add host arg to app.py

* 🐛 fix: fix module transform bug (needed to create deep copy)

* ✨feat: improved cache management

* 🐛 fix: minor fixes

* style: 🎨 fix code style issues with Black

* 🐛 fix: remove https://localhost:3000from CORS in debug mode

* 🐛 fix: import error

* 🐛 fix: import error, upgrade to Python3.10

* 🐛 fix: import error - PyCap

* ✨feat: redcap + dashboard auth management

* style: 🎨 fix code style issues with Black

* 🐛 fix: minor fixes

* style: 🎨 fix code style issues with Black

* 🐛 fix: minor fixes

* 🔨 chore: update side scripts

* ✨feat: redcap api updates, dashboard wip

* style: 🎨 fix code style issues with Black

* feat: ✨ improved REDcap & Dashboard API structure

* style: 🎨 fix code style issues with Black

* 🚩 feat: feature flag signup API endpoint (#43)

* 🚩 feat: feature flag signup API endpoint

* style: 🎨 fix code style issues with Black

---------

Co-authored-by: Lint Action <[email protected]>

* 🙈 chore: update gitignore

* chore 🔨 replaced name with family/ given name in contributor (#44)

* chore: modified dataset name

* chore: added test for changed name contributor

* style: 🎨 fix code style issues with Black

---------

Co-authored-by: Lint Action <[email protected]>

* feat: ❇️  add dataset healthsheet table (#46)

* feat: add dataset health sheet table

* style: format

* style: 🎨 fix code style issues with Black

* fix: added relation of healthsheet to parent table

---------

Co-authored-by: Lint Action <[email protected]>

* feat: ❇️ add published dataset table (#45)

* feat: added published dataset table

* style: 🎨 fix code style issues with Black

* style: format

* fix: update published dataset table

---------

Co-authored-by: Lint Action <[email protected]>

* feat: ❇️  add healtsheet endpoints (#47)

* feat: add health sheet endpoints

* style: 🎨 fix code style issues with Black

* feat: add health sheet test functions

* style: format

* style: 🎨 fix code style issues with Black

---------

Co-authored-by: Lint Action <[email protected]>

* 🚚 chore: update path

* 👷 ci: remove old workflows

* 💚 ci: fix build

* style: 🎨 fix code style issues with Black

* 💚 ci: fix build

* 💚 ci: fix build

* style: 🎨 fix code style issues with Black

* 🚨 chore: remove format action

* 💚 ci: fix build

* 💚 ci: fix build

* ✨feat: add participant list report

* fix: 🐛   dataset related-identifier and publisher tables (#49)

* fix: delete record keys

* fix: add publisher table

* fix: related item identifier model and table

* fix: related item identifier endpoint

* fix: dataset publisher

* fix: test for related item identifier table

* fix: modify dataset other table

* fix: modify dataset_managing_organization

* fix: test dataset other and managing org

* fix:dataset other

* fix: format

* wip: testing version minimized steps

* fix: testing version related identifier

* fix: version related identifier

* feat: ✨ update dashboard config for new modules

* 🔨 chore: add table reset

* fix: 🐛 study metadata changes (#50)

* fix: dataset rights add scheme uri

* feat: add study_location list table

* fix: location list relation

* feat: added study metadata tables

* style: format

* fix: study design added is_patient_registry col

* fix: added new columns to existing tables

* fix: remove tables

* fix: added column to study table

* style: format

* fix: study

* fix: add new endpoints

* fix: sponsor and collab endpoints

* fix: central contact

* fix: sponsors

* fix: collaborators

* fix: endpoints

* fix: condition and keyword schema

* style: format

* fix: test dataset metadata

* fix: finalize study metadata endpoints

* fix: collabs test

* fix: test keywords and oversight test

* fix: finalized study metadata test

* fix: dataset metasdata test

* fix: study version metadata test

* style: format

* fix: test

* fix: study acronym

* fix: study metadata

* fix: study design

* fix: 🐛 study metadata database updates (#51)

* fix: study oversight table nullability

* fix: study intervention remove a column

* fix: study intervention test

* fix: change study location table name

* 🔨 chore: update delete script

* fix: 🐞  version metadata changes (#52)

* fix: schema types for study metadata

* fix: metadata return for version steps

* fix: test version and collaborators metadata

* feat: public dashboard creation and management

* style: format

* fix: 🐛  maganing organization table (#53)

* feat: added managing organization table

* fix: api for managing org

* fix: api for managing org

* fix: test for managing org

* fix: model classes of managing organization

* style: format

* chore: rebuild database

* 🗃️ chore: update db

* wip: finalizing redcap release ETL

* feat: ✨ REDCap release ETL

* fix: 🐛 minor fix to aireadi_config.py

* chore: reset

* 👷 ci: add build for main pushes

* 👷 ci: disable unused workflow

---------

Co-authored-by: slugb0t <[email protected]>
Co-authored-by: Lint Action <[email protected]>
Co-authored-by: aydawka <[email protected]>
Co-authored-by: Dorian Portillo <[email protected]>
Co-authored-by: Aydan Gasimova <[email protected]>
Co-authored-by: Greenstick <[email protected]>
Co-authored-by: Greenstick <[email protected]>
  • Loading branch information
8 people authored Apr 15, 2024
1 parent 4b7b47b commit 955dfe2
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 43 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-and-deploy-to-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
name: (main) Build and push api image to Azure Container Registry

on:
push:
branches:
- main
pull_request:
types: [closed]
branches:
Expand Down
86 changes: 43 additions & 43 deletions .github/workflows/staging-build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
on:
push:
branches:
- staging
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- staging
on:
# push:
# branches:
# - staging
# pull_request:
# types: [opened, synchronize, reopened, closed]
# branches:
# - staging
workflow_dispatch:

name: Staging_Container_Workflow

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
# checkout the repo
- name: 'Checkout GitHub Action'
uses: actions/checkout@v4
with:
ref: staging
- name: 'Login via Azure CLI'
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: 'Build and push image'
uses: azure/docker-login@v1
with:
login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- run: |
docker build . -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/fairhub-flask-api:staging${{ github.sha }}
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/fairhub-flask-api:staging${{ github.sha }}
build-and-deploy:
runs-on: ubuntu-latest
steps:
# checkout the repo
- name: "Checkout GitHub Action"
uses: actions/checkout@v4
with:
ref: staging

- name: "Login via Azure CLI"
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: "Build and push image"
uses: azure/docker-login@v1
with:
login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- run: |
docker build . -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/fairhub-flask-api:staging${{ github.sha }}
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/fairhub-flask-api:staging${{ github.sha }}
- name: 'Deploy to Azure Container Instances'
uses: 'azure/aci-deploy@v1'
with:
resource-group: ${{ secrets.RESOURCE_GROUP }}
dns-name-label: ${{ secrets.RESOURCE_GROUP }}${{ github.run_number }}
image: ${{ secrets.REGISTRY_LOGIN_SERVER }}/sampleapp:${{ github.sha }}
registry-login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
registry-username: ${{ secrets.REGISTRY_USERNAME }}
registry-password: ${{ secrets.REGISTRY_PASSWORD }}
name: fairhub-flask-api-staging
location: 'west us'
- name: "Deploy to Azure Container Instances"
uses: "azure/aci-deploy@v1"
with:
resource-group: ${{ secrets.RESOURCE_GROUP }}
dns-name-label: ${{ secrets.RESOURCE_GROUP }}${{ github.run_number }}
image: ${{ secrets.REGISTRY_LOGIN_SERVER }}/sampleapp:${{ github.sha }}
registry-login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
registry-username: ${{ secrets.REGISTRY_USERNAME }}
registry-password: ${{ secrets.REGISTRY_PASSWORD }}
name: fairhub-flask-api-staging
location: "west us"

0 comments on commit 955dfe2

Please sign in to comment.