-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UIP-49 modify dockerfile #93
Conversation
lib/biokbase/log.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is most of the PR. Copy-pasted from another repo, so it can be included here directly.
Dockerfile
Outdated
FROM kbase/sdkbase2:python | ||
MAINTAINER KBase Developer | ||
FROM python:3.12-slim | ||
LABEL MAINTAINER KBase Developer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LABEL maintainer="KBase Developer"
Dockerfile
Outdated
RUN pip install --upgrade pip | ||
RUN pip install -r requirements.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could combine into a single command
@@ -0,0 +1,27 @@ | |||
[NarrativeService] | |||
kbase-endpoint = https://ci.kbase.us/services |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to guess that a lot of these aren't used...
I've been contemplating about migrating to a model where the config file just provides the base url (instead of all these derivative URLs) and any extra stuff, like scratch dir, etc., and there's a config.py
that generates the various necessary endpoint URLs from the base url. Main advantages would be being able to reuse the config generator in multiple projects, not having to remember the suffixes if you accidentally delete the test or real deploy.cfg, and a more compact config file with less repetition. Hmmm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I bet you're right. I'd rather ferret those out when picking through the tests, though, as they seem reasonably benign here.
test/run_tests.sh
Outdated
# export KB_DEPLOYMENT_CONFIG=$script_dir/../deploy.cfg | ||
export KB_AUTH_TOKEN=`cat /kb/module/work/token` | ||
export PYTHONPATH=$script_dir/../lib:$PATH:$PYTHONPATH | ||
# cd $script_dir/../test | ||
# python -m nose --with-coverage --cover-package=NarrativeService --cover-html --cover-html-dir=/kb/module/work/cover_html --nocapture . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you want to remove these comments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I suppose.
As done in StaticNarrative and elsewhere, this updates the Dockerfile to use the Python 3.12 image, and a little bit of compatilbility fixing in the test suite.
Note that tests are (still) going to fail pretty hard right now due to some mish-mash between mocking and contacting other services. That'll be addressed in a patch to split between unit and integration tests.