loris-imageserver / loris

Loris IIIF Image Server
Other
208 stars 87 forks source link

Use sane environment by default #538

Open ambs opened 3 years ago

ambs commented 3 years ago

Some details can be made better, but for now, it is working perfectly on my docker environment. I am happy to provide further changes on this branch if you like.

bcail commented 3 years ago

@ambs thanks - looks like there's an error to fix.

ambs commented 3 years ago

I fixed the problem. It's not a clean solution yet. I think you need to decide what to do with the get_debug_config function. I suggest it just sets values if they are not present, and therefore, not rewriting anything. If that seems like a good suggestion, let me know, and I'll prepare such a PR (and we can keep the debug=True option).

bcail commented 3 years ago

@ambs I think updating get_debug_config to just set values if they're not present - would be ok. That way configuration in the config file isn't overwritten, as you point out. However, to update get_debug_config, you might need to update the tests, which use that function. You might need to add a new function to set the correct config for the tests.

ambs commented 3 years ago

@bcail I am happy with that. It might take some more time to prepare a decent patch, but I will try to prepare it. Just so I do not abuse CI, what is the correct way to run the tests locally? Thank you

bcail commented 3 years ago

Take a look at the CI configuration: https://github.com/loris-imageserver/loris/blob/development/.github/workflows/ci.yml. That shows how to set up the environment for running the tests.