Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
612 commits
Select commit Hold shift + click to select a range
3de3202
fix: union types
Aydawka Oct 13, 2023
199ff1b
style: 🎨 fix code style issues with Black
lint-action Oct 13, 2023
88234ed
fix: union types
Aydawka Oct 13, 2023
42b73d5
Merge remote-tracking branch 'origin/build-fix' into build-fix
Aydawka Oct 13, 2023
c5943a4
fix: none type
Aydawka Oct 13, 2023
b7ec2da
fix: pylint errors
Aydawka Oct 13, 2023
04e5ef5
style: 🎨 fix code style issues with Black
lint-action Oct 13, 2023
78466dd
fix: pylint errors
Aydawka Oct 13, 2023
44c0912
Merge remote-tracking branch 'origin/build-fix' into build-fix
Aydawka Oct 13, 2023
508673a
fix: pylint errors
Aydawka Oct 13, 2023
1588ea7
Merge pull request #14 from AI-READI/build-fix
megasanjay Oct 13, 2023
9d0d5d5
feat: pytest (#13)
slugb0t Oct 13, 2023
0e7de9a
👷 ci: update docker compose file
megasanjay Oct 14, 2023
37dd3dc
💚 ci: add cors route
megasanjay Oct 18, 2023
77aee77
💚 ci: add cors route
megasanjay Oct 18, 2023
49bd33d
💚 ci: add cors route
megasanjay Oct 18, 2023
eb85c25
💚 ci: add cors route
megasanjay Oct 18, 2023
3089efd
💚 ci: add cors route
megasanjay Oct 18, 2023
8d736b4
💚 ci: add cors route
megasanjay Oct 18, 2023
1abaf66
💚 ci: add cors route
megasanjay Oct 18, 2023
3b64ba6
💚 ci: add cors route
megasanjay Oct 18, 2023
d6c7b96
💚 ci: add cors route
megasanjay Oct 18, 2023
1b4e46f
💚 ci: add cors route
megasanjay Oct 18, 2023
5386ce2
feat: add jsonschema validation for backend (#15)
slugb0t Oct 19, 2023
757b488
fix: remove allowed_origins
megasanjay Oct 19, 2023
47dade9
🚨 chore: fix flake errors
megasanjay Oct 19, 2023
9e82f3e
💚 fix: update cors
megasanjay Oct 19, 2023
39c0b71
💚 fix: update cors
megasanjay Oct 19, 2023
ab163ab
🐛 fix: update study identification schema
megasanjay Oct 19, 2023
fc6e8a6
🐛 fix: update study identification schema
megasanjay Oct 19, 2023
ed9dd75
feat: update dataset metadata endpoints (#16)
Aydawka Oct 24, 2023
2f938f7
feat: redcap api, caching, upgrade python
greenstick Oct 26, 2023
08ea6d3
merge: authentication into staging (#17)
Aydawka Oct 26, 2023
a966c71
🧐 wip: test blob access
megasanjay Oct 26, 2023
9da3ac0
⚰️ remove: remove migration
megasanjay Oct 27, 2023
6b2b401
chore: remove output
megasanjay Oct 27, 2023
756c7c8
🚑 fix: use a sas token
megasanjay Oct 30, 2023
1b2ec6d
wip: redcap api and supporting sql
greenstick Oct 31, 2023
b5bcd7d
Merge branch 'staging' of https://github.com/AI-READI/api.fairhub.io …
greenstick Oct 31, 2023
d315c64
feat: add api endpoint to request files from Azure
megasanjay Nov 1, 2023
4d3d175
✨ feat: add files endpoint
megasanjay Nov 1, 2023
21eb53a
✨ feat: add id to files
megasanjay Nov 1, 2023
9c5ae26
🐛fix: ignore created time
megasanjay Nov 1, 2023
de7b910
Merge branch 'staging' into blobs
megasanjay Nov 1, 2023
4530e5e
✨ feat: add files endpoint (#18)
megasanjay Nov 1, 2023
f6ff596
🐛 fix: read env into config for endpoints
megasanjay Nov 1, 2023
fb3fb5c
💚 fix: update configs for ci
megasanjay Nov 2, 2023
776e7b6
✨ feat: redcap endpoints done
greenstick Nov 2, 2023
869a271
Merge branch 'staging' of https://github.com/AI-READI/api.fairhub.io …
greenstick Nov 2, 2023
8d24d19
Merge branch 'staging' of https://github.com/AI-READI/api.fairhub.io …
greenstick Nov 2, 2023
10ef3bd
🚨 chore: fix redcap flake errors
greenstick Nov 2, 2023
dadc624
✨feat: hide redcap api token
greenstick Nov 2, 2023
eb71028
style: 🎨 fix code style issues with Black
lint-action Nov 2, 2023
eceaa8f
🐛 fix: return default port to 5000
greenstick Nov 2, 2023
7165910
🐛fix: ignore created time
megasanjay Nov 4, 2023
5357ec0
🚨 fix: fix formatting
megasanjay Nov 4, 2023
a6e1962
🚨 fix: fix flake errors
megasanjay Nov 4, 2023
dc24de6
style: 🎨 fix code style issues with Black
lint-action Nov 4, 2023
73ee3b1
🚨 fix: fix mypy errors
megasanjay Nov 4, 2023
2112c1a
Merge branch 'dashboard' of https://github.com/AI-READI/api.fairhub.i…
megasanjay Nov 4, 2023
4b836fb
style: 🎨 fix code style issues with Black
lint-action Nov 4, 2023
6cc0788
🚨 fix: fix pylint errors
megasanjay Nov 4, 2023
997750c
Merge branch 'dashboard' of https://github.com/AI-READI/api.fairhub.i…
megasanjay Nov 4, 2023
eb2962a
⬆️ chore: update to python 3.10
megasanjay Nov 4, 2023
76b4fd2
✅ test: update configs for cache
megasanjay Nov 4, 2023
287aee3
💚 ci: update ci test containers
megasanjay Nov 4, 2023
5f433c4
👷 chore: update dev compose
megasanjay Nov 4, 2023
93514a2
✨ feat: dashboard crud api
greenstick Nov 6, 2023
eddbf54
🐛 fix: update study metadata input schemas
megasanjay Nov 6, 2023
1c0c52b
Merge branch 'staging' of https://github.com/AI-READI/api.fairhub.io …
megasanjay Nov 7, 2023
e074add
✨ feat: add support for jsonschema validation for dataset metadata (#20)
megasanjay Nov 7, 2023
77eb0d1
Merge branch 'staging' of https://github.com/AI-READI/api.fairhub.io …
megasanjay Nov 7, 2023
f57c56b
🐛 fix: study design json schema
megasanjay Nov 7, 2023
a30d3cd
🐛 fix: update valid identifier type values
megasanjay Nov 7, 2023
09c836e
test: :white_check_mark: add dataset and dataset metadata tests (#22)
slugb0t Nov 10, 2023
3236235
merge: version into staging (#21)
Aydawka Nov 10, 2023
ef26982
Revert "merge: version into staging (#21)" (#23)
megasanjay Nov 10, 2023
8b658ca
feat: ✨ add support for dataset version metadata in the API (#24)
megasanjay Nov 10, 2023
5e96623
💚 ci: update dockerfile
megasanjay Nov 11, 2023
61629ef
fix: minor fix on model classes for minimized version pages
Aydawka Nov 13, 2023
8edf54f
style: 🎨 fix code style issues with Black
lint-action Nov 13, 2023
6d63c5a
wip: caching & dashboard done; cleanup in progress
greenstick Nov 14, 2023
7bd08a1
👷 ci: deploy api to Azure Container Registry (#25)
megasanjay Nov 14, 2023
27e5ee2
👷 ci: add sha tag to build image
megasanjay Nov 14, 2023
20814d4
💚 ci: remove typo
megasanjay Nov 14, 2023
17da83b
👷 ci: wait for other workflows to complete (#26)
megasanjay Nov 15, 2023
a7a4db0
👷 ci: update ref for wait on action
megasanjay Nov 15, 2023
5e5d831
👷 ci: update ref for wait on action
megasanjay Nov 15, 2023
f957777
👷 ci: update workflow names
megasanjay Nov 15, 2023
40b6de5
👷 ci: update build variables
megasanjay Nov 15, 2023
d5cfdac
👷 ci: test concurrency
megasanjay Nov 15, 2023
15228c6
✨ feat: use waitress as a wsgi server (#27)
megasanjay Nov 15, 2023
7fe152f
💚 fix: update cors for local development (#28)
megasanjay Nov 15, 2023
7093fd0
⬆️ chore: cleaning up poe errors
greenstick Nov 15, 2023
794bc99
style: 🎨 fix code style issues with Black
lint-action Nov 15, 2023
2bff4b2
🐛 fix: etl config
greenstick Nov 15, 2023
88b36d9
Merge branch 'dashboard' of https://github.com/AI-READI/api.fairhub.i…
greenstick Nov 15, 2023
011d1a6
feat: ✨ add test file for version steps (#29)
Aydawka Nov 21, 2023
d1d829b
chore: update readme for better instructions
megasanjay Nov 30, 2023
50d4ceb
Merge branch 'staging' of https://github.com/AI-READI/api.fairhub.io …
megasanjay Nov 30, 2023
a84ff4b
🚨 fix: precommit errors fixed
greenstick Dec 5, 2023
d007c76
style: 🎨 fix code style issues with Black
lint-action Dec 5, 2023
2f7bad0
feat: ✨ pytest multiple user permissioned clients + bug fixes (#30)
slugb0t Dec 5, 2023
b041334
🐛 fix: black issue with line length
greenstick Dec 5, 2023
6dbf4f8
Merge branch 'dashboard' of https://github.com/AI-READI/api.fairhub.i…
greenstick Dec 5, 2023
449797a
✨ feat: updates for new chart types/modules
greenstick Dec 12, 2023
91fbb9d
style: 🎨 fix code style issues with Black
lint-action Dec 12, 2023
676a382
refactor: ♻️ api responses updated for swagger docs (#32)
slugb0t Dec 12, 2023
396502a
fix: 🐛 updating user profile (#31)
slugb0t Dec 12, 2023
26c0ed4
🐛 fix: minor fixes
greenstick Dec 13, 2023
6f5f98e
Merge branch 'dashboard' of https://github.com/AI-READI/api.fairhub.i…
greenstick Dec 13, 2023
1e1f849
style: 🎨 fix code style issues with Black
lint-action Dec 13, 2023
f589b0c
🚨 chore: run formatters
megasanjay Dec 20, 2023
ec272f1
✨ feat: add support for feature flags (#36)
megasanjay Dec 20, 2023
91832e6
➕ chore: add dependency
megasanjay Dec 20, 2023
d4645a9
feat: ✨ password change endpoint (#33)
slugb0t Dec 20, 2023
810076f
fix: 🐛 update dataset other model to return needed data (#35)
slugb0t Dec 21, 2023
a9faba0
feat: ✨ utils for license text and support to store license (#38)
slugb0t Dec 28, 2023
ff04d07
feat: added study metadata keywords (#37)
Aydawka Dec 28, 2023
60c954b
🚨 fix: fix mypy warning
megasanjay Dec 28, 2023
7a5a63b
feat: DOI reserved for version table (#39)
Aydawka Jan 15, 2024
1435398
Revert "feat: DOI reserved for version table" (#40)
megasanjay Jan 15, 2024
992d6fd
👷 ci: rename container image
megasanjay Jan 18, 2024
0f9e18c
🐛 fix: update domains to app
megasanjay Jan 18, 2024
c0aa648
🚑 fix: disable email deliverability check
megasanjay Jan 18, 2024
76d3112
feat: DOI reserved for version table (#41)
megasanjay Jan 19, 2024
8e603d5
🐛 fix: minor fixes
greenstick Jan 20, 2024
4b5bf93
Merge branch 'dashboard' of https://github.com/AI-READI/api.fairhub.i…
greenstick Jan 20, 2024
300b156
🐛 fix: minor fixes
greenstick Jan 20, 2024
acc9f5f
no message
greenstick Jan 20, 2024
a2678da
style: 🎨 fix code style issues with Black
lint-action Jan 20, 2024
7c8f9a1
🐛 fix: minor fixes
greenstick Jan 20, 2024
004cdc2
Merge branch 'dashboard' of https://github.com/AI-READI/api.fairhub.i…
greenstick Jan 20, 2024
b7726af
style: 🎨 fix code style issues with Black
lint-action Jan 20, 2024
13748c2
Merge branch 'staging' into dashboard
greenstick Jan 23, 2024
e12265d
Merge branch 'dashboard' of https://github.com/AI-READI/api.fairhub.i…
greenstick Jan 23, 2024
4025744
🐛 fix: minor fixes
greenstick Jan 26, 2024
3f56c58
style: 🎨 fix code style issues with Black
lint-action Jan 26, 2024
95fb942
🐛 fix: minor fixes
greenstick Feb 4, 2024
f6f9fe4
style: 🎨 fix code style issues with Black
lint-action Feb 4, 2024
8ccd04a
🐛 fix: add host arg to app.py
greenstick Feb 5, 2024
86a0978
🐛 fix: fix module transform bug (needed to create deep copy)
greenstick Feb 6, 2024
c147960
✨feat: improved cache management
greenstick Feb 9, 2024
7641482
🐛 fix: minor fixes
greenstick Feb 9, 2024
cde2287
style: 🎨 fix code style issues with Black
lint-action Feb 13, 2024
bf42b45
🐛 fix: remove https://localhost:3000from CORS in debug mode
greenstick Feb 13, 2024
79ace19
Merge branch 'dashboard' of github.com:AI-READI/fairhub-api into dash…
greenstick Feb 13, 2024
f31e2c6
🐛 fix: import error
greenstick Feb 13, 2024
ce74942
🐛 fix: import error, upgrade to Python3.10
greenstick Feb 13, 2024
ef0efea
🐛 fix: import error - PyCap
greenstick Feb 13, 2024
5cf1ecd
✨feat: redcap + dashboard auth management
greenstick Feb 13, 2024
05db29b
style: 🎨 fix code style issues with Black
lint-action Feb 13, 2024
7c69aad
🐛 fix: minor fixes
greenstick Feb 13, 2024
76dc410
Merge branch 'dashboard' of github.com:AI-READI/fairhub-api into dash…
greenstick Feb 13, 2024
745a84b
style: 🎨 fix code style issues with Black
lint-action Feb 13, 2024
478cb12
🐛 fix: minor fixes
greenstick Feb 13, 2024
2383b55
Merge branch 'dashboard' of github.com:AI-READI/fairhub-api into dash…
greenstick Feb 13, 2024
12d080a
🔨 chore: update side scripts
megasanjay Feb 15, 2024
28089fa
✨feat: redcap api updates, dashboard wip
greenstick Feb 17, 2024
098457d
Merge branch 'dashboard' of github.com:AI-READI/fairhub-api into dash…
greenstick Feb 17, 2024
894b18a
style: 🎨 fix code style issues with Black
lint-action Feb 17, 2024
d9e6d81
feat: ✨ improved REDcap & Dashboard API structure
greenstick Feb 20, 2024
af6b55a
style: 🎨 fix code style issues with Black
lint-action Feb 20, 2024
275a4be
Merge pull request #42 from AI-READI/dashboard
greenstick Feb 20, 2024
a1078c4
🚩 feat: feature flag signup API endpoint (#43)
megasanjay Feb 21, 2024
912d79c
🙈 chore: update gitignore
megasanjay Feb 21, 2024
135d4f4
chore 🔨 replaced name with family/ given name in contributor (#44)
Aydawka Feb 21, 2024
6f0a60a
feat: ❇️ add dataset healthsheet table (#46)
Aydawka Feb 22, 2024
88778fc
feat: ❇️ add published dataset table (#45)
Aydawka Feb 22, 2024
6e49067
feat: ❇️ add healtsheet endpoints (#47)
Aydawka Feb 27, 2024
489583b
🚚 chore: update path
megasanjay Feb 27, 2024
29da4d9
Merge branch 'staging' of https://github.com/AI-READI/api.fairhub.io …
megasanjay Feb 27, 2024
dde1567
👷 ci: remove old workflows
megasanjay Feb 27, 2024
f635f4f
💚 ci: fix build
megasanjay Feb 27, 2024
869e1aa
style: 🎨 fix code style issues with Black
lint-action Feb 27, 2024
c63d5df
💚 ci: fix build
megasanjay Feb 27, 2024
050fc6a
💚 ci: fix build
megasanjay Feb 27, 2024
3490822
style: 🎨 fix code style issues with Black
lint-action Feb 27, 2024
ab971d5
🚨 chore: remove format action
megasanjay Feb 27, 2024
3ec71fe
💚 ci: fix build
megasanjay Feb 27, 2024
137e723
💚 ci: fix build
megasanjay Feb 27, 2024
6e19ce2
✨feat: add participant list report
greenstick Feb 29, 2024
7e55ef6
Merge branch 'dashboard' into staging
greenstick Feb 29, 2024
f8024f9
fix: 🐛 dataset related-identifier and publisher tables (#49)
Aydawka Mar 1, 2024
3d95380
feat: ✨ update dashboard config for new modules
greenstick Mar 6, 2024
fe95f8e
Merge branch 'staging' of github.com:AI-READI/fairhub-api into staging
greenstick Mar 6, 2024
13e7737
🔨 chore: add table reset
megasanjay Mar 11, 2024
fa2307b
fix: 🐛 study metadata changes (#50)
Aydawka Mar 11, 2024
6a41186
fix: 🐛 study metadata database updates (#51)
Aydawka Mar 11, 2024
1837d37
🔨 chore: update delete script
megasanjay Mar 11, 2024
8b7c6b1
fix: 🐞 version metadata changes (#52)
Aydawka Mar 14, 2024
abe68dd
feat: public dashboard creation and management
greenstick Mar 19, 2024
b35a19d
Merge branch 'staging' of github.com:AI-READI/fairhub-api into staging
greenstick Mar 19, 2024
06ca5bb
style: format
greenstick Mar 19, 2024
ac7228d
fix: 🐛 maganing organization table (#53)
Aydawka Mar 19, 2024
7f97fea
chore: rebuild database
megasanjay Apr 2, 2024
ecaf661
🗃️ chore: update db
megasanjay Apr 2, 2024
ee0eefd
wip: finalizing redcap release ETL
greenstick Apr 6, 2024
506e867
Merge branch 'staging' of github.com:AI-READI/fairhub-api into staging
greenstick Apr 6, 2024
11f5829
feat: ✨ REDCap release ETL
greenstick Apr 8, 2024
70eb4bd
fix: 🐛 minor fix to aireadi_config.py
greenstick Apr 9, 2024
b7660dd
chore: reset
megasanjay Apr 15, 2024
eb1f287
👷 ci: add build for main pushes
megasanjay Apr 15, 2024
61d14b1
Merge branch 'main' into staging
megasanjay Apr 15, 2024
216df4a
👷 ci: disable unused workflow
megasanjay Apr 15, 2024
93d4ac9
🗃️ chore: add email to bypass
greenstick Apr 16, 2024
5a2f196
Merge branch 'staging' of github.com:AI-READI/fairhub-api into staging
greenstick Apr 16, 2024
9be1c67
fix: 🐛 remove CSV saving in REDCap ETL
greenstick Apr 16, 2024
4f7fc0d
feat: add sessions (#56)
Aydawka Jul 3, 2024
b027a2f
chore: rebuild image
megasanjay Jul 26, 2024
45e4f5c
chore: test migration
megasanjay Aug 1, 2024
8d98dae
Revert "feat: add sessions (#56)" (#58)
megasanjay Aug 1, 2024
f37a654
feat: year 2 dashboard updates
greenstick Nov 7, 2024
e688464
fix: precommit error
greenstick Nov 7, 2024
8e434b6
fix: update cors origin for PR deployment
Aydawka Jan 28, 2025
073d622
fix: update cors origin
Aydawka Jan 28, 2025
beb1b9b
fix: disable the package mood in poetry
Aydawka Jan 28, 2025
f962fda
fix: location of package-mode
Aydawka Jan 28, 2025
6ced394
chore: update workflow
megasanjay Jan 28, 2025
5827d54
ci: update workflow
megasanjay Jan 28, 2025
e2b43af
ci: update poetry install
megasanjay Jan 28, 2025
e15b98e
fix: syntax
Aydawka Jan 28, 2025
6ef9b54
feat: add sessions (#59)
megasanjay Feb 5, 2025
9bfea8a
fix: update study acronym table into short description (#60)
Aydawka Feb 20, 2025
db6b1f6
✨ feat: added email verifications (#34)
Aydawka Feb 20, 2025
998ad31
fix: invitation location
Aydawka Feb 20, 2025
231ac98
fix: invitation issue
Aydawka Feb 20, 2025
706fd63
fix: ✨ disable email verification (#61)
Aydawka Feb 21, 2025
e37882b
refactor: study metadata pages (#62)
Aydawka Mar 6, 2025
2c9210c
fix: update model for the user and contributor
Aydawka Mar 12, 2025
985ccd7
fix: restyle dataset metadata (#63)
Aydawka Mar 24, 2025
2983bb7
fix: 🐛 study metadata cleanup (#64)
Aydawka Mar 25, 2025
b07423e
feat: add reset password endpoints (#57)
Aydawka Apr 2, 2025
e33a77d
fix: uploaded files (#66)
Aydawka Jun 18, 2025
f988053
fix: creating study check
Aydawka Jul 2, 2025
2449c09
feat: ✨ add clinical trials integration (#67)
Aydawka Jul 9, 2025
3186c99
fix: clinical trials automation fix (#68)
Aydawka Jul 16, 2025
0b82c4c
fix: dataset updated date
Aydawka Sep 30, 2025
9de8447
fix: huge etl upgrades
greenstick Nov 15, 2025
af64add
Merge pull request #70 from AI-READI/dashboard-year-3
greenstick Nov 15, 2025
a8f75cc
fix: package-mode key removed
greenstick Nov 15, 2025
92c56ed
fix: Polars compilation issue
greenstick Nov 15, 2025
47b2364
fix: attempt rust compilation step
greenstick Nov 15, 2025
d665fbb
fix: Try moving from Alpine to Debian for Polars installation
greenstick Nov 15, 2025
d3ab6eb
fix: Minor fix
greenstick Nov 15, 2025
bf09301
fix: OS issue with Polars and CSV handling
greenstick Nov 15, 2025
7814b68
fix: Try different CSV separator
greenstick Nov 15, 2025
e37858b
fix: Move to live transform
greenstick Nov 15, 2025
2f4172c
fix: Move to live transform
greenstick Nov 15, 2025
003d8d8
feat: Additional logging on live transform
greenstick Nov 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
- uses: Gr1N/setup-poetry@v8

- name: Install dependencies
run: poetry install
run: poetry install --no-root

- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: .venv
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
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"
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ jobs:
- uses: Gr1N/setup-poetry@v8

- name: Install dependencies
run: poetry install
run: poetry install --no-root

- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: .venv
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
Expand Down
43 changes: 28 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,47 @@
FROM python:3.10-alpine
# Use official slim Python image
FROM python:3.10-slim

# Expose the port your app will run on
EXPOSE 5000

# Set working directory
WORKDIR /app

# Environment
ENV POETRY_VERSION=1.3.2

RUN apk update
RUN apk add --no-cache gcc libffi-dev musl-dev postgresql-dev

# Note: Force pip to use pre-built wheels
ENV PIP_ONLY_BINARY=:all:

# Install system dependencies for building Python packages
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
build-essential \
libffi-dev \
libpq-dev \
&& rm -rf /var/lib/apt/lists/*

# Install Poetry
RUN pip install "poetry==$POETRY_VERSION"

COPY poetry.lock pyproject.toml ./

# Install Python dependencies
COPY pyproject.toml poetry.lock ./
RUN poetry config virtualenvs.create false
RUN poetry install
RUN poetry install --no-root

# Copy source code and config
COPY apis ./apis
COPY model ./model
COPY core ./core
COPY modules ./modules
COPY app.py .
COPY config.py .
COPY caching.py .

COPY app.py config.py caching.py ./
# Copy database/migration setup
COPY alembic ./alembic
COPY alembic.ini .

# Copy runtime entrypoint
COPY entrypoint.sh .
COPY alembic alembic.ini ./
COPY entrypoint.sh ./

# Setup Entrypoint
RUN chmod +x entrypoint.sh

ENTRYPOINT ["./entrypoint.sh"]
ENTRYPOINT ["./entrypoint.sh"]
36 changes: 36 additions & 0 deletions alembic/versions/0ff53a655198_update_email_verification.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
"""update_email_verification

Revision ID: 0ff53a655198
Revises: 3ffefbd9c03b
Create Date: 2025-02-18 13:50:48.808176

"""
from typing import Sequence, Union
import sqlalchemy as sa
import datetime
from alembic import op


# revision identifiers, used by Alembic.
revision: str = '0ff53a655198'
down_revision: Union[str, None] = '5c1257547eb8'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


created_at = int(datetime.datetime.now(datetime.timezone.utc).timestamp())


def upgrade() -> None:
op.alter_column("email_verification", "token", type_=sa.String)
op.alter_column("email_verification", "user_id", type_=sa.CHAR(36))

op.drop_column("email_verification", "created_at")

op.add_column(
"email_verification", sa.Column("created_at", sa.BIGINT(), nullable=True)
)

op.execute(f"UPDATE \"email_verification\" SET created_at ='{created_at}'")

op.alter_column("email_verification", "created_at", nullable=False)
33 changes: 33 additions & 0 deletions alembic/versions/3ffefbd9c03b_email_verified_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
"""email verified type

Revision ID: 3ffefbd9c03b
Revises: 9698369d7a8c
Create Date: 2024-07-01 12:28:02.596192

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '3ffefbd9c03b'
down_revision: Union[str, None] = '9698369d7a8c'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
with op.batch_alter_table("user") as batch_op:
batch_op.alter_column(
"email_verified",
type_=sa.Boolean(),
postgresql_using="email_verified::boolean",
)






28 changes: 28 additions & 0 deletions alembic/versions/5c1257547eb8_update_study_acronym.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
"""update_study_acronym

Revision ID: 5c1257547eb8
Revises: 3ffefbd9c03b
Create Date: 2025-02-19 16:25:24.597207

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '5c1257547eb8'
down_revision: Union[str, None] = '3ffefbd9c03b'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
with op.batch_alter_table("study") as batch_op:
batch_op.alter_column(
"acronym",
new_column_name="short_description",
type_=sa.String(300),
nullable=False
)
27 changes: 27 additions & 0 deletions alembic/versions/9698369d7a8c_create_session_table.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
"""create session table

Revision ID: 9698369d7a8c
Revises:
Create Date: 2024-06-13 09:59:17.605666

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa

# revision identifiers, used by Alembic.
revision: str = '9698369d7a8c'
down_revision: Union[str, None] = None
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
op.create_table(
'session',
sa.Column('id', sa.CHAR(36), primary_key=True),
sa.Column('user_id', sa.CHAR(36), sa.ForeignKey("user.id"), nullable=False),
sa.Column('expires_at', sa.BigInteger, nullable=False)
)

26 changes: 26 additions & 0 deletions alembic/versions/df71df391cdb_add_token_to_user.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
"""add token to user

Revision ID: df71df391cdb
Revises: 3ffefbd9c03b
Create Date: 2024-07-03 10:15:49.657807

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
import uuid


# revision identifiers, used by Alembic.
revision: str = 'df71df391cdb'
down_revision: Union[str, None] = '0ff53a655198'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None

password_reset_token = str(uuid.uuid4())

def upgrade() -> None:
op.add_column(
"user", sa.Column("password_reset_token", sa.String, nullable=True)
)
24 changes: 24 additions & 0 deletions alembic/versions_backup/6173282aef08_remove_invite_info.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
"""remove_invite_info

Revision ID: 6173282aef08
Revises: f150341d2741
Create Date: 2023-12-19 00:32:08.157538

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = "6173282aef08"
down_revision: Union[str, None] = "f150341d2741"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
op.drop_column("invite", "info")
with op.batch_alter_table("notification") as batch_op:
batch_op.alter_column("target", nullable=True)
Loading
Loading