datakind / permanent-colandr-back

DataCorps - Colandr Tool resources
https://www.colandrapp.com/signin
14 stars 1 forks source link

Clean up app+extensions setup and dockerize the stack #49

Closed bdewilde closed 1 year ago

bdewilde commented 1 year ago

changes

very sorry to dump a bunch of changes together like this 😞 i was obliged to iteratively reorganize and update various aspects of the app's setup+structure in order to make progress on dockerizing and testing the app, which remains my primary goal.

questions

btw, this is where i landed on what was originally posted here: https://github.com/datakind/permanent-colandr-back/pull/48

bdewilde commented 1 year ago

@samanz i think i got the everything* working in docker! to test for yourself, you'll have to comment out all of the lock functionality in tasks.py (ugh sorry), then get the services up and running with docker compose up --build. shell into the colandr-api container and run flask reset-db followed by flask add-admin --name [NAME] --email [EMAIL], plus an immediate password prompt. then you can try running my old "test" script outside docker like python repopulate_db --email [EMAIL] --password [PASSWORD]. you should see lots of logging in the api as well as worker containers that confirms things are chugging along.

*excluding ~full-text uploads~, redis task locking, and user auth in unit testing, as mentioned in the PR message; ~as well as citation deduplication, which should be easy to fix (just have to get the model files into the docker container)~

imho this is a big improvement over the old setup!! just gotta get a couple key missing pieces working before we can really start hacking on this code.

bdewilde commented 1 year ago

update: full-text uploads and citation deduping now appear to be working 👍

bdewilde commented 1 year ago

hi @samanz , i think i've gotten everything working, except for the unit testing user auth issue. I'm just going to merge, so I can work on the testing issue separately. Please feel free to review this PR after the fact.