cerfacs-globc / icclim

icclim: Python library for climate indices and climate indicators calculation.
https://icclim.readthedocs.io/en/latest/
Apache License 2.0
80 stars 32 forks source link

Enh/add auto release process #291

Closed bzah closed 8 months ago

bzah commented 8 months ago

Pull Request to resolve #272

Describe the changes you made

Add a github action to release icclim on pypi whenever a github release is published. Shamelessly inspired by xclim's github action that serve the same purpose.

Beside this PR, a dedicated release github environment has been create to enable trusted release to pypi. This environment can be managed at the repository level by the admins @pagecp and @bzah here : https://github.com/cerfacs-globc/icclim/settings/environments

References

github-actions[bot] commented 8 months ago

Coverage

Report
FileStmtsMissCoverMissing
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/icclim
   _generated_api.py178995%17–27
   icclim_logger.py852966%24, 43, 65, 70–95, 105, 111–142, 150–155
   icclim_types.py13130%1–21
   main.py2833488%59–65, 125, 134, 415–419, 502, 528–529, 531–532, 534, 536–537, 539–540, 560–567, 637–642, 727, 734, 738–739
   utils.py40880%14–15, 25–30, 37–41, 43–44
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/icclim/ecad
   xclim_binding.py52885%16–18, 44, 48, 77, 81, 110, 114
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/icclim/generic_indices
   generic_indicators.py4989880%49–55, 68, 72, 89, 93, 97, 110–113, 117, 191, 333–337, 339–343, 389, 420–421, 723–724, 759, 765, 773–774, 794, 958–962, 964–965, 983–989, 993, 1021, 1023, 1091–1092, 1125–1151, 1179–1199, 1215, 1224–1225, 1252–1284, 1290–1293, 1315
   standard_variable.py48198%19
   threshold.py4113492%49–54, 209–210, 234, 238, 286, 302–304, 319–323, 327–331, 411, 553–554, 617–622, 717–718, 913, 936–937, 942, 1016–1017, 1020–1024, 1112–1114
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/icclim/models
   cf_calendar.py35197%20
   climate_variable.py1062180%27–34, 107–113, 168–169, 178, 214–218, 221, 261, 265–269, 296–297, 334
   frequency.py1801592%36–38, 174–177, 321–327, 331, 414–418, 440, 445
   global_metadata.py660%1–9
   index_config.py27581%7–11
   index_group.py35294%33–37
   logical_link.py21195%12
   operator.py31390%10, 15–19
   standard_index.py30680%7–10, 59, 62, 66
   user_index_dict.py20200%1–28
/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/icclim/pre_processing
   in_file_dictionary.py880%1–29
   input_parsing.py2055374%22–28, 81–82, 86–87, 92–97, 111–112, 180, 185–189, 192, 202–203, 214–218, 244, 258, 272, 293–298, 302, 304, 312–317, 322–327, 338–339, 353–360, 369–389, 414
   rechunk.py89693%21–22, 43–44, 48, 136
TOTAL264338186% 

Test results

Tests Skipped Failures Errors Time
189 0 :zzz: 0 :x: 0 :fire: 1m 33s :stopwatch: