From ea9d4df3a337389208a4b0fe1eda906134896150 Mon Sep 17 00:00:00 2001 From: Vincent Privat <146961743+vprivat-ads@users.noreply.github.com> Date: Fri, 12 Jul 2024 10:39:18 +0200 Subject: [PATCH] Include release date in extension table (#51) --- .gitignore | 2 ++ python/README_TEMPLATE.md.jinja | 6 +++--- python/__pycache__/config.cpython-311.pyc | Bin 2339 -> 0 bytes python/__pycache__/config.cpython-312.pyc | Bin 2315 -> 0 bytes python/create_readme.py | 10 +++++++++- 5 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 .gitignore delete mode 100644 python/__pycache__/config.cpython-311.pyc delete mode 100644 python/__pycache__/config.cpython-312.pyc diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f1c7d86 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +python/__pycache__ + diff --git a/python/README_TEMPLATE.md.jinja b/python/README_TEMPLATE.md.jinja index 1990b46..9a8cce0 100644 --- a/python/README_TEMPLATE.md.jinja +++ b/python/README_TEMPLATE.md.jinja @@ -23,10 +23,10 @@ Below you can also find a list of extensions grouped by [maturity](#grouped-by-m ### Alphabetical list -| Title | Field Name Prefix | Scope | [Maturity](https://github.com/radiantearth/stac-spec/tree/master/extensions#extension-maturity) | Version | Description | -| ----- | ----------------- | ----- | ----------------------------------------------------------------------------------------------- | ------- | ----------- | +| Title | Field Name Prefix | Scope | [Maturity](https://github.com/radiantearth/stac-spec/tree/master/extensions#extension-maturity) | Version | Release Date | Description | +| ----- | ----------------- | ----- | ----------------------------------------------------------------------------------------------- | ------- | ------------ | ----------- | {%- for e in extensions %} -| [{{e.title}}]({{e.url}}){% if e.external %}*{% endif %} | {{e.prefix}} | {{e.scope}} | {{e.maturity}} | {{e.version}} | {{e.description}} | +| [{{e.title}}]({{e.url}}){% if e.external %}*{% endif %} | {{e.prefix}} | {{e.scope}} | {{e.maturity}} | {{e.version}} | {{e.releasedate}} | {{e.description}} | {%- endfor %} * **Last updated:** {{updated}} diff --git a/python/__pycache__/config.cpython-311.pyc b/python/__pycache__/config.cpython-311.pyc deleted file mode 100644 index db70b40a3305b18f962e20c4c332bac3622be5ec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2339 zcmbVNPjlNu6qjW?cIwy(b(*A5%9ekFGqF@|P&y2uaYC5b4zcOb3`4rnTgyxJ$K72e zwN5$m3EQYH&rvcufPlxpa`>Y?RgGLFb8F*#PU2W zz-w?lmaDJ`H()82mth5N!t1g82Hb)-;WoSl=y@LQz}xUnIx`FV8B>9Gf6nZy@Lor$ zz3&$cM(w(R{W4f~ojeo7;na1)VwW(6!6W_(7uc9ucpWImTo4wPx(ri?I_5@m$6pbX z3D{O0)2V|$w@w(v7TWE*!u3Dv3o+pLbls$)?;UD}YwH$ud_DS&E*K%Y9f#NdNrvk< zj!+-O5xQvvhL5!*ipL2vTt_A^&IPL|0mKb#5v`UB^HOP%FzYcZoM8lm zO~MioE}0*Qi0hdL*d`47_flY&p~gsjTdD8WNJ*lcqGOQcbO8lDR{}&9aZDj8i2$Fa zLqiQdAcov|Yl!3q^*jspT!xapMAXJ6VMEC%J0e4_g}F^?+5Sf~Y+i#&Hy&#N&I z#W;ok$0(Z%&@hn^t(Rg?ggXepPK)~8&! zj2f?GsqmGDEh>ioCn?;^5cPE8+)kaZ#?>UuDY_nQ5tk1n7ZUHp8rK9i43A-Bh}<4B zBxS^iDxOadQeUF=<;jhBlGGg$CKA#nj#^mk7}$xrjDJ7P`ZAE^F-*L7Q}3%`PUD;c zeVAr;L7m7_h&q9TWdBI|f}l3}??Q-=hddR99Z3tv!v8!?-%1pk$4#!8?orY>C)#P- z)sH^ZP`w?FU zGXq9?^cgEit-mnI39avKpf0tDzxn@?!wk+Qcvri7K0&FfW&IK(wkt?I>bm~Tb2reW z>1)&ti-OpLs7beK*>L_ryV?A@wcUMmu-DjacfxApn{H#TwZ3x@39Zg{yVVKjwzpdC zy+*R+SLKC7q`Z8n_g$OlvaLIW>Bla664N@(R#KhZSJb`0G8l@!>*(?->QPf03||)S z+b(z(`IIfo-(=*+|B}Nvo5^IxMI~4M!5yi$gKT*;UmK~bL3UwueQl)H$FupWdNMy= zR4TWEQZuMPP<I3QAi+<-4(}EN-f2O^ZRP5mdg7Ox8Kma!~prs2l`U z=d8<0P}&YEkAv#*S-o7}4(6AF%5qTsU|gDs5{QNcrGkP|=if}tOnq4$Db?}gOm0CP OE9r1D7rpF;#Q!&l%Ppk< diff --git a/python/__pycache__/config.cpython-312.pyc b/python/__pycache__/config.cpython-312.pyc deleted file mode 100644 index bda2d38b95d8ff54fe687fb24218189d99ba7421..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2315 zcmbVN&2!sC6qn`C)V30Enxs(5mT!kxDmSKd7((lWFo_-F(4iTIbfaC%OC_zkyGm-E zfZ@QA6I^=Y#^1ul!%3qn|A0#m%=E-cvf?x|4J7h-_4et#x9|7cw{QQb*DopZY5(wZ z|DPE}`754ePi-PR{ZR_PDo8;&OO>N4$2=;?v4~2RY8CbrR7MpvgD#=!;{vLoI?~W= zBF~|h(95Wi$n)qjT0o15yo9cxSJ118d=r%6mCWL2v(- z+f#?{G~W%%CL>PEgh3tIP76O0*yV(}LESkyjVimCF^GH|EO7zNsUdG6!XX!!MKjdH zF5?#A!IEH*xWu)PW49ogng_L2%m}o>_J9f+d@>Ni<2Mb%B4Xel=q7axo4A1yFJcIW zvEd}ajpNL?0h0(VFNv_5MPTqqPowx8Gn2X!i8vMT>{!N5d-cv%TX#@!camkYhQ**a z7y^cEC@=yJ77#%JR{;0T0e~DZ-<1>m(8sQcf$KX5n5_V43nF}k0dx`ICbY5MEJQ`A zv~iU8nH`lFhRDHD6=5#7!4s1BsB{}Tn8Dy?2JAf4n5l0k^Su};X_OOmcxg^&P|&9m zAh5A(2}wx|_<1^X(B>XC<<8qfAUCM*+n`SwNcR#D2U?g7C8O*R54j!{)`;x{A7(ht z!$Cjx+{`>L#y}k71pZ&*Y|cQ>sBNzR7h6z}Lp;SE6G6oQGaw6ylb9kX1S1E&!2Cs& zAR^HcE-P(7xS))fFJ!6wg%52ahQUV}-189iaN^v}oG-@JB+LoA?yY0WJ;{Z{JNcT_ z1T;;bL30RbADEIdY{nJOrw3^u(FXG5#ym;t4lxrcX%k01s`O0g#*HPom1TV%$nqGb z-rJe?#V}`aPJlkhGCQMAWGTd*zy-2@q|Cp4-E?09jL?lkk!?CtK>)|Z`)-Fy2x?d@(aYP7%FZSQneH}_+q z)7$8FdQoj-z0=)krzXEEPbDJd*!cv6a(rS z@+#^ROZSG)Dz_Ypd>env7UeQI`R9MiVVuw9a^s3psQ*Mq>a{Rmo4o6z+2%-H4)fY* zZh54>KdzP<>UXo_1x33WR<}Y8g^dSKW{Ua3SW~oxu(}><-;7mdeoZ~r&WF`@sC^x4 z?WuM#tbP`1`(eX9He3p;8=-bTY#be{q*XVZT?n3F}{+5-hX; diff --git a/python/create_readme.py b/python/create_readme.py index e57255e..6773473 100644 --- a/python/create_readme.py +++ b/python/create_readme.py @@ -79,8 +79,14 @@ def get_extensions() -> list: tags = tags.json() if len(tags) > 0: src["version"] = re.sub(r"^v", "", tags[0]["name"]) + try: + with requests.get(tags[0]["commit"]["url"], headers=headers) as commit: + src["releasedate"] = commit.json()["commit"]["author"]["date"][:10] + except error as e: + logger.error(f"commit not available: {e}") else: src["version"] = "**Unreleased**" + src["releasedate"] = "N/A" if "maturity" not in src: src["maturity"] = wip except error as e: @@ -131,6 +137,8 @@ def get_extensions() -> list: src["maturity"] = unknown if "scope" not in src: src["scope"] = unknown + if "releasedate" not in src: + src["releasedate"] = unknown return data @@ -159,7 +167,7 @@ def main() -> bool: count = len(data) if count < 45: - logger.error("Something likely went wrong as there are not enough repos listed, don't overrride README") + logger.error("Something likely went wrong as there are not enough repos listed, don't override README") sys.exit(1) now = datetime.utcnow().strftime("%b %d %Y, %H:%M %Z")