clamsproject / clams-python

CLAMS SDK for python
http://sdk.clams.ai/
Apache License 2.0
4 stars 1 forks source link

auto generate `app_version` value #118

Closed keighrim closed 1 year ago

keighrim commented 1 year ago

This PR closes #114.

A few notes;

codecov[bot] commented 1 year ago

Codecov Report

Merging #118 (f8c6965) into develop (9266524) will increase coverage by 0.60%. The diff coverage is 94.11%.

@@             Coverage Diff             @@
##           develop     #118      +/-   ##
===========================================
+ Coverage    81.29%   81.89%   +0.60%     
===========================================
  Files            6        6              
  Lines          449      475      +26     
===========================================
+ Hits           365      389      +24     
- Misses          84       86       +2     
Flag Coverage Δ
unittests 81.89% <94.11%> (+0.60%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
clams/appmetadata/__init__.py 91.54% <93.93%> (+0.32%) :arrow_up:
clams/app/__init__.py 87.50% <100.00%> (-0.22%) :arrow_down:

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

keighrim commented 1 year ago

New commits added to

  1. re-order app_version generation logic
  2. completely disable manually setting app_version and mmif_version values
  3. allow using "shortname" for identifier field (dev puts example-app -> automatically expanded to http://apps.clams.ai/example-app/v100)
keighrim commented 1 year ago

https://github.com/clamsproject/.github/commit/84c29a95b13d4b8537eef8d568fde6f978fa5f10 adds $CLAMS_APP_VERSION generation for container actions, but Containerfile/Dockerfiles in individual app repositories also need to be updated to have something like this.

ARG CLAMS_APP_VERSION
ENV CLAMS_APP_VERSION ${CLAMS_APP_VERSION}

(turned out that there's no way to pass a ENV value from docker build CLI, instead only ARG value is passable)