abraham-ai / eden

Eden converts your python function into a hosted endpoint with minimal changes to your existing code :mage_man:
GNU General Public License v3.0
47 stars 5 forks source link

try/except block to handle use-cases without git #40

Open mathematicalmichael opened 1 year ago

mathematicalmichael commented 1 year ago

ran into an issue trying to build a container (which did not depend on git cloning an "eden app"), and currently the code will bail out on git.Repo. This proposed change allows for overriding the need for git to be installed by setting an environment variable, and allows for successful server responses without it.

codecov-commenter commented 1 year ago

Codecov Report

Merging #40 (fca926b) into master (04b6b3d) will decrease coverage by 0.56%. The diff coverage is n/a.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##           master      #40      +/-   ##
==========================================
- Coverage   69.04%   68.49%   -0.56%     
==========================================
  Files          22       24       +2     
  Lines         588      657      +69     
==========================================
+ Hits          406      450      +44     
- Misses        182      207      +25     

see 2 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

mathematicalmichael commented 1 year ago

I tested this change with the same COPY directive as in #41 and can confirm that this change allows a container to be built without git installed if ENV GIT_PYTHON_REFRESH=quiet is set in the Dockerfile.