-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature/add unit tests #20
Conversation
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.
In addition to the per-file comments and per-line comments included elsewhere in this review...
Additional comments required to be resolved before merge:
- Docker setup: Dockerfile fails to build since
ras_stac/plugins
does not exist. - Docker setup: Add a
.dockerignore
file and use it to explicitly avoid including.env
into the image. Even though this is currently not an issue (Dockerfile does not have aCOPY . .
directive), might as well do it.
Additional comments that could be made into issues if not resolved prior to merge:
- DRYify Logging: Start a new file
ras_stac/utils/logger.py
with a functionset_up_logger
that each module and script can import, then consolidate the various logging calls. - Idiomacy: When a variable holds an S3 path / URL having the form
"s3://bucket/some/great/blob"
Use var names3_path
rather thans3_key
ors3_full_key
- Explicit failures when environment is not set up properly: Use
os.environ["VARNAME"]
instead ofos.environ.get("VARNAME")
since the former will fail with a clear KeyError if the env var has not been set. - Stability: Consider upgading version of GDAL base image in Dockerfile (currently 3.8.0) to incorporate the latest bug fix releases within 3.8.x.
- Robustness: Near the top of
populate-sample-data.sh
, modify existing lineset -e
to be the standard fullset -euo pipefail
. Also move this line to the very top, just underneath the shebang, before thesource .env
. - Convenience / Ease of Use: In
populate-sample-data.sh
, invoke the Python runtime likepython -um ...
instead ofpython -m ...
. Theu
causes Python to run unbuffered, so you can see lines in realtime as they are printed/logged rather than waiting for a large chunk of lines to flush.
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.
Thanks for the updates. I just pushed a small change to an error message, good to go.
Edit: I did push one more commit to add core tests into the Docker image, and to add a shell script for building the Docker image and running those core tests in the container.
This PR makes the following changes to ras-stac: