From 5e206f439535f36dc8bbdef1d95c0c5904bb2454 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Tue, 14 Nov 2023 16:54:08 +0000 Subject: [PATCH 01/45] understanding workflow --- fuji_server/yaml/metrics_v0.7_software.yaml | 41 ++++++++ notes.md | 91 ++++++++++++++++++ .../icon/bootstrap/question-circle.svg | 4 + simpleclient/icon/fuji_logo_square.png | Bin 0 -> 23779 bytes start-dev.sh | 5 + 5 files changed, 141 insertions(+) create mode 100644 fuji_server/yaml/metrics_v0.7_software.yaml create mode 100644 notes.md create mode 100644 simpleclient/icon/bootstrap/question-circle.svg create mode 100644 simpleclient/icon/fuji_logo_square.png create mode 100755 start-dev.sh diff --git a/fuji_server/yaml/metrics_v0.7_software.yaml b/fuji_server/yaml/metrics_v0.7_software.yaml new file mode 100644 index 00000000..afb02cc6 --- /dev/null +++ b/fuji_server/yaml/metrics_v0.7_software.yaml @@ -0,0 +1,41 @@ +# LIST OF FAIR4RS METRICS AND THEIR RESPONSE OUTPUT FORMATS +config: + metric_specification: https://doi.org/10.5281/zenodo.10047401 + metric_status: draft + allowed_harvesting_methods: + - HTML_EMBEDDING + - MICRODATA + - TYPED_LINKS + - SIGNPOSTING + allowed_metadata_standards: + - jsonld + - dublin-core + - dcat-data-catalog-vocabulary +metrics: +- metric_identifier: FRSM-15 + metric_number: 15 + metric_short_name: Software Source Code License + metric_name: The software source code includes licensing information for the software and any bundled external software. + description: It is important that software licences are included with the source code as many tools and processes look for licensing information there to determine licence compatibility. + fair_principle: R1.1 + target: Software + evaluation_mechanism: Metric evaluation is based on the presence of a machine readable license file. + test_scoring_mechanism: cumulative + metric_tests: + - metric_test_identifier: FRSM-15-1 + metric_test_name: License file is included. + metric_test_score: 1 + metric_test_maturity: 1 + - metric_test_identifier: FRSM-15-2 + metric_test_name: Licensing information is part of the source code header. + metric_test_score: 1 + metric_test_maturity: 2 + - metric_test_identifier: FRSM-15-3 + metric_test_name: Recognized licence is in SPDX format. + metric_test_score: 1 + metric_test_maturity: 3 + created_by: FAIR4RS + date_created: 2023-11-10 + date_updated: 2023-11-10 + version: 0.1 + total_score: 3 diff --git a/notes.md b/notes.md new file mode 100644 index 00000000..60ec0c4a --- /dev/null +++ b/notes.md @@ -0,0 +1,91 @@ +# Kara's running notes + +Test URL for data: https://doi.org/10.5281/zenodo.10047401 + +Presentation: https://zenodo.org/records/4068347/files/FAIRsFAIR_FUJI_30092020.pdf?download=1 + +Working paper about metrics: https://zenodo.org/records/3934401 + +Paper about tool: https://doi.org/10.1016/j.patter.2021.100370 + +EASE repos: https://docs.google.com/spreadsheets/d/1V4jA9zWnIT4GSQc0M4ysyy2CcVC-2LYo/edit#gid=1649627670 + +CESSDA repos: https://github.com/cessda + +## deploying LEMP + +[Guide](https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-22-04) for reference. + +```bash +sudo apt-get update +sudo apt-get install nginx +sudo ufw allow 'Nginx HTTP' +sudo service mysql start # expects that mysql is already installed, if not run sudo apt install mysql-server +sudo apt install php8.1-fpm php-mysql +sudo apt install php8.1-curl +sudo phpenmod curl +sudo vim /etc/nginx/sites-available/fuji-dev +``` + +Paste: + +```php +server { + listen 9000; + server_name fuji-dev; + root /var/www/fuji-dev; + + index index.php; + + location / { + try_files $uri $uri/ =404; + } + + location ~ \.php$ { + include snippets/fastcgi-php.conf; + fastcgi_pass unix:/var/run/php/php8.1-fpm.sock; + } + + location ~ /\.ht { + deny all; + } +} +``` + +Link `index.php` to `/var/www/fuji-dev` by running `sudo ln /home/kmoraw/SSI/fuji/simpleclient/* /var/www/fuji-dev/`. You might need to adjust the file permissions to allow non-root writes. + +Next, +```bash +sudo ln -s /etc/nginx/sites-available/fuji-dev /etc/nginx/sites-enabled/ +#sudo unlink /etc/nginx/sites-enabled/default +sudo nginx -t +sudo service nginx reload +sudo service php8.1-fpm start +``` + +[nginx and WSL](https://stackoverflow.com/questions/61806937/nginx-running-in-wsl2-ubuntu-20-04-does-not-serve-html-page-to-windows-10-host) + +Add `fuji-dev` to Windows hosts file `%windir%\system32\drivers\etc\hosts`: + +```powershell +Add-Content "$env:windir\system32\drivers\etc\hosts" -value "127.0.0.1 fuji-dev" +``` + +Access http://localhost:9000/, things should be fine. + +## Run API + +In `fuji/`, run `python -m fuji_server -c fuji_server/config/server.ini`. Access at http://localhost:1071/fuji/api/v1/ui/. + +## Workflow + +Things sort of start at [`fair_object_controller/assess_by_id`](fuji_server/controllers/fair_object_controller.py#36). +Here, we create a [`FAIRCheck`](fuji_server/controllers/fair_check.py) object. +This reads the metrics file during initialisation and will provide all the `check` methods. + +Next, we start harvesting. This is again a method of the `FAIRCheck` object. +First, we call [`harvest_all_metadata`](fuji_server/controllers/fair_check.py#327), followed by [`harvest_re3_data`](fuji_server/controllers/fair_check.py#343) (which seems to be about Datacite) and finally [`harvest_all_data`](fuji_server/controllers/fair_check.py#357). + +> It seems to me that we always scrape *all* data, but then only calculate the FAIR score based on the metrics listed in the metrics file. + +Each specific evaluator, e.g. [`FAIREvaluatorLicense`](fuji_server/evaluators/fair_evaluator_license.py), is associated with a specific FsF metric. This makes it more difficult for us to reuse them. They seem to just look into the harvested data. \ No newline at end of file diff --git a/simpleclient/icon/bootstrap/question-circle.svg b/simpleclient/icon/bootstrap/question-circle.svg new file mode 100644 index 00000000..cfb7c81c --- /dev/null +++ b/simpleclient/icon/bootstrap/question-circle.svg @@ -0,0 +1,4 @@ + + + + diff --git a/simpleclient/icon/fuji_logo_square.png b/simpleclient/icon/fuji_logo_square.png new file mode 100644 index 0000000000000000000000000000000000000000..16ae24d19d33e9eadbdf29b0a53692407f3b0935 GIT binary patch literal 23779 zcmV)PK()V#P)f6Xi@@54ZTQ_E-Enz5K6$1 z03tR-RB%L5k){YTDBysjLy@r}iiH7DvFijGMAUI`6dRUFWUU$Bym{}eS9UO(Z2>7`&z9wUXbV-Il z#&6`Y8GKGQ04S2&F6MJnWNa;Ck|;8QE#r9r;7G||@X{|>%+C|c55>;RS}qbKr-&IQ zTvLXPlM{>K&(BTgi^a?^4mXV>;xX8n8Ce|RasXz}{8imI52H3ZN4bf ze_i~WlJ|C&UW9+{8AKoW!}eExnGFE2re(F+`iE_46#!l90Z_aBhs|Iw0E)7{bq;-T z9=d#9QpDmcXDh4R++0fmpKB>E=%LdZt9g z$j;($`3&Zthxi`{{&gM}5&R^+h%b~yM9Zd3AWW9ETgVfL1(`yIK=_}U_z%PWq}jQa ziQ4!P(3V&Nr6C$XejWfQDiI(Fdt@un?|lo#M+5oIi_w{wo%_#%{(V=tO#a9gB!7-$ zM?^BX5>d|Vn*3S!?g~$*UQipUP zL&zMmg;!4Do9IA%up=Rh?=qPj=x&RGBx1dpI68aT- z2O}^EromdU5o`ssU{5#*j)WJ%$?!5bA1;Eoz?EiTr=n?cd`V|I)p<|3O zju?MT93~aB0<#&j8`F+Cg&D?-VWzQItUA^l>xvDRIYI4MQ`g1<+DyrL=EogS06Xii({|v`U^zjmmKqDIK93(F5q| z^fLNk`gQs{RV`IdRle#b)i%{Ds;|}NsClUI)k@Ub)kf6bsWa4l)YH_rsduU0(?DsM zX@qO!YV6TCtMPOWZH~(v?wpc2hv(eZgf-1HBQ#fN?$aF5oYvCT^3%%Fs?s{6^;Da# z?V+8jy+iwi_M{F~$4y6|vqR^k&SQoO!;_KDsATjprgSxR{dFa}^}2()GkV5)QF?`X z?Rxk03HmJkB>f%wz4}uIItC#I1qQ7Kw+-=zEW;GTU55RJuZ@h2VvIHzbs0S}Rx=JT z&Npr~zH34@aW`3J(qMAU6l2OVO*7qXdf5y%vo}jIt1%lghs_<#1?IcWhb_<+P8LFo z28$a^64R5J!)#@aTGB0pEekEXET35!SjAgyv+B3{Xl-wuZrx~o$A)4PXj5p@WAm%6 znJw40#`fA=@?77!tLJvleQsxN$G6*KchjC~A7a13zSsVPgQJ7Uq0M2^(ZDg$vDWbh zi^d9LZDyT!LOXdmt#&%*^w!zIS?qk+`4<X~g?%562@eae34a)26HyS+zks@6 z$%2*zuOhu7%OdYYnM6sVdZQJi6QY}=U&naIl*dS8tzuWkUW(I*6U24LW8oFzvR(TOpMEs5_rp_~TJ^wNN(wM(bC zZ0;`Z6P^ce2XB(^$}i_nB)KM)Cp}7bP2Qe7nc|*Ok@8f)7E}wKr~0SXrM^xJP1~RL zDLp2=Jp-4Km~m7{5vB?IGPN`FGKaIwvx>8%%bb_(Ts9>N5;bK**^9Ef#WdN^)PTf9 zvR*Qp{o-l7TcBI8wqSIn=gRt3(5j`Y zdRObOE?Pal#&6AmwS={4Ykw%TE-Wv6xh`g1Pmxy9nxe7we(PI{6^cd0H#WFzsN0Cz zDA+i-Y3`<~O&?2mB^OJrODjs>Z{}{k_?699m0x|@lC)*8%%N=0R?Jr6*6Z8cw;d=~ zF3&F?+a9vLa|dHb$&Qyhm+ZVyVOLSNi?B>BD~E ze(8aT1AWbo&CM;EEoH56tE6@EV8X%6-*|u1-NtOIZ>P7H9s-9XhaP{M`0e$>L5F*f zu#U8SXZT%h2eqT56Y5;vIn|ZYCGC#u9zGg)w718lr{jCe@An_mJyvsE<#^c%!il02 zpHAkVoIaIx>gnm^(__6$dheWxJ#(!uyl?Pq(Ao3ne9xWf_v}A;-u3*k3(gmgUSwVD zy5w-FbHIL};|Kd6ItCpEJBJ*Hx-UCj?irppeBz4xmD5+fub#UWaP88_{E^}7QP*$Y zNVp-r$-DXJR{E{yw{vdK+*xxMeYfPE(!GlNn)e%iH2tw%>L5Kn>ODH}V8MesW8ASP zKV|>)e!S=*`C-L`&P4Mg+egPHeJ3wJUif(YN!F8@r^P=j|6Kdbc>FRj6+1Ql zT=e|YubW?}zu5oM?q%*O zYsY?HXY%Aq5Xx=ph0s9O%JZDr!*6SW(m&*Rbcuf$A5E|dW4M0@M zUiBfK10Dh8%W1rVsND2>$X@mS*YKJk62Zu3tL50IG{$!7s}KUjvEcw?7jl$mpGyCG zcuf$AfGFOJq8WdlXYErV(H$YhgmSD=0bUctW_V2yiJ)=`3Mb@%_Not(8HA#sZ&-8_ z4LMA=SH1r={3i%fv+elM=oSd(%0|0cIOV~aWzp1#q%G20eJKNrGM0LEAuUbB4! zd3(!l75~TZN)x1NVt?Q0#zR|&*K9jHA5c}G0__P3Pv~;*%Ap5R*F{mN0%y+^b5a+X zu9U3F5J`@<*sKtkECy&)?1FIhJ7* zsu2x(&b>(vmrGGM5BM-Lo@=Bi%Mw5`E9yATH>Sl1|C1X&eOTP`g2HPk>-U=fKF!Dz zS$#GrU#;bLNj+zF-@RhOf0iUAo*<#8f)f1^u{*6)oXhm|>#?j>hnfH=;BRwzH{ zK6UHO@7`~`r?_okWc@+_(76`39Ls@;qK^FJj4Y5G6q_LRx_vm5kt=(W0Y*ILjQYrO zF)hAq)P8!$ZNE&qTio(XB1$Yl%1mh>iwzx+)S&zP_kf&k$cYctOf8v+T!>=>bu}TSD8vRk!MYczkhBr`;ZeLR5UP8SNQ{_D5wNWwM zB8;-!S{$OQnm9I0?&?y8kj-B#58Ia?!o#T;(M2> zoSp|zyHt$nJzXaL{s%_%rK1}^xq9Q&=0D}om?ncFt2FHYF}V++MOtYT#L7Afh?*oJT1jc++@ zrAp&hwrsVQ^+2g+b>*0iRphY#9ApWRcyYvbb`*4SEc~ZUdf)~ja)T6ANulu_Os1O~ z^?H7AqW8QryKWxeuqQwJUVe0=Hzy;+)<8upY7~O!Im*o-8`ZGi!Ykx(g-CAkL)Jad2W}Qs1^TBQM7p@_fn1lwf#>N&qQd z1mPO+(|ZOXRhCD5SqNdPu=p0K7;!lqYp5*Dq-GQZc*MGT_=mpVcK8ohep}e(u#KDU z6mUv{_?3%eLLw8Zb$owYZwPQ#-lW%(UTjlO3nI(ABhFZx)Mdk391GFXSe#sdoHgW? zE%?m*yDEGa@@zTxknmZhD>vwV``pfAubeqMoQ@!M+f5El>N&fwTI=0|XH8|0FuK{n zgk0<>C49E91lD?z3NtDMs9v3}Gu|y#IcdV(bGu*N5d}CAL7KMunDL8G=oMD0^#~&G zS7nU`yAb0wECd$zkxWDqmG`gTb=)EH$!bS8$(C>$f?T}ui_E)5Tn7p>RS{<=pNiM8 z3gYa;u^L+LGcG=5^qC{;Kf2`THrWbJLy+6&_Ub#1+pvrAP$m1)Pc?XZI|>Q!c*cUh=k#qucTtFNYv%@w`#yQzmM3lM!DZ+45=MJC1IX)Nm?- zWT)NM$21FD;n#>*jC6L2P7E&rgZ{ry5?r#`xQ;+5KEcPfGi;CS{R z`E?dTSp9WSyOIJ7Xqp;Wt=X{O$iYcRw?;}h9YN0S_$D=F#Pa=KL6OyY-t_VlUc=!K zMJ%rPDc;{20(uYAl(}P_+0DK*Kj@{!~up;wu$X9VikCW zeB_;yAZK@eeKw%yY+=o)L-7$>EQVZjTgjN`eSDy?yE4hJ8P|jCii%YcZ?j z0An7~8joSkJAU@_#-E0j_!TXuCCHugd#?7Hdr;Vbs_5vpyoLq9LJ$j6b)6!+F*(}g z=;jm`PD_x4*6-AfsNJb10IyfFN*XwmK~XNM`OwmlN&9YJ*j=J^5vL?b^_HVsR7rYc zA#2iyI=U^dVI5e`loZ{(Pds_M!_jRi4xEl432ol%T{-EEc`U2L z($ZBL(+#`Ld<)UweL@b^YjV6g;CT-CgoL+>Z`Av%Bioi)9L&xf1eUJ}Jp;m&_b%-> zWEUB~xUZoYH&%!R`n=a`-Gs9x8pJvfLa0v^34$Eya6 z0L#NFMxdxmjwH>-TO(zxi`F+VJh9u1<{Hm{`k8kx&LJOfld=v0#Ue=icUQ-1yhDd0 z#0OK5j??&5daGhm#ogWB-?5#BnY(taUT{72!hz>H^_PokM%V2;xeuhNd6?&1os%1d zt)j%JqOjlx_x|PhuwI!rIt|a$ccwpGP8=Fq={o(N5wd0=&eq5{Ll(vY*voS($ z#lH;cAfz^fP#^>aD2gJ#Xd$Dl(BJitf;r?5M)Hju0EK{4A~}QyB5c>wBUr$S(H#pCe`2d6jW{z9xi*?nG$z;PM-Ef1DWgWK zcYHK{A=MfVSl9$2Qv=N52n={RYcl;g@F0#&ifueZ(0BePVe_pgNQH!s$s90sdN!*o z7Sj_GP^AAtxXPt>s&AOgtkJ zK?sH=Kp+HZtC3Nvb!5cLM-W^if4RqD?m^z;J88&dN+-uz7~*sUu@2GH6Pian%TVA@ zh#{MsJdp!`BS?T>42W&;wkiwUaAA~;Fm|}n0C-?P6Vgy#q(XO!ro7#K%lZQu6F^}U zPMGL{5l2Xbm4r03_}FnFX%Hx>GmX${(no?5I*f}077)bEw~RWm!?cR7zCleZ*Xv#% zLs*Sx^;(2*!7Tib$eN@MM(yc6I=VsMt*3T=EtzMdRRpQsWUNeqG=)1mUqM5+R z#IVXON7ZOO=7$tA(bga(1PhV-MgR8~%&@{hO;fVSph}6uUEF*o=(5u!F~P8kAmO!I zci}iw9dkDFL}^=$`^pO))R!##b zujqgE%+BR$yLaz3KDcp=2P5Nb-=@Fe-%yMvKoa41H-^JQbhF zBn&C)3axOtX3}TvymfBZZgPD8@y#n~=l@vz*In-sZR-YEgooFT33o^s{T@Ai2` zLBAOuGDZ_vs$$(lj-~5U&{UOZMiB*}M4dY-r10DsnJR*aP1V2)R+^4&U&Qs9cjS>k z4oisfcOcdj=o=XRRzSJ<6A!K*F<9H?LRj3%ePUw9AjAba-;yjvW(k?lTka7Rc`Hw& zeY$LJ-|4keZd^I=3mK{FI=X?y!p@}=3ul`17cRvb9^YCg_X-_^t#r2*LZdP=S(B*b{;hxnQ6DWLNc9$@ z8dYi7w>N8W76VNz?A8LALiL0*=AKNydt)U+X!paMNB56^`*uNs&S|wB+(zkf_24Q& zX1xSJ`AeR?#x9TbY*NYq9bjEef`7b8?OUeG@GA9t9yq⪚gtOg)o~STCX5g`?2dr6LL6oSyq&u zpy*_XWpd@&tb5ni-@Uy5wnu}j%=DkkgLG+;>{Bd;Hk(7uhz z)x9atn!=F1^u3orNOnYKxfsOih2`EGMSbu3iEU|~Euyy*eYK~xBp2$UXjwu`vq3#H zUIBA*(;rxU1I#8!Y_k!a5YIKSwxZ$#iYrj$rPJr8A3+fO@6fLw?zwVg&0PRGI<8qx zggx7q2pvH%FW=!`Hnv=Ja{tEOrK`LtQ>ZKQtWl1i*`Ty9#N}R|3#!~`u&{zzBtb6h zUTx|%d;d|4Vb9{!hY`n6GG*_$W}}3aGpqBxn?;bgMgs$)n+<)7HR|l|A1=-o7|0ds zhq>wZHb1;|@~0zf=WRCRWg;-8k=>h9Qtg&uxYK-c(!ZY>k}b>gjJ4PFC|Doxwtsbfb#uJ`aIg23M_@Vt4&dWg3M#+0@vL* zzJ2kr-xi$A%X-M!qyASFr}nQEviPow?KyT+xsY1jwC(}@ImAa7n7Y_wHo=1F4tcb6 znASH$NHtyLh@O7u#C?Ri+$ODxDOQa_Ks%GsOY2`|WW`#YPF*~(y2wn%Md5`6DIc36 zuhnJJC?Z+~+e3CGij{B^vx%Ou_Q~DT%WmD>ap3gN-x|R;@7lcX{|Zj5m@O<7FKYJo z_gnq^D-3~5&qZr07q20Sgbb7vZfq*$tA?}A@#RQ$P$oU;0(d zB4jQ0_OJ5N8APT~=Mx>|3WQWF22wPH=pvjc#4jXzbhkGr^j-DUOtbWce-R`wqNY5l z`>cMXz>2mQMToA!Q*znr+GSm)yxF??6#%5&d+e8@@(%WAYIkWMk2?0fXFM=bF#usd z;0|b@fTo9!_yvo<%A7a(XOpC!XRiu2E*^aNo#Y=oQ}IdDO0civ3w(HrT{|Qs;Z3c8f1_k__`5mh{EHxEqZ`+7 zar5nA)JffcpkOnVapUBciRbsOT>j1Nb2_O?KC+4SMEBh40t&WUJYHL!R#PFs2-GOQ zVCPu$jZ#2eP6nQuGBR`i(F>-M=U8D!%-!Dk`pV$Vy&v{>nT1u#{#e2lE@4#(Lf#KR z&V?N26!pE!$JgUdlQ!K`%U(L!SWq_*WG%Ie)_qE&PVev8wt8xj^%vq9f)HiRJt}#? zD3dCn-;Cgi!s@qRw7fgcPLbwHL( z$oYS@T_lGb#zP1DANR2fyb+Xp&Vci-U%u@bs8VhwpPFBRX3 z0F#b*&Pc>8g>-v07#K{tn273ah?E3AdfB(1AxPzVjUfeQn z$BOayid){j-JU@~{>l!WI(Re(tf>~cZ?57x!gFq*XxAtQ`iyKawbjUsMX$+W86Mv` zo8P2W_X*zhN6YkjI2afB&lampv2S6@4>B#2H;VEl>2ZHV=5POBkJ{A zxb2Un!_U3wyMGd-N}X;@Y|4nz2=OvOi7qZHPRnz-Pd zV4tQYPM0+th#_8z2f{OkbpDr?Lt{fa`E~}d+Vs5$2$mY0DM0H|zXCZjk059Ft>Ti} zO!=r%o!)tQ=+St<15ay}biq`Fre(KtAK!lW=eg}x1JKHaLADHxs$(h2MWh#M-@PN{)YU%z|od$K3TPQ)wDv zO%VtcgrqUM0Te?BN*~Y7csPcTxnK$c zn9hCOYDCuTBbV6MVwD8g{z=!I zA{8MAVCaqM4{nWHKd=26YcAr)+3poD{o>V!l-HG18H}GK ztb2`rWBZrGQ=9htY)nw)#HE}`pHN`GWvT9t0maC?$ayX=`)1aITP6z922u5~s>KBm zW1Z17PkQLahj&kp-L$ap1#{0W($wVlg?)~;eQ(uZH_vkK(+ty-kc57bUP94w02z8+ z>Z6+@x6NyR%d$%VU`Pj*_VZ~TZ**>=>W57@S~N_saF7z?y(z(sLr0Bc>#R39)h@Yr zP(v5s<`D=G3ZgLfK>&IK(Vo91)Os1!IZuuYe#{hkng;Us$K-t)Magex-P!ZVkpIAG zM8wTYhh1ngV9})D3bj_S82MW|lL&o?qGdD@2VT00MKKIQtTDeh`mm@A%M>PnnXez+ zxjc=KVJ8^Q^&h_Jp^o1`9FZBnxckPHErp)a$efwRt(sMe`o5KEXpG9UD zauw=dPi(n8`pAy{_bsV>`be$My1DK{eEjJlfP=n>!&c9wP|!P6c05@u#H z;x;40#t@%MogX5K-sxSj<4%40#clbI&t=&C0-xgYp*3H}B=?Oacl`~XGg;7sMfJl# z`tC~=3n&JigA}%+QwZ+af~iVwzW%+Rr#4*!KvRp$5MZ`X`szu^KlFWX%O&LI`YBCO zbp_>}V&nqHf8P7U+aqqC-el3#b#RGStx0dHr-OW49~*^xQJiU1lxR;c`B6Xj-No5P zs|&IcGNrrBvuu-CnQOqC+K}2wEHZ`)^5I{x-TroU=3FMmf1dH@*CBKThzo<{rSY!x zhKonpGl4M!eoMc$ahWmq-a{#`#~hs8v@kEG@!&aC8}^BY6dh%WQ7ims1n?q&h1~{< zNCjBz9%hq}kOPrvc(*Jg^}U}zY;(-)hCK%sh5h;Z!zQPqlDfBvX)$^s1bk=2aclQ} zKVj&tvpXM~TgIY(YUR)_ihea?t>B3}o_xOxtF=@@g$*o^p zXfgcjxjv<%zT#P=wqO&nz@Pdhczo+L>OJ@PJt7_u*@8FEaF&dgWbppu=@Ks(F@K2G_pOocv#}oa!0b~?;bN+v zlrViDysq0jIqTQ&D_&WaK;>D^&nvvc2yLla{SY$x**&mv?d+1qd5dA2pWzbkV(NTeE=iNLa`LaGEmACS>~Se zB3Koh_r%_>gcX-%;Qd`@pOd{)lkiq=^<1pu>qur+BlJlIJUoAqU%Y;wQ8MGl7lH98 zOZkK}Y~)+9(<}&?Sd5;@eBc;hkq^;I&k8FQ?qz={lQd-dt=*qrvq#mb7xo+8n7ex} z1zc(n%7&P;9RLIcoyWF`F@VKo1%d52c_kg(t);8v-vyH8Z#p-Rp;hG-a`7(3S&GQV8FG$ghfjY`<|2Pb}SH zk9vQd)%8^UUh`IZ1xAeHc@uo$Oi~c^FAYL$lL4*3trvLs`S=JSHJzIvT^g&HZ>DMo zspMcP=AfsfGtu3A)LNAJ^netKfr+0Vje1nE#;q4{aH`(#K{gRluppJI*79(p}mvud;c zV58wu7yc}K!rMe>0unyOoT+h%$O0t>i^l$p^6q>pB-+QPVyn4n7uVS&iDn^=ZCZ4v z%fzkA<*wS9Me{=l{UZZU?wlaXbHYo@^bL)I&4w-YCsU(k{gg;=7`jw5vLKusIUhkf zHB@Pq&v2hY$T1Rgn3kR#;>ePo_5l6#%?5)_mvz0uTa?oV)>w!*V~F}~Wcl(%xOt+%Nc<*Dt9SJmn`p(kt9S9tCWOT;UlXF2l2tWFCFpCAw15q`Pl z@82O@I;qFKLhTMhZi`~&36Y#2!?kxf001BWNklCn%& z+P}MIncBmD7SYfC)u{{iKX4j?wD}v#5LzW3a;!n&5fENq;~BIpH{+hw*DNVP+SgZV zSIu;vLDBF{M95(?F`Xhe&DZ$5f#zQ7GHETm!`t|21LEfMyrBe>qX3wQ95T7KpI>Cx z$1k%GgFl-N7t;0Z}rw7lRl@+KmS&cAQh&Q=V#Xb1TI(})LPRHak&@c@CtQ0 zdI7-%$x28@kgknYZr{yvpRSO>A=rlG5S4Q!xV?C(Y5(D4yiICx3u~qD@UJ$L=Z!6$ zIdhXGAS9t>YX7%=D|Hp}Wqf6;dd}`zcDdE4m76^S!Uyrs__AY>Ac*7c9{F{4D)_wr zOUoi!CdJ5=ZmgJ!&BBI=enWh4>BF_K_tEjKM_HRJU6!dhxSHJ4dmM(mU4nJn8;ECpRhn`$T|C2k=rXPp zEBjJWII;DsGxhs?beKG?+J7nQM7+Y#L_yhQqdwOxnKd>!MT1z@qd0bY8n586inTh+ zE*|*Ns?aROB1qQ;Dr(g%w;_DgF&$f^6hj@b0~)skO{vuLWNY|P2k$N&+={!wn1D( z_mFyBF@+jQ63EYqff0f$?FkhgYIRzoU5?M9ws4f+Cti0+>7q)e_d z+cY0R;D>Q>`WGfTk4alTx>J=k*rM$!2_9PFnJg~KW)zgUf1#&eMl3x@${0sVC}yrTg>q!6hR^AMb1|s zWWBn{vqlB2Qh(r1Yx`H%^tjPy?%_K;g7+anH|T6|=g8hKZWEDOa0+BE>|OOQJ;h>z zEa*eY#*Fr!g!Q17Jy$@*1tkike!I?aD`k|lWy{rmK`PI%&WN|+raTmtR3X{JLxkAt zJa0HlWR8pE5#A*ai$|E2QxKNJkcy&ZE)^g~;Y1cv+bm6*`0zLn7teCtTs*_}=rXQZ z?2h^}sMrU)^m6}k7z_R@)RV_|FIW`FL+$DlRIuz*yx6?t9=anQ$B}0c$K$6%6Qr_v zcPcxf!+V)LXA)dCZub1(^o5MOXRjKK84tL}`B!(ZAD3qlL4tj0xOJh&AYh^gV&s7R z0R(R-TsBEWmwVn3!JnJ1s*6`oRs93GOo{0nD~ohw@{< ztLGF|L`+Hq7Na&5cfB1yz1F`zK^VD_{^VxlGD8Y{R470*GzbWf5?oLon)335EW0}_ zBFLI~uC*h}%f=$31IQuVBN@00X)LMHohqn0<5MQNn=Lxv(;J_|V`^n~=94dS&Mz`6 zm_+XR6+$k(-_!vy+cmy55|vuNF+`ef03=W2T%e1PnN5i7CpkfAAj_vI<}e3Pus$dK z;)VU+oBiw<4r&1p;-n0N`)@pTYc3cl08jK!o@I$RC{sa7460$ih}ASf5wLlQ$84Mr z0&UdV7Xm6EShv}5Z^Z_^r28K(+S2vNy@(VYpCs&if~f;VF*i69|9<+lUsvm%oV8dH z&VO)Ha7^3a;#KjecX;c!DMmH|Bfi)fm!5%OU@O-odWAOkPrtcQQs4GnKTa_9ntSpj zP03p2rQKa;$+hc~(2V2-tI`oHHvm~S9ouxnv{(1s7)-vS0u+jh+=8n7U87@Mm@ zx1=sxq4I7-Mh|x>XAoGhVsj<;VaDLJE1&KJV0y92)1_a0?BW$R(I=u)4y5Vvgd~zJ ztCN{YAaV?)PzWX&k_Ug#(|1Z$sxJMSN$nLr z$G1Wo4Tj9SlFfEl+!t|CdX$S%d6wO-&$uD!G9E<6M`lVmK0${d8 zWj+gC#{L|i$f1+fUY@mudaKXxq zW38!QNRX9N+~c~pRt>-=`vi9=3Xmov(PJ)uD96x)AL0WNowv=`tScVZ>PK=2!(Q}}o{KTUhe@MPu`aD3SUx$HG zNVe)z{L;kyi`r4uKgB{QHT%DS+rNl`K%MxlY6G1p;F9T`2#K!Bp0#gp^71ex4N zoeX$f$KH*35io$#N#bYYah%3bqSAE@Ir9N1f_clLVRFOhfG-(rGF?c+!*?1 z7Um2PgW?keiyN}uRpM(3CKe9K%oW|Nzapm5kd~amIc5(5|LP+t^%ae10PBmnI-Cg@ zNbCYD-B>B?oU^)gL&og`HjO*=uX-tQBU~b2VGqY8)!-}aUOR*!n8kI7pcm$dx{Jay z1nJRK<*{;sdvBbJrM34dE(CW?h=U#7jG`czq|019<(_3~t21uxm)vZ;=z68wD0u3S zf?avr#@u)j%Ex!C&lz=Ah54}+o*~GW@4D6lI*{Nb`q5tygEatGnu1U&MV+SQX62|b z4?;*Axr%1o1>ffz(v$*q1;%`yqn3Ds zD%R?E#S>Lwji8qRHB>IEz<1op|*W6iqQ2H-#EVL=Z?Z96;!?WI`6{sA`|e z2`*mcwYv1HHVcVb2;ZQ@NIl}?q_bCotdRLhf`TkYgPyY@OGh=U!#QDEdyydH5>Oz> zN6npjSr-e-&bSn?GJMN(U?Sb>GEr-qV+*5)7X^%si4>hIL=@j6MR_lRj$)E1fXhg; z(J98v&E*ko*Bpm`RWIvGMi`s86&DvGL4p(1$=C$SJEQLLCm>J)B!%5k0f;Dp$|Svi z3A3Ewp(u%C4iN?2yvlnGReMGp%+E02yxUUv#di!*DIqtkF$a4*o zjz+iA1}AhP2j59k=D#6>WkzGfmzPYRF32?eAph|Ni=3LIK!sXe8uGlUinAsrVj9M} zg+mCEojIByF4*Oz{e5v6Da+Mo-n;G^AiDq{UrVa#9b=@FyOo~k5!&!d=FJ_FM=cDi zJE;#XQw)$YB?E-Cz>%YnrtP}X8CbrCd*gwh_vJaG(<$eLU;r&^N$yUN7{E(9(>Bf4^-sh$8_|SFE>X@b+A|P=o&`g+qnq*) z2se?Jm8KEnN!}GZLA(G{{$u1_q5T1cYhXW8xJoLKMGRkxagrvu_L9KpA@AKk_4$$F zl;`4ILFOINp^J>7=a91fC23?K!~hfE3Nq$c6x6M_C||9$TdfWg-av>~I)h_WQ6Ne> zj&M@(?^zTC*9$T7K-jI8gdhS8SvNMjdPQ6(qkd&6?}Hc-5yB+7#%EPXjY%J8-`)0O z_WeU?mX@Opim%`k-gX4($lWkz-K1+_0mMaOp8La?cki;)Wxohzq8c=(8CiX2T-p`3 zeG6v{hN6ThbHJHNEJAEDhJj=20$~J|Y_!XJcrr7%#@m}{nXPuL8@yVdk-8=Q=K2>Z!|tW)K&4yRNQzdq@d``njF7PkutiX9!Mp@gS-c@*Yu258 zcIyHDWn7!b*d|&bMCev2%T3omUg^h#^dXn&EoHd{5O1Ig@urrHi*K^4i|>U} zHQqW!bicz~Zt9iHyZeMFia@I=%V+|s`I{(Q#XY2cJfP@ka%wrm8*KUjAVnWZzrJa= z%_?{f>U5dWnd6K}_Uu?90SfkeKw-8k3Q~C(!Yr9Wk<0TukxJlIi23V=M`_nGbI%_F zpc-K2&dg~vCQ9iIn=m01z-7reAA~a|_+b^_E^EX&lXSdmdqGf{kkwfTl z6Vmh@jNl!L=k5U+y5ptsyn1ENuKPD`ZO_GkGG5yE!&CdbB=INn&X4)R%@JN#3Jcu# zo{R}ha`nJDDt90=d3tK8G45Kblf&JFi8x4M93ALQ39C4gElKJ!?im9rw)#ft6W0Op zMqjDQeIEXb)(#a|n63GLMkKXQr-7m~3EHd6ytL6S6%qu7#lr@@=lA4zLk)Z7VWDLT zlOaFzeM4TxW;u_uxvc#3U%%=1tSQjI^1_ejp8s5@x;h_<`Tx?MzQDpUn*GE3Xgc9M z2XB^OF-J(i((&3za&%D2q90sbcPy;-J1Y^CkFn3x?_jwVLIZ1f^uL_cqv`glGBmbH zlw74Az?uwp%Kr!jw}zZsC%0@pw07PpYf3Q7>y)D4J;0+p!6(C^`iQ_!1ii^jQXNQ4 z5CQiuJz3xz8QhvE*X5)x+o>S>ez5DaZ|z!duPSG{e@s`J*lB=~(}mef_n;_Ymc-X7 zncU*l!$O!v5S5ZT4`}$1jCu}rhZJus0(5K)6*uushMDmdCuyX2UHUiof}R8?G0zqWp6UfLDAt+8I{Rkpbd8G9qd+ilkzQVifs`4_V9U$J^yz$}8S z*rLCdQeXbiM@xlCwc%_v5K*N76G?L_A*Pk&&Pkc~&i(8gSv3*!+yKWfK}rwOX$;1^ z`!lld9X)NYI-?u)^Qo3HdW=bz=VI?A(cCAg*UlgK+3FmOW)Wo9Q6qQdC*N~ETHx?d zK;r%z1tYvYppYP5a)RWi{buke-)54Vf7MD5pjtLdf#wJh#oVNOwEXeel`8=F(k@j7 zMI^w)uCoTRdVP{T6QmX_Lf}kBrZOvOQBg2E@{L-~?<7)Pe@M=8__(UauETq%>%~`+ zZ#r_`B>4h#=G8Tiylajf=}OB;N1`f75qZ(^fPkT8zdgRTVH{`5vs+J1?mnkJ<)R+O zv351{dK&11PQ7_%8<{CntS-iEg1r4%-pTK0d*qRd9qzM^5rzcuDmfHPFP_+N_Z*8`Y|9I<|E#>Nr zdz%CFN2HheNNHkjHwfgQWZSbJ92uN>W&L$~Ra>L}NLhGthjBb$lN>R)K**RB3Tn4Z zsVG*;46_Mx<35`Q?s)8ica=>r<>1j&++@aHK7mYQU_*ikNWZ$_d(W_zn1`}S5P}LN zNhc9jaUdnzl6U{u$jqzjB{RD>2eD0tx622Q-$b0%`mxmztRZMdmUr{y#*-NjZWgPv zS`>YA`ds75Nqv>s*Z?HADzz9G0+kvh{y5X4bms|~w{2BT)}u25BUX9EEV-@qxbrD6 z!Pt@@ZV|Bx1BUrF_x{02Pp)pfYtOnH^qd!2s!HOAmhx~V-XPltf*fJOUa zCj=A>^5}FUCHpkz(b13dFK@JYgq6R;JGi26gWmH$Apw~jX5(^jX-8SPQZxl}9;Y6< zxc~cN$4a({AoEveXB}VevnQ?+QxiEs{48w5bWF6Y_29OujbHqxw|PjuC+B~@tc-3m zz|%kOv?7mvn<#m4cJ^X9=PyLrK{I4o;5n|W(a09 zJbUTM{WE)|D9&Pn1P7vYz>Cqp9ZnEX;OG@B^HB>6-F6{JAs+7ee4jF`S{D`P)=^uk z&RgWERI>Xj7a1*yKt<+qdSlkz{R=a1Y}sMo2KQIY9z_w+OKlsnJoRJ~^bA`5fY)aoHRe9}Jmco(KgjGMS)5@@Q6;fg&G?it z3t2AD(@|~s3q&`i=|;6WO!=y6qX84oY+F(+_iVEW(lAazt(oKA-p2#Z0VY@mIbQwv z3!;TDh>VS98r6wbEZKL;X!q9TUppw6jDO}6*=RYZLk-=75}F~3P9{T{;Bcla=+=c{ zq0Mccpllbs6Lnn*B63LdEczUU=p8w!`!_tfzSS-XLtljO_}1aII!^k8<#pwqWpNJ+ zfgpIQfAyw=Lx)bg`p%-s3o3NX++=N1i&EYTz3TFDY zZJ_uGNEEx*8l+v=mP>xEQE7sHclV47mHSqxglJPTEpv^gfGhw(>`6gNOUOb!-^Uym zh)s|Y{MlIu;bV+pCZfcsd-S>Y1e@opPhV?1LTf1$s=#s_&y^trD5X?+dds!J9^?W3!}ObhoGB;I zka;r`K%7QqjB7kl-pm5}N9fWTr@H$UYIX>!-D%1~gxD0`K`T}-LqYf@6akgWW!*_FOsMeSMEvS$6ZW zHV2tE4+xfe7oNWUgsWfWf2{T}Fz?YR=NgKigRuD4?zKBioQ@IOlIQGfglH**#4?EU zktx(u6T5%l*LM7-dB4qSX0~4PFM`BH($qKO-CD*)DL%w{PysuY!cjED*moSR-zr(& zoE)xnbbHJ}-lKE>ytz()vn$l<>{X}zM39-!vP`yb*)PcNP=HTYMQb?J!IV`$izeOg!t}#N6b}O|G1&fFn z@FqhQ-_jA^H|+muFY?Le7oGE0j>3hxCVbFW2Ng7hO2*9jTwoqkK3dgVi>51g4V`4L zxsBF;0UbX6t(vE6@O+~#KM^}T_EYhJiD-m)Ucu%(eyN?>Ga}aP6}lDU25DMC6R7KK z%ej^S>2c+uoz#8F+xH#amXeOv@2+p)<{A7Y#%%eLV8v_>1ao+vQY<~XZTS%ZhQ08+ z&k$tX=XnpZ_xgP7re>sO41osx5-BHk7Rxw($dx@0*XyyyWQSlvH${x_zLBr|%3N zvp!A}e^vs>6t35<9{O#;lN(20Dl7hL6|3XhIh$9{bzkG|LcQS(7Q0phBG2eJ*_665 zir#xq8XabaQ4-N-=vcQ5bQ@0s)ce-UKsVWV#U z67R*eV_`!`35j*2Z=^jS=#hZ|OzZabl`YBP&yH?SNkO}jUq@7o??02h|D-)v(pIWo z0ztH*AhZ3+z5BnId(Lw=3j5B?I&^uR_j1UCcd-=~zs>@jkCdajE62Ul)Ai`w6?v}} z_7@L3+vBXL*Zs57G4*k0b)^nu5&j^i?4xaR#| zL%G-{s)Y6vQ$k}C-{m=79O6s<67KULco{N`{LaH$C+6>1^SMR(=nKWCFIMYTSFbGV zL{l&sl@ODYe?lM#WrE%vo2e!&{y=$l;5dU>%Gs-qR`328mDFR-FwSJ`h}e8LXS2qY z5)@5y2=R+A9{%+*0R1dF_k{#mzFD7re}mu0fq@_n7=efLTM9iN0=X#@uH8G?byQd> zX6&`Q+^acMnt^&<-uL${TVtTNPx&6K$xt3(9=t018_xrzC_u}V$M*j;!F`1WHuhQ_44 z0Voj5@ka0}&l)1c_*lyPjC)rdoCz~+iP0i_vU*+00tE;2XuYA(?`2BXhMcI`UDh)L1 zbDdru@d=KkOGP)X5)t3FMd`@K-APx8;5Z|NrAzDR^nhY~FzVrrQ(G6E+`QE4kWgmt zaV-2n_sxtk+Afd-u}HTU@1dpm)`i zhjwm1xb8E_^0iBWsFZ<8c- ztBWz4ATw6zo-7!pnLVbj>$f-`J3i!3F@RYtBYpj?6|+3glS8w2Rr7PwaDq$SJHaF8 z4~uL#aC-Z(zwH2WYNemN)P=Q+2WQ;7bJ*^(i*MOj&-hLgBWR+7#`(o>5yZCbQTzHYB+ZRckExH2WxR#^FNBO={+SMbdKPj!h4sth=hkUZD`@}=X{UVsN<>h%7 z2X{`gNpj2)6F<}V#og2q-T(j+I!Q!9R5UMtIW?~mrO%ITHt_QX08&+jtKtm?P=X(e zL?EISBQtWjj~5>P{o`UK&ktwW*$neoQ{2iO36Ugv9QtNAmw5}v zXgUvHkZX1{!sEYxoL)U;^1<~eT)8bE1P*|NizWLjCR)Hy2NBj8` z7TZ~+ypwrSzsLU*l>$t(bd^wy^Yk?KnKLZCi>4?>P-}QU&Bu$zx(ymSJKOAJJV)1m zay7Q;pgvK_1HUCCsUvh$u{?jQvgRVLm+1v7J1@9kGog;tGLl~!#=XaNU(?~-q zZNS_U>8>$N3Zq{E6$EbH0Q-?bl@ znYsEVn3T}8V(sZ|i?>_4V_p=jA_!9^`)1DVzy%sLUJO|9e18E-{0}e;IJV>wfWN~QECKo_GKGPKaJ?A=m2=W#ouQ_NRx)r7(fit2{q0`4ZV5U zulalOHtLTJ+iNfe7JTg*cQnwOk>QzGm`$9a$MBc|I{CXz!#uJ|`O%-;eZ-q>H*jp} z_(QRSZ}g5Xqn}UIh7@G}sjpFpf_THJ=k}}`c65WVG%Mmvt+wxchG}_xM2!wjDGDVb z#FZ!CR0%=h{w{(E*|hZ850@NXzd+LT)>ac_#GEJjX>0r!_>=;5$SmR}OczigcJ<5H zgtz49;~j@jA!^0Ah`JLt&TIotpKrvtyu zO(VZH1cuk#UZFJ%eECa0YLHa)xyv`{xNeP=bHASE1{F$b95!O5 zGt4Ad4_soS6jQe@@-PPZ(4XE*Gv5Y$@2?>@M@-u@2*L8Hl$;)f5RyB^YJ@XGu$Q8l z41`Q07mjVcp{TFjzj9Duf*8)VTzvBtq19ScREJhc@=#EY%Yc^-pm-|ned%Oe;!({Rp4JG8T+PeC}{vQPQ*~4J?cM`VjFF1w2`O3{Y zW9J5n55Ap2#4Q;;9&^|^W)eMii>@M{w&^nuB~jczB#OJ)A@z1`nz{mcrg6?aS2ZCdf*fU5%A+qBiAiiIeXhec(@r+ zao1r*^~&;bzt8u80p9eC2Tv^XOWpYSpkt*Y>vT_OKWUQM-ERPA(kuSUL=pBXAVuBE z(&vvp^4pxXVB980H|d3N8iEK|wcQ|C*iG5G#Pe?BSos3XI>$Z_SxM?&aizryjcY=$vCxm?tneyVfKUNMpvVQ&^ zFr~huTl7*m6+sHoctFO|&)?PR26uFs2{;hy==KOeMhxT(9N4d;M*H)}ZsR+Q%D!c3 z89Tliy*fOh-Pwe8W5-b#cfbg#{xh?Quv$ei`!DYMVGJS15l1)2TsS2`1Pqyz^ZoYE zJ!>W>D25~ZryYDQh?-6wGwRx*p-XA@wsy3vbdJRj`pThSFS>dJ^p8p&@JmEO+ld@& zj0G4|uQE|Yor6(u53U|sd~nT&C59XVoR%PM5*4M_eCAOL=Q{^E3V{U+Aw8@m)2Ua2 zC+<_bk7IxQZfm|pyMlR{4+K$iZJpNRkB7yz=?#>)55RO;B$%PRf_~x!c4a&h6kanX zv`WL(H_z@UF`;0cmLSuIYT~gTL^~Hf3Lpm3qd<9xT|Qqt6_?%9QuRgR?|QQ>feW#3 z?W|P4;Ha4iZKto-`g;$ODP2+!ZwlgtU3h0uz9fWTSwPdWCbUBJB{?iH@c^8XAg(SH zlef#SGZ}ekN4KRYh!PP-TD1~RO?=-y;o&LuME~e~iyaUirJfd;a5^NS){yXo4$Ffo z)OnMFOcO|ffLCos;W;+6ddldg;59*thcR8%We|;PLnk+95{+|>SP-$B`}1yPZ>{&5 z(RxhI&!?|ip1kkQ!hNc^g`;YzGi3B_zr$@v*DKn}w7LrM7W= zgJDaK?EK84Y_pDnQxc?GQ&|@ZLVr{eIz^%L7l$g836_2N#}d!vji33>Xg=)mb!&<{ zxps+Qs=eDMC~{9iyYVaB0z*>dO1DnD(NLBs@(S!M-ey)nAUP$YtNBF4RwIXd9Nivs z;B*9;)JN_){VlhKSTc)#`#==AjKI}h4SP4QOT}*a#AE*29r_hNz&aH{CJy!RgA{5|l0ym=0zXw12uT9f zDmZib2ky;Juk!wQ`yp=aTc2hX+vRZ2j}ry591~vUV)|-mnW}P~7GtA0hObU0lsXh8 z4<&Vr_H2Upo#+ZIMtiX5&;!N)Lhx{!W&kC+#ga*uW7Aw|x!R5mu^LWAkfu>oV}L-p zSII=Fus`B#TstaKUOg&;+5B*u??+R<$~*Yw&pJsGZeKsSC71jXVtXBQ(ReR*@$}Ua z1-}e37^{;GSzGHDQr1P|>qUlc9}J)u&l-tLhQKp{Q40F91s7IuPT~0w7Z!p6Ps@Rl zVTj6vGYB~{g1psfcdneinU#}s7(sCKz>m|ek=ZWq>vt{QIZVzBRLsFTlu?F4ZobI{r%2QUP~8mG3}f2zg)>em*{ez2#RkOc~EnkfM3= z)0+L=C=#2$C){btS zwD?o(GGR~1qjpuIWGR5x>;WhJHk`W5Zl3#%?)rCItXm#77fa8s`33b?7*0iyLaf_k6oMsuH+`^X>!b#XZZJaD3m8F+ zIGfmFYe^sn1r1OIGoT53kxnZHFtX=9+|x|LG`YS?q%oCJ8mW4bhMmaX<#)hD%XWPA zgZ|ux1KH^ZPjOCefb(j>DG5@DNnhj&F_Au5x7c-KtJ>;;&_Hz~vU{L7>PlD-5vdVS zphYWw)qmHsv9dOFp%VcIq9Mj%SeRRQ+s|Ny5N9x!{9u8GXa@D%G_W3keE*64WmhH+ z_BeQArR#x>2jSK8SJI{Uh*ksht|nEJja@U%^;h>`#bC(N9WaMf zQtY-v8UPano9BM1n>}Gst{~2w{JFpE>zb|I%6t33iV9b{4&Y&Z2&hungj~r85C0Uy zY{(h0X!hx9Dusm&Kp(&{wPPc-y4Wau$B>0CAOF_tGNqsnEnBPmnITf z5wQE1m{{-NvWc!IdbgJULb=FCVgsm0#30IAu}j>yV({s++w+G%C5MO(|6>J9Qz3-q z>1A`&KjU1PXY<;ij9;)zJyKT{XvD%^O=&W#1OXZrh)1?0%b(YWg%GJOgg6zHDyl+U zWjO#!knzVsx)1r|I@`72zl#z>kV5pHktc{1Yd?QWabQRrO(&>j#sDKMi+Ia=XaPCE zT|SQ<6ZdZJjUwxNSM(Nq{PcCCLjx6@Jq!A}BlmJHEDlx3P$|g3&O{80F4l#a3GpgX zfyf7iaIXy1aR{c_qwfDAN*qB7F=W0`=oE|gtx>M4;^H>K&5!DZ@`)&7&UUas4h8&w zduI^ZG!(}1?@PO^wps>bQ&0~g+etl4P#nW~5D`TXgl!0-FvY{rDO;5>uj0W8Q|3uT z!Gj04fnKH+##FWyr68T!>dM9jvbD9cv|ZaI=Ec0Yq9Wp?$%8ieK`$x1e_qI+ey{KQ zzL#3c$d{`2ei{8A-NDfueMe&}p9%fqJ+DBvdj_<%1N*E&gay75=9ueRgpxH#fu^H* zdj7TVc8~W-N2{k(dr6NF1^B;(Jo*7NJc{|ea=pcu9`Xl@zlRsE)w$-KkR>v#Eq=7s zLp$lm7M0}iSUz!{rLcu4d4m+_xR!dgqrM_|>!SDYzTM6)AlxohR#9C!(W(GyVS6sG zK0MYf-1G-TL-y;(D=^YbPf!E42BB_`$4PwbjWP4E`IE9S2qpAMUtB-BbAo?KU07i`YT_9YT=SHDrt$Z}q||;W+gJb6pEjRt70> z=7B_$^=>5Id7jmz*PR9zwxI&+!3E*B0p;?@WPZ^|y(aN{1w@$i)V_`tbj$P6tai|>(h?q^yFi690e%Evl( zik73S4N{=7J^r%$lzV*0FOk_+lSI}iA&}WUPCaBKB;D07B-(nJ$yyFe7=+SyKdbba zIR0!D!&^7fHb5qd{0a@R6o~RXmQ0tzQp7R_F`Hagje)8cDpj%2(<}HmoYs6&68)u0 z726;NffAq5em`ck#d8Cblz9$7mXzqsXFI#sOl*S~gu6N^09Hq|(5Hb#ffu@w_^vL` z_cxiZWo2xG7{r!CvIxQ2S>zn7s;<7~Bq*wlkj=lb4Pqpfu0bU&EdZj~jf>DhxFrXI eDSuhp{Ny{mI>q2=MMH}K0000 Date: Tue, 21 Nov 2023 15:53:52 +0000 Subject: [PATCH 02/45] added microdata keywords for GitHub webpages --- fuji_server/helper/metadata_mapper.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fuji_server/helper/metadata_mapper.py b/fuji_server/helper/metadata_mapper.py index 5053ef6b..dc56eb9f 100644 --- a/fuji_server/helper/metadata_mapper.py +++ b/fuji_server/helper/metadata_mapper.py @@ -242,7 +242,9 @@ def flip_dict(dict_to_flip): MICRODATA_MAPPING = ( "{object_type: type, title: properties.name, summary: properties.description, publication_date: properties.datePublished, " "publisher: (properties.publisher.properties.name || properties.publisher)," - "creator: (properties.creator.properties.name || properties.author.properties.name)" + "creator: (properties.creator.properties.name || properties.author.properties.name || properties.author)," + "license_path: properties.license," + "description: properties.text" "}" ) From 34daec89b54f942a593e891072a3e5ce7cf33767 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Mon, 27 Nov 2023 15:12:06 +0000 Subject: [PATCH 03/45] notes on data files --- notes.md | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/notes.md b/notes.md index 60ec0c4a..918e754f 100644 --- a/notes.md +++ b/notes.md @@ -2,6 +2,10 @@ Test URL for data: https://doi.org/10.5281/zenodo.10047401 +Test URL for software: https://github.com/cessda/cessda.cmv.server + +Test URL for software not on GH: https://zenodo.org/records/6319836 + Presentation: https://zenodo.org/records/4068347/files/FAIRsFAIR_FUJI_30092020.pdf?download=1 Working paper about metrics: https://zenodo.org/records/3934401 @@ -12,6 +16,11 @@ EASE repos: https://docs.google.com/spreadsheets/d/1V4jA9zWnIT4GSQc0M4ysyy2CcVC- CESSDA repos: https://github.com/cessda +## concepts + +- signposting: Use typed links to make it easier for machine agents to understand what links lead to on the scholarly web. ([blog article](https://signposting.org/)). Adds a relation property to the link (`rel=author`). +- [typed links](https://www.iana.org/assignments/link-relations/link-relations.xhtml): links that have info on link relations, i.e. `rel`, also called "link relation types". + ## deploying LEMP [Guide](https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-22-04) for reference. @@ -88,4 +97,46 @@ First, we call [`harvest_all_metadata`](fuji_server/controllers/fair_check.py#32 > It seems to me that we always scrape *all* data, but then only calculate the FAIR score based on the metrics listed in the metrics file. -Each specific evaluator, e.g. [`FAIREvaluatorLicense`](fuji_server/evaluators/fair_evaluator_license.py), is associated with a specific FsF metric. This makes it more difficult for us to reuse them. They seem to just look into the harvested data. \ No newline at end of file +Each specific evaluator, e.g. [`FAIREvaluatorLicense`](fuji_server/evaluators/fair_evaluator_license.py), is associated with a specific FsF metric. +This makes it more difficult for us to reuse them. +They seem to just look into the harvested data. +All evaluators are always called, but before they do anything, they check whether their associated metric is listed in the metrics YAML file. +Only if it is, the evaluator runs through and computes a local score. + +In the end, all scores are aggregated into F, A, I, R scores. +This might be a problem for us for metrics that are associated with more than one of these. + + +## Questions + +:question: for open questions + +:exclamation: for answered questions + +### What are all the files in `fuji_server/data` for? :question: + +- :question: [`linked_vocabs/*_ontologies.json`](fuji_server/data/linked_vocabs): ... +- :question: [`access_rights.json`](fuji_server/data/access_rights.json): lists COAR, EPRINTS, EU, OPENAIRE access rights. Seems to relate to metric FsF-A1-01M, which looks for metadata item `access_level`. Is that found during metadata harvesting? +- :question: [`bioschemastypes.txt`](fuji_server/data/bioschemastypes.txt): added to `schema_org_creativeworks`, just a list of words. Not sure what happens with that. +- :question: [`creativeworktypes.txt`](fuji_server/data/creativeworktypes.txt): added to `schema_org_creativeworks`, just a list of words. Not sure what happens with that. +- :question: [`default_namespaces.txt`](fuji_server/data/default_namespaces.txt): "excluded" (whatever that means) during evaluation of FsF-I2-01M. +- :exclamation: [`file_formats.json`](fuji_server/data/file_formats.json): dictionary of scientific file formats. Used in evaluation of R1.3-02D to check the file format of the data. +- :exclamation: [`google_cache.db`](fuji_server/data/google_cache.db): Used for evaluating FsF-F4-01M (searchable in major catalogues like DataCite registry, Google Dataset, Mendeley, ...). Google Data search is queried for a PID in column `google_links`. It's a dataset with metadata about datasets that have a DOI or persistent identifier from `identifer.org`. +- :question: [`identifiers_org_resolver_data.json`](fuji_server/data/identifiers_org_resolver_data.json): Used in [`IdentifierHelper`](fuji_server/helper/identifier_helper.py). I'm not quite sure what that class does - does it extract IDs from URLs? +- :question: [`jsonldcontext.json`](fuji_server/data/jsonldcontext.json): Loaded into `Preprocessor.schema_org_context`. I think this is used in FsF-R1-01MD. No idea what it does though. +- :exclamation: [`licenses.json`](fuji_server/data/licenses.json): Used to populate `Preprocessor.license_names`, a list of SPDX licences. Used in evaluation of FsF-R1.1-01M. +- :question: [`linked_vocab.json`](fuji_server/data/linked_vocab.json): ... +- :exclamation: [`longterm_formats.json`](fuji_server/data/longterm_formats.json): This doesn't seem to be used any more (code is commented out). Instead, the info might be pulled from [`file_formats.json`](fuji_server/data/file_formats.json). +- :question: [`metadata_standards_uris.json`](fuji_server/data/metadata_standards_uris.json): ... +- :question: [`metadata_standards.json`](fuji_server/data/metadata_standards.json): Used in evaluation of FsF-R1.3-01M. Something about community specific metadata standards, whatever that means. Also, no idea how it recognises which standard it should be using? +- :exclamation: [`open_formats.json`](fuji_server/data/open_formats.json): This doesn't seem to be used any more (code is commented out). Instead, the info might be pulled from [`file_formats.json`](fuji_server/data/file_formats.json). +- :question: [`repodois.yaml`](fuji_server/data/repodois.yaml): DOIs from re3data (Datacite). No idea where these are used. +- :question: [`ResourceTypes.txt`](fuji_server/data/ResourceTypes.txt): List of content type identifiers? Seems to be loaded into `VALID_RESOURCE_TYPES` and used in evaluation of FsF-R1-01MD somehow. +- :exclamation: [`standard_uri_protocols.json`](fuji_server/data/standard_uri_protocols.json): Used for evaluating access through standardised protocols (FsF-A1-03D). Mapping of acronym to long name (e.g. FTP, SFTP, HTTP etc.) + +### What is `fuji_server/harvester/repository_harvester.py` for? :question: + +It defines class `RepositoryHarvester`, which doesn't seem to be used. +What's envisioned for this class? +Should we reuse it? +Is it meant for something else? \ No newline at end of file From 5e4f48dc9a449cd02e308d00413514df57ab3aac Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Mon, 27 Nov 2023 15:14:10 +0000 Subject: [PATCH 04/45] debugging prints --- fuji_server/controllers/fair_check.py | 6 ++++++ .../controllers/fair_object_controller.py | 18 ++++++++++-------- fuji_server/harvester/metadata_harvester.py | 1 + 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/fuji_server/controllers/fair_check.py b/fuji_server/controllers/fair_check.py index 23522cff..7c1c63a5 100644 --- a/fuji_server/controllers/fair_check.py +++ b/fuji_server/controllers/fair_check.py @@ -282,6 +282,9 @@ def set_auth_token(self, auth_token, auth_token_type="Basic"): self.auth_token_type = "Basic" def clean_metadata(self): + print("\nmerged START") + print(self.metadata_merged) + print("merged END\n") data_objects = self.metadata_merged.get("object_content_identifier") if data_objects == {"url": None} or data_objects == [None]: data_objects = self.metadata_merged["object_content_identifier"] = None @@ -553,6 +556,7 @@ def get_assessment_summary(self, results): } for res_k, res_v in enumerate(results): if res_v.get("metric_identifier"): + # TODO: write match for FRSM metric_match = re.search(r"^FsF-(([FAIR])[0-9](\.[0-9])?)-", str(res_v.get("metric_identifier"))) if metric_match.group(2) is not None: fair_principle = metric_match[1] @@ -585,6 +589,8 @@ def get_assessment_summary(self, results): summary["score_total"].update(sf.groupby(by="fair_principle")["score_total"].sum().to_dict()) summary["score_total"]["FAIR"] = round(float(sf["score_total"].sum()), 2) + print(summary) + summary["score_percent"] = ( round( sf.groupby(by="fair_category")["score_earned"].sum() diff --git a/fuji_server/controllers/fair_object_controller.py b/fuji_server/controllers/fair_object_controller.py index 456b05ed..0fddbb1e 100644 --- a/fuji_server/controllers/fair_object_controller.py +++ b/fuji_server/controllers/fair_object_controller.py @@ -101,28 +101,28 @@ def assess_by_id(body): # noqa: E501 ft.retrieve_metadata_external(ft.pid_url, repeat_mode=True) ft.harvest_re3_data() core_metadata_result = ft.check_minimal_metatadata() - # print(ft.metadata_unmerged) + print(ft.metadata_unmerged) content_identifier_included_result = ft.check_data_identifier_included_in_metadata() - # print('F-UJI checks: accsee level') + print('F-UJI checks: access level') access_level_result = ft.check_data_access_level() - # print('F-UJI checks: license') + print('F-UJI checks: license') license_result = ft.check_license() - # print('F-UJI checks: related') + print('F-UJI checks: related') related_resources_result = ft.check_relatedresources() - # print('F-UJI checks: searchable') + print('F-UJI checks: searchable') check_searchable_result = ft.check_searchable() - # print('F-UJI checks: data content') + print('F-UJI checks: data content') ft.harvest_all_data() uid_data_result = ft.check_unique_content_identifier() pid_data_result = ft.check_persistent_data_identifier() data_identifier_included_result = ft.check_data_content_metadata() metadata_identifier_included_result = ft.check_metadata_identifier_included_in_metadata() data_file_format_result = ft.check_data_file_format() - # print('F-UJI checks: data file format') + print('F-UJI checks: data file format') community_standards_result = ft.check_community_metadatastandards() data_provenance_result = ft.check_data_provenance() formal_metadata_result = ft.check_formal_metadata() - # print('F-UJI checks: semantic vocab') + print('F-UJI checks: semantic vocab') semantic_vocab_result = ft.check_semantic_vocabulary() ft.check_metadata_preservation() standard_protocol_data_result = ft.check_standardised_protocol_data() @@ -167,6 +167,8 @@ def assess_by_id(body): # noqa: E501 results.append(standard_protocol_metadata_result) debug_messages = ft.get_log_messages_dict() # ft.logger_message_stream.flush() + print(debug_messages) + print(results) summary = ft.get_assessment_summary(results) for res_k, res_v in enumerate(results): if ft.isDebug: diff --git a/fuji_server/harvester/metadata_harvester.py b/fuji_server/harvester/metadata_harvester.py index 0afc81bd..f926bbf8 100644 --- a/fuji_server/harvester/metadata_harvester.py +++ b/fuji_server/harvester/metadata_harvester.py @@ -145,6 +145,7 @@ def merge_metadata(self, metadict, url, method, format, mimetype, schema="", nam ) if isinstance(metadict, dict) and allow_merge == True: # self.metadata_sources.append((method_source, 'negotiated')) + print("MERGING:", metadict.keys()) for r in metadict.keys(): if r in self.reference_elements: # enforce lists From 1dc23158a75e2bec8728a581607ef7311b02dbe0 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Mon, 27 Nov 2023 15:15:52 +0000 Subject: [PATCH 05/45] ignore google DB --- .gitignore | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index 9abc4997..72c7c2ce 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,12 @@ # vim *.swp +# database +*.db + +# local copies of Google database loading files +fuji_server/helper/catalogue_helper_google_datasearch_copy.py +fuji_server/helper/create_google_cache_db_copy.py # Created by https://www.gitignore.io/api/python,linux,macos From 62d4775a2678da80e5ece086d4164a71dfa16739 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Mon, 27 Nov 2023 15:16:15 +0000 Subject: [PATCH 06/45] add license_path (used in GitHub) to metadata --- fuji_server/helper/metadata_mapper.py | 1 + 1 file changed, 1 insertion(+) diff --git a/fuji_server/helper/metadata_mapper.py b/fuji_server/helper/metadata_mapper.py index dc56eb9f..67920242 100644 --- a/fuji_server/helper/metadata_mapper.py +++ b/fuji_server/helper/metadata_mapper.py @@ -78,6 +78,7 @@ def flip_dict(dict_to_flip): "right_holder": {"label": "License", "sameAs": "http://purl.org/dc/terms/rightsHolder"}, "object_size": {"label": "Object Size", "sameAs": "http://purl.org/dc/terms/extent"}, "language": {"label": "Language", "sameAs": "http://purl.org/dc/terms/language"}, + "license_path": {"label": "License Path", "sameAs": None} } # core metadata elements (FsF-F2-01M) From 8a6a37a24d2a60b66c4e785dfe9100d34f9a282f Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Mon, 27 Nov 2023 15:16:59 +0000 Subject: [PATCH 07/45] data update --- fuji_server/data/repodois.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fuji_server/data/repodois.yaml b/fuji_server/data/repodois.yaml index 594c844d..8d2b5e49 100644 --- a/fuji_server/data/repodois.yaml +++ b/fuji_server/data/repodois.yaml @@ -45,6 +45,7 @@ bl.uclan: https://doi.org/10.17616/R38D3J bl.ucld: https://doi.org/10.17616/R34F41 bl.uel: https://doi.org/10.17616/R3V48Z bl.ukda: https://doi.org/10.17616/R3088K +bmbf.hirzqt: https://doi.org/10.17616/R3CK9G brown.bdr: https://doi.org/10.17616/R3193B brvz.rdr: https://doi.org/10.17616/R31NJN5S caltech.data: https://doi.org/10.17616/R3SW99 @@ -55,6 +56,7 @@ cern.hepdata: https://doi.org/10.17616/R30W2H cern.inspire: https://doi.org/10.17616/R3JC9Z cern.zenodo: https://doi.org/10.17616/R3QP53 clarin.clarin: https://doi.org/10.17616/R3RP5D +cngb.cga: https://doi.org/10.17616/R31NJMGL cngb.gigadb: https://doi.org/10.17616/R3TG83 cnic.sciencedb: https://doi.org/10.17616/R31NJMNT concor.kcydcu: https://doi.org/10.17616/R3FJ70 @@ -110,6 +112,7 @@ fzj.b2share: https://doi.org/10.17616/R3VK72 fzj.tereno: https://doi.org/10.17616/R39G9T gbif.ec: https://doi.org/10.17616/R31NJNFS gbif.gbif: https://doi.org/10.17616/R3J014 +gdcc.consorcio: https://doi.org/10.17616/R3S668 gdcc.csuc: https://doi.org/10.17616/R31NJMYF gdcc.harvard-dv: https://doi.org/10.17616/R3C880 gdcc.harvard-sbgr: https://doi.org/10.17616/R3N92J @@ -152,7 +155,7 @@ inist.otelo: https://doi.org/10.17616/R3F19K inist.resif: https://doi.org/10.17616/R37Q06 iris.iris: https://doi.org/10.17616/R3X607 ist.rex: https://doi.org/10.17616/R3877B -ivuw.dadosipb: https://doi.org/10.17616/R31NJN3K +itesm.ojevlu: https://doi.org/10.17616/R31NJNF0 ivuw.ipbdados: https://doi.org/10.17616/R31NJN3K jbru.bbees: https://doi.org/10.17616/R31NJNEN jcvi.eivbwb: https://doi.org/10.17616/R30P93 From 4fee56462dcbe9a1262d152be0932641bcb2ac68 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Mon, 27 Nov 2023 15:19:06 +0000 Subject: [PATCH 08/45] metric version configuration added to simpleclient --- simpleclient/index.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/simpleclient/index.php b/simpleclient/index.php index cf00b4f4..186bc871 100644 --- a/simpleclient/index.php +++ b/simpleclient/index.php @@ -47,6 +47,7 @@ $fuji_server = 'http://localhost:1071/fuji/api/v1/evaluate'; $fuji_username = 'yourusername'; $fuji_password = 'yourpassword'; +$metric_version = "metrics_v0.5"; #"metrics_v0.7_software"; ################################################################ $fair_basic_terms=['F'=>'Findable','A'=>'Accessible','I'=>'Interoperable','R'=>'Reusable']; @@ -171,6 +172,7 @@ $message->metadata_service_type = $input_service_type; $message->test_debug = true; $message->use_datacite = $usedatacite; + $message->metric_version = $metric_version; $post = json_encode($message); $username = $fuji_username; From efc5c2246c9bb873e881eeb1b7e388893ea6d951 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Mon, 27 Nov 2023 15:27:06 +0000 Subject: [PATCH 09/45] harvester notes --- notes.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/notes.md b/notes.md index 918e754f..8debabb0 100644 --- a/notes.md +++ b/notes.md @@ -97,6 +97,14 @@ First, we call [`harvest_all_metadata`](fuji_server/controllers/fair_check.py#32 > It seems to me that we always scrape *all* data, but then only calculate the FAIR score based on the metrics listed in the metrics file. +The metadata harvester looks through HTML markup following schema.org, Dublincore etc., through signposting/typed links (see above). +Ideally, it can find things like author information or license names that way. +It doesn't do much with GitHub, which doesn't seem to be signposted accordingly. + +The data harvester is only run if the metadata harvester finds an `object_content_identifier`, which I think is supposed to point to actual content (videos, pictures, but also data files). +Then, the data harvester runs over the data file and checks things like file format. +I haven't seen it do anything yet (metadata harvester has not found an `object_content_identifier` as of date). + Each specific evaluator, e.g. [`FAIREvaluatorLicense`](fuji_server/evaluators/fair_evaluator_license.py), is associated with a specific FsF metric. This makes it more difficult for us to reuse them. They seem to just look into the harvested data. From 5909b35bdb16df14b97333cf0566468c625ad4c4 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Tue, 5 Dec 2023 15:32:32 +0000 Subject: [PATCH 10/45] added GitHub harvester --- fuji_server/config/github.cfg | 2 + fuji_server/controllers/fair_check.py | 5 ++ .../controllers/fair_object_controller.py | 1 + fuji_server/harvester/github_harvester.py | 46 +++++++++++++++++++ notes.md | 9 +++- 5 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 fuji_server/config/github.cfg create mode 100644 fuji_server/harvester/github_harvester.py diff --git a/fuji_server/config/github.cfg b/fuji_server/config/github.cfg new file mode 100644 index 00000000..ecf08d00 --- /dev/null +++ b/fuji_server/config/github.cfg @@ -0,0 +1,2 @@ +[ACCESS] +token = \ No newline at end of file diff --git a/fuji_server/controllers/fair_check.py b/fuji_server/controllers/fair_check.py index 7c1c63a5..527829e5 100644 --- a/fuji_server/controllers/fair_check.py +++ b/fuji_server/controllers/fair_check.py @@ -54,6 +54,7 @@ from fuji_server.evaluators.fair_evaluator_unique_identifier_data import FAIREvaluatorUniqueIdentifierData from fuji_server.evaluators.fair_evaluator_unique_identifier_metadata import FAIREvaluatorUniqueIdentifierMetadata from fuji_server.harvester.data_harvester import DataHarvester +from fuji_server.harvester.github_harvester import GithubHarvester from fuji_server.harvester.metadata_harvester import MetadataHarvester from fuji_server.helper.linked_vocab_helper import linked_vocab_helper from fuji_server.helper.metadata_collector import MetadataOfferingMethods @@ -364,6 +365,10 @@ def harvest_all_data(self): data_harvester.retrieve_all_data() self.content_identifier = data_harvester.data + def harvest_github(self): + github_harvester = GithubHarvester(self.id) + github_harvester.harvest() + def retrieve_metadata_embedded(self): self.metadata_harvester.retrieve_metadata_embedded() self.metadata_unmerged.extend(self.metadata_harvester.metadata_unmerged) diff --git a/fuji_server/controllers/fair_object_controller.py b/fuji_server/controllers/fair_object_controller.py index 0fddbb1e..be6115b6 100644 --- a/fuji_server/controllers/fair_object_controller.py +++ b/fuji_server/controllers/fair_object_controller.py @@ -127,6 +127,7 @@ def assess_by_id(body): # noqa: E501 ft.check_metadata_preservation() standard_protocol_data_result = ft.check_standardised_protocol_data() standard_protocol_metadata_result = ft.check_standardised_protocol_metadata() + ft.harvest_github() if uid_result: results.append(uid_result) if pid_result: diff --git a/fuji_server/harvester/github_harvester.py b/fuji_server/harvester/github_harvester.py new file mode 100644 index 00000000..372e83e7 --- /dev/null +++ b/fuji_server/harvester/github_harvester.py @@ -0,0 +1,46 @@ +from github import Github, Auth +from github.GithubException import RateLimitExceededException, UnknownObjectException +from configparser import ConfigParser + +from fuji_server.helper.identifier_helper import IdentifierHelper + +class GithubHarvester: + def __init__(self, id, host="https://github.com"): + # Read Github API access token from config file. + config = ConfigParser() + config.read('../config.cfg') + auth_token = Auth.Token(config['ACCESS']['token']) + self.id = id + self.host = host + if host != "https://github.com": + base_url = f"{self.host}/api/v3" + self.handle = Github(auth=auth_token, base_url=base_url) + else: + self.handle = Github(auth=auth_token) + self.data = {} # dictionary with all info + + def harvest(self): + print("\n\n\n----------------------\nGitHub Harvest\n----------------------") + # check if it's a URL or repo ID + # NOTE: this should probably be handled by IdentifierHelper, but I don't understand that module yet. + if self.id.count('/') > 1: # URL + self.url = self.id + _, self.username, self.repo_name = self.id.rsplit("/", 2) + else: # repo ID + self.username, self.repo_name = self.id.split("/") + self.url = "/".join([self.endpoint, self.username, self.repo_name]) + self.repo_id = "/".join([self.username, self.repo_name]) + + # access repo via GitHub API + repo = self.handle.get_repo(self.repo_id) + + # harvesting + license_file = repo.get_license() + try: # LICENSE + license_file = repo.get_license() + self.data['license'] = license_file.license.key + except UnknownObjectException: + pass + + print(self.data) + print("----------------------\n\n\n") \ No newline at end of file diff --git a/notes.md b/notes.md index 8debabb0..33590bed 100644 --- a/notes.md +++ b/notes.md @@ -114,6 +114,9 @@ Only if it is, the evaluator runs through and computes a local score. In the end, all scores are aggregated into F, A, I, R scores. This might be a problem for us for metrics that are associated with more than one of these. +## changes + +- new requirement: `pygithub` package, using 2.1.1 ## Questions @@ -147,4 +150,8 @@ This might be a problem for us for metrics that are associated with more than on It defines class `RepositoryHarvester`, which doesn't seem to be used. What's envisioned for this class? Should we reuse it? -Is it meant for something else? \ No newline at end of file +Is it meant for something else? + +### What does `IdentifierHelper` do? :question: + +... \ No newline at end of file From f327ac16754e27a79c0329774c71a58df700dbe1 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Tue, 5 Dec 2023 15:34:47 +0000 Subject: [PATCH 11/45] ignore github cofig file from now on --- .gitignore | 3 +++ fuji_server/harvester/github_harvester.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 72c7c2ce..7d6097d2 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,9 @@ fuji_server/helper/catalogue_helper_google_datasearch_copy.py fuji_server/helper/create_google_cache_db_copy.py +# private config +fuji_server/config/github.cfg + # Created by https://www.gitignore.io/api/python,linux,macos ### Python ### diff --git a/fuji_server/harvester/github_harvester.py b/fuji_server/harvester/github_harvester.py index 372e83e7..351915ff 100644 --- a/fuji_server/harvester/github_harvester.py +++ b/fuji_server/harvester/github_harvester.py @@ -8,7 +8,7 @@ class GithubHarvester: def __init__(self, id, host="https://github.com"): # Read Github API access token from config file. config = ConfigParser() - config.read('../config.cfg') + config.read('../../config/github.cfg') auth_token = Auth.Token(config['ACCESS']['token']) self.id = id self.host = host From 096bb4489efba00e7f272159d6f28f4e9b186a57 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Tue, 5 Dec 2023 15:41:05 +0000 Subject: [PATCH 12/45] fixed config read --- fuji_server/harvester/github_harvester.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fuji_server/harvester/github_harvester.py b/fuji_server/harvester/github_harvester.py index 351915ff..189a6e13 100644 --- a/fuji_server/harvester/github_harvester.py +++ b/fuji_server/harvester/github_harvester.py @@ -1,3 +1,5 @@ +import os + from github import Github, Auth from github.GithubException import RateLimitExceededException, UnknownObjectException from configparser import ConfigParser @@ -8,7 +10,7 @@ class GithubHarvester: def __init__(self, id, host="https://github.com"): # Read Github API access token from config file. config = ConfigParser() - config.read('../../config/github.cfg') + config.read(os.path.join(os.path.abspath(os.path.dirname(__file__)), '../config/github.cfg')) auth_token = Auth.Token(config['ACCESS']['token']) self.id = id self.host = host From 5bacfb332a85cf8ea5e1bccad99abc472310fdf1 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Tue, 5 Dec 2023 15:55:28 +0000 Subject: [PATCH 13/45] GitHub licenses recognised by evaluator --- fuji_server/controllers/fair_check.py | 1 + fuji_server/controllers/fair_object_controller.py | 2 +- fuji_server/evaluators/fair_evaluator_license.py | 2 ++ fuji_server/harvester/github_harvester.py | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/fuji_server/controllers/fair_check.py b/fuji_server/controllers/fair_check.py index 527829e5..8a4a7927 100644 --- a/fuji_server/controllers/fair_check.py +++ b/fuji_server/controllers/fair_check.py @@ -368,6 +368,7 @@ def harvest_all_data(self): def harvest_github(self): github_harvester = GithubHarvester(self.id) github_harvester.harvest() + self.github_data = github_harvester.data def retrieve_metadata_embedded(self): self.metadata_harvester.retrieve_metadata_embedded() diff --git a/fuji_server/controllers/fair_object_controller.py b/fuji_server/controllers/fair_object_controller.py index be6115b6..143011e6 100644 --- a/fuji_server/controllers/fair_object_controller.py +++ b/fuji_server/controllers/fair_object_controller.py @@ -100,6 +100,7 @@ def assess_by_id(body): # noqa: E501 if ft.repeat_pid_check: ft.retrieve_metadata_external(ft.pid_url, repeat_mode=True) ft.harvest_re3_data() + ft.harvest_github() core_metadata_result = ft.check_minimal_metatadata() print(ft.metadata_unmerged) content_identifier_included_result = ft.check_data_identifier_included_in_metadata() @@ -127,7 +128,6 @@ def assess_by_id(body): # noqa: E501 ft.check_metadata_preservation() standard_protocol_data_result = ft.check_standardised_protocol_data() standard_protocol_metadata_result = ft.check_standardised_protocol_metadata() - ft.harvest_github() if uid_result: results.append(uid_result) if pid_result: diff --git a/fuji_server/evaluators/fair_evaluator_license.py b/fuji_server/evaluators/fair_evaluator_license.py index 5d6da470..83ce1518 100644 --- a/fuji_server/evaluators/fair_evaluator_license.py +++ b/fuji_server/evaluators/fair_evaluator_license.py @@ -54,6 +54,8 @@ def __init__(self, fuji_instance): def setLicenseDataAndOutput(self): self.license_info = [] specified_licenses = self.fuji.metadata_merged.get("license") + if specified_licenses is None: # try GitHub data + specified_licenses = self.fuji.github_data.get("license") if isinstance(specified_licenses, str): # licenses maybe string or list depending on metadata schemas specified_licenses = [specified_licenses] if specified_licenses is not None and specified_licenses != []: diff --git a/fuji_server/harvester/github_harvester.py b/fuji_server/harvester/github_harvester.py index 189a6e13..9c1ce841 100644 --- a/fuji_server/harvester/github_harvester.py +++ b/fuji_server/harvester/github_harvester.py @@ -40,7 +40,7 @@ def harvest(self): license_file = repo.get_license() try: # LICENSE license_file = repo.get_license() - self.data['license'] = license_file.license.key + self.data['license'] = license_file.license.name except UnknownObjectException: pass From 708857372ba79d481dff9ad7a3aa18736582bb96 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Thu, 7 Dec 2023 15:52:22 +0000 Subject: [PATCH 14/45] FRSM metric recognition --- fuji_server/controllers/fair_check.py | 6 +++-- fuji_server/evaluators/fair_evaluator.py | 25 ++++++++++++------- .../evaluators/fair_evaluator_license.py | 2 +- fuji_server/helper/metric_helper.py | 5 ++-- fuji_server/yaml/metrics_v0.7_software.yaml | 8 +++--- simpleclient/index.php | 6 ++--- 6 files changed, 31 insertions(+), 21 deletions(-) diff --git a/fuji_server/controllers/fair_check.py b/fuji_server/controllers/fair_check.py index 8a4a7927..149cd69d 100644 --- a/fuji_server/controllers/fair_check.py +++ b/fuji_server/controllers/fair_check.py @@ -199,6 +199,9 @@ def __init__( self.METRICS = self.metric_helper.get_custom_metrics( ["metric_name", "total_score", "metric_tests", "metric_number"] ) + print("\n\nFound METRICS:\n") + print(self.METRICS) + print("\n\n") self.METRIC_VERSION = metric_version self.metrics_config = self.metric_helper.get_metrics_config() print("METRICS CONFIG: ", self.metrics_config) @@ -562,8 +565,7 @@ def get_assessment_summary(self, results): } for res_k, res_v in enumerate(results): if res_v.get("metric_identifier"): - # TODO: write match for FRSM - metric_match = re.search(r"^FsF-(([FAIR])[0-9](\.[0-9])?)-", str(res_v.get("metric_identifier"))) + metric_match = re.search(r"^(?:FRSM-[0-9]+|FsF)-(([FAIR])[0-9](\.[0-9])?)", str(res_v.get("metric_identifier"))) # match both FAIR and FsF metrics if metric_match.group(2) is not None: fair_principle = metric_match[1] fair_category = metric_match[2] diff --git a/fuji_server/evaluators/fair_evaluator.py b/fuji_server/evaluators/fair_evaluator.py index 68d9c955..78fe9af7 100644 --- a/fuji_server/evaluators/fair_evaluator.py +++ b/fuji_server/evaluators/fair_evaluator.py @@ -72,7 +72,7 @@ def __init__(self, fuji_instance): self.isDebug = self.fuji.isDebug self.fuji.count = self.fuji.count + 1 self.logger = self.fuji.logger - self.metric_regex = r"FsF-[FAIR][0-9]?(\.[0-9])?-[0-9]+[MD]+(-[0-9]+[a-z]?)?" + self.metric_regex = r"^FsF-[FAIR][0-9]?(\.[0-9])?-[0-9]+[MD]+(-[0-9]+[a-z]?)?|^FRSM-[0-9]+-[FAIR][0-9]?(\.[0-9])?(-[0-9]+)?" # match FsF or FAIR4RS metric identifiers def set_maturity(self, maturity): if self.maturity < maturity: @@ -83,20 +83,27 @@ def set_metric(self, metric_identifier): Parameters ---------- - metric_identifier:str - The metric identifier + metric_identifier: str | list + The metric identifier. Can be a list if the evaluator is used for different metric sources. metrics: str FUJI metrics """ self.metrics = self.fuji.METRICS - self.metric_identifier = metric_identifier + if isinstance(metric_identifier, list): # find out whether one of them + for mid in metric_identifier: + if mid in self.metrics: + self.metric_identifier = mid # choose the first hit - it's unlikely there's more than one, and it doesn't change the behaviour either way + break + self.metric_identifier = None # fallback + else: # str or None + self.metric_identifier = metric_identifier if self.metric_identifier is not None and self.metric_identifier in self.metrics: - self.agnostic_identifier = self.metrics.get(metric_identifier).get("agnostic_identifier") - self.community_identifier = self.metrics.get(metric_identifier).get("metric_identifier") - self.total_score = int(self.metrics.get(metric_identifier).get("total_score")) + self.agnostic_identifier = self.metrics.get(self.metric_identifier).get("agnostic_identifier") + self.community_identifier = self.metrics.get(self.metric_identifier).get("metric_identifier") + self.total_score = int(self.metrics.get(self.metric_identifier).get("total_score")) self.score = FAIRResultCommonScore(total=self.total_score) - self.metric_name = self.metrics.get(metric_identifier).get("metric_name") - self.metric_number = self.metrics.get(metric_identifier).get("metric_number") + self.metric_name = self.metrics.get(self.metric_identifier).get("metric_name") + self.metric_number = self.metrics.get(self.metric_identifier).get("metric_number") self.initializeMetricTests() def evaluate(self): diff --git a/fuji_server/evaluators/fair_evaluator_license.py b/fuji_server/evaluators/fair_evaluator_license.py index 83ce1518..bc7d81dc 100644 --- a/fuji_server/evaluators/fair_evaluator_license.py +++ b/fuji_server/evaluators/fair_evaluator_license.py @@ -46,7 +46,7 @@ class FAIREvaluatorLicense(FAIREvaluator): def __init__(self, fuji_instance): FAIREvaluator.__init__(self, fuji_instance) - self.set_metric("FsF-R1.1-01M") + self.set_metric(["FsF-R1.1-01M", "FRSM-15-R1.1"]) self.output = [] self.license_info = [] diff --git a/fuji_server/helper/metric_helper.py b/fuji_server/helper/metric_helper.py index 992d657f..9e8e8b5d 100644 --- a/fuji_server/helper/metric_helper.py +++ b/fuji_server/helper/metric_helper.py @@ -15,8 +15,9 @@ def __init__(self, metric_input_file_name, logger=None): self.metric_version = None self.total_metrics = 0 self.all_metrics_list = None - self.metric_regex = r"FsF-[FAIR][0-9]?(\.[0-9])?-[0-9]+[MD]+" - self.metric_test_regex = r"FsF-[FAIR][0-9]?(\.[0-9])?-[0-9]+[MD]+(-[0-9]+[a-z]?)" + # match FsF or FAIR4RS metric (test) identifiers + self.metric_regex = r"^FsF-[FAIR][0-9]?(\.[0-9])?-[0-9]+[MD]+|FRSM-[0-9]+-[FAIR][0-9]?(\.[0-9])?" + self.metric_test_regex = r"FsF-[FAIR][0-9]?(\.[0-9])?-[0-9]+[MD]+(-[0-9]+[a-z]?)|^FRSM-[0-9]+-[FAIR][0-9]?(\.[0-9])?(-[0-9]+)?" self.config = {} if logger: self.logger = logger diff --git a/fuji_server/yaml/metrics_v0.7_software.yaml b/fuji_server/yaml/metrics_v0.7_software.yaml index afb02cc6..dee1c1a5 100644 --- a/fuji_server/yaml/metrics_v0.7_software.yaml +++ b/fuji_server/yaml/metrics_v0.7_software.yaml @@ -12,7 +12,7 @@ config: - dublin-core - dcat-data-catalog-vocabulary metrics: -- metric_identifier: FRSM-15 +- metric_identifier: FRSM-15-R1.1 metric_number: 15 metric_short_name: Software Source Code License metric_name: The software source code includes licensing information for the software and any bundled external software. @@ -22,15 +22,15 @@ metrics: evaluation_mechanism: Metric evaluation is based on the presence of a machine readable license file. test_scoring_mechanism: cumulative metric_tests: - - metric_test_identifier: FRSM-15-1 + - metric_test_identifier: FRSM-15-R1.1-1 metric_test_name: License file is included. metric_test_score: 1 metric_test_maturity: 1 - - metric_test_identifier: FRSM-15-2 + - metric_test_identifier: FRSM-15-R1.1-2 metric_test_name: Licensing information is part of the source code header. metric_test_score: 1 metric_test_maturity: 2 - - metric_test_identifier: FRSM-15-3 + - metric_test_identifier: FRSM-15-R1.1-3 metric_test_name: Recognized licence is in SPDX format. metric_test_score: 1 metric_test_maturity: 3 diff --git a/simpleclient/index.php b/simpleclient/index.php index 186bc871..53555396 100644 --- a/simpleclient/index.php +++ b/simpleclient/index.php @@ -45,9 +45,9 @@ set_time_limit(0); ######################## local config ########################## $fuji_server = 'http://localhost:1071/fuji/api/v1/evaluate'; -$fuji_username = 'yourusername'; -$fuji_password = 'yourpassword'; -$metric_version = "metrics_v0.5"; #"metrics_v0.7_software"; +$fuji_username = 'marvel'; +$fuji_password = 'wonderwoman'; +$metric_version = "metrics_v0.7_software"; #"metrics_v0.5"; #"metrics_v0.7_software"; ################################################################ $fair_basic_terms=['F'=>'Findable','A'=>'Accessible','I'=>'Interoperable','R'=>'Reusable']; From 2848067e8e51f002ff0a9e729caba1ccb4170622 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Thu, 7 Dec 2023 16:53:34 +0000 Subject: [PATCH 15/45] #15 reuse metric test code --- .../evaluators/fair_evaluator_license.py | 17 +++++++++++++++-- notes.md | 4 ++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/fuji_server/evaluators/fair_evaluator_license.py b/fuji_server/evaluators/fair_evaluator_license.py index bc7d81dc..1729442e 100644 --- a/fuji_server/evaluators/fair_evaluator_license.py +++ b/fuji_server/evaluators/fair_evaluator_license.py @@ -51,6 +51,19 @@ def __init__(self, fuji_instance): self.output = [] self.license_info = [] + def setMetricTestMap(self): + """Create map from metric test names to class functions. This is necessary as functions may be reused for different metrics relating to licenses.""" + metric_test_map = { # overall map + self.testLicenseIsValidAndSPDXRegistered: ["FsF-R1.1-01M-2", "FRSM-15-R1.1-3"], + self.testLicenseMetadataElementAvailable: ["FsF-R1.1-01M-1", "FRSM-15-R1.1-1"] + } + # select based on metric identifier + self.metric_test_map = {} + for k, tids in metric_test_map.items(): + candidates = [tid for tid in tids if tid.startswith(self.metric_identifier)] + assert len(candidates) <= 1, "Code for metric test should not be called by more than one metric test within the same metric." + self.metric_test_map[k] = candidates[0] + def setLicenseDataAndOutput(self): self.license_info = [] specified_licenses = self.fuji.metadata_merged.get("license") @@ -181,7 +194,7 @@ def lookup_license_by_name(self, lvalue, metric_id): def testLicenseMetadataElementAvailable(self): test_status = False - if self.isTestDefined(self.metric_identifier + "-1"): + if self.isTestDefined(self.metric_identifier + "-1"): # TODO: use self.metric_test_map instead test_score = self.getTestConfigScore(self.metric_identifier + "-1") if self.license_info is not None and self.license_info != []: test_status = True @@ -195,7 +208,7 @@ def testLicenseMetadataElementAvailable(self): self.logger.warning(f"{self.metric_identifier} : License information unavailable in metadata") return test_status - def testLicenseIsValidAndSPDXRegistered(self): + def testLicenseIsValidAndSPDXRegistered(self): # TODO: use self.metric_test_map instead test_status = False test_requirements = {} if self.isTestDefined(self.metric_identifier + "-2"): diff --git a/notes.md b/notes.md index 33590bed..856c6b95 100644 --- a/notes.md +++ b/notes.md @@ -154,4 +154,8 @@ Is it meant for something else? ### What does `IdentifierHelper` do? :question: +... + +### What do test score and test maturity mean as results? + ... \ No newline at end of file From 354ac82193bc8ac20edc99c1c96d0d45efff6b94 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Wed, 13 Dec 2023 11:00:37 +0000 Subject: [PATCH 16/45] correct test mapping for license --- .../evaluators/fair_evaluator_license.py | 34 +++++++++++-------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/fuji_server/evaluators/fair_evaluator_license.py b/fuji_server/evaluators/fair_evaluator_license.py index 1729442e..54508cb8 100644 --- a/fuji_server/evaluators/fair_evaluator_license.py +++ b/fuji_server/evaluators/fair_evaluator_license.py @@ -51,11 +51,13 @@ def __init__(self, fuji_instance): self.output = [] self.license_info = [] + self.setMetricTestMap() + def setMetricTestMap(self): """Create map from metric test names to class functions. This is necessary as functions may be reused for different metrics relating to licenses.""" metric_test_map = { # overall map - self.testLicenseIsValidAndSPDXRegistered: ["FsF-R1.1-01M-2", "FRSM-15-R1.1-3"], - self.testLicenseMetadataElementAvailable: ["FsF-R1.1-01M-1", "FRSM-15-R1.1-1"] + "testLicenseIsValidAndSPDXRegistered": ["FsF-R1.1-01M-2", "FRSM-15-R1.1-3"], + "testLicenseMetadataElementAvailable": ["FsF-R1.1-01M-1", "FRSM-15-R1.1-1"] } # select based on metric identifier self.metric_test_map = {} @@ -193,28 +195,32 @@ def lookup_license_by_name(self, lvalue, metric_id): return html_url, isOsiApproved, id def testLicenseMetadataElementAvailable(self): + agnostic_test_name = "testLicenseMetadataElementAvailable" test_status = False - if self.isTestDefined(self.metric_identifier + "-1"): # TODO: use self.metric_test_map instead - test_score = self.getTestConfigScore(self.metric_identifier + "-1") + test_id = self.metric_test_map[agnostic_test_name] + if self.isTestDefined(test_id): + test_score = self.getTestConfigScore(test_id) if self.license_info is not None and self.license_info != []: test_status = True self.logger.log( self.fuji.LOG_SUCCESS, f"{self.metric_identifier} : Found licence information in metadata" ) - self.maturity = self.getTestConfigMaturity(self.metric_identifier + "-1") - self.setEvaluationCriteriumScore(self.metric_identifier + "-1", test_score, "pass") + self.maturity = self.getTestConfigMaturity(test_id) + self.setEvaluationCriteriumScore(test_id, test_score, "pass") self.score.earned += test_score else: self.logger.warning(f"{self.metric_identifier} : License information unavailable in metadata") return test_status - def testLicenseIsValidAndSPDXRegistered(self): # TODO: use self.metric_test_map instead + def testLicenseIsValidAndSPDXRegistered(self): + agnostic_test_name = "testLicenseIsValidAndSPDXRegistered" test_status = False test_requirements = {} - if self.isTestDefined(self.metric_identifier + "-2"): - if self.metric_tests[self.metric_identifier + "-2"].metric_test_requirements: - test_requirements = self.metric_tests[self.metric_identifier + "-2"].metric_test_requirements[0] - test_score = self.getTestConfigScore(self.metric_identifier + "-2") + test_id = self.metric_test_map[agnostic_test_name] + if self.isTestDefined(test_id): + if self.metric_tests[test_id].metric_test_requirements: + test_requirements = self.metric_tests[test_id].metric_test_requirements[0] + test_score = self.getTestConfigScore(test_id) test_required = [] if test_requirements.get("required"): if isinstance(test_requirements.get("required"), list): @@ -226,7 +232,7 @@ def testLicenseIsValidAndSPDXRegistered(self): # TODO: use self.metric_test_map self.logger.info( "{0} : Will exclusively consider community specific licenses for {0}{1} which are specified in metrics -: {2}".format( - self.metric_identifier, "-2", test_requirements.get("required") + test_id, test_requirements.get("required") ) ) else: @@ -253,9 +259,9 @@ def testLicenseIsValidAndSPDXRegistered(self): # TODO: use self.metric_test_map ) if test_status: - self.maturity = self.getTestConfigMaturity(self.metric_identifier + "-2") + self.maturity = self.getTestConfigMaturity(test_id) self.score.earned += test_score - self.setEvaluationCriteriumScore(self.metric_identifier + "-2", test_score, "pass") + self.setEvaluationCriteriumScore(test_id, test_score, "pass") return test_status From 4654e39fb8015ea0e490848bc36ad3f9aa7bbcb8 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Wed, 13 Dec 2023 11:45:20 +0000 Subject: [PATCH 17/45] added domain-specific tests --- fuji_server/helper/metric_helper.py | 2 +- fuji_server/yaml/metrics_v0.7_software.yaml | 4 +- .../yaml/metrics_v0.7_software_cessda.yaml | 41 +++++++++++++++++++ 3 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 fuji_server/yaml/metrics_v0.7_software_cessda.yaml diff --git a/fuji_server/helper/metric_helper.py b/fuji_server/helper/metric_helper.py index 9e8e8b5d..d80d57f2 100644 --- a/fuji_server/helper/metric_helper.py +++ b/fuji_server/helper/metric_helper.py @@ -17,7 +17,7 @@ def __init__(self, metric_input_file_name, logger=None): self.all_metrics_list = None # match FsF or FAIR4RS metric (test) identifiers self.metric_regex = r"^FsF-[FAIR][0-9]?(\.[0-9])?-[0-9]+[MD]+|FRSM-[0-9]+-[FAIR][0-9]?(\.[0-9])?" - self.metric_test_regex = r"FsF-[FAIR][0-9]?(\.[0-9])?-[0-9]+[MD]+(-[0-9]+[a-z]?)|^FRSM-[0-9]+-[FAIR][0-9]?(\.[0-9])?(-[0-9]+)?" + self.metric_test_regex = r"FsF-[FAIR][0-9]?(\.[0-9])?-[0-9]+[MD]+(-[0-9]+[a-z]?)|^FRSM-[0-9]+-[FAIR][0-9]?(\.[0-9])?(?:-[a-zA-Z]+)?(-[0-9]+)?" self.config = {} if logger: self.logger = logger diff --git a/fuji_server/yaml/metrics_v0.7_software.yaml b/fuji_server/yaml/metrics_v0.7_software.yaml index dee1c1a5..bdccceaa 100644 --- a/fuji_server/yaml/metrics_v0.7_software.yaml +++ b/fuji_server/yaml/metrics_v0.7_software.yaml @@ -27,7 +27,7 @@ metrics: metric_test_score: 1 metric_test_maturity: 1 - metric_test_identifier: FRSM-15-R1.1-2 - metric_test_name: Licensing information is part of the source code header. + metric_test_name: The source code includes licensing information for all components bundled with that software. metric_test_score: 1 metric_test_maturity: 2 - metric_test_identifier: FRSM-15-R1.1-3 @@ -36,6 +36,6 @@ metrics: metric_test_maturity: 3 created_by: FAIR4RS date_created: 2023-11-10 - date_updated: 2023-11-10 + date_updated: 2023-12-13 version: 0.1 total_score: 3 diff --git a/fuji_server/yaml/metrics_v0.7_software_cessda.yaml b/fuji_server/yaml/metrics_v0.7_software_cessda.yaml new file mode 100644 index 00000000..ef4efeab --- /dev/null +++ b/fuji_server/yaml/metrics_v0.7_software_cessda.yaml @@ -0,0 +1,41 @@ +# LIST OF FAIR4RS METRICS AND THEIR RESPONSE OUTPUT FORMATS +config: + metric_specification: https://doi.org/10.5281/zenodo.10047401 + metric_status: draft + allowed_harvesting_methods: + - HTML_EMBEDDING + - MICRODATA + - TYPED_LINKS + - SIGNPOSTING + allowed_metadata_standards: + - jsonld + - dublin-core + - dcat-data-catalog-vocabulary +metrics: +- metric_identifier: FRSM-15-R1.1 + metric_number: 15 + metric_short_name: Software Source Code License + metric_name: The software source code includes licensing information for the software and any bundled external software. + description: It is important that software licences are included with the source code as many tools and processes look for licensing information there to determine licence compatibility. + fair_principle: R1.1 + target: Software + evaluation_mechanism: Metric evaluation is based on the presence of a machine readable license file. + test_scoring_mechanism: cumulative + metric_tests: + - metric_test_identifier: FRSM-15-R1.1-CESSDA-1 + metric_test_name: LICENSE.txt file is included at the root of the repository. + metric_test_score: 1 + metric_test_maturity: 1 + - metric_test_identifier: FRSM-15-R1.1-CESSDA-2 + metric_test_name: Licensing information is part of the source code header. + metric_test_score: 1 + metric_test_maturity: 2 + - metric_test_identifier: FRSM-15-R1.1-CESSDA-3 + metric_test_name: The build script (Maven POM, where used) checks that the standard header is present in all source code files. + metric_test_score: 1 + metric_test_maturity: 3 + created_by: FAIR4RS + date_created: 2023-12-13 + date_updated: 2023-12-13 + version: 0.1 + total_score: 3 From 27847b27e1f58add3a340b5a076fd8fdb205a4ad Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Wed, 13 Dec 2023 12:55:59 +0000 Subject: [PATCH 18/45] #15 stubs for new tests --- .../evaluators/fair_evaluator_license.py | 50 ++++++++++++++++++- simpleclient/index.php | 2 +- 2 files changed, 50 insertions(+), 2 deletions(-) diff --git a/fuji_server/evaluators/fair_evaluator_license.py b/fuji_server/evaluators/fair_evaluator_license.py index 54508cb8..37c77b71 100644 --- a/fuji_server/evaluators/fair_evaluator_license.py +++ b/fuji_server/evaluators/fair_evaluator_license.py @@ -57,7 +57,11 @@ def setMetricTestMap(self): """Create map from metric test names to class functions. This is necessary as functions may be reused for different metrics relating to licenses.""" metric_test_map = { # overall map "testLicenseIsValidAndSPDXRegistered": ["FsF-R1.1-01M-2", "FRSM-15-R1.1-3"], - "testLicenseMetadataElementAvailable": ["FsF-R1.1-01M-1", "FRSM-15-R1.1-1"] + "testLicenseMetadataElementAvailable": ["FsF-R1.1-01M-1", "FRSM-15-R1.1-1"], + "testLicenseFileAtRoot": ["FRSM-15-R1.1-CESSDA-1"], + "testLicenseInHeaders": ["FRSM-15-R1.1-CESSDA-2"], + "testLicenseForBundled": ["FRSM-15-R1.1-2"], + "testBuildScriptChecksLicenseHeader": ["FRSM-15-R1.1-CESSDA-3"] } # select based on metric identifier self.metric_test_map = {} @@ -265,6 +269,42 @@ def testLicenseIsValidAndSPDXRegistered(self): return test_status + def testLicenseFileAtRoot(self): + #TODO: Implement + agnostic_test_name = "testLicenseFileAtRoot" + test_status = False + test_id = self.metric_test_map[agnostic_test_name] + if self.isTestDefined(test_id): + pass + return test_status + + def testLicenseInHeaders(self): + #TODO: Implement + agnostic_test_name = "testLicenseInHeaders" + test_status = False + test_id = self.metric_test_map[agnostic_test_name] + if self.isTestDefined(test_id): + pass + return test_status + + def testLicenseForBundled(self): + #TODO: Implement + agnostic_test_name = "testLicenseForBundled" + test_status = False + test_id = self.metric_test_map[agnostic_test_name] + if self.isTestDefined(test_id): + pass + return test_status + + def testBuildScriptChecksLicenseHeader(self): + #TODO: Implement + agnostic_test_name = "testBuildScriptChecksLicenseHeader" + test_status = False + test_id = self.metric_test_map[agnostic_test_name] + if self.isTestDefined(test_id): + pass + return test_status + def evaluate(self): self.setLicenseDataAndOutput() @@ -277,6 +317,14 @@ def evaluate(self): license_status = "pass" if self.testLicenseIsValidAndSPDXRegistered(): license_status = "pass" + if self.testLicenseFileAtRoot(): + license_status = "pass" + if self.testLicenseForBundled(): + license_status = "pass" + if self.testLicenseInHeaders(): + license_status = "pass" + if self.testBuildScriptChecksLicenseHeader(): + license_status = "pass" self.result.test_status = license_status self.result.output = self.output diff --git a/simpleclient/index.php b/simpleclient/index.php index 53555396..992baa77 100644 --- a/simpleclient/index.php +++ b/simpleclient/index.php @@ -47,7 +47,7 @@ $fuji_server = 'http://localhost:1071/fuji/api/v1/evaluate'; $fuji_username = 'marvel'; $fuji_password = 'wonderwoman'; -$metric_version = "metrics_v0.7_software"; #"metrics_v0.5"; #"metrics_v0.7_software"; +$metric_version = "metrics_v0.7_software_cessda"; #"metrics_v0.5"; #"metrics_v0.7_software"; ################################################################ $fair_basic_terms=['F'=>'Findable','A'=>'Accessible','I'=>'Interoperable','R'=>'Reusable']; From 86445c082d5d2c54d2bd2c59059549f1d04d942c Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Wed, 13 Dec 2023 16:24:25 +0000 Subject: [PATCH 19/45] #15 implemented test txt at root --- .../evaluators/fair_evaluator_license.py | 86 +++++++++++++------ fuji_server/harvester/github_harvester.py | 12 ++- simpleclient/index.php | 2 +- 3 files changed, 69 insertions(+), 31 deletions(-) diff --git a/fuji_server/evaluators/fair_evaluator_license.py b/fuji_server/evaluators/fair_evaluator_license.py index 37c77b71..29766ecd 100644 --- a/fuji_server/evaluators/fair_evaluator_license.py +++ b/fuji_server/evaluators/fair_evaluator_license.py @@ -28,6 +28,7 @@ from fuji_server.evaluators.fair_evaluator import FAIREvaluator from fuji_server.models.license import License from fuji_server.models.license_output_inner import LicenseOutputInner +from pathlib import Path class FAIREvaluatorLicense(FAIREvaluator): @@ -51,11 +52,8 @@ def __init__(self, fuji_instance): self.output = [] self.license_info = [] - self.setMetricTestMap() - - def setMetricTestMap(self): - """Create map from metric test names to class functions. This is necessary as functions may be reused for different metrics relating to licenses.""" - metric_test_map = { # overall map + # Create map from metric test names to class functions. This is necessary as functions may be reused for different metrics relating to licenses. + self.metric_test_map = { # overall map "testLicenseIsValidAndSPDXRegistered": ["FsF-R1.1-01M-2", "FRSM-15-R1.1-3"], "testLicenseMetadataElementAvailable": ["FsF-R1.1-01M-1", "FRSM-15-R1.1-1"], "testLicenseFileAtRoot": ["FRSM-15-R1.1-CESSDA-1"], @@ -63,12 +61,6 @@ def setMetricTestMap(self): "testLicenseForBundled": ["FRSM-15-R1.1-2"], "testBuildScriptChecksLicenseHeader": ["FRSM-15-R1.1-CESSDA-3"] } - # select based on metric identifier - self.metric_test_map = {} - for k, tids in metric_test_map.items(): - candidates = [tid for tid in tids if tid.startswith(self.metric_identifier)] - assert len(candidates) <= 1, "Code for metric test should not be called by more than one metric test within the same metric." - self.metric_test_map[k] = candidates[0] def setLicenseDataAndOutput(self): self.license_info = [] @@ -202,7 +194,12 @@ def testLicenseMetadataElementAvailable(self): agnostic_test_name = "testLicenseMetadataElementAvailable" test_status = False test_id = self.metric_test_map[agnostic_test_name] - if self.isTestDefined(test_id): + test_defined = False + for test_id in self.metric_test_map[agnostic_test_name]: + if self.isTestDefined(test_id): + test_defined = True + break + if test_defined: test_score = self.getTestConfigScore(test_id) if self.license_info is not None and self.license_info != []: test_status = True @@ -220,8 +217,12 @@ def testLicenseIsValidAndSPDXRegistered(self): agnostic_test_name = "testLicenseIsValidAndSPDXRegistered" test_status = False test_requirements = {} - test_id = self.metric_test_map[agnostic_test_name] - if self.isTestDefined(test_id): + test_defined = False + for test_id in self.metric_test_map[agnostic_test_name]: + if self.isTestDefined(test_id): + test_defined = True + break + if test_defined: if self.metric_tests[test_id].metric_test_requirements: test_requirements = self.metric_tests[test_id].metric_test_requirements[0] test_score = self.getTestConfigScore(test_id) @@ -269,21 +270,46 @@ def testLicenseIsValidAndSPDXRegistered(self): return test_status - def testLicenseFileAtRoot(self): - #TODO: Implement + def testLicenseTXTAtRoot(self): agnostic_test_name = "testLicenseFileAtRoot" test_status = False - test_id = self.metric_test_map[agnostic_test_name] - if self.isTestDefined(test_id): - pass + test_defined = False + for test_id in self.metric_test_map[agnostic_test_name]: + if self.isTestDefined(test_id): + test_defined = True + break + if test_defined: + test_score = self.getTestConfigScore(test_id) + license_path = self.fuji.github_data.get("license_path") + if license_path is not None: + if license_path == "LICENSE.txt": + test_status = True + self.logger.log( + self.fuji.LOG_SUCCESS, f"{self.metric_identifier} : Found LICENSE.txt at repository root." + ) + self.maturity = self.getTestConfigMaturity(test_id) + self.setEvaluationCriteriumScore(test_id, test_score, "pass") + self.score.earned += test_score + else: # identify what's wrong + p = Path(license_path) + if p.parent != ".": + self.logger.warning(f"{self.metric_identifier} : Found a license file, but it is not located at the root of the repository.") + if p.suffix != "": + self.logger.warning(f"{self.metric_identifier} : Found a license file, but the suffix is not TXT.") + else: + self.logger.warning(f"{self.metric_identifier} : Did not find a license file.") return test_status def testLicenseInHeaders(self): #TODO: Implement agnostic_test_name = "testLicenseInHeaders" test_status = False - test_id = self.metric_test_map[agnostic_test_name] - if self.isTestDefined(test_id): + test_defined = False + for test_id in self.metric_test_map[agnostic_test_name]: + if self.isTestDefined(test_id): + test_defined = True + break + if test_defined: pass return test_status @@ -291,8 +317,12 @@ def testLicenseForBundled(self): #TODO: Implement agnostic_test_name = "testLicenseForBundled" test_status = False - test_id = self.metric_test_map[agnostic_test_name] - if self.isTestDefined(test_id): + test_defined = False + for test_id in self.metric_test_map[agnostic_test_name]: + if self.isTestDefined(test_id): + test_defined = True + break + if test_defined: pass return test_status @@ -300,8 +330,12 @@ def testBuildScriptChecksLicenseHeader(self): #TODO: Implement agnostic_test_name = "testBuildScriptChecksLicenseHeader" test_status = False - test_id = self.metric_test_map[agnostic_test_name] - if self.isTestDefined(test_id): + test_defined = False + for test_id in self.metric_test_map[agnostic_test_name]: + if self.isTestDefined(test_id): + test_defined = True + break + if test_defined: pass return test_status @@ -317,7 +351,7 @@ def evaluate(self): license_status = "pass" if self.testLicenseIsValidAndSPDXRegistered(): license_status = "pass" - if self.testLicenseFileAtRoot(): + if self.testLicenseTXTAtRoot(): license_status = "pass" if self.testLicenseForBundled(): license_status = "pass" diff --git a/fuji_server/harvester/github_harvester.py b/fuji_server/harvester/github_harvester.py index 9c1ce841..0327b2f1 100644 --- a/fuji_server/harvester/github_harvester.py +++ b/fuji_server/harvester/github_harvester.py @@ -22,7 +22,7 @@ def __init__(self, id, host="https://github.com"): self.data = {} # dictionary with all info def harvest(self): - print("\n\n\n----------------------\nGitHub Harvest\n----------------------") + print("\n\n\n----------------------\nGitHub Harvest\n----------------------") # DEBUG PRINTS # check if it's a URL or repo ID # NOTE: this should probably be handled by IdentifierHelper, but I don't understand that module yet. if self.id.count('/') > 1: # URL @@ -34,12 +34,16 @@ def harvest(self): self.repo_id = "/".join([self.username, self.repo_name]) # access repo via GitHub API - repo = self.handle.get_repo(self.repo_id) - + try: + repo = self.handle.get_repo(self.repo_id) + except UnknownObjectException: + print("Could not find repo.") #TODO: this will be an access log, probably? + return + # harvesting - license_file = repo.get_license() try: # LICENSE license_file = repo.get_license() + self.data['license_path'] = license_file.path self.data['license'] = license_file.license.name except UnknownObjectException: pass diff --git a/simpleclient/index.php b/simpleclient/index.php index 992baa77..52125443 100644 --- a/simpleclient/index.php +++ b/simpleclient/index.php @@ -47,7 +47,7 @@ $fuji_server = 'http://localhost:1071/fuji/api/v1/evaluate'; $fuji_username = 'marvel'; $fuji_password = 'wonderwoman'; -$metric_version = "metrics_v0.7_software_cessda"; #"metrics_v0.5"; #"metrics_v0.7_software"; +$metric_version = "metrics_v0.7_software_cessda"; #"metrics_v0.7_software_cessda"; #"metrics_v0.5"; #"metrics_v0.7_software"; ################################################################ $fair_basic_terms=['F'=>'Findable','A'=>'Accessible','I'=>'Interoperable','R'=>'Reusable']; From 3b087e26fc00beaa64077ce3dae8d8c2254e4985 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Wed, 13 Dec 2023 16:34:31 +0000 Subject: [PATCH 20/45] fixed debug messages for FRSM metrics --- fuji_server/controllers/fair_check.py | 2 +- fuji_server/controllers/fair_object_controller.py | 4 ++-- fuji_server/evaluators/fair_evaluator_license.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fuji_server/controllers/fair_check.py b/fuji_server/controllers/fair_check.py index f8eade16..4f89a8a5 100644 --- a/fuji_server/controllers/fair_check.py +++ b/fuji_server/controllers/fair_check.py @@ -539,7 +539,7 @@ def get_log_messages_dict(self): logger_messages = {} self.logger_message_stream.seek(0) for log_message in self.logger_message_stream.readlines(): - if log_message.startswith("FsF-"): + if log_message.startswith("FsF-") or log_message.startswith("FRSM-"): m = log_message.split(":", 1) metric = m[0].strip() message_n_level = m[1].strip().split("|", 1) diff --git a/fuji_server/controllers/fair_object_controller.py b/fuji_server/controllers/fair_object_controller.py index 88df923b..48e1d08d 100644 --- a/fuji_server/controllers/fair_object_controller.py +++ b/fuji_server/controllers/fair_object_controller.py @@ -168,8 +168,8 @@ def assess_by_id(body): results.append(standard_protocol_metadata_result) debug_messages = ft.get_log_messages_dict() # ft.logger_message_stream.flush() - print(debug_messages) - print(results) + print("Debug messages:", debug_messages) + print("Results:", results) summary = ft.get_assessment_summary(results) for res_k, res_v in enumerate(results): if ft.isDebug: diff --git a/fuji_server/evaluators/fair_evaluator_license.py b/fuji_server/evaluators/fair_evaluator_license.py index 29766ecd..f311dcae 100644 --- a/fuji_server/evaluators/fair_evaluator_license.py +++ b/fuji_server/evaluators/fair_evaluator_license.py @@ -294,7 +294,7 @@ def testLicenseTXTAtRoot(self): p = Path(license_path) if p.parent != ".": self.logger.warning(f"{self.metric_identifier} : Found a license file, but it is not located at the root of the repository.") - if p.suffix != "": + if p.suffix != ".txt": self.logger.warning(f"{self.metric_identifier} : Found a license file, but the suffix is not TXT.") else: self.logger.warning(f"{self.metric_identifier} : Did not find a license file.") From e8817acc226a3ec0bcbbd9b9049951722abc076d Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Wed, 13 Dec 2023 16:36:44 +0000 Subject: [PATCH 21/45] #15 more specific CESSDA-1 test --- fuji_server/evaluators/fair_evaluator_license.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fuji_server/evaluators/fair_evaluator_license.py b/fuji_server/evaluators/fair_evaluator_license.py index f311dcae..b555494c 100644 --- a/fuji_server/evaluators/fair_evaluator_license.py +++ b/fuji_server/evaluators/fair_evaluator_license.py @@ -295,7 +295,9 @@ def testLicenseTXTAtRoot(self): if p.parent != ".": self.logger.warning(f"{self.metric_identifier} : Found a license file, but it is not located at the root of the repository.") if p.suffix != ".txt": - self.logger.warning(f"{self.metric_identifier} : Found a license file, but the suffix is not TXT.") + self.logger.warning(f"{self.metric_identifier} : Found a license file, but the file suffix is not TXT.") + if p.stem != "LICENSE": + self.logger.warning(f"{self.metric_identifier} : Found a license file, but the file name is not LICENSE.") else: self.logger.warning(f"{self.metric_identifier} : Did not find a license file.") return test_status From 93a7d95bed5efdc10ee1c66bd589c64aa07e73cb Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Thu, 14 Dec 2023 13:23:40 +0000 Subject: [PATCH 22/45] fixed metric test score visualisation in table --- simpleclient/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simpleclient/index.php b/simpleclient/index.php index 52125443..b09328f4 100644 --- a/simpleclient/index.php +++ b/simpleclient/index.php @@ -377,8 +377,8 @@ $mstyle=''; } print(''.$test_key.''.$metric_test['metric_test_name'].''); - if($metric_test['metric_test_score'] !=0){ - print($metric_test['metric_test_score']); + if($metric_test['metric_test_score']['earned'] !=0){ + print($metric_test['metric_test_score']['earned']); } print(''); if($metric_test['metric_test_status']=='pass'){ From f0d65d714f73303c20a2cffef718f9d7277981d1 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Thu, 14 Dec 2023 13:26:51 +0000 Subject: [PATCH 23/45] update notes --- notes.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/notes.md b/notes.md index 856c6b95..45eccb95 100644 --- a/notes.md +++ b/notes.md @@ -4,6 +4,8 @@ Test URL for data: https://doi.org/10.5281/zenodo.10047401 Test URL for software: https://github.com/cessda/cessda.cmv.server +Test URL for terrible software repo on GitHub (private): https://github.com/karacolada/challenge-fuji + Test URL for software not on GH: https://zenodo.org/records/6319836 Presentation: https://zenodo.org/records/4068347/files/FAIRsFAIR_FUJI_30092020.pdf?download=1 @@ -156,6 +158,10 @@ Is it meant for something else? ... -### What do test score and test maturity mean as results? +### What do test score and test maturity mean as results? :exclamation: + +Resulting maturity is the highest maturity of all tests that passed. Score is the sum of the scores of all tests. + +### How are metric requirements used? :question: ... \ No newline at end of file From 2a2b932eccf7bd81df8269e6ebb862ccdf43a32b Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Thu, 14 Dec 2023 13:37:08 +0000 Subject: [PATCH 24/45] #15 implemented CESSDA-3 --- .../evaluators/fair_evaluator_license.py | 48 +++++++++++++++++-- fuji_server/harvester/github_harvester.py | 6 +++ 2 files changed, 50 insertions(+), 4 deletions(-) diff --git a/fuji_server/evaluators/fair_evaluator_license.py b/fuji_server/evaluators/fair_evaluator_license.py index b555494c..b1f76b12 100644 --- a/fuji_server/evaluators/fair_evaluator_license.py +++ b/fuji_server/evaluators/fair_evaluator_license.py @@ -24,6 +24,7 @@ import idutils import Levenshtein +import lxml.etree as ET from fuji_server.evaluators.fair_evaluator import FAIREvaluator from fuji_server.models.license import License @@ -271,6 +272,11 @@ def testLicenseIsValidAndSPDXRegistered(self): return test_status def testLicenseTXTAtRoot(self): + """Looks for license_path in self.fuji.github_data. Test passes if the license file is called LICENSE.txt and located at project root. + + Returns: + bool: True if the test was defined and passed. False otherwise. + """ agnostic_test_name = "testLicenseFileAtRoot" test_status = False test_defined = False @@ -292,7 +298,7 @@ def testLicenseTXTAtRoot(self): self.score.earned += test_score else: # identify what's wrong p = Path(license_path) - if p.parent != ".": + if str(p.parent) != ".": self.logger.warning(f"{self.metric_identifier} : Found a license file, but it is not located at the root of the repository.") if p.suffix != ".txt": self.logger.warning(f"{self.metric_identifier} : Found a license file, but the file suffix is not TXT.") @@ -303,7 +309,7 @@ def testLicenseTXTAtRoot(self): return test_status def testLicenseInHeaders(self): - #TODO: Implement + #TODO: Implement - is there a tool that recognises code files (source code)? Like from name? Could envisage choosing 5 of those and checking for "license" in the first 30-ish lines, maybe also copyright? agnostic_test_name = "testLicenseInHeaders" test_status = False test_defined = False @@ -329,7 +335,12 @@ def testLicenseForBundled(self): return test_status def testBuildScriptChecksLicenseHeader(self): - #TODO: Implement + """Parses build script looking for command that ensures the presence of license headers. + Currently only for Maven POM files and expects build to fail if license headers are missing. + + Returns: + bool: True if the test was defined and passed. False otherwise. + """ agnostic_test_name = "testBuildScriptChecksLicenseHeader" test_status = False test_defined = False @@ -338,7 +349,36 @@ def testBuildScriptChecksLicenseHeader(self): test_defined = True break if test_defined: - pass + test_score = self.getTestConfigScore(test_id) + # Maven + mvn_pom = self.fuji.github_data.get("mvn_pom") + if mvn_pom is not None: + # Check whether pom.xml uses license:check-file-header to validate license headers. + # See https://www.mojohaus.org/license-maven-plugin/check-file-header-mojo.html for more info. + root = ET.fromstring(mvn_pom) + namespaces = root.nsmap + # look for plugin with artifactID license-maven-plugin + found_license_plugin = False + for plugin in root.iterfind(".//plugin", namespaces): + artifact_id = plugin.find("artifactId", namespaces) + if artifact_id is not None and artifact_id.text == "license-maven-plugin": + found_license_plugin = True + fail_on_missing_header = plugin.find("configuration/failOnMissingHeader", namespaces) + if fail_on_missing_header is not None and fail_on_missing_header.text == "true": + test_status = True + self.logger.log( + self.fuji.LOG_SUCCESS, f"{self.metric_identifier} : Maven POM checks for license headers in source files." + ) + self.maturity = self.getTestConfigMaturity(test_id) + self.setEvaluationCriteriumScore(test_id, test_score, "pass") + self.score.earned += test_score + else: + self.logger.warning(f"{self.metric_identifier} : Maven POM uses license-maven-plugin (license:check-file-header) but does not fail on missing header.") + break + if not found_license_plugin: + self.logger.warning(f"{self.metric_identifier} : Maven POM does not use license-maven-plugin (license:check-file-header) to check for license headers in source code files.") + else: + self.logger.warning(f"{self.metric_identifier} : Did not find a Maven POM file.") return test_status def evaluate(self): diff --git a/fuji_server/harvester/github_harvester.py b/fuji_server/harvester/github_harvester.py index 0327b2f1..aa75ac10 100644 --- a/fuji_server/harvester/github_harvester.py +++ b/fuji_server/harvester/github_harvester.py @@ -48,5 +48,11 @@ def harvest(self): except UnknownObjectException: pass + try: # Maven POM + mvn_pom_file = repo.get_contents("pom.xml") + self.data["mvn_pom"] = mvn_pom_file.decoded_content + except UnknownObjectException: + pass + print(self.data) print("----------------------\n\n\n") \ No newline at end of file From 4bb7305f392657a05072401dfe9c53f7944d4ed3 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Thu, 14 Dec 2023 14:07:33 +0000 Subject: [PATCH 25/45] #15 CESSDA-2 fast pass if CESSDA-3 --- .../evaluators/fair_evaluator_license.py | 29 +++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/fuji_server/evaluators/fair_evaluator_license.py b/fuji_server/evaluators/fair_evaluator_license.py index b1f76b12..c8197fa2 100644 --- a/fuji_server/evaluators/fair_evaluator_license.py +++ b/fuji_server/evaluators/fair_evaluator_license.py @@ -309,7 +309,11 @@ def testLicenseTXTAtRoot(self): return test_status def testLicenseInHeaders(self): - #TODO: Implement - is there a tool that recognises code files (source code)? Like from name? Could envisage choosing 5 of those and checking for "license" in the first 30-ish lines, maybe also copyright? + """Checks whether source code files include a license header. Fast-pass if the build script checks for license headers. + + Returns: + bool: True if the test was defined and passed. False otherwise. + """ agnostic_test_name = "testLicenseInHeaders" test_status = False test_defined = False @@ -318,7 +322,22 @@ def testLicenseInHeaders(self): test_defined = True break if test_defined: - pass + test_score = self.getTestConfigScore(test_id) + # check whether CESSDA-3 was run and passed + for tid in self.metric_test_map["testBuildScriptChecksLicenseHeader"]: + if tid in self.metric_tests.keys(): #and self.metric_tests[tid]["metric_test_status"] == "pass": + if self.metric_tests[tid].metric_test_status == "pass": + test_status = True + self.logger.log( + self.fuji.LOG_SUCCESS, f"{self.metric_identifier} : Build script checks for license headers, so we can assume that all source files do contain license headers." + ) + if not test_status: # CESSDA-3 did not pass + # TODO: is there a tool that recognises code files (source code)? Like from name? Could envisage choosing 5 of those and checking for "license" in the first 30-ish lines, maybe also copyright? + self.logger.warning(f"{self.metric_identifier} : Check for license headers in source files is not implemented.") + if test_status: # test passed, update score and maturity + self.maturity = self.getTestConfigMaturity(test_id) + self.setEvaluationCriteriumScore(test_id, test_score, "pass") + self.score.earned += test_score return test_status def testLicenseForBundled(self): @@ -397,11 +416,11 @@ def evaluate(self): license_status = "pass" if self.testLicenseForBundled(): license_status = "pass" - if self.testLicenseInHeaders(): - license_status = "pass" if self.testBuildScriptChecksLicenseHeader(): license_status = "pass" - + if self.testLicenseInHeaders(): + license_status = "pass" + self.result.test_status = license_status self.result.output = self.output self.result.metric_tests = self.metric_tests From 7307009eb6fb83dbe01db19bcafbde500f8ce5c5 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Thu, 14 Dec 2023 15:18:40 +0000 Subject: [PATCH 26/45] #15 implemented CESSDA-2 per-file check --- .../evaluators/fair_evaluator_license.py | 27 ++++++++++++++----- fuji_server/harvester/github_harvester.py | 24 +++++++++++++++++ 2 files changed, 44 insertions(+), 7 deletions(-) diff --git a/fuji_server/evaluators/fair_evaluator_license.py b/fuji_server/evaluators/fair_evaluator_license.py index c8197fa2..c95eaba4 100644 --- a/fuji_server/evaluators/fair_evaluator_license.py +++ b/fuji_server/evaluators/fair_evaluator_license.py @@ -309,7 +309,7 @@ def testLicenseTXTAtRoot(self): return test_status def testLicenseInHeaders(self): - """Checks whether source code files include a license header. Fast-pass if the build script checks for license headers. + """Checks whether a sample of source code files include a license header. Fast-pass if the build script checks for license headers. Returns: bool: True if the test was defined and passed. False otherwise. @@ -325,15 +325,28 @@ def testLicenseInHeaders(self): test_score = self.getTestConfigScore(test_id) # check whether CESSDA-3 was run and passed for tid in self.metric_test_map["testBuildScriptChecksLicenseHeader"]: - if tid in self.metric_tests.keys(): #and self.metric_tests[tid]["metric_test_status"] == "pass": - if self.metric_tests[tid].metric_test_status == "pass": + if tid in self.metric_tests.keys() and self.metric_tests[tid].metric_test_status == "pass": + test_status = True + self.logger.log( + self.fuji.LOG_SUCCESS, f"{self.metric_identifier} : Build script checks for license headers, so we can assume that all source files do contain license headers." + ) + if not test_status: # CESSDA-3 did not pass + source_code_samples = self.fuji.github_data.get("source_code_samples") + if source_code_samples is not None: + license_headers_count = 0 + for sample in source_code_samples: + header_region = "\n".join(sample["content"].decode("utf-8").splitlines()[:30]).lower() + if "license" in header_region: + license_headers_count += 1 + if license_headers_count == len(source_code_samples): test_status = True self.logger.log( - self.fuji.LOG_SUCCESS, f"{self.metric_identifier} : Build script checks for license headers, so we can assume that all source files do contain license headers." + self.fuji.LOG_SUCCESS, f"{self.metric_identifier} : Sample of {len(source_code_samples)} source code files all contained a license header." ) - if not test_status: # CESSDA-3 did not pass - # TODO: is there a tool that recognises code files (source code)? Like from name? Could envisage choosing 5 of those and checking for "license" in the first 30-ish lines, maybe also copyright? - self.logger.warning(f"{self.metric_identifier} : Check for license headers in source files is not implemented.") + else: + self.logger.warning(f"{self.metric_identifier} : {license_headers_count} out of a sample of {len(source_code_samples)} source code files were found to contain a license header.") + else: + self.logger.warning(f"{self.metric_identifier} : No source code files found.") if test_status: # test passed, update score and maturity self.maturity = self.getTestConfigMaturity(test_id) self.setEvaluationCriteriumScore(test_id, test_score, "pass") diff --git a/fuji_server/harvester/github_harvester.py b/fuji_server/harvester/github_harvester.py index aa75ac10..614c7cd0 100644 --- a/fuji_server/harvester/github_harvester.py +++ b/fuji_server/harvester/github_harvester.py @@ -54,5 +54,29 @@ def harvest(self): except UnknownObjectException: pass + # identify source code + repo_languages = repo.get_languages() + if repo_languages != {}: + self.data["languages"] = repo_languages + main_source_code_language = repo.language + if main_source_code_language is not None: + self.data["main_language"] = main_source_code_language + query = f" repo:{self.repo_id} language:{main_source_code_language}" # needs the space in front as every query needs a string to match on + source_code_files = self.handle.search_code(query) + # extract code of up to n=5 files + n = min(5, source_code_files.totalCount) + source_code_samples = [] + for i in range(n): + source_code_samples.append( + { + "path": source_code_files[i].path, + "language": main_source_code_language, + "content": source_code_files[i].decoded_content + } + ) + if len(source_code_samples) > 0: + self.data["source_code_samples"] = source_code_samples + + print(self.data) print("----------------------\n\n\n") \ No newline at end of file From 693b7d93badf3e97c6bd2a8d506de666adcef424 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Fri, 15 Dec 2023 09:32:22 +0000 Subject: [PATCH 27/45] #15 added general-2 warning --- fuji_server/evaluators/fair_evaluator_license.py | 8 ++++++-- simpleclient/index.php | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/fuji_server/evaluators/fair_evaluator_license.py b/fuji_server/evaluators/fair_evaluator_license.py index c95eaba4..8e0a09e1 100644 --- a/fuji_server/evaluators/fair_evaluator_license.py +++ b/fuji_server/evaluators/fair_evaluator_license.py @@ -354,7 +354,11 @@ def testLicenseInHeaders(self): return test_status def testLicenseForBundled(self): - #TODO: Implement + """Look for license information of bundled components. Not implemented. + + Returns: + bool: True if the test was defined and passed. False otherwise. + """ agnostic_test_name = "testLicenseForBundled" test_status = False test_defined = False @@ -363,7 +367,7 @@ def testLicenseForBundled(self): test_defined = True break if test_defined: - pass + self.logger.warning(f"{self.metric_identifier} : Test for license information of bundled components is not implemented.") return test_status def testBuildScriptChecksLicenseHeader(self): diff --git a/simpleclient/index.php b/simpleclient/index.php index b09328f4..5f16c2b3 100644 --- a/simpleclient/index.php +++ b/simpleclient/index.php @@ -47,7 +47,7 @@ $fuji_server = 'http://localhost:1071/fuji/api/v1/evaluate'; $fuji_username = 'marvel'; $fuji_password = 'wonderwoman'; -$metric_version = "metrics_v0.7_software_cessda"; #"metrics_v0.7_software_cessda"; #"metrics_v0.5"; #"metrics_v0.7_software"; +$metric_version = "metrics_v0.7_software"; #"metrics_v0.7_software_cessda"; #"metrics_v0.5"; #"metrics_v0.7_software"; ################################################################ $fair_basic_terms=['F'=>'Findable','A'=>'Accessible','I'=>'Interoperable','R'=>'Reusable']; From 3a8b107c72c59e6cfc2549a529e77a356fbbe2d2 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Mon, 18 Dec 2023 10:44:24 +0000 Subject: [PATCH 28/45] remove added debug prints --- fuji_server/controllers/fair_check.py | 8 -------- .../controllers/fair_object_controller.py | 18 ++++++++---------- fuji_server/harvester/github_harvester.py | 9 ++------- fuji_server/harvester/metadata_harvester.py | 1 - 4 files changed, 10 insertions(+), 26 deletions(-) diff --git a/fuji_server/controllers/fair_check.py b/fuji_server/controllers/fair_check.py index 4f89a8a5..205cf8e1 100644 --- a/fuji_server/controllers/fair_check.py +++ b/fuji_server/controllers/fair_check.py @@ -200,9 +200,6 @@ def __init__( self.METRICS = self.metric_helper.get_custom_metrics( ["metric_name", "total_score", "metric_tests", "metric_number"] ) - print("\n\nFound METRICS:\n") - print(self.METRICS) - print("\n\n") self.METRIC_VERSION = metric_version self.metrics_config = self.metric_helper.get_metrics_config() print("METRICS CONFIG: ", self.metrics_config) @@ -287,9 +284,6 @@ def set_auth_token(self, auth_token, auth_token_type="Basic"): self.auth_token_type = "Basic" def clean_metadata(self): - print("\nmerged START") - print(self.metadata_merged) - print("merged END\n") data_objects = self.metadata_merged.get("object_content_identifier") if data_objects == {"url": None} or data_objects == [None]: data_objects = self.metadata_merged["object_content_identifier"] = None @@ -600,8 +594,6 @@ def get_assessment_summary(self, results): summary["score_total"].update(sf.groupby(by="fair_principle")["score_total"].sum().to_dict()) summary["score_total"]["FAIR"] = round(float(sf["score_total"].sum()), 2) - print(summary) - summary["score_percent"] = ( round( sf.groupby(by="fair_category")["score_earned"].sum() diff --git a/fuji_server/controllers/fair_object_controller.py b/fuji_server/controllers/fair_object_controller.py index 48e1d08d..2944ac26 100644 --- a/fuji_server/controllers/fair_object_controller.py +++ b/fuji_server/controllers/fair_object_controller.py @@ -102,28 +102,28 @@ def assess_by_id(body): ft.harvest_re3_data() ft.harvest_github() core_metadata_result = ft.check_minimal_metatadata() - print(ft.metadata_unmerged) + # print(ft.metadata_unmerged) content_identifier_included_result = ft.check_data_identifier_included_in_metadata() - print('F-UJI checks: access level') + # print('F-UJI checks: access level') access_level_result = ft.check_data_access_level() - print('F-UJI checks: license') + # print('F-UJI checks: license') license_result = ft.check_license() - print('F-UJI checks: related') + # print('F-UJI checks: related') related_resources_result = ft.check_relatedresources() - print('F-UJI checks: searchable') + # print('F-UJI checks: searchable') check_searchable_result = ft.check_searchable() - print('F-UJI checks: data content') + # print('F-UJI checks: data content') ft.harvest_all_data() uid_data_result = ft.check_unique_content_identifier() pid_data_result = ft.check_persistent_data_identifier() data_identifier_included_result = ft.check_data_content_metadata() metadata_identifier_included_result = ft.check_metadata_identifier_included_in_metadata() data_file_format_result = ft.check_data_file_format() - print('F-UJI checks: data file format') + # print('F-UJI checks: data file format') community_standards_result = ft.check_community_metadatastandards() data_provenance_result = ft.check_data_provenance() formal_metadata_result = ft.check_formal_metadata() - print('F-UJI checks: semantic vocab') + # print('F-UJI checks: semantic vocab') semantic_vocab_result = ft.check_semantic_vocabulary() ft.check_metadata_preservation() standard_protocol_data_result = ft.check_standardised_protocol_data() @@ -168,8 +168,6 @@ def assess_by_id(body): results.append(standard_protocol_metadata_result) debug_messages = ft.get_log_messages_dict() # ft.logger_message_stream.flush() - print("Debug messages:", debug_messages) - print("Results:", results) summary = ft.get_assessment_summary(results) for res_k, res_v in enumerate(results): if ft.isDebug: diff --git a/fuji_server/harvester/github_harvester.py b/fuji_server/harvester/github_harvester.py index 614c7cd0..3b359b67 100644 --- a/fuji_server/harvester/github_harvester.py +++ b/fuji_server/harvester/github_harvester.py @@ -22,7 +22,6 @@ def __init__(self, id, host="https://github.com"): self.data = {} # dictionary with all info def harvest(self): - print("\n\n\n----------------------\nGitHub Harvest\n----------------------") # DEBUG PRINTS # check if it's a URL or repo ID # NOTE: this should probably be handled by IdentifierHelper, but I don't understand that module yet. if self.id.count('/') > 1: # URL @@ -37,7 +36,7 @@ def harvest(self): try: repo = self.handle.get_repo(self.repo_id) except UnknownObjectException: - print("Could not find repo.") #TODO: this will be an access log, probably? + print("Could not find repo.") #TODO: this should be a log message return # harvesting @@ -75,8 +74,4 @@ def harvest(self): } ) if len(source_code_samples) > 0: - self.data["source_code_samples"] = source_code_samples - - - print(self.data) - print("----------------------\n\n\n") \ No newline at end of file + self.data["source_code_samples"] = source_code_samples \ No newline at end of file diff --git a/fuji_server/harvester/metadata_harvester.py b/fuji_server/harvester/metadata_harvester.py index b19654d7..799824b5 100644 --- a/fuji_server/harvester/metadata_harvester.py +++ b/fuji_server/harvester/metadata_harvester.py @@ -148,7 +148,6 @@ def merge_metadata(self, metadict, url, method, format, mimetype, schema="", nam ) if isinstance(metadict, dict) and allow_merge == True: # self.metadata_sources.append((method_source, 'negotiated')) - print("MERGING:", metadict.keys()) for r in metadict.keys(): if r in self.reference_elements: # enforce lists From d837efbcfe9396cabda85ac4f3b321295aadeca4 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Mon, 18 Dec 2023 14:27:59 +0000 Subject: [PATCH 29/45] updated documentation --- README.md | 106 +++++++++++++++++++++++++++++++++++++ fuji_server/data/README.md | 21 ++++++++ 2 files changed, 127 insertions(+) create mode 100644 fuji_server/data/README.md diff --git a/README.md b/README.md index 93dee259..983a87d2 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,8 @@ The F-UJI server can now be started with: python -m fuji_server -c fuji_server/config/server.ini ``` +The OpenAPI user interface is then available at . + ### Docker-based installation ```bash @@ -99,6 +101,110 @@ If you receive the exception `urllib2.URLError: /fuji/simpleclient/* /var/www/fuji-dev/`. You might need to adjust the file permissions to allow non-root writes. + +Next, +```bash +sudo ln -s /etc/nginx/sites-available/fuji-dev /etc/nginx/sites-enabled/ +sudo nginx -t +sudo service nginx reload +sudo service php8.1-fpm start +``` + +The web client should now be available at . Make sure to adjust the username and password in [`simpleclient/index.php`](./simpleclient/index.php). + +After a restart, it may be necessary to start the services again: + +```bash +sudo service php8.1-fpm start +sudo service nginx start +python -m fuji_server -c fuji_server/config/server.ini +``` + +### Component interaction (walkthrough) + +This walkthrough can guide you through the comprehensive codebase. + +A good starting point is [`fair_object_controller/assess_by_id`](fuji_server/controllers/fair_object_controller.py#36). +Here, we create a [`FAIRCheck`](fuji_server/controllers/fair_check.py) object called `ft`. +This reads the metrics YAML file during initialisation and will provide all the `check` methods. + +Next, several harvesting methods are called, first [`harvest_all_metadata`](fuji_server/controllers/fair_check.py#329), followed by [`harvest_re3_data`](fuji_server/controllers/fair_check.py#345) (Datacite) and [`harvest_github`](fuji_server/controllers/fair_check.py#366) and finally [`harvest_all_data`](fuji_server/controllers/fair_check.py#359). +The harvesters are implemented separately in [`harvester/`](./fuji_server/harvester/), and each of them collects different kinds of data. +This is regardless of the defined metrics, the harvesters always run. +- The metadata harvester looks through HTML markup following schema.org, Dublincore etc., through signposting/typed links. +Ideally, it can find things like author information or license names that way. +- The data harvester is only run if the metadata harvester finds an `object_content_identifier` pointing at content files. +Then, the data harvester runs over the files and checks things like the file format. +- The Github harvester connects with the GitHub API to retrieve metadata and data from software repositories. +It relies on an access token being defined in [`config/github.cfg`](./fujji_server/config/github.cfg). + +After harvesting, all evaluators are called. +Each specific evaluator, e.g. [`FAIREvaluatorLicense`](fuji_server/evaluators/fair_evaluator_license.py), is associated with a specific FsF and/or FAIR4RS metric. +Before the evaluator runs any checks on the harvested data, it asserts that its associated metric is listed in the metrics YAML file. +Only if it is, the evaluator runs through and computes a local score. + +In the end, all scores are aggregated into F, A, I, R scores. + +### Adding support for new metrics + +Start by adding a new metrics YAML file in [`yaml/`](./fuji_server/yaml). +Its name has to match the following regular expression: `(metrics_v)?([0-9]+\.[0-9]+)(_[a-z]+)?(\.yaml)`, +and the content should be structured similarly to the existing metric files. + +Metric names are tested for validity using regular expressions throughout the code. +If your metric names do not match those, not all components of the tool will execute as expected, so make sure to adjust the expressions. +Regular expression groups are also used for mapping to F, A, I, R categories for scoring, and debug messages are only displayed if they are associated with a valid metric. + +Evaluators are mapped to metrics in their `__init__` methods, so adjust existing evaluators to associate with your metric as well or define new evaluators if needed. +The multiple test methods within an evaluator also check whether their specific test is defined. +[`FAIREvaluatorLicense`](fuji_server/evaluators/fair_evaluator_license.py) is an example of an evaluator corresponding to metrics from different sources. + +For each metric, the maturity is determined as the maximum of the maturity associated with each passed test. +This means that if a test indicating maturity 3 is passed and one indicating maturity 2 is not passed, the metric will still be shown to be fulfilled with maturity 3. ## License This project is licensed under the MIT License; for more details, see the [LICENSE](https://github.com/pangaea-data-publisher/fuji/blob/master/LICENSE) file. diff --git a/fuji_server/data/README.md b/fuji_server/data/README.md new file mode 100644 index 00000000..1488b3c3 --- /dev/null +++ b/fuji_server/data/README.md @@ -0,0 +1,21 @@ +# Data files + + +- [`linked_vocabs/*_ontologies.json`](./linked_vocabs) +- [`access_rights.json`](./access_rights.json): Lists COAR, EPRINTS, EU, OPENAIRE access rights. Used for evaluation of the data access level, FsF-A1-01M, which looks for metadata item `access_level`. +- [`bioschemastypes.txt`](./bioschemastypes.txt) +- [`creativeworktypes.txt`](./creativeworktypes.txt) +- [`default_namespaces.txt`](./default_namespaces.txt): Excluded during evaluation of the semantic vocabulary, FsF-I2-01M. +- [`file_formats.json`](./file_formats.json): Dictionary of scientific file formats. Used in evaluation of R1.3-02D to check the file format of the data. +- [`google_cache.db`](./google_cache.db): Used for evaluating FsF-F4-01M (searchability in major catalogues like DataCite registry, Google Dataset, Mendeley, ...). Google Data search is queried for a PID in column `google_links`. It's a dataset with metadata about datasets that have a DOI or persistent identifier from `identifer.org`. +- [`identifiers_org_resolver_data.json`](./identifiers_org_resolver_data.json): Used in [`IdentifierHelper`](fuji_server/helper/identifier_helper.py). +- [`jsonldcontext.json`](./jsonldcontext.json) +- [`licenses.json`](./licenses.json): Used to populate `Preprocessor.license_names`, a list of SPDX licences. Used in evaluation of licenses, FsF-R1.1-01M. +- [`linked_vocab.json`](./linked_vocab.json) +- [`longterm_formats.json`](./longterm_formats.json): This isn't used any more (code is commented out). Instead, the info should be pulled from [`file_formats.json`](./file_formats.json). +- [`metadata_standards_uris.json`](./metadata_standards_uris.json) +- [`metadata_standards.json`](./metadata_standards.json): Used in evaluation of community metadata, FsF-R1.3-01M. +- [`open_formats.json`](./open_formats.json): This isn't used any more (code is commented out). Instead, the info should be pulled from [`file_formats.json`](./file_formats.json). +- [`repodois.yaml`](./repodois.yaml): DOIs from re3data (Datacite). +- [`ResourceTypes.txt`](./ResourceTypes.txt) +- [`standard_uri_protocols.json`](./standard_uri_protocols.json): Used for evaluating access through standardised protocols (FsF-A1-03D). Mapping of acronym to long name (e.g. FTP, SFTP, HTTP etc.) \ No newline at end of file From 0883b9d9ba2c2abdd1d448145a2cde24fe3d15b6 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Mon, 18 Dec 2023 15:23:11 +0000 Subject: [PATCH 30/45] Adding use_github to API call --- README.md | 17 ++++++++++++++++- fuji_server/controllers/fair_check.py | 14 +++++++++++--- .../controllers/fair_object_controller.py | 2 ++ fuji_server/yaml/openapi.yaml | 4 ++++ simpleclient/index.php | 2 ++ 5 files changed, 35 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 983a87d2..3cee271e 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,7 @@ F-UJI is using [basic authentication](https://en.wikipedia.org/wiki/Basic_access ## Development -The repository includes a simple web client suitable for interacting with the API during development. +The repository includes a [simple web client](./simpleclient/) suitable for interacting with the API during development. One way to run it would be with a LEMP stack (Linux, Nginx, MySQL, PHP), which is described in the following. First, install the necessary packages: @@ -206,6 +206,21 @@ The multiple test methods within an evaluator also check whether their specific For each metric, the maturity is determined as the maximum of the maturity associated with each passed test. This means that if a test indicating maturity 3 is passed and one indicating maturity 2 is not passed, the metric will still be shown to be fulfilled with maturity 3. +### Updates to the API + +F-UJI makes use of Swagger Codegen. If making changes to the API, make sure to [install Swagger Codegen](https://github.com/swagger-api/swagger-codegen#prerequisites): + +```bash +wget https://repo1.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/3.0.51/swagger-codegen-cli-3.0.51.jar -O swagger-codegen-cli.jar +java -jar swagger-codegen-cli.jar --help +``` +Update the API definition in [`fuji_server/yaml/openapi.yaml`](./fuji_server/yaml/openapi.yaml). Then, run Swagger Codegen: + +```bash +# TODO +... +``` + ## License This project is licensed under the MIT License; for more details, see the [LICENSE](https://github.com/pangaea-data-publisher/fuji/blob/master/LICENSE) file. diff --git a/fuji_server/controllers/fair_check.py b/fuji_server/controllers/fair_check.py index 205cf8e1..13e53014 100644 --- a/fuji_server/controllers/fair_check.py +++ b/fuji_server/controllers/fair_check.py @@ -98,6 +98,7 @@ def __init__( metadata_service_url=None, metadata_service_type=None, use_datacite=True, + use_github=True, verify_pids=True, oaipmh_endpoint=None, metric_version=None, @@ -155,6 +156,7 @@ def __init__( self.rdf_collector = None self.use_datacite = use_datacite + self.use_github = use_github self.repeat_pid_check = False self.logger_message_stream = io.StringIO() logging.addLevelName(self.LOG_SUCCESS, "SUCCESS") @@ -364,9 +366,15 @@ def harvest_all_data(self): self.content_identifier = data_harvester.data def harvest_github(self): - github_harvester = GithubHarvester(self.id) - github_harvester.harvest() - self.github_data = github_harvester.data + if self.use_github: + github_harvester = GithubHarvester(self.id) + github_harvester.harvest() + self.github_data = github_harvester.data + else: + self.github_data = {} + # NOTE: Update list of metrics that are impacted by this as more are implemented. + for m in ["FRSM-15-R1.1"]: + self.logger.warning(f"{m} : Github support disabled, therefore skipping harvesting through Github API") def retrieve_metadata_embedded(self): self.metadata_harvester.retrieve_metadata_embedded() diff --git a/fuji_server/controllers/fair_object_controller.py b/fuji_server/controllers/fair_object_controller.py index 2944ac26..186962f6 100644 --- a/fuji_server/controllers/fair_object_controller.py +++ b/fuji_server/controllers/fair_object_controller.py @@ -59,6 +59,7 @@ def assess_by_id(body): oaipmh_endpoint = body.oaipmh_endpoint metadata_service_type = body.metadata_service_type usedatacite = body.use_datacite + usegithub = body.use_github metric_version = body.metric_version print("BODY METRIC", metric_version) auth_token = body.auth_token @@ -76,6 +77,7 @@ def assess_by_id(body): metadata_service_url=metadata_service_endpoint, metadata_service_type=metadata_service_type, use_datacite=usedatacite, + use_github=usegithub, oaipmh_endpoint=oaipmh_endpoint, metric_version=metric_version, ) diff --git a/fuji_server/yaml/openapi.yaml b/fuji_server/yaml/openapi.yaml index 66c158e8..aeef5a54 100644 --- a/fuji_server/yaml/openapi.yaml +++ b/fuji_server/yaml/openapi.yaml @@ -40,6 +40,7 @@ paths: metadata_service_endpoint: http://ws.pangaea.de/oai/provider metadata_service_type: oai_pmh use_datacite: true + use_github: false metric_version: metrics_v0.5 responses: '200': @@ -678,6 +679,9 @@ components: use_datacite: type: boolean description: Indicates if DataCite content negotiation (using the DOI) shall be used to collect metadata + use_github: + type: boolean + description: Indicates if the GitHub REST API shall be used to collect (meta)data metric_version: type: string description: The FAIRsFAIR metric version be used fo rthe assessment diff --git a/simpleclient/index.php b/simpleclient/index.php index 5f16c2b3..5a7c0a94 100644 --- a/simpleclient/index.php +++ b/simpleclient/index.php @@ -48,6 +48,7 @@ $fuji_username = 'marvel'; $fuji_password = 'wonderwoman'; $metric_version = "metrics_v0.7_software"; #"metrics_v0.7_software_cessda"; #"metrics_v0.5"; #"metrics_v0.7_software"; +$usegithub = False; ################################################################ $fair_basic_terms=['F'=>'Findable','A'=>'Accessible','I'=>'Interoperable','R'=>'Reusable']; @@ -172,6 +173,7 @@ $message->metadata_service_type = $input_service_type; $message->test_debug = true; $message->use_datacite = $usedatacite; + $message->use_github = $usegithub; $message->metric_version = $metric_version; $post = json_encode($message); From cc93f8b198e40436add22b6148341c8371535e14 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Mon, 18 Dec 2023 15:31:11 +0000 Subject: [PATCH 31/45] swagger.json -> openapi.json --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3cee271e..849362cc 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ To access the OpenAPI user interface, open the URL below in the browser: Your OpenAPI definition lives here: - + You can provide a different server config file this way: From 9e0dd685d46bf445f23f0a5c620e3ff7961dfb50 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Thu, 11 Jan 2024 14:12:37 +0000 Subject: [PATCH 32/45] #21 update dependencies --- pyproject.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 12094861..28d1e29f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,8 @@ dependencies = [ "sparqlwrapper~=2.0", "tika~=2.6", "tldextract~=5.0", - "urlextract~=1.8" + "urlextract~=1.8", + "pygithub~=2.1" ] description = "FUJI (FAIRsFAIR Data Objects Assessment Service), A service to evaluate FAIR data objects based on FAIRsFAIR Metrics" keywords = [ @@ -53,7 +54,8 @@ keywords = [ "FAIR", "Research Data", "FAIR data", - "Metadata harvesting" + "Metadata harvesting", + "FAIR4RS" ] license = "MIT" name = "fuji" From 740fb49a98564388f3aa935416df1f7bdb629f89 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Thu, 11 Jan 2024 14:21:43 +0000 Subject: [PATCH 33/45] #21 tidy up dev files --- notes.md | 167 --------------------------------------------------- start-dev.sh | 5 -- 2 files changed, 172 deletions(-) delete mode 100644 notes.md delete mode 100755 start-dev.sh diff --git a/notes.md b/notes.md deleted file mode 100644 index 45eccb95..00000000 --- a/notes.md +++ /dev/null @@ -1,167 +0,0 @@ -# Kara's running notes - -Test URL for data: https://doi.org/10.5281/zenodo.10047401 - -Test URL for software: https://github.com/cessda/cessda.cmv.server - -Test URL for terrible software repo on GitHub (private): https://github.com/karacolada/challenge-fuji - -Test URL for software not on GH: https://zenodo.org/records/6319836 - -Presentation: https://zenodo.org/records/4068347/files/FAIRsFAIR_FUJI_30092020.pdf?download=1 - -Working paper about metrics: https://zenodo.org/records/3934401 - -Paper about tool: https://doi.org/10.1016/j.patter.2021.100370 - -EASE repos: https://docs.google.com/spreadsheets/d/1V4jA9zWnIT4GSQc0M4ysyy2CcVC-2LYo/edit#gid=1649627670 - -CESSDA repos: https://github.com/cessda - -## concepts - -- signposting: Use typed links to make it easier for machine agents to understand what links lead to on the scholarly web. ([blog article](https://signposting.org/)). Adds a relation property to the link (`rel=author`). -- [typed links](https://www.iana.org/assignments/link-relations/link-relations.xhtml): links that have info on link relations, i.e. `rel`, also called "link relation types". - -## deploying LEMP - -[Guide](https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-22-04) for reference. - -```bash -sudo apt-get update -sudo apt-get install nginx -sudo ufw allow 'Nginx HTTP' -sudo service mysql start # expects that mysql is already installed, if not run sudo apt install mysql-server -sudo apt install php8.1-fpm php-mysql -sudo apt install php8.1-curl -sudo phpenmod curl -sudo vim /etc/nginx/sites-available/fuji-dev -``` - -Paste: - -```php -server { - listen 9000; - server_name fuji-dev; - root /var/www/fuji-dev; - - index index.php; - - location / { - try_files $uri $uri/ =404; - } - - location ~ \.php$ { - include snippets/fastcgi-php.conf; - fastcgi_pass unix:/var/run/php/php8.1-fpm.sock; - } - - location ~ /\.ht { - deny all; - } -} -``` - -Link `index.php` to `/var/www/fuji-dev` by running `sudo ln /home/kmoraw/SSI/fuji/simpleclient/* /var/www/fuji-dev/`. You might need to adjust the file permissions to allow non-root writes. - -Next, -```bash -sudo ln -s /etc/nginx/sites-available/fuji-dev /etc/nginx/sites-enabled/ -#sudo unlink /etc/nginx/sites-enabled/default -sudo nginx -t -sudo service nginx reload -sudo service php8.1-fpm start -``` - -[nginx and WSL](https://stackoverflow.com/questions/61806937/nginx-running-in-wsl2-ubuntu-20-04-does-not-serve-html-page-to-windows-10-host) - -Add `fuji-dev` to Windows hosts file `%windir%\system32\drivers\etc\hosts`: - -```powershell -Add-Content "$env:windir\system32\drivers\etc\hosts" -value "127.0.0.1 fuji-dev" -``` - -Access http://localhost:9000/, things should be fine. - -## Run API - -In `fuji/`, run `python -m fuji_server -c fuji_server/config/server.ini`. Access at http://localhost:1071/fuji/api/v1/ui/. - -## Workflow - -Things sort of start at [`fair_object_controller/assess_by_id`](fuji_server/controllers/fair_object_controller.py#36). -Here, we create a [`FAIRCheck`](fuji_server/controllers/fair_check.py) object. -This reads the metrics file during initialisation and will provide all the `check` methods. - -Next, we start harvesting. This is again a method of the `FAIRCheck` object. -First, we call [`harvest_all_metadata`](fuji_server/controllers/fair_check.py#327), followed by [`harvest_re3_data`](fuji_server/controllers/fair_check.py#343) (which seems to be about Datacite) and finally [`harvest_all_data`](fuji_server/controllers/fair_check.py#357). - -> It seems to me that we always scrape *all* data, but then only calculate the FAIR score based on the metrics listed in the metrics file. - -The metadata harvester looks through HTML markup following schema.org, Dublincore etc., through signposting/typed links (see above). -Ideally, it can find things like author information or license names that way. -It doesn't do much with GitHub, which doesn't seem to be signposted accordingly. - -The data harvester is only run if the metadata harvester finds an `object_content_identifier`, which I think is supposed to point to actual content (videos, pictures, but also data files). -Then, the data harvester runs over the data file and checks things like file format. -I haven't seen it do anything yet (metadata harvester has not found an `object_content_identifier` as of date). - -Each specific evaluator, e.g. [`FAIREvaluatorLicense`](fuji_server/evaluators/fair_evaluator_license.py), is associated with a specific FsF metric. -This makes it more difficult for us to reuse them. -They seem to just look into the harvested data. -All evaluators are always called, but before they do anything, they check whether their associated metric is listed in the metrics YAML file. -Only if it is, the evaluator runs through and computes a local score. - -In the end, all scores are aggregated into F, A, I, R scores. -This might be a problem for us for metrics that are associated with more than one of these. - -## changes - -- new requirement: `pygithub` package, using 2.1.1 - -## Questions - -:question: for open questions - -:exclamation: for answered questions - -### What are all the files in `fuji_server/data` for? :question: - -- :question: [`linked_vocabs/*_ontologies.json`](fuji_server/data/linked_vocabs): ... -- :question: [`access_rights.json`](fuji_server/data/access_rights.json): lists COAR, EPRINTS, EU, OPENAIRE access rights. Seems to relate to metric FsF-A1-01M, which looks for metadata item `access_level`. Is that found during metadata harvesting? -- :question: [`bioschemastypes.txt`](fuji_server/data/bioschemastypes.txt): added to `schema_org_creativeworks`, just a list of words. Not sure what happens with that. -- :question: [`creativeworktypes.txt`](fuji_server/data/creativeworktypes.txt): added to `schema_org_creativeworks`, just a list of words. Not sure what happens with that. -- :question: [`default_namespaces.txt`](fuji_server/data/default_namespaces.txt): "excluded" (whatever that means) during evaluation of FsF-I2-01M. -- :exclamation: [`file_formats.json`](fuji_server/data/file_formats.json): dictionary of scientific file formats. Used in evaluation of R1.3-02D to check the file format of the data. -- :exclamation: [`google_cache.db`](fuji_server/data/google_cache.db): Used for evaluating FsF-F4-01M (searchable in major catalogues like DataCite registry, Google Dataset, Mendeley, ...). Google Data search is queried for a PID in column `google_links`. It's a dataset with metadata about datasets that have a DOI or persistent identifier from `identifer.org`. -- :question: [`identifiers_org_resolver_data.json`](fuji_server/data/identifiers_org_resolver_data.json): Used in [`IdentifierHelper`](fuji_server/helper/identifier_helper.py). I'm not quite sure what that class does - does it extract IDs from URLs? -- :question: [`jsonldcontext.json`](fuji_server/data/jsonldcontext.json): Loaded into `Preprocessor.schema_org_context`. I think this is used in FsF-R1-01MD. No idea what it does though. -- :exclamation: [`licenses.json`](fuji_server/data/licenses.json): Used to populate `Preprocessor.license_names`, a list of SPDX licences. Used in evaluation of FsF-R1.1-01M. -- :question: [`linked_vocab.json`](fuji_server/data/linked_vocab.json): ... -- :exclamation: [`longterm_formats.json`](fuji_server/data/longterm_formats.json): This doesn't seem to be used any more (code is commented out). Instead, the info might be pulled from [`file_formats.json`](fuji_server/data/file_formats.json). -- :question: [`metadata_standards_uris.json`](fuji_server/data/metadata_standards_uris.json): ... -- :question: [`metadata_standards.json`](fuji_server/data/metadata_standards.json): Used in evaluation of FsF-R1.3-01M. Something about community specific metadata standards, whatever that means. Also, no idea how it recognises which standard it should be using? -- :exclamation: [`open_formats.json`](fuji_server/data/open_formats.json): This doesn't seem to be used any more (code is commented out). Instead, the info might be pulled from [`file_formats.json`](fuji_server/data/file_formats.json). -- :question: [`repodois.yaml`](fuji_server/data/repodois.yaml): DOIs from re3data (Datacite). No idea where these are used. -- :question: [`ResourceTypes.txt`](fuji_server/data/ResourceTypes.txt): List of content type identifiers? Seems to be loaded into `VALID_RESOURCE_TYPES` and used in evaluation of FsF-R1-01MD somehow. -- :exclamation: [`standard_uri_protocols.json`](fuji_server/data/standard_uri_protocols.json): Used for evaluating access through standardised protocols (FsF-A1-03D). Mapping of acronym to long name (e.g. FTP, SFTP, HTTP etc.) - -### What is `fuji_server/harvester/repository_harvester.py` for? :question: - -It defines class `RepositoryHarvester`, which doesn't seem to be used. -What's envisioned for this class? -Should we reuse it? -Is it meant for something else? - -### What does `IdentifierHelper` do? :question: - -... - -### What do test score and test maturity mean as results? :exclamation: - -Resulting maturity is the highest maturity of all tests that passed. Score is the sum of the scores of all tests. - -### How are metric requirements used? :question: - -... \ No newline at end of file diff --git a/start-dev.sh b/start-dev.sh deleted file mode 100755 index 835e3876..00000000 --- a/start-dev.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -sudo service php8.1-fpm start -sudo service nginx start -python -m fuji_server -c fuji_server/config/server.ini From c4a822f11fb243d6b1e8bc08f206ecb1e59c8589 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Thu, 11 Jan 2024 14:33:10 +0000 Subject: [PATCH 34/45] linting checks pass --- fuji_server/controllers/fair_check.py | 4 +- fuji_server/data/README.md | 2 +- fuji_server/data/metadata_standards_uris.json | 42 ++++++------- fuji_server/data/repodois.yaml | 2 +- .../evaluators/fair_evaluator_license.py | 59 ++++++++++++------- fuji_server/harvester/github_harvester.py | 29 +++++---- fuji_server/helper/metadata_mapper.py | 2 +- fuji_server/helper/metric_helper.py | 2 +- 8 files changed, 80 insertions(+), 62 deletions(-) diff --git a/fuji_server/controllers/fair_check.py b/fuji_server/controllers/fair_check.py index 9e2713a3..c4a334c5 100644 --- a/fuji_server/controllers/fair_check.py +++ b/fuji_server/controllers/fair_check.py @@ -572,7 +572,9 @@ def get_assessment_summary(self, results): } for res_k, res_v in enumerate(results): if res_v.get("metric_identifier"): - metric_match = re.search(r"^(?:FRSM-[0-9]+|FsF)-(([FAIR])[0-9](\.[0-9])?)", str(res_v.get("metric_identifier"))) # match both FAIR and FsF metrics + metric_match = re.search( + r"^(?:FRSM-[0-9]+|FsF)-(([FAIR])[0-9](\.[0-9])?)", str(res_v.get("metric_identifier")) + ) # match both FAIR and FsF metrics if metric_match.group(2) is not None: fair_principle = metric_match[1] fair_category = metric_match[2] diff --git a/fuji_server/data/README.md b/fuji_server/data/README.md index 1488b3c3..60c2ccea 100644 --- a/fuji_server/data/README.md +++ b/fuji_server/data/README.md @@ -18,4 +18,4 @@ - [`open_formats.json`](./open_formats.json): This isn't used any more (code is commented out). Instead, the info should be pulled from [`file_formats.json`](./file_formats.json). - [`repodois.yaml`](./repodois.yaml): DOIs from re3data (Datacite). - [`ResourceTypes.txt`](./ResourceTypes.txt) -- [`standard_uri_protocols.json`](./standard_uri_protocols.json): Used for evaluating access through standardised protocols (FsF-A1-03D). Mapping of acronym to long name (e.g. FTP, SFTP, HTTP etc.) \ No newline at end of file +- [`standard_uri_protocols.json`](./standard_uri_protocols.json): Used for evaluating access through standardised protocols (FsF-A1-03D). Mapping of acronym to long name (e.g. FTP, SFTP, HTTP etc.) diff --git a/fuji_server/data/metadata_standards_uris.json b/fuji_server/data/metadata_standards_uris.json index 752abdb6..25a48cb0 100644 --- a/fuji_server/data/metadata_standards_uris.json +++ b/fuji_server/data/metadata_standards_uris.json @@ -7668,27 +7668,6 @@ ], "title": "EAD (Encoded Archival Description)" }, - "https://ogp.me": { - "acronym": "OpenGraph", - "field_of_science": [], - "id": "opengraph", - "identifier": [ - { - "type": "local", - "value": "fuji:m46" - }, - { - "type": "homepage", - "value": "https://ogp.me" - }, - { - "type": "namespace", - "value": "https://ogp.me/ns#" - } - ], - "subject_areas": null, - "title": "The Open Graph protocol metadata format" - }, "http://a9.com/-/spec/opensearch/1.1/": { "acronym": null, "field_of_science": [], @@ -38198,6 +38177,27 @@ ], "title": "ETD-MS an Interoperability Metadata Standard for Electronic Theses and Dissertations" }, + "https://ogp.me": { + "acronym": "OpenGraph", + "field_of_science": [], + "id": "opengraph", + "identifier": [ + { + "type": "local", + "value": "fuji:m46" + }, + { + "type": "homepage", + "value": "https://ogp.me" + }, + { + "type": "namespace", + "value": "https://ogp.me/ns#" + } + ], + "subject_areas": null, + "title": "The Open Graph protocol metadata format" + }, "https://ogp.me/ns#": { "acronym": "OpenGraph", "field_of_science": [], diff --git a/fuji_server/data/repodois.yaml b/fuji_server/data/repodois.yaml index 8d2b5e49..db9707e2 100644 --- a/fuji_server/data/repodois.yaml +++ b/fuji_server/data/repodois.yaml @@ -33,7 +33,7 @@ bl.lincoln: https://doi.org/10.17616/R3MZ01 bl.lshtm: https://doi.org/10.17616/R3705V bl.mendeley: https://doi.org/10.17616/R3DD11 bl.nhm: https://doi.org/10.17616/R3PS7K -bl.oxdb: https://doi.org/10.17616/R3504V +bl.oxdb: https://doi.org/10.17616/R3Q056 bl.reading: https://doi.org/10.17616/R3D075 bl.salford: https://doi.org/10.17616/R31D20 bl.shef: https://doi.org/10.17616/R3P64K diff --git a/fuji_server/evaluators/fair_evaluator_license.py b/fuji_server/evaluators/fair_evaluator_license.py index 8e0a09e1..676fc0a3 100644 --- a/fuji_server/evaluators/fair_evaluator_license.py +++ b/fuji_server/evaluators/fair_evaluator_license.py @@ -21,6 +21,7 @@ # SOFTWARE. import fnmatch import re +from pathlib import Path import idutils import Levenshtein @@ -29,7 +30,6 @@ from fuji_server.evaluators.fair_evaluator import FAIREvaluator from fuji_server.models.license import License from fuji_server.models.license_output_inner import LicenseOutputInner -from pathlib import Path class FAIREvaluatorLicense(FAIREvaluator): @@ -60,7 +60,7 @@ def __init__(self, fuji_instance): "testLicenseFileAtRoot": ["FRSM-15-R1.1-CESSDA-1"], "testLicenseInHeaders": ["FRSM-15-R1.1-CESSDA-2"], "testLicenseForBundled": ["FRSM-15-R1.1-2"], - "testBuildScriptChecksLicenseHeader": ["FRSM-15-R1.1-CESSDA-3"] + "testBuildScriptChecksLicenseHeader": ["FRSM-15-R1.1-CESSDA-3"], } def setLicenseDataAndOutput(self): @@ -237,7 +237,7 @@ def testLicenseIsValidAndSPDXRegistered(self): test_required = [test_required] self.logger.info( - "{0} : Will exclusively consider community specific licenses for {0}{1} which are specified in metrics -: {2}".format( + "{0} : Will exclusively consider community specific licenses for {0} which are specified in metrics -: {1}".format( test_id, test_requirements.get("required") ) ) @@ -291,23 +291,29 @@ def testLicenseTXTAtRoot(self): if license_path == "LICENSE.txt": test_status = True self.logger.log( - self.fuji.LOG_SUCCESS, f"{self.metric_identifier} : Found LICENSE.txt at repository root." - ) + self.fuji.LOG_SUCCESS, f"{self.metric_identifier} : Found LICENSE.txt at repository root." + ) self.maturity = self.getTestConfigMaturity(test_id) self.setEvaluationCriteriumScore(test_id, test_score, "pass") self.score.earned += test_score else: # identify what's wrong p = Path(license_path) if str(p.parent) != ".": - self.logger.warning(f"{self.metric_identifier} : Found a license file, but it is not located at the root of the repository.") + self.logger.warning( + f"{self.metric_identifier} : Found a license file, but it is not located at the root of the repository." + ) if p.suffix != ".txt": - self.logger.warning(f"{self.metric_identifier} : Found a license file, but the file suffix is not TXT.") + self.logger.warning( + f"{self.metric_identifier} : Found a license file, but the file suffix is not TXT." + ) if p.stem != "LICENSE": - self.logger.warning(f"{self.metric_identifier} : Found a license file, but the file name is not LICENSE.") + self.logger.warning( + f"{self.metric_identifier} : Found a license file, but the file name is not LICENSE." + ) else: self.logger.warning(f"{self.metric_identifier} : Did not find a license file.") return test_status - + def testLicenseInHeaders(self): """Checks whether a sample of source code files include a license header. Fast-pass if the build script checks for license headers. @@ -328,8 +334,9 @@ def testLicenseInHeaders(self): if tid in self.metric_tests.keys() and self.metric_tests[tid].metric_test_status == "pass": test_status = True self.logger.log( - self.fuji.LOG_SUCCESS, f"{self.metric_identifier} : Build script checks for license headers, so we can assume that all source files do contain license headers." - ) + self.fuji.LOG_SUCCESS, + f"{self.metric_identifier} : Build script checks for license headers, so we can assume that all source files do contain license headers.", + ) if not test_status: # CESSDA-3 did not pass source_code_samples = self.fuji.github_data.get("source_code_samples") if source_code_samples is not None: @@ -341,10 +348,13 @@ def testLicenseInHeaders(self): if license_headers_count == len(source_code_samples): test_status = True self.logger.log( - self.fuji.LOG_SUCCESS, f"{self.metric_identifier} : Sample of {len(source_code_samples)} source code files all contained a license header." - ) + self.fuji.LOG_SUCCESS, + f"{self.metric_identifier} : Sample of {len(source_code_samples)} source code files all contained a license header.", + ) else: - self.logger.warning(f"{self.metric_identifier} : {license_headers_count} out of a sample of {len(source_code_samples)} source code files were found to contain a license header.") + self.logger.warning( + f"{self.metric_identifier} : {license_headers_count} out of a sample of {len(source_code_samples)} source code files were found to contain a license header." + ) else: self.logger.warning(f"{self.metric_identifier} : No source code files found.") if test_status: # test passed, update score and maturity @@ -352,7 +362,7 @@ def testLicenseInHeaders(self): self.setEvaluationCriteriumScore(test_id, test_score, "pass") self.score.earned += test_score return test_status - + def testLicenseForBundled(self): """Look for license information of bundled components. Not implemented. @@ -367,9 +377,11 @@ def testLicenseForBundled(self): test_defined = True break if test_defined: - self.logger.warning(f"{self.metric_identifier} : Test for license information of bundled components is not implemented.") + self.logger.warning( + f"{self.metric_identifier} : Test for license information of bundled components is not implemented." + ) return test_status - + def testBuildScriptChecksLicenseHeader(self): """Parses build script looking for command that ensures the presence of license headers. Currently only for Maven POM files and expects build to fail if license headers are missing. @@ -403,16 +415,21 @@ def testBuildScriptChecksLicenseHeader(self): if fail_on_missing_header is not None and fail_on_missing_header.text == "true": test_status = True self.logger.log( - self.fuji.LOG_SUCCESS, f"{self.metric_identifier} : Maven POM checks for license headers in source files." + self.fuji.LOG_SUCCESS, + f"{self.metric_identifier} : Maven POM checks for license headers in source files.", ) self.maturity = self.getTestConfigMaturity(test_id) self.setEvaluationCriteriumScore(test_id, test_score, "pass") self.score.earned += test_score else: - self.logger.warning(f"{self.metric_identifier} : Maven POM uses license-maven-plugin (license:check-file-header) but does not fail on missing header.") + self.logger.warning( + f"{self.metric_identifier} : Maven POM uses license-maven-plugin (license:check-file-header) but does not fail on missing header." + ) break if not found_license_plugin: - self.logger.warning(f"{self.metric_identifier} : Maven POM does not use license-maven-plugin (license:check-file-header) to check for license headers in source code files.") + self.logger.warning( + f"{self.metric_identifier} : Maven POM does not use license-maven-plugin (license:check-file-header) to check for license headers in source code files." + ) else: self.logger.warning(f"{self.metric_identifier} : Did not find a Maven POM file.") return test_status @@ -437,7 +454,7 @@ def evaluate(self): license_status = "pass" if self.testLicenseInHeaders(): license_status = "pass" - + self.result.test_status = license_status self.result.output = self.output self.result.metric_tests = self.metric_tests diff --git a/fuji_server/harvester/github_harvester.py b/fuji_server/harvester/github_harvester.py index 3b359b67..449e09f9 100644 --- a/fuji_server/harvester/github_harvester.py +++ b/fuji_server/harvester/github_harvester.py @@ -1,17 +1,16 @@ import os - -from github import Github, Auth -from github.GithubException import RateLimitExceededException, UnknownObjectException from configparser import ConfigParser -from fuji_server.helper.identifier_helper import IdentifierHelper +from github import Auth, Github +from github.GithubException import UnknownObjectException + -class GithubHarvester: +class GithubHarvester: def __init__(self, id, host="https://github.com"): # Read Github API access token from config file. config = ConfigParser() - config.read(os.path.join(os.path.abspath(os.path.dirname(__file__)), '../config/github.cfg')) - auth_token = Auth.Token(config['ACCESS']['token']) + config.read(os.path.join(os.path.abspath(os.path.dirname(__file__)), "../config/github.cfg")) + auth_token = Auth.Token(config["ACCESS"]["token"]) self.id = id self.host = host if host != "https://github.com": @@ -24,7 +23,7 @@ def __init__(self, id, host="https://github.com"): def harvest(self): # check if it's a URL or repo ID # NOTE: this should probably be handled by IdentifierHelper, but I don't understand that module yet. - if self.id.count('/') > 1: # URL + if self.id.count("/") > 1: # URL self.url = self.id _, self.username, self.repo_name = self.id.rsplit("/", 2) else: # repo ID @@ -36,18 +35,18 @@ def harvest(self): try: repo = self.handle.get_repo(self.repo_id) except UnknownObjectException: - print("Could not find repo.") #TODO: this should be a log message + print("Could not find repo.") # TODO: this should be a log message return - + # harvesting try: # LICENSE license_file = repo.get_license() - self.data['license_path'] = license_file.path - self.data['license'] = license_file.license.name + self.data["license_path"] = license_file.path + self.data["license"] = license_file.license.name except UnknownObjectException: pass - try: # Maven POM + try: # Maven POM mvn_pom_file = repo.get_contents("pom.xml") self.data["mvn_pom"] = mvn_pom_file.decoded_content except UnknownObjectException: @@ -70,8 +69,8 @@ def harvest(self): { "path": source_code_files[i].path, "language": main_source_code_language, - "content": source_code_files[i].decoded_content + "content": source_code_files[i].decoded_content, } ) if len(source_code_samples) > 0: - self.data["source_code_samples"] = source_code_samples \ No newline at end of file + self.data["source_code_samples"] = source_code_samples diff --git a/fuji_server/helper/metadata_mapper.py b/fuji_server/helper/metadata_mapper.py index d5553876..a024904c 100644 --- a/fuji_server/helper/metadata_mapper.py +++ b/fuji_server/helper/metadata_mapper.py @@ -78,7 +78,7 @@ def flip_dict(dict_to_flip): "right_holder": {"label": "License", "sameAs": "http://purl.org/dc/terms/rightsHolder"}, "object_size": {"label": "Object Size", "sameAs": "http://purl.org/dc/terms/extent"}, "language": {"label": "Language", "sameAs": "http://purl.org/dc/terms/language"}, - "license_path": {"label": "License Path", "sameAs": None} + "license_path": {"label": "License Path", "sameAs": None}, } # core metadata elements (FsF-F2-01M) diff --git a/fuji_server/helper/metric_helper.py b/fuji_server/helper/metric_helper.py index d80d57f2..17724bf8 100644 --- a/fuji_server/helper/metric_helper.py +++ b/fuji_server/helper/metric_helper.py @@ -15,7 +15,7 @@ def __init__(self, metric_input_file_name, logger=None): self.metric_version = None self.total_metrics = 0 self.all_metrics_list = None - # match FsF or FAIR4RS metric (test) identifiers + # match FsF or FAIR4RS metric (test) identifiers self.metric_regex = r"^FsF-[FAIR][0-9]?(\.[0-9])?-[0-9]+[MD]+|FRSM-[0-9]+-[FAIR][0-9]?(\.[0-9])?" self.metric_test_regex = r"FsF-[FAIR][0-9]?(\.[0-9])?-[0-9]+[MD]+(-[0-9]+[a-z]?)|^FRSM-[0-9]+-[FAIR][0-9]?(\.[0-9])?(?:-[a-zA-Z]+)?(-[0-9]+)?" self.config = {} From 850ad34109dd07e72b439e29cffb1a1b3d7aca30 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Fri, 12 Jan 2024 11:47:02 +0000 Subject: [PATCH 35/45] regenerated swagger --- fuji_server/models/__init__.py | 74 ++++ .../models/any_of_fair_results_items.py | 82 +++- fuji_server/models/body.py | 340 +++++++++------ .../models/community_endorsed_standard.py | 348 +++++----------- .../community_endorsed_standard_output.py | 82 +++- ...ommunity_endorsed_standard_output_inner.py | 217 ++++++---- fuji_server/models/core_metadata.py | 348 +++++----------- fuji_server/models/core_metadata_output.py | 172 +++++--- fuji_server/models/data_access_level.py | 348 +++++----------- fuji_server/models/data_access_output.py | 126 ++++-- fuji_server/models/data_content_metadata.py | 347 +++++----------- .../models/data_content_metadata_output.py | 133 ++++-- .../data_content_metadata_output_inner.py | 156 ++++--- fuji_server/models/data_file_format.py | 348 +++++----------- fuji_server/models/data_file_format_output.py | 83 +++- .../models/data_file_format_output_inner.py | 217 ++++++---- fuji_server/models/data_provenance.py | 348 +++++----------- fuji_server/models/data_provenance_output.py | 147 ++++--- .../models/data_provenance_output_inner.py | 128 ++++-- fuji_server/models/debug.py | 82 +++- fuji_server/models/fair_result_common.py | 265 +++++++----- .../models/fair_result_common_score.py | 126 ++++-- .../fair_result_evaluation_criterium.py | 219 ++++++---- fuji_server/models/fair_results.py | 392 ++++++++++-------- fuji_server/models/formal_metadata.py | 348 +++++----------- fuji_server/models/formal_metadata_output.py | 83 +++- .../models/formal_metadata_output_inner.py | 156 ++++--- fuji_server/models/harvest.py | 168 ++++---- fuji_server/models/harvest_results.py | 129 ++++-- .../models/harvest_results_metadata.py | 242 ++++++----- fuji_server/models/identifier_included.py | 348 +++++----------- .../models/identifier_included_output.py | 135 ++++-- .../identifier_included_output_inner.py | 108 +++-- fuji_server/models/license.py | 348 +++++----------- fuji_server/models/license_output.py | 83 +++- fuji_server/models/license_output_inner.py | 146 ++++--- fuji_server/models/metadata_preserved.py | 348 +++++----------- .../models/metadata_preserved_output.py | 110 +++-- fuji_server/models/metric.py | 336 ++++++++------- fuji_server/models/metrics.py | 129 ++++-- .../models/output_core_metadata_found.py | 89 +++- .../models/output_search_mechanisms.py | 128 ++++-- fuji_server/models/persistence.py | 348 +++++----------- fuji_server/models/persistence_output.py | 111 +++-- .../models/persistence_output_inner.py | 182 +++++--- fuji_server/models/related_resource.py | 348 +++++----------- fuji_server/models/related_resource_output.py | 83 +++- .../models/related_resource_output_inner.py | 126 ++++-- fuji_server/models/searchable.py | 348 +++++----------- fuji_server/models/searchable_output.py | 111 +++-- fuji_server/models/semantic_vocabulary.py | 348 +++++----------- .../models/semantic_vocabulary_output.py | 83 +++- .../semantic_vocabulary_output_inner.py | 126 ++++-- .../models/standardised_protocol_data.py | 348 +++++----------- .../standardised_protocol_data_output.py | 108 +++-- .../models/standardised_protocol_metadata.py | 350 +++++----------- .../standardised_protocol_metadata_output.py | 108 +++-- fuji_server/models/uniqueness.py | 348 +++++----------- fuji_server/models/uniqueness_output.py | 126 ++++-- 59 files changed, 5832 insertions(+), 6332 deletions(-) mode change 100644 => 100755 fuji_server/models/any_of_fair_results_items.py diff --git a/fuji_server/models/__init__.py b/fuji_server/models/__init__.py index e69de29b..def51357 100644 --- a/fuji_server/models/__init__.py +++ b/fuji_server/models/__init__.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +# flake8: noqa +""" + F-UJI + + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 + + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +# import models into model package +from swagger_client.models.any_of_fair_results_results_items import AnyOfFAIRResultsResultsItems +from swagger_client.models.body import Body +from swagger_client.models.community_endorsed_standard import CommunityEndorsedStandard +from swagger_client.models.community_endorsed_standard_output import CommunityEndorsedStandardOutput +from swagger_client.models.community_endorsed_standard_output_inner import CommunityEndorsedStandardOutputInner +from swagger_client.models.core_metadata import CoreMetadata +from swagger_client.models.core_metadata_output import CoreMetadataOutput +from swagger_client.models.data_access_level import DataAccessLevel +from swagger_client.models.data_access_output import DataAccessOutput +from swagger_client.models.data_content_metadata import DataContentMetadata +from swagger_client.models.data_content_metadata_output import DataContentMetadataOutput +from swagger_client.models.data_content_metadata_output_inner import DataContentMetadataOutputInner +from swagger_client.models.data_file_format import DataFileFormat +from swagger_client.models.data_file_format_output import DataFileFormatOutput +from swagger_client.models.data_file_format_output_inner import DataFileFormatOutputInner +from swagger_client.models.data_provenance import DataProvenance +from swagger_client.models.data_provenance_output import DataProvenanceOutput +from swagger_client.models.data_provenance_output_inner import DataProvenanceOutputInner +from swagger_client.models.debug import Debug +from swagger_client.models.fair_result_common import FAIRResultCommon +from swagger_client.models.fair_result_common_score import FAIRResultCommonScore +from swagger_client.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium +from swagger_client.models.fair_results import FAIRResults +from swagger_client.models.formal_metadata import FormalMetadata +from swagger_client.models.formal_metadata_output import FormalMetadataOutput +from swagger_client.models.formal_metadata_output_inner import FormalMetadataOutputInner +from swagger_client.models.harvest import Harvest +from swagger_client.models.harvest_results import HarvestResults +from swagger_client.models.harvest_results_metadata import HarvestResultsMetadata +from swagger_client.models.identifier_included import IdentifierIncluded +from swagger_client.models.identifier_included_output import IdentifierIncludedOutput +from swagger_client.models.identifier_included_output_inner import IdentifierIncludedOutputInner +from swagger_client.models.license import License +from swagger_client.models.license_output import LicenseOutput +from swagger_client.models.license_output_inner import LicenseOutputInner +from swagger_client.models.metadata_preserved import MetadataPreserved +from swagger_client.models.metadata_preserved_output import MetadataPreservedOutput +from swagger_client.models.metric import Metric +from swagger_client.models.metrics import Metrics +from swagger_client.models.output_core_metadata_found import OutputCoreMetadataFound +from swagger_client.models.output_search_mechanisms import OutputSearchMechanisms +from swagger_client.models.persistence import Persistence +from swagger_client.models.persistence_output import PersistenceOutput +from swagger_client.models.persistence_output_inner import PersistenceOutputInner +from swagger_client.models.related_resource import RelatedResource +from swagger_client.models.related_resource_output import RelatedResourceOutput +from swagger_client.models.related_resource_output_inner import RelatedResourceOutputInner +from swagger_client.models.searchable import Searchable +from swagger_client.models.searchable_output import SearchableOutput +from swagger_client.models.semantic_vocabulary import SemanticVocabulary +from swagger_client.models.semantic_vocabulary_output import SemanticVocabularyOutput +from swagger_client.models.semantic_vocabulary_output_inner import SemanticVocabularyOutputInner +from swagger_client.models.standardised_protocol_data import StandardisedProtocolData +from swagger_client.models.standardised_protocol_data_output import StandardisedProtocolDataOutput +from swagger_client.models.standardised_protocol_metadata import StandardisedProtocolMetadata +from swagger_client.models.standardised_protocol_metadata_output import StandardisedProtocolMetadataOutput +from swagger_client.models.uniqueness import Uniqueness +from swagger_client.models.uniqueness_output import UniquenessOutput diff --git a/fuji_server/models/any_of_fair_results_items.py b/fuji_server/models/any_of_fair_results_items.py old mode 100644 new mode 100755 index de3416c7..ad886fe1 --- a/fuji_server/models/any_of_fair_results_items.py +++ b/fuji_server/models/any_of_fair_results_items.py @@ -1,26 +1,80 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class AnyOfFAIRResultsResultsItems(Model): + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class AnyOfFAIRResultsResultsItems: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {} + + attribute_map = {} + def __init__(self): """AnyOfFAIRResultsResultsItems - a model defined in Swagger""" - self.swagger_types = {} + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(AnyOfFAIRResultsResultsItems, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() - self.attribute_map = {} + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AnyOfFAIRResultsResultsItems): + return False - @classmethod - def from_dict(cls, dikt) -> "AnyOfFAIRResultsResultsItems": - """Returns the dict as a model + return self.__dict__ == other.__dict__ - :param dikt: A dict. - :type: dict - :return: The AnyOfFAIRResultsResultsItems of this AnyOfFAIRResultsResultsItems. # noqa: E501 - :rtype: AnyOfFAIRResultsResultsItems - """ - return util.deserialize_model(dikt, cls) + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/body.py b/fuji_server/models/body.py index 2bdb1321..3ca68167 100644 --- a/fuji_server/models/body.py +++ b/fuji_server/models/body.py @@ -1,109 +1,122 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class Body(Model): + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class Body: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + "object_identifier": "str", + "test_debug": "bool", + "metadata_service_endpoint": "str", + "metadata_service_type": "str", + "use_datacite": "bool", + "use_github": "bool", + "metric_version": "str", + "auth_token": "str", + "auth_token_type": "str", + "oaipmh_endpoint": "str", + } + + attribute_map = { + "object_identifier": "object_identifier", + "test_debug": "test_debug", + "metadata_service_endpoint": "metadata_service_endpoint", + "metadata_service_type": "metadata_service_type", + "use_datacite": "use_datacite", + "use_github": "use_github", + "metric_version": "metric_version", + "auth_token": "auth_token", + "auth_token_type": "auth_token_type", + "oaipmh_endpoint": "oaipmh_endpoint", + } + def __init__( self, - object_identifier: str | None = None, - test_debug: bool = False, - metadata_service_endpoint: str | None = None, - metadata_service_type: str | None = None, - use_datacite: bool | None = None, - metric_version: str | None = None, - auth_token: str | None = None, - auth_token_type: str | None = None, - oaipmh_endpoint: str | None = None, + object_identifier=None, + test_debug=False, + metadata_service_endpoint=None, + metadata_service_type=None, + use_datacite=None, + use_github=None, + metric_version=None, + auth_token=None, + auth_token_type=None, + oaipmh_endpoint=None, ): - """Body - a model defined in Swagger - - :param object_identifier: The object_identifier of this Body. # noqa: E501 - :type object_identifier: str - :param test_debug: The test_debug of this Body. # noqa: E501 - :type test_debug: bool - :param metadata_service_endpoint: The metadata_service_endpoint of this Body. # noqa: E501 - :type metadata_service_endpoint: str - :param metadata_service_type: The metadata_service_type of this Body. # noqa: E501 - :type metadata_service_type: str - :param use_datacite: The use_datacite of this Body. # noqa: E501 - :type use_datacite: bool - :param metric_version: The metric_version of this Body. # noqa: E501 - :type metric_version: str - :param auth_token: The auth_token of this Body. # noqa: E501 - :type auth_token: str - :param auth_token_type: The auth_token_type of this Body. # noqa: E501 - :type auth_token_type: str - :param oaipmh_endpoint: The oaipmh_endpoint of this Body. # noqa: E501 - :type oaipmh_endpoint: str - """ - self.swagger_types = { - "object_identifier": str, - "test_debug": bool, - "metadata_service_endpoint": str, - "metadata_service_type": str, - "use_datacite": bool, - "metric_version": str, - "auth_token": str, - "auth_token_type": str, - "oaipmh_endpoint": str, - } - - self.attribute_map = { - "object_identifier": "object_identifier", - "test_debug": "test_debug", - "metadata_service_endpoint": "metadata_service_endpoint", - "metadata_service_type": "metadata_service_type", - "use_datacite": "use_datacite", - "metric_version": "metric_version", - "auth_token": "auth_token", - "auth_token_type": "auth_token_type", - "oaipmh_endpoint": "oaipmh_endpoint", - } - self._object_identifier = object_identifier - self._test_debug = test_debug - self._metadata_service_endpoint = metadata_service_endpoint - self._metadata_service_type = metadata_service_type - self._use_datacite = use_datacite - self._metric_version = metric_version - self._auth_token = auth_token - self._auth_token_type = auth_token_type - self._oaipmh_endpoint = oaipmh_endpoint - - @classmethod - def from_dict(cls, dikt) -> "Body": - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The body of this Body. # noqa: E501 - :rtype: Body - """ - return util.deserialize_model(dikt, cls) + """Body - a model defined in Swagger""" + self._object_identifier = None + self._test_debug = None + self._metadata_service_endpoint = None + self._metadata_service_type = None + self._use_datacite = None + self._use_github = None + self._metric_version = None + self._auth_token = None + self._auth_token_type = None + self._oaipmh_endpoint = None + self.discriminator = None + self.object_identifier = object_identifier + if test_debug is not None: + self.test_debug = test_debug + if metadata_service_endpoint is not None: + self.metadata_service_endpoint = metadata_service_endpoint + if metadata_service_type is not None: + self.metadata_service_type = metadata_service_type + if use_datacite is not None: + self.use_datacite = use_datacite + if use_github is not None: + self.use_github = use_github + if metric_version is not None: + self.metric_version = metric_version + if auth_token is not None: + self.auth_token = auth_token + if auth_token_type is not None: + self.auth_token_type = auth_token_type + if oaipmh_endpoint is not None: + self.oaipmh_endpoint = oaipmh_endpoint @property - def object_identifier(self) -> str: - """Gets the object_identifier of this Body. + def object_identifier(self): + """Gets the object_identifier of this Body. # noqa: E501 The full identifier of data object that needs to be evaluated # noqa: E501 - :return: The object_identifier of this Body. + :return: The object_identifier of this Body. # noqa: E501 :rtype: str """ return self._object_identifier @object_identifier.setter - def object_identifier(self, object_identifier: str): + def object_identifier(self, object_identifier): """Sets the object_identifier of this Body. The full identifier of data object that needs to be evaluated # noqa: E501 - :param object_identifier: The object_identifier of this Body. - :type object_identifier: str + :param object_identifier: The object_identifier of this Body. # noqa: E501 + :type: str """ if object_identifier is None: raise ValueError("Invalid value for `object_identifier`, must not be `None`") @@ -111,183 +124,250 @@ def object_identifier(self, object_identifier: str): self._object_identifier = object_identifier @property - def test_debug(self) -> bool: - """Gets the test_debug of this Body. + def test_debug(self): + """Gets the test_debug of this Body. # noqa: E501 Indicate if the detailed evaluation procedure of the metrics should to be included in the response # noqa: E501 - :return: The test_debug of this Body. + :return: The test_debug of this Body. # noqa: E501 :rtype: bool """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug: bool): + def test_debug(self, test_debug): """Sets the test_debug of this Body. Indicate if the detailed evaluation procedure of the metrics should to be included in the response # noqa: E501 - :param test_debug: The test_debug of this Body. - :type test_debug: bool + :param test_debug: The test_debug of this Body. # noqa: E501 + :type: bool """ self._test_debug = test_debug @property - def metadata_service_endpoint(self) -> str: - """Gets the metadata_service_endpoint of this Body. + def metadata_service_endpoint(self): + """Gets the metadata_service_endpoint of this Body. # noqa: E501 The URL of the catalogue endpoint (e.g. OAI-PMH data-provider) # noqa: E501 - :return: The metadata_service_endpoint of this Body. + :return: The metadata_service_endpoint of this Body. # noqa: E501 :rtype: str """ return self._metadata_service_endpoint @metadata_service_endpoint.setter - def metadata_service_endpoint(self, metadata_service_endpoint: str): + def metadata_service_endpoint(self, metadata_service_endpoint): """Sets the metadata_service_endpoint of this Body. The URL of the catalogue endpoint (e.g. OAI-PMH data-provider) # noqa: E501 - :param metadata_service_endpoint: The metadata_service_endpoint of this Body. - :type metadata_service_endpoint: str + :param metadata_service_endpoint: The metadata_service_endpoint of this Body. # noqa: E501 + :type: str """ self._metadata_service_endpoint = metadata_service_endpoint @property - def metadata_service_type(self) -> str: - """Gets the metadata_service_type of this Body. + def metadata_service_type(self): + """Gets the metadata_service_type of this Body. # noqa: E501 - :return: The metadata_service_type of this Body. + :return: The metadata_service_type of this Body. # noqa: E501 :rtype: str """ return self._metadata_service_type @metadata_service_type.setter - def metadata_service_type(self, metadata_service_type: str): + def metadata_service_type(self, metadata_service_type): """Sets the metadata_service_type of this Body. - :param metadata_service_type: The metadata_service_type of this Body. - :type metadata_service_type: str + :param metadata_service_type: The metadata_service_type of this Body. # noqa: E501 + :type: str """ self._metadata_service_type = metadata_service_type @property - def use_datacite(self) -> bool: - """Gets the use_datacite of this Body. + def use_datacite(self): + """Gets the use_datacite of this Body. # noqa: E501 Indicates if DataCite content negotiation (using the DOI) shall be used to collect metadata # noqa: E501 - :return: The use_datacite of this Body. + :return: The use_datacite of this Body. # noqa: E501 :rtype: bool """ return self._use_datacite @use_datacite.setter - def use_datacite(self, use_datacite: bool): + def use_datacite(self, use_datacite): """Sets the use_datacite of this Body. Indicates if DataCite content negotiation (using the DOI) shall be used to collect metadata # noqa: E501 - :param use_datacite: The use_datacite of this Body. - :type use_datacite: bool + :param use_datacite: The use_datacite of this Body. # noqa: E501 + :type: bool """ self._use_datacite = use_datacite @property - def metric_version(self) -> str: - """Gets the metric_version of this Body. + def use_github(self): + """Gets the use_github of this Body. # noqa: E501 + + Indicates if the GitHub REST API shall be used to collect (meta)data # noqa: E501 + + :return: The use_github of this Body. # noqa: E501 + :rtype: bool + """ + return self._use_github + + @use_github.setter + def use_github(self, use_github): + """Sets the use_github of this Body. + + Indicates if the GitHub REST API shall be used to collect (meta)data # noqa: E501 + + :param use_github: The use_github of this Body. # noqa: E501 + :type: bool + """ + + self._use_github = use_github + + @property + def metric_version(self): + """Gets the metric_version of this Body. # noqa: E501 The FAIRsFAIR metric version be used fo rthe assessment # noqa: E501 - :return: The metric_version of this Body. + :return: The metric_version of this Body. # noqa: E501 :rtype: str """ return self._metric_version @metric_version.setter - def metric_version(self, metric_version: str): + def metric_version(self, metric_version): """Sets the metric_version of this Body. The FAIRsFAIR metric version be used fo rthe assessment # noqa: E501 - :param metric_version: The metric_version of this Body. - :type metric_version: str + :param metric_version: The metric_version of this Body. # noqa: E501 + :type: str """ self._metric_version = metric_version @property - def auth_token(self) -> str: - """Gets the auth_token of this Body. + def auth_token(self): + """Gets the auth_token of this Body. # noqa: E501 The authentication token for HTTP authentication # noqa: E501 - :return: The auth_token of this Body. + :return: The auth_token of this Body. # noqa: E501 :rtype: str """ return self._auth_token @auth_token.setter - def auth_token(self, auth_token: str): + def auth_token(self, auth_token): """Sets the auth_token of this Body. The authentication token for HTTP authentication # noqa: E501 - :param auth_token: The auth_token of this Body. - :type auth_token: str + :param auth_token: The auth_token of this Body. # noqa: E501 + :type: str """ self._auth_token = auth_token @property - def auth_token_type(self) -> str: - """Gets the auth_token_type of this Body. + def auth_token_type(self): + """Gets the auth_token_type of this Body. # noqa: E501 The authentication token type, 'Basic' or 'Bearer' # noqa: E501 - :return: The auth_token_type of this Body. + :return: The auth_token_type of this Body. # noqa: E501 :rtype: str """ return self._auth_token_type @auth_token_type.setter - def auth_token_type(self, auth_token_type: str): + def auth_token_type(self, auth_token_type): """Sets the auth_token_type of this Body. The authentication token type, 'Basic' or 'Bearer' # noqa: E501 - :param auth_token_type: The auth_token_type of this Body. - :type auth_token_type: str + :param auth_token_type: The auth_token_type of this Body. # noqa: E501 + :type: str """ self._auth_token_type = auth_token_type @property - def oaipmh_endpoint(self) -> str: - """Gets the oaipmh_endpoint of this Body. + def oaipmh_endpoint(self): + """Gets the oaipmh_endpoint of this Body. # noqa: E501 (Deprecated) The URL of the OAI-PMH data-provider # noqa: E501 - :return: The oaipmh_endpoint of this Body. + :return: The oaipmh_endpoint of this Body. # noqa: E501 :rtype: str """ return self._oaipmh_endpoint @oaipmh_endpoint.setter - def oaipmh_endpoint(self, oaipmh_endpoint: str): + def oaipmh_endpoint(self, oaipmh_endpoint): """Sets the oaipmh_endpoint of this Body. (Deprecated) The URL of the OAI-PMH data-provider # noqa: E501 - :param oaipmh_endpoint: The oaipmh_endpoint of this Body. - :type oaipmh_endpoint: str + :param oaipmh_endpoint: The oaipmh_endpoint of this Body. # noqa: E501 + :type: str """ self._oaipmh_endpoint = oaipmh_endpoint + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(Body, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Body): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/community_endorsed_standard.py b/fuji_server/models/community_endorsed_standard.py index eb700955..a5880ef6 100644 --- a/fuji_server/models/community_endorsed_standard.py +++ b/fuji_server/models/community_endorsed_standard.py @@ -1,291 +1,135 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model -from fuji_server.models.community_endorsed_standard_output import CommunityEndorsedStandardOutput -from fuji_server.models.debug import Debug -from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class CommunityEndorsedStandard(Model): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - def __init__( - self, - id: int | None = None, - metric_identifier: str | None = None, - metric_name: str | None = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, - test_status: str = "fail", - score: FAIRResultCommonScore = None, - maturity: str = "incomplete", - output: CommunityEndorsedStandardOutput = None, - test_debug: Debug = None, - ): - """CommunityEndorsedStandard - a model defined in Swagger - - :param id: The id of this CommunityEndorsedStandard. # noqa: E501 - :type id: int - :param metric_identifier: The metric_identifier of this CommunityEndorsedStandard. # noqa: E501 - :type metric_identifier: str - :param metric_name: The metric_name of this CommunityEndorsedStandard. # noqa: E501 - :type metric_name: str - :param metric_tests: The metric_tests of this CommunityEndorsedStandard. # noqa: E501 - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - :param test_status: The test_status of this CommunityEndorsedStandard. # noqa: E501 - :type test_status: str - :param score: The score of this CommunityEndorsedStandard. # noqa: E501 - :type score: FAIRResultCommonScore - :param maturity: The maturity of this CommunityEndorsedStandard. # noqa: E501 - :type maturity: str - :param output: The output of this CommunityEndorsedStandard. # noqa: E501 - :type output: CommunityEndorsedStandardOutput - :param test_debug: The test_debug of this CommunityEndorsedStandard. # noqa: E501 - :type test_debug: Debug - """ - self.swagger_types = { - "id": int, - "metric_identifier": str, - "metric_name": str, - "metric_tests": dict[str, FAIRResultEvaluationCriterium], - "test_status": str, - "score": FAIRResultCommonScore, - "maturity": str, - "output": CommunityEndorsedStandardOutput, - "test_debug": Debug, - } - - self.attribute_map = { - "id": "id", - "metric_identifier": "metric_identifier", - "metric_name": "metric_name", - "metric_tests": "metric_tests", - "test_status": "test_status", - "score": "score", - "maturity": "maturity", - "output": "output", - "test_debug": "test_debug", - } - self._id = id - self._metric_identifier = metric_identifier - self._metric_name = metric_name - self._metric_tests = metric_tests - self._test_status = test_status - self._score = score - self._maturity = maturity - self._output = output - self._test_debug = test_debug - - @classmethod - def from_dict(cls, dikt) -> "CommunityEndorsedStandard": - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The CommunityEndorsedStandard of this CommunityEndorsedStandard. # noqa: E501 - :rtype: CommunityEndorsedStandard - """ - return util.deserialize_model(dikt, cls) - - @property - def id(self) -> int: - """Gets the id of this CommunityEndorsedStandard. - - - :return: The id of this CommunityEndorsedStandard. - :rtype: int - """ - return self._id - - @id.setter - def id(self, id: int): - """Sets the id of this CommunityEndorsedStandard. - - - :param id: The id of this CommunityEndorsedStandard. - :type id: int - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") - - self._id = id - - @property - def metric_identifier(self) -> str: - """Gets the metric_identifier of this CommunityEndorsedStandard. - - - :return: The metric_identifier of this CommunityEndorsedStandard. - :rtype: str - """ - return self._metric_identifier - - @metric_identifier.setter - def metric_identifier(self, metric_identifier: str): - """Sets the metric_identifier of this CommunityEndorsedStandard. - - - :param metric_identifier: The metric_identifier of this CommunityEndorsedStandard. - :type metric_identifier: str - """ - if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") - - self._metric_identifier = metric_identifier - - @property - def metric_name(self) -> str: - """Gets the metric_name of this CommunityEndorsedStandard. - - - :return: The metric_name of this CommunityEndorsedStandard. - :rtype: str - """ - return self._metric_name - - @metric_name.setter - def metric_name(self, metric_name: str): - """Sets the metric_name of this CommunityEndorsedStandard. - - - :param metric_name: The metric_name of this CommunityEndorsedStandard. - :type metric_name: str - """ - if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" - self._metric_name = metric_name +import pprint +import re # noqa: F401 - @property - def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: - """Gets the metric_tests of this CommunityEndorsedStandard. - - - :return: The metric_tests of this CommunityEndorsedStandard. - :rtype: Dict[str, FAIRResultEvaluationCriterium] - """ - return self._metric_tests - - @metric_tests.setter - def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): - """Sets the metric_tests of this CommunityEndorsedStandard. - - - :param metric_tests: The metric_tests of this CommunityEndorsedStandard. - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - """ - - self._metric_tests = metric_tests - - @property - def test_status(self) -> str: - """Gets the test_status of this CommunityEndorsedStandard. - - - :return: The test_status of this CommunityEndorsedStandard. - :rtype: str - """ - return self._test_status - - @test_status.setter - def test_status(self, test_status: str): - """Sets the test_status of this CommunityEndorsedStandard. - - - :param test_status: The test_status of this CommunityEndorsedStandard. - :type test_status: str - """ - allowed_values = ["pass", "fail", "indeterminate"] - if test_status not in allowed_values: - raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") - - self._test_status = test_status - - @property - def score(self) -> FAIRResultCommonScore: - """Gets the score of this CommunityEndorsedStandard. +import six +from swagger_client.models.fair_result_common import FAIRResultCommon - :return: The score of this CommunityEndorsedStandard. - :rtype: FAIRResultCommonScore - """ - return self._score - - @score.setter - def score(self, score: FAIRResultCommonScore): - """Sets the score of this CommunityEndorsedStandard. - - - :param score: The score of this CommunityEndorsedStandard. - :type score: FAIRResultCommonScore - """ - if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") - - self._score = score - - @property - def maturity(self) -> str: - """Gets the maturity of this CommunityEndorsedStandard. - - - :return: The maturity of this CommunityEndorsedStandard. - :rtype: str - """ - return self._maturity - - @maturity.setter - def maturity(self, maturity: int): - """Sets the maturity of this Uniqueness. +class CommunityEndorsedStandard(FAIRResultCommon): + """NOTE: This class is auto generated by the swagger code generator program. - :param maturity: The maturity of this Uniqueness. - :type maturity: int - """ + Do not edit the class manually. + """ - self._maturity = maturity + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"output": "CommunityEndorsedStandardOutput", "test_debug": "Debug"} + if hasattr(FAIRResultCommon, "swagger_types"): + swagger_types.update(FAIRResultCommon.swagger_types) + + attribute_map = {"output": "output", "test_debug": "test_debug"} + if hasattr(FAIRResultCommon, "attribute_map"): + attribute_map.update(FAIRResultCommon.attribute_map) + + def __init__(self, output=None, test_debug=None, *args, **kwargs): + """CommunityEndorsedStandard - a model defined in Swagger""" + self._output = None + self._test_debug = None + self.discriminator = None + if output is not None: + self.output = output + if test_debug is not None: + self.test_debug = test_debug + FAIRResultCommon.__init__(self, *args, **kwargs) @property - def output(self) -> CommunityEndorsedStandardOutput: - """Gets the output of this CommunityEndorsedStandard. + def output(self): + """Gets the output of this CommunityEndorsedStandard. # noqa: E501 - :return: The output of this CommunityEndorsedStandard. + :return: The output of this CommunityEndorsedStandard. # noqa: E501 :rtype: CommunityEndorsedStandardOutput """ return self._output @output.setter - def output(self, output: CommunityEndorsedStandardOutput): + def output(self, output): """Sets the output of this CommunityEndorsedStandard. - :param output: The output of this CommunityEndorsedStandard. - :type output: CommunityEndorsedStandardOutput + :param output: The output of this CommunityEndorsedStandard. # noqa: E501 + :type: CommunityEndorsedStandardOutput """ self._output = output @property - def test_debug(self) -> Debug: - """Gets the test_debug of this CommunityEndorsedStandard. + def test_debug(self): + """Gets the test_debug of this CommunityEndorsedStandard. # noqa: E501 - :return: The test_debug of this CommunityEndorsedStandard. + :return: The test_debug of this CommunityEndorsedStandard. # noqa: E501 :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug: Debug): + def test_debug(self, test_debug): """Sets the test_debug of this CommunityEndorsedStandard. - :param test_debug: The test_debug of this CommunityEndorsedStandard. - :type test_debug: Debug + :param test_debug: The test_debug of this CommunityEndorsedStandard. # noqa: E501 + :type: Debug """ self._test_debug = test_debug + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(CommunityEndorsedStandard, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CommunityEndorsedStandard): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/community_endorsed_standard_output.py b/fuji_server/models/community_endorsed_standard_output.py index 1d4b8d7d..7e0bdfee 100644 --- a/fuji_server/models/community_endorsed_standard_output.py +++ b/fuji_server/models/community_endorsed_standard_output.py @@ -1,26 +1,80 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class CommunityEndorsedStandardOutput(Model): + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class CommunityEndorsedStandardOutput: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {} + + attribute_map = {} + def __init__(self): """CommunityEndorsedStandardOutput - a model defined in Swagger""" - self.swagger_types = {} + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(CommunityEndorsedStandardOutput, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() - self.attribute_map = {} + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CommunityEndorsedStandardOutput): + return False - @classmethod - def from_dict(cls, dikt) -> "CommunityEndorsedStandardOutput": - """Returns the dict as a model + return self.__dict__ == other.__dict__ - :param dikt: A dict. - :type: dict - :return: The CommunityEndorsedStandard_output of this CommunityEndorsedStandardOutput. # noqa: E501 - :rtype: CommunityEndorsedStandardOutput - """ - return util.deserialize_model(dikt, cls) + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/community_endorsed_standard_output_inner.py b/fuji_server/models/community_endorsed_standard_output_inner.py index 0f2ca895..0fabb700 100644 --- a/fuji_server/models/community_endorsed_standard_output_inner.py +++ b/fuji_server/models/community_endorsed_standard_output_inner.py @@ -1,167 +1,212 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class CommunityEndorsedStandardOutputInner(Model): - """NOTE: This class is auto generated by the swagger code generator program. + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" - Do not edit the class manually. - """ +import pprint +import re # noqa: F401 - def __init__( - self, - metadata_standard: str | None = None, - url: str | None = None, - subject_areas: list[str] | None = None, - type: str | None = None, - source: str | None = None, - ): - """CommunityEndorsedStandardOutputInner - a model defined in Swagger +import six - :param metadata_standard: The metadata_standard of this CommunityEndorsedStandardOutputInner. # noqa: E501 - :type metadata_standard: str - :param url: The url of this CommunityEndorsedStandardOutputInner. # noqa: E501 - :type url: str - :param subject_areas: The subject_areas of this CommunityEndorsedStandardOutputInner. # noqa: E501 - :type subject_areas: List[str] - :param type: The type of this CommunityEndorsedStandardOutputInner. # noqa: E501 - :type type: str - :param source: The source of this CommunityEndorsedStandardOutputInner. # noqa: E501 - :type source: str - """ - self.swagger_types = { - "metadata_standard": str, - "url": str, - "subject_areas": list[str], - "type": str, - "source": str, - } - - self.attribute_map = { - "metadata_standard": "metadata_standard", - "url": "url", - "subject_areas": "subject_areas", - "type": "type", - "source": "source", - } - self._metadata_standard = metadata_standard - self._url = url - self._subject_areas = subject_areas - self._type = type - self._source = source - @classmethod - def from_dict(cls, dikt) -> "CommunityEndorsedStandardOutputInner": - """Returns the dict as a model +class CommunityEndorsedStandardOutputInner: + """NOTE: This class is auto generated by the swagger code generator program. - :param dikt: A dict. - :type: dict - :return: The CommunityEndorsedStandard_output_inner of this CommunityEndorsedStandardOutputInner. # noqa: E501 - :rtype: CommunityEndorsedStandardOutputInner - """ - return util.deserialize_model(dikt, cls) + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + "metadata_standard": "str", + "url": "str", + "subject_areas": "list[str]", + "type": "str", + "source": "str", + } + + attribute_map = { + "metadata_standard": "metadata_standard", + "url": "url", + "subject_areas": "subject_areas", + "type": "type", + "source": "source", + } + + def __init__(self, metadata_standard=None, url=None, subject_areas=None, type=None, source=None): + """CommunityEndorsedStandardOutputInner - a model defined in Swagger""" + self._metadata_standard = None + self._url = None + self._subject_areas = None + self._type = None + self._source = None + self.discriminator = None + if metadata_standard is not None: + self.metadata_standard = metadata_standard + if url is not None: + self.url = url + if subject_areas is not None: + self.subject_areas = subject_areas + if type is not None: + self.type = type + if source is not None: + self.source = source @property - def metadata_standard(self) -> str: - """Gets the metadata_standard of this CommunityEndorsedStandardOutputInner. + def metadata_standard(self): + """Gets the metadata_standard of this CommunityEndorsedStandardOutputInner. # noqa: E501 - :return: The metadata_standard of this CommunityEndorsedStandardOutputInner. + :return: The metadata_standard of this CommunityEndorsedStandardOutputInner. # noqa: E501 :rtype: str """ return self._metadata_standard @metadata_standard.setter - def metadata_standard(self, metadata_standard: str): + def metadata_standard(self, metadata_standard): """Sets the metadata_standard of this CommunityEndorsedStandardOutputInner. - :param metadata_standard: The metadata_standard of this CommunityEndorsedStandardOutputInner. - :type metadata_standard: str + :param metadata_standard: The metadata_standard of this CommunityEndorsedStandardOutputInner. # noqa: E501 + :type: str """ self._metadata_standard = metadata_standard @property - def url(self) -> str: - """Gets the url of this CommunityEndorsedStandardOutputInner. + def url(self): + """Gets the url of this CommunityEndorsedStandardOutputInner. # noqa: E501 - :return: The url of this CommunityEndorsedStandardOutputInner. + :return: The url of this CommunityEndorsedStandardOutputInner. # noqa: E501 :rtype: str """ return self._url @url.setter - def url(self, url: str): + def url(self, url): """Sets the url of this CommunityEndorsedStandardOutputInner. - :param url: The url of this CommunityEndorsedStandardOutputInner. - :type url: str + :param url: The url of this CommunityEndorsedStandardOutputInner. # noqa: E501 + :type: str """ self._url = url @property - def subject_areas(self) -> list[str]: - """Gets the subject_areas of this CommunityEndorsedStandardOutputInner. + def subject_areas(self): + """Gets the subject_areas of this CommunityEndorsedStandardOutputInner. # noqa: E501 - :return: The subject_areas of this CommunityEndorsedStandardOutputInner. - :rtype: List[str] + :return: The subject_areas of this CommunityEndorsedStandardOutputInner. # noqa: E501 + :rtype: list[str] """ return self._subject_areas @subject_areas.setter - def subject_areas(self, subject_areas: list[str]): + def subject_areas(self, subject_areas): """Sets the subject_areas of this CommunityEndorsedStandardOutputInner. - :param subject_areas: The subject_areas of this CommunityEndorsedStandardOutputInner. - :type subject_areas: List[str] + :param subject_areas: The subject_areas of this CommunityEndorsedStandardOutputInner. # noqa: E501 + :type: list[str] """ self._subject_areas = subject_areas @property - def type(self) -> str: - """Gets the type of this CommunityEndorsedStandardOutputInner. + def type(self): + """Gets the type of this CommunityEndorsedStandardOutputInner. # noqa: E501 - :return: The type of this CommunityEndorsedStandardOutputInner. + :return: The type of this CommunityEndorsedStandardOutputInner. # noqa: E501 :rtype: str """ return self._type @type.setter - def type(self, type: str): + def type(self, type): """Sets the type of this CommunityEndorsedStandardOutputInner. - :param type: The type of this CommunityEndorsedStandardOutputInner. - :type type: str + :param type: The type of this CommunityEndorsedStandardOutputInner. # noqa: E501 + :type: str """ self._type = type @property - def source(self) -> str: - """Gets the source of this CommunityEndorsedStandardOutputInner. + def source(self): + """Gets the source of this CommunityEndorsedStandardOutputInner. # noqa: E501 - :return: The source of this CommunityEndorsedStandardOutputInner. + :return: The source of this CommunityEndorsedStandardOutputInner. # noqa: E501 :rtype: str """ return self._source @source.setter - def source(self, source: str): + def source(self, source): """Sets the source of this CommunityEndorsedStandardOutputInner. - :param source: The source of this CommunityEndorsedStandardOutputInner. - :type source: str + :param source: The source of this CommunityEndorsedStandardOutputInner. # noqa: E501 + :type: str """ self._source = source + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(CommunityEndorsedStandardOutputInner, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CommunityEndorsedStandardOutputInner): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/core_metadata.py b/fuji_server/models/core_metadata.py index b9a42dfb..9b02a8e0 100644 --- a/fuji_server/models/core_metadata.py +++ b/fuji_server/models/core_metadata.py @@ -1,291 +1,135 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model -from fuji_server.models.core_metadata_output import CoreMetadataOutput -from fuji_server.models.debug import Debug -from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class CoreMetadata(Model): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - def __init__( - self, - id: int | None = None, - metric_identifier: str | None = None, - metric_name: str | None = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, - test_status: str = "fail", - score: FAIRResultCommonScore = None, - maturity: int = 0, - output: CoreMetadataOutput = None, - test_debug: Debug = None, - ): - """CoreMetadata - a model defined in Swagger - - :param id: The id of this CoreMetadata. # noqa: E501 - :type id: int - :param metric_identifier: The metric_identifier of this CoreMetadata. # noqa: E501 - :type metric_identifier: str - :param metric_name: The metric_name of this CoreMetadata. # noqa: E501 - :type metric_name: str - :param metric_tests: The metric_tests of this CoreMetadata. # noqa: E501 - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - :param test_status: The test_status of this CoreMetadata. # noqa: E501 - :type test_status: str - :param score: The score of this CoreMetadata. # noqa: E501 - :type score: FAIRResultCommonScore - :param maturity: The maturity of this CoreMetadata. # noqa: E501 - :type maturity: int - :param output: The output of this CoreMetadata. # noqa: E501 - :type output: CoreMetadataOutput - :param test_debug: The test_debug of this CoreMetadata. # noqa: E501 - :type test_debug: Debug - """ - self.swagger_types = { - "id": int, - "metric_identifier": str, - "metric_name": str, - "metric_tests": dict[str, FAIRResultEvaluationCriterium], - "test_status": str, - "score": FAIRResultCommonScore, - "maturity": int, - "output": CoreMetadataOutput, - "test_debug": Debug, - } - - self.attribute_map = { - "id": "id", - "metric_identifier": "metric_identifier", - "metric_name": "metric_name", - "metric_tests": "metric_tests", - "test_status": "test_status", - "score": "score", - "maturity": "maturity", - "output": "output", - "test_debug": "test_debug", - } - self._id = id - self._metric_identifier = metric_identifier - self._metric_name = metric_name - self._metric_tests = metric_tests - self._test_status = test_status - self._score = score - self._maturity = maturity - self._output = output - self._test_debug = test_debug - - @classmethod - def from_dict(cls, dikt) -> "CoreMetadata": - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The CoreMetadata of this CoreMetadata. # noqa: E501 - :rtype: CoreMetadata - """ - return util.deserialize_model(dikt, cls) - - @property - def id(self) -> int: - """Gets the id of this CoreMetadata. - - - :return: The id of this CoreMetadata. - :rtype: int - """ - return self._id - - @id.setter - def id(self, id: int): - """Sets the id of this CoreMetadata. - - - :param id: The id of this CoreMetadata. - :type id: int - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") - - self._id = id - - @property - def metric_identifier(self) -> str: - """Gets the metric_identifier of this CoreMetadata. - - - :return: The metric_identifier of this CoreMetadata. - :rtype: str - """ - return self._metric_identifier - - @metric_identifier.setter - def metric_identifier(self, metric_identifier: str): - """Sets the metric_identifier of this CoreMetadata. - - - :param metric_identifier: The metric_identifier of this CoreMetadata. - :type metric_identifier: str - """ - if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") - - self._metric_identifier = metric_identifier - - @property - def metric_name(self) -> str: - """Gets the metric_name of this CoreMetadata. - - - :return: The metric_name of this CoreMetadata. - :rtype: str - """ - return self._metric_name - - @metric_name.setter - def metric_name(self, metric_name: str): - """Sets the metric_name of this CoreMetadata. - - - :param metric_name: The metric_name of this CoreMetadata. - :type metric_name: str - """ - if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" - self._metric_name = metric_name +import pprint +import re # noqa: F401 - @property - def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: - """Gets the metric_tests of this CoreMetadata. - - - :return: The metric_tests of this CoreMetadata. - :rtype: Dict[str, FAIRResultEvaluationCriterium] - """ - return self._metric_tests - - @metric_tests.setter - def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): - """Sets the metric_tests of this CoreMetadata. - - - :param metric_tests: The metric_tests of this CoreMetadata. - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - """ - - self._metric_tests = metric_tests - - @property - def test_status(self) -> str: - """Gets the test_status of this CoreMetadata. - - - :return: The test_status of this CoreMetadata. - :rtype: str - """ - return self._test_status - - @test_status.setter - def test_status(self, test_status: str): - """Sets the test_status of this CoreMetadata. - - - :param test_status: The test_status of this CoreMetadata. - :type test_status: str - """ - allowed_values = ["pass", "fail", "indeterminate"] - if test_status not in allowed_values: - raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") - - self._test_status = test_status - - @property - def score(self) -> FAIRResultCommonScore: - """Gets the score of this CoreMetadata. +import six +from swagger_client.models.fair_result_common import FAIRResultCommon - :return: The score of this CoreMetadata. - :rtype: FAIRResultCommonScore - """ - return self._score - - @score.setter - def score(self, score: FAIRResultCommonScore): - """Sets the score of this CoreMetadata. - - - :param score: The score of this CoreMetadata. - :type score: FAIRResultCommonScore - """ - if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") - - self._score = score - - @property - def maturity(self) -> int: - """Gets the maturity of this CoreMetadata. - - - :return: The maturity of this CoreMetadata. - :rtype: int - """ - return self._maturity - - @maturity.setter - def maturity(self, maturity: int): - """Sets the maturity of this CoreMetadata. +class CoreMetadata(FAIRResultCommon): + """NOTE: This class is auto generated by the swagger code generator program. - :param maturity: The maturity of this CoreMetadata. - :type maturity: int - """ + Do not edit the class manually. + """ - self._maturity = maturity + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"output": "CoreMetadataOutput", "test_debug": "Debug"} + if hasattr(FAIRResultCommon, "swagger_types"): + swagger_types.update(FAIRResultCommon.swagger_types) + + attribute_map = {"output": "output", "test_debug": "test_debug"} + if hasattr(FAIRResultCommon, "attribute_map"): + attribute_map.update(FAIRResultCommon.attribute_map) + + def __init__(self, output=None, test_debug=None, *args, **kwargs): + """CoreMetadata - a model defined in Swagger""" + self._output = None + self._test_debug = None + self.discriminator = None + if output is not None: + self.output = output + if test_debug is not None: + self.test_debug = test_debug + FAIRResultCommon.__init__(self, *args, **kwargs) @property - def output(self) -> CoreMetadataOutput: - """Gets the output of this CoreMetadata. + def output(self): + """Gets the output of this CoreMetadata. # noqa: E501 - :return: The output of this CoreMetadata. + :return: The output of this CoreMetadata. # noqa: E501 :rtype: CoreMetadataOutput """ return self._output @output.setter - def output(self, output: CoreMetadataOutput): + def output(self, output): """Sets the output of this CoreMetadata. - :param output: The output of this CoreMetadata. - :type output: CoreMetadataOutput + :param output: The output of this CoreMetadata. # noqa: E501 + :type: CoreMetadataOutput """ self._output = output @property - def test_debug(self) -> Debug: - """Gets the test_debug of this CoreMetadata. + def test_debug(self): + """Gets the test_debug of this CoreMetadata. # noqa: E501 - :return: The test_debug of this CoreMetadata. + :return: The test_debug of this CoreMetadata. # noqa: E501 :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug: Debug): + def test_debug(self, test_debug): """Sets the test_debug of this CoreMetadata. - :param test_debug: The test_debug of this CoreMetadata. - :type test_debug: Debug + :param test_debug: The test_debug of this CoreMetadata. # noqa: E501 + :type: Debug """ self._test_debug = test_debug + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(CoreMetadata, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CoreMetadata): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/core_metadata_output.py b/fuji_server/models/core_metadata_output.py index 01954a5b..4f282ec0 100644 --- a/fuji_server/models/core_metadata_output.py +++ b/fuji_server/models/core_metadata_output.py @@ -1,72 +1,74 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model -from fuji_server.models.output_core_metadata_found import OutputCoreMetadataFound +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class CoreMetadataOutput(Model): - """NOTE: This class is auto generated by the swagger code generator program. + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" - Do not edit the class manually. - """ +import pprint +import re # noqa: F401 - def __init__( - self, - core_metadata_status: str | None = None, - core_metadata_found: OutputCoreMetadataFound = None, - core_metadata_source: list[str] | None = None, - ): - """CoreMetadataOutput - a model defined in Swagger +import six - :param core_metadata_status: The core_metadata_status of this CoreMetadataOutput. # noqa: E501 - :type core_metadata_status: str - :param core_metadata_found: The core_metadata_found of this CoreMetadataOutput. # noqa: E501 - :type core_metadata_found: OutputCoreMetadataFound - :param core_metadata_source: The core_metadata_source of this CoreMetadataOutput. # noqa: E501 - :type core_metadata_source: List[str] - """ - self.swagger_types = { - "core_metadata_status": str, - "core_metadata_found": OutputCoreMetadataFound, - "core_metadata_source": list[str], - } - - self.attribute_map = { - "core_metadata_status": "core_metadata_status", - "core_metadata_found": "core_metadata_found", - "core_metadata_source": "core_metadata_source", - } - self._core_metadata_status = core_metadata_status - self._core_metadata_found = core_metadata_found - self._core_metadata_source = core_metadata_source - @classmethod - def from_dict(cls, dikt) -> "CoreMetadataOutput": - """Returns the dict as a model +class CoreMetadataOutput: + """NOTE: This class is auto generated by the swagger code generator program. - :param dikt: A dict. - :type: dict - :return: The CoreMetadata_output of this CoreMetadataOutput. # noqa: E501 - :rtype: CoreMetadataOutput - """ - return util.deserialize_model(dikt, cls) + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + "core_metadata_status": "str", + "core_metadata_found": "OutputCoreMetadataFound", + "core_metadata_source": "list[str]", + } + + attribute_map = { + "core_metadata_status": "core_metadata_status", + "core_metadata_found": "core_metadata_found", + "core_metadata_source": "core_metadata_source", + } + + def __init__(self, core_metadata_status=None, core_metadata_found=None, core_metadata_source=None): + """CoreMetadataOutput - a model defined in Swagger""" + self._core_metadata_status = None + self._core_metadata_found = None + self._core_metadata_source = None + self.discriminator = None + if core_metadata_status is not None: + self.core_metadata_status = core_metadata_status + if core_metadata_found is not None: + self.core_metadata_found = core_metadata_found + if core_metadata_source is not None: + self.core_metadata_source = core_metadata_source @property - def core_metadata_status(self) -> str: - """Gets the core_metadata_status of this CoreMetadataOutput. + def core_metadata_status(self): + """Gets the core_metadata_status of this CoreMetadataOutput. # noqa: E501 - :return: The core_metadata_status of this CoreMetadataOutput. + :return: The core_metadata_status of this CoreMetadataOutput. # noqa: E501 :rtype: str """ return self._core_metadata_status @core_metadata_status.setter - def core_metadata_status(self, core_metadata_status: str): + def core_metadata_status(self, core_metadata_status): """Sets the core_metadata_status of this CoreMetadataOutput. - :param core_metadata_status: The core_metadata_status of this CoreMetadataOutput. - :type core_metadata_status: str + :param core_metadata_status: The core_metadata_status of this CoreMetadataOutput. # noqa: E501 + :type: str """ allowed_values = ["insufficent metadata", "partial metadata", "all metadata"] if core_metadata_status not in allowed_values: @@ -77,43 +79,87 @@ def core_metadata_status(self, core_metadata_status: str): self._core_metadata_status = core_metadata_status @property - def core_metadata_found(self) -> OutputCoreMetadataFound: - """Gets the core_metadata_found of this CoreMetadataOutput. + def core_metadata_found(self): + """Gets the core_metadata_found of this CoreMetadataOutput. # noqa: E501 - :return: The core_metadata_found of this CoreMetadataOutput. + :return: The core_metadata_found of this CoreMetadataOutput. # noqa: E501 :rtype: OutputCoreMetadataFound """ return self._core_metadata_found @core_metadata_found.setter - def core_metadata_found(self, core_metadata_found: OutputCoreMetadataFound): + def core_metadata_found(self, core_metadata_found): """Sets the core_metadata_found of this CoreMetadataOutput. - :param core_metadata_found: The core_metadata_found of this CoreMetadataOutput. - :type core_metadata_found: OutputCoreMetadataFound + :param core_metadata_found: The core_metadata_found of this CoreMetadataOutput. # noqa: E501 + :type: OutputCoreMetadataFound """ self._core_metadata_found = core_metadata_found @property - def core_metadata_source(self) -> list[str]: - """Gets the core_metadata_source of this CoreMetadataOutput. + def core_metadata_source(self): + """Gets the core_metadata_source of this CoreMetadataOutput. # noqa: E501 - :return: The core_metadata_source of this CoreMetadataOutput. - :rtype: List[str] + :return: The core_metadata_source of this CoreMetadataOutput. # noqa: E501 + :rtype: list[str] """ return self._core_metadata_source @core_metadata_source.setter - def core_metadata_source(self, core_metadata_source: list[str]): + def core_metadata_source(self, core_metadata_source): """Sets the core_metadata_source of this CoreMetadataOutput. - :param core_metadata_source: The core_metadata_source of this CoreMetadataOutput. - :type core_metadata_source: List[str] + :param core_metadata_source: The core_metadata_source of this CoreMetadataOutput. # noqa: E501 + :type: list[str] """ self._core_metadata_source = core_metadata_source + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(CoreMetadataOutput, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CoreMetadataOutput): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/data_access_level.py b/fuji_server/models/data_access_level.py index b2f94fd4..4a9adad1 100644 --- a/fuji_server/models/data_access_level.py +++ b/fuji_server/models/data_access_level.py @@ -1,291 +1,135 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model -from fuji_server.models.data_access_output import DataAccessOutput -from fuji_server.models.debug import Debug -from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class DataAccessLevel(Model): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - def __init__( - self, - id: int | None = None, - metric_identifier: str | None = None, - metric_name: str | None = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, - test_status: str = "fail", - score: FAIRResultCommonScore = None, - maturity: str = "incomplete", - output: DataAccessOutput = None, - test_debug: Debug = None, - ): - """DataAccessLevel - a model defined in Swagger - - :param id: The id of this DataAccessLevel. # noqa: E501 - :type id: int - :param metric_identifier: The metric_identifier of this DataAccessLevel. # noqa: E501 - :type metric_identifier: str - :param metric_name: The metric_name of this DataAccessLevel. # noqa: E501 - :type metric_name: str - :param metric_tests: The metric_tests of this DataAccessLevel. # noqa: E501 - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - :param test_status: The test_status of this DataAccessLevel. # noqa: E501 - :type test_status: str - :param score: The score of this DataAccessLevel. # noqa: E501 - :type score: FAIRResultCommonScore - :param maturity: The maturity of this DataAccessLevel. # noqa: E501 - :type maturity: str - :param output: The output of this DataAccessLevel. # noqa: E501 - :type output: DataAccessOutput - :param test_debug: The test_debug of this DataAccessLevel. # noqa: E501 - :type test_debug: Debug - """ - self.swagger_types = { - "id": int, - "metric_identifier": str, - "metric_name": str, - "metric_tests": dict[str, FAIRResultEvaluationCriterium], - "test_status": str, - "score": FAIRResultCommonScore, - "maturity": str, - "output": DataAccessOutput, - "test_debug": Debug, - } - - self.attribute_map = { - "id": "id", - "metric_identifier": "metric_identifier", - "metric_name": "metric_name", - "metric_tests": "metric_tests", - "test_status": "test_status", - "score": "score", - "maturity": "maturity", - "output": "output", - "test_debug": "test_debug", - } - self._id = id - self._metric_identifier = metric_identifier - self._metric_name = metric_name - self._metric_tests = metric_tests - self._test_status = test_status - self._score = score - self._maturity = maturity - self._output = output - self._test_debug = test_debug - - @classmethod - def from_dict(cls, dikt) -> "DataAccessLevel": - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The DataAccessLevel of this DataAccessLevel. # noqa: E501 - :rtype: DataAccessLevel - """ - return util.deserialize_model(dikt, cls) - - @property - def id(self) -> int: - """Gets the id of this DataAccessLevel. - - - :return: The id of this DataAccessLevel. - :rtype: int - """ - return self._id - - @id.setter - def id(self, id: int): - """Sets the id of this DataAccessLevel. - - - :param id: The id of this DataAccessLevel. - :type id: int - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") - - self._id = id - - @property - def metric_identifier(self) -> str: - """Gets the metric_identifier of this DataAccessLevel. - - - :return: The metric_identifier of this DataAccessLevel. - :rtype: str - """ - return self._metric_identifier - - @metric_identifier.setter - def metric_identifier(self, metric_identifier: str): - """Sets the metric_identifier of this DataAccessLevel. - - - :param metric_identifier: The metric_identifier of this DataAccessLevel. - :type metric_identifier: str - """ - if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") - - self._metric_identifier = metric_identifier - - @property - def metric_name(self) -> str: - """Gets the metric_name of this DataAccessLevel. - - - :return: The metric_name of this DataAccessLevel. - :rtype: str - """ - return self._metric_name - - @metric_name.setter - def metric_name(self, metric_name: str): - """Sets the metric_name of this DataAccessLevel. - - - :param metric_name: The metric_name of this DataAccessLevel. - :type metric_name: str - """ - if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" - self._metric_name = metric_name +import pprint +import re # noqa: F401 - @property - def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: - """Gets the metric_tests of this DataAccessLevel. - - - :return: The metric_tests of this DataAccessLevel. - :rtype: Dict[str, FAIRResultEvaluationCriterium] - """ - return self._metric_tests - - @metric_tests.setter - def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): - """Sets the metric_tests of this DataAccessLevel. - - - :param metric_tests: The metric_tests of this DataAccessLevel. - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - """ - - self._metric_tests = metric_tests - - @property - def test_status(self) -> str: - """Gets the test_status of this DataAccessLevel. - - - :return: The test_status of this DataAccessLevel. - :rtype: str - """ - return self._test_status - - @test_status.setter - def test_status(self, test_status: str): - """Sets the test_status of this DataAccessLevel. - - - :param test_status: The test_status of this DataAccessLevel. - :type test_status: str - """ - allowed_values = ["pass", "fail", "indeterminate"] - if test_status not in allowed_values: - raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") - - self._test_status = test_status - - @property - def score(self) -> FAIRResultCommonScore: - """Gets the score of this DataAccessLevel. +import six +from swagger_client.models.fair_result_common import FAIRResultCommon - :return: The score of this DataAccessLevel. - :rtype: FAIRResultCommonScore - """ - return self._score - - @score.setter - def score(self, score: FAIRResultCommonScore): - """Sets the score of this DataAccessLevel. - - - :param score: The score of this DataAccessLevel. - :type score: FAIRResultCommonScore - """ - if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") - - self._score = score - - @property - def maturity(self) -> str: - """Gets the maturity of this DataAccessLevel. - - - :return: The maturity of this DataAccessLevel. - :rtype: str - """ - return self._maturity - - @maturity.setter - def maturity(self, maturity: int): - """Sets the maturity of this Uniqueness. +class DataAccessLevel(FAIRResultCommon): + """NOTE: This class is auto generated by the swagger code generator program. - :param maturity: The maturity of this Uniqueness. - :type maturity: int - """ + Do not edit the class manually. + """ - self._maturity = maturity + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"output": "DataAccessOutput", "test_debug": "Debug"} + if hasattr(FAIRResultCommon, "swagger_types"): + swagger_types.update(FAIRResultCommon.swagger_types) + + attribute_map = {"output": "output", "test_debug": "test_debug"} + if hasattr(FAIRResultCommon, "attribute_map"): + attribute_map.update(FAIRResultCommon.attribute_map) + + def __init__(self, output=None, test_debug=None, *args, **kwargs): + """DataAccessLevel - a model defined in Swagger""" + self._output = None + self._test_debug = None + self.discriminator = None + if output is not None: + self.output = output + if test_debug is not None: + self.test_debug = test_debug + FAIRResultCommon.__init__(self, *args, **kwargs) @property - def output(self) -> DataAccessOutput: - """Gets the output of this DataAccessLevel. + def output(self): + """Gets the output of this DataAccessLevel. # noqa: E501 - :return: The output of this DataAccessLevel. + :return: The output of this DataAccessLevel. # noqa: E501 :rtype: DataAccessOutput """ return self._output @output.setter - def output(self, output: DataAccessOutput): + def output(self, output): """Sets the output of this DataAccessLevel. - :param output: The output of this DataAccessLevel. - :type output: DataAccessOutput + :param output: The output of this DataAccessLevel. # noqa: E501 + :type: DataAccessOutput """ self._output = output @property - def test_debug(self) -> Debug: - """Gets the test_debug of this DataAccessLevel. + def test_debug(self): + """Gets the test_debug of this DataAccessLevel. # noqa: E501 - :return: The test_debug of this DataAccessLevel. + :return: The test_debug of this DataAccessLevel. # noqa: E501 :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug: Debug): + def test_debug(self, test_debug): """Sets the test_debug of this DataAccessLevel. - :param test_debug: The test_debug of this DataAccessLevel. - :type test_debug: Debug + :param test_debug: The test_debug of this DataAccessLevel. # noqa: E501 + :type: Debug """ self._test_debug = test_debug + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(DataAccessLevel, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DataAccessLevel): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/data_access_output.py b/fuji_server/models/data_access_output.py index 6f133b4e..ccf3a118 100644 --- a/fuji_server/models/data_access_output.py +++ b/fuji_server/models/data_access_output.py @@ -1,55 +1,63 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class DataAccessOutput(Model): + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class DataAccessOutput: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - def __init__(self, access_level: str | None = None, access_details: object = None): - """DataAccessOutput - a model defined in Swagger - - :param access_level: The access_level of this DataAccessOutput. # noqa: E501 - :type access_level: str - :param access_details: The access_details of this DataAccessOutput. # noqa: E501 - :type access_details: object - """ - self.swagger_types = {"access_level": str, "access_details": object} - - self.attribute_map = {"access_level": "access_level", "access_details": "access_details"} - self._access_level = access_level - self._access_details = access_details + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"access_level": "str", "access_details": "object"} - @classmethod - def from_dict(cls, dikt) -> "DataAccessOutput": - """Returns the dict as a model + attribute_map = {"access_level": "access_level", "access_details": "access_details"} - :param dikt: A dict. - :type: dict - :return: The DataAccess_output of this DataAccessOutput. # noqa: E501 - :rtype: DataAccessOutput - """ - return util.deserialize_model(dikt, cls) + def __init__(self, access_level=None, access_details=None): + """DataAccessOutput - a model defined in Swagger""" + self._access_level = None + self._access_details = None + self.discriminator = None + if access_level is not None: + self.access_level = access_level + if access_details is not None: + self.access_details = access_details @property - def access_level(self) -> str: - """Gets the access_level of this DataAccessOutput. + def access_level(self): + """Gets the access_level of this DataAccessOutput. # noqa: E501 - :return: The access_level of this DataAccessOutput. + :return: The access_level of this DataAccessOutput. # noqa: E501 :rtype: str """ return self._access_level @access_level.setter - def access_level(self, access_level: str): + def access_level(self, access_level): """Sets the access_level of this DataAccessOutput. - :param access_level: The access_level of this DataAccessOutput. - :type access_level: str + :param access_level: The access_level of this DataAccessOutput. # noqa: E501 + :type: str """ allowed_values = ["public", "embargoed", "restricted", "closed", "metadataonly"] if access_level not in allowed_values: @@ -58,22 +66,66 @@ def access_level(self, access_level: str): self._access_level = access_level @property - def access_details(self) -> object: - """Gets the access_details of this DataAccessOutput. + def access_details(self): + """Gets the access_details of this DataAccessOutput. # noqa: E501 - :return: The access_details of this DataAccessOutput. + :return: The access_details of this DataAccessOutput. # noqa: E501 :rtype: object """ return self._access_details @access_details.setter - def access_details(self, access_details: object): + def access_details(self, access_details): """Sets the access_details of this DataAccessOutput. - :param access_details: The access_details of this DataAccessOutput. - :type access_details: object + :param access_details: The access_details of this DataAccessOutput. # noqa: E501 + :type: object """ self._access_details = access_details + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(DataAccessOutput, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DataAccessOutput): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/data_content_metadata.py b/fuji_server/models/data_content_metadata.py index 64321e34..c7523e08 100644 --- a/fuji_server/models/data_content_metadata.py +++ b/fuji_server/models/data_content_metadata.py @@ -1,290 +1,135 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model -from fuji_server.models.data_content_metadata_output import DataContentMetadataOutput -from fuji_server.models.debug import Debug -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class DataContentMetadata(Model): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - def __init__( - self, - id: int | None = None, - metric_identifier: str | None = None, - metric_name: str | None = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, - test_status: str = "fail", - score: FAIRResultCommonScore = None, - maturity: str = "incomplete", - output: DataContentMetadataOutput = None, - test_debug: Debug = None, - ): - """DataContentMetadata - a model defined in Swagger - - :param id: The id of this DataContentMetadata. # noqa: E501 - :type id: int - :param metric_identifier: The metric_identifier of this DataContentMetadata. # noqa: E501 - :type metric_identifier: str - :param metric_name: The metric_name of this DataContentMetadata. # noqa: E501 - :type metric_name: str - :param metric_tests: The metric_tests of this DataContentMetadata. # noqa: E501 - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - :param test_status: The test_status of this DataContentMetadata. # noqa: E501 - :type test_status: str - :param score: The score of this DataContentMetadata. # noqa: E501 - :type score: FAIRResultCommonScore - :param maturity: The maturity of this DataContentMetadata. # noqa: E501 - :type maturity: str - :param output: The output of this DataContentMetadata. # noqa: E501 - :type output: DataContentMetadataOutput - :param test_debug: The test_debug of this DataContentMetadata. # noqa: E501 - :type test_debug: Debug - """ - self.swagger_types = { - "id": int, - "metric_identifier": str, - "metric_name": str, - "metric_tests": dict[str, FAIRResultEvaluationCriterium], - "test_status": str, - "score": FAIRResultCommonScore, - "maturity": str, - "output": DataContentMetadataOutput, - "test_debug": Debug, - } - - self.attribute_map = { - "id": "id", - "metric_identifier": "metric_identifier", - "metric_name": "metric_name", - "metric_tests": "metric_tests", - "test_status": "test_status", - "score": "score", - "maturity": "maturity", - "output": "output", - "test_debug": "test_debug", - } - self._id = id - self._metric_identifier = metric_identifier - self._metric_name = metric_name - self._metric_tests = metric_tests - self._test_status = test_status - self._score = score - self._maturity = maturity - self._output = output - self._test_debug = test_debug - - @classmethod - def from_dict(cls, dikt) -> "DataContentMetadata": - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The DataContentMetadata of this DataContentMetadata. # noqa: E501 - :rtype: DataContentMetadata - """ - return util.deserialize_model(dikt, cls) - - @property - def id(self) -> int: - """Gets the id of this DataContentMetadata. - - - :return: The id of this DataContentMetadata. - :rtype: int - """ - return self._id - - @id.setter - def id(self, id: int): - """Sets the id of this DataContentMetadata. - - - :param id: The id of this DataContentMetadata. - :type id: int - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") - - self._id = id - - @property - def metric_identifier(self) -> str: - """Gets the metric_identifier of this DataContentMetadata. - - - :return: The metric_identifier of this DataContentMetadata. - :rtype: str - """ - return self._metric_identifier - - @metric_identifier.setter - def metric_identifier(self, metric_identifier: str): - """Sets the metric_identifier of this DataContentMetadata. - - - :param metric_identifier: The metric_identifier of this DataContentMetadata. - :type metric_identifier: str - """ - if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") - - self._metric_identifier = metric_identifier - - @property - def metric_name(self) -> str: - """Gets the metric_name of this DataContentMetadata. - - - :return: The metric_name of this DataContentMetadata. - :rtype: str - """ - return self._metric_name - - @metric_name.setter - def metric_name(self, metric_name: str): - """Sets the metric_name of this DataContentMetadata. - - - :param metric_name: The metric_name of this DataContentMetadata. - :type metric_name: str - """ - if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" - self._metric_name = metric_name +import pprint +import re # noqa: F401 - @property - def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: - """Gets the metric_tests of this DataContentMetadata. - - - :return: The metric_tests of this DataContentMetadata. - :rtype: Dict[str, FAIRResultEvaluationCriterium] - """ - return self._metric_tests - - @metric_tests.setter - def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): - """Sets the metric_tests of this DataContentMetadata. - - - :param metric_tests: The metric_tests of this DataContentMetadata. - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - """ - - self._metric_tests = metric_tests - - @property - def test_status(self) -> str: - """Gets the test_status of this DataContentMetadata. - - - :return: The test_status of this DataContentMetadata. - :rtype: str - """ - return self._test_status - - @test_status.setter - def test_status(self, test_status: str): - """Sets the test_status of this DataContentMetadata. - - - :param test_status: The test_status of this DataContentMetadata. - :type test_status: str - """ - allowed_values = ["pass", "fail", "indeterminate"] - if test_status not in allowed_values: - raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") - - self._test_status = test_status - - @property - def score(self) -> FAIRResultCommonScore: - """Gets the score of this DataContentMetadata. +import six +from swagger_client.models.fair_result_common import FAIRResultCommon - :return: The score of this DataContentMetadata. - :rtype: FAIRResultCommonScore - """ - return self._score - - @score.setter - def score(self, score: FAIRResultCommonScore): - """Sets the score of this DataContentMetadata. - - - :param score: The score of this DataContentMetadata. - :type score: FAIRResultCommonScore - """ - if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") - - self._score = score - - @property - def maturity(self) -> str: - """Gets the maturity of this DataContentMetadata. - - - :return: The maturity of this DataContentMetadata. - :rtype: str - """ - return self._maturity - - @maturity.setter - def maturity(self, maturity: int): - """Sets the maturity of this Uniqueness. +class DataContentMetadata(FAIRResultCommon): + """NOTE: This class is auto generated by the swagger code generator program. - :param maturity: The maturity of this Uniqueness. - :type maturity: int - """ + Do not edit the class manually. + """ - self._maturity = maturity + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"output": "DataContentMetadataOutput", "test_debug": "Debug"} + if hasattr(FAIRResultCommon, "swagger_types"): + swagger_types.update(FAIRResultCommon.swagger_types) + + attribute_map = {"output": "output", "test_debug": "test_debug"} + if hasattr(FAIRResultCommon, "attribute_map"): + attribute_map.update(FAIRResultCommon.attribute_map) + + def __init__(self, output=None, test_debug=None, *args, **kwargs): + """DataContentMetadata - a model defined in Swagger""" + self._output = None + self._test_debug = None + self.discriminator = None + if output is not None: + self.output = output + if test_debug is not None: + self.test_debug = test_debug + FAIRResultCommon.__init__(self, *args, **kwargs) @property - def output(self) -> DataContentMetadataOutput: - """Gets the output of this DataContentMetadata. + def output(self): + """Gets the output of this DataContentMetadata. # noqa: E501 - :return: The output of this DataContentMetadata. + :return: The output of this DataContentMetadata. # noqa: E501 :rtype: DataContentMetadataOutput """ return self._output @output.setter - def output(self, output: DataContentMetadataOutput): + def output(self, output): """Sets the output of this DataContentMetadata. - :param output: The output of this DataContentMetadata. - :type output: DataContentMetadataOutput + :param output: The output of this DataContentMetadata. # noqa: E501 + :type: DataContentMetadataOutput """ self._output = output @property - def test_debug(self) -> Debug: - """Gets the test_debug of this DataContentMetadata. + def test_debug(self): + """Gets the test_debug of this DataContentMetadata. # noqa: E501 - :return: The test_debug of this DataContentMetadata. + :return: The test_debug of this DataContentMetadata. # noqa: E501 :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug: Debug): + def test_debug(self, test_debug): """Sets the test_debug of this DataContentMetadata. - :param test_debug: The test_debug of this DataContentMetadata. - :type test_debug: Debug + :param test_debug: The test_debug of this DataContentMetadata. # noqa: E501 + :type: Debug """ self._test_debug = test_debug + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(DataContentMetadata, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DataContentMetadata): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/data_content_metadata_output.py b/fuji_server/models/data_content_metadata_output.py index c49e1c87..0e1565c6 100644 --- a/fuji_server/models/data_content_metadata_output.py +++ b/fuji_server/models/data_content_metadata_output.py @@ -1,81 +1,128 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model -from fuji_server.models.data_content_metadata_output_inner import DataContentMetadataOutputInner +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class DataContentMetadataOutput(Model): + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class DataContentMetadataOutput: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - def __init__( - self, - object_type: str | None = None, - data_content_descriptor: list[DataContentMetadataOutputInner] | None = None, - ): - """DataContentMetadataOutput - a model defined in Swagger - - :param object_type: The object_type of this DataContentMetadataOutput. # noqa: E501 - :type object_type: str - :param data_content_descriptor: The data_content_descriptor of this DataContentMetadataOutput. # noqa: E501 - :type data_content_descriptor: List[DataContentMetadataOutputInner] - """ - self.swagger_types = {"object_type": str, "data_content_descriptor": list[DataContentMetadataOutputInner]} - - self.attribute_map = {"object_type": "object_type", "data_content_descriptor": "data_content_descriptor"} - self._object_type = object_type - self._data_content_descriptor = data_content_descriptor + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"object_type": "str", "data_content_descriptor": "list[DataContentMetadataOutputInner]"} - @classmethod - def from_dict(cls, dikt) -> "DataContentMetadataOutput": - """Returns the dict as a model + attribute_map = {"object_type": "object_type", "data_content_descriptor": "data_content_descriptor"} - :param dikt: A dict. - :type: dict - :return: The DataContentMetadata_output of this DataContentMetadataOutput. # noqa: E501 - :rtype: DataContentMetadataOutput - """ - return util.deserialize_model(dikt, cls) + def __init__(self, object_type=None, data_content_descriptor=None): + """DataContentMetadataOutput - a model defined in Swagger""" + self._object_type = None + self._data_content_descriptor = None + self.discriminator = None + if object_type is not None: + self.object_type = object_type + if data_content_descriptor is not None: + self.data_content_descriptor = data_content_descriptor @property - def object_type(self) -> str: - """Gets the object_type of this DataContentMetadataOutput. + def object_type(self): + """Gets the object_type of this DataContentMetadataOutput. # noqa: E501 - :return: The object_type of this DataContentMetadataOutput. + :return: The object_type of this DataContentMetadataOutput. # noqa: E501 :rtype: str """ return self._object_type @object_type.setter - def object_type(self, object_type: str): + def object_type(self, object_type): """Sets the object_type of this DataContentMetadataOutput. - :param object_type: The object_type of this DataContentMetadataOutput. - :type object_type: str + :param object_type: The object_type of this DataContentMetadataOutput. # noqa: E501 + :type: str """ self._object_type = object_type @property - def data_content_descriptor(self) -> list[DataContentMetadataOutputInner]: - """Gets the data_content_descriptor of this DataContentMetadataOutput. + def data_content_descriptor(self): + """Gets the data_content_descriptor of this DataContentMetadataOutput. # noqa: E501 - :return: The data_content_descriptor of this DataContentMetadataOutput. - :rtype: List[DataContentMetadataOutputInner] + :return: The data_content_descriptor of this DataContentMetadataOutput. # noqa: E501 + :rtype: list[DataContentMetadataOutputInner] """ return self._data_content_descriptor @data_content_descriptor.setter - def data_content_descriptor(self, data_content_descriptor: list[DataContentMetadataOutputInner]): + def data_content_descriptor(self, data_content_descriptor): """Sets the data_content_descriptor of this DataContentMetadataOutput. - :param data_content_descriptor: The data_content_descriptor of this DataContentMetadataOutput. - :type data_content_descriptor: List[DataContentMetadataOutputInner] + :param data_content_descriptor: The data_content_descriptor of this DataContentMetadataOutput. # noqa: E501 + :type: list[DataContentMetadataOutputInner] """ self._data_content_descriptor = data_content_descriptor + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(DataContentMetadataOutput, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DataContentMetadataOutput): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/data_content_metadata_output_inner.py b/fuji_server/models/data_content_metadata_output_inner.py index 7ad51ec4..d2da5e60 100644 --- a/fuji_server/models/data_content_metadata_output_inner.py +++ b/fuji_server/models/data_content_metadata_output_inner.py @@ -1,106 +1,156 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class DataContentMetadataOutputInner(Model): - """NOTE: This class is auto generated by the swagger code generator program. + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" - Do not edit the class manually. - """ +import pprint +import re # noqa: F401 - def __init__( - self, descriptor: str | None = None, descriptor_value: str | None = None, matches_content: bool = False - ): - """DataContentMetadataOutputInner - a model defined in Swagger +import six - :param descriptor: The descriptor of this DataContentMetadataOutputInner. # noqa: E501 - :type descriptor: str - :param descriptor_value: The descriptor_value of this DataContentMetadataOutputInner. # noqa: E501 - :type descriptor_value: str - :param matches_content: The matches_content of this DataContentMetadataOutputInner. # noqa: E501 - :type matches_content: bool - """ - self.swagger_types = {"descriptor": str, "descriptor_value": str, "matches_content": bool} - self.attribute_map = { - "descriptor": "descriptor", - "descriptor_value": "descriptor_value", - "matches_content": "matches_content", - } - self._descriptor = descriptor - self._descriptor_value = descriptor_value - self._matches_content = matches_content +class DataContentMetadataOutputInner: + """NOTE: This class is auto generated by the swagger code generator program. - @classmethod - def from_dict(cls, dikt) -> "DataContentMetadataOutputInner": - """Returns the dict as a model + Do not edit the class manually. + """ - :param dikt: A dict. - :type: dict - :return: The DataContentMetadata_output_inner of this DataContentMetadataOutputInner. # noqa: E501 - :rtype: DataContentMetadataOutputInner - """ - return util.deserialize_model(dikt, cls) + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"descriptor": "str", "descriptor_value": "str", "matches_content": "bool"} + + attribute_map = { + "descriptor": "descriptor", + "descriptor_value": "descriptor_value", + "matches_content": "matches_content", + } + + def __init__(self, descriptor=None, descriptor_value=None, matches_content=False): + """DataContentMetadataOutputInner - a model defined in Swagger""" + self._descriptor = None + self._descriptor_value = None + self._matches_content = None + self.discriminator = None + if descriptor is not None: + self.descriptor = descriptor + if descriptor_value is not None: + self.descriptor_value = descriptor_value + if matches_content is not None: + self.matches_content = matches_content @property - def descriptor(self) -> str: - """Gets the descriptor of this DataContentMetadataOutputInner. + def descriptor(self): + """Gets the descriptor of this DataContentMetadataOutputInner. # noqa: E501 - :return: The descriptor of this DataContentMetadataOutputInner. + :return: The descriptor of this DataContentMetadataOutputInner. # noqa: E501 :rtype: str """ return self._descriptor @descriptor.setter - def descriptor(self, descriptor: str): + def descriptor(self, descriptor): """Sets the descriptor of this DataContentMetadataOutputInner. - :param descriptor: The descriptor of this DataContentMetadataOutputInner. - :type descriptor: str + :param descriptor: The descriptor of this DataContentMetadataOutputInner. # noqa: E501 + :type: str """ self._descriptor = descriptor @property - def descriptor_value(self) -> str: - """Gets the descriptor_value of this DataContentMetadataOutputInner. + def descriptor_value(self): + """Gets the descriptor_value of this DataContentMetadataOutputInner. # noqa: E501 - :return: The descriptor_value of this DataContentMetadataOutputInner. + :return: The descriptor_value of this DataContentMetadataOutputInner. # noqa: E501 :rtype: str """ return self._descriptor_value @descriptor_value.setter - def descriptor_value(self, descriptor_value: str): + def descriptor_value(self, descriptor_value): """Sets the descriptor_value of this DataContentMetadataOutputInner. - :param descriptor_value: The descriptor_value of this DataContentMetadataOutputInner. - :type descriptor_value: str + :param descriptor_value: The descriptor_value of this DataContentMetadataOutputInner. # noqa: E501 + :type: str """ self._descriptor_value = descriptor_value @property - def matches_content(self) -> bool: - """Gets the matches_content of this DataContentMetadataOutputInner. + def matches_content(self): + """Gets the matches_content of this DataContentMetadataOutputInner. # noqa: E501 - :return: The matches_content of this DataContentMetadataOutputInner. + :return: The matches_content of this DataContentMetadataOutputInner. # noqa: E501 :rtype: bool """ return self._matches_content @matches_content.setter - def matches_content(self, matches_content: bool): + def matches_content(self, matches_content): """Sets the matches_content of this DataContentMetadataOutputInner. - :param matches_content: The matches_content of this DataContentMetadataOutputInner. - :type matches_content: bool + :param matches_content: The matches_content of this DataContentMetadataOutputInner. # noqa: E501 + :type: bool """ self._matches_content = matches_content + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(DataContentMetadataOutputInner, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DataContentMetadataOutputInner): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/data_file_format.py b/fuji_server/models/data_file_format.py index 63fca363..22037af9 100644 --- a/fuji_server/models/data_file_format.py +++ b/fuji_server/models/data_file_format.py @@ -1,291 +1,135 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model -from fuji_server.models.data_file_format_output import DataFileFormatOutput -from fuji_server.models.debug import Debug -from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class DataFileFormat(Model): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - def __init__( - self, - id: int | None = None, - metric_identifier: str | None = None, - metric_name: str | None = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, - test_status: str = "fail", - score: FAIRResultCommonScore = None, - maturity: str = "incomplete", - output: DataFileFormatOutput = None, - test_debug: Debug = None, - ): - """DataFileFormat - a model defined in Swagger - - :param id: The id of this DataFileFormat. # noqa: E501 - :type id: int - :param metric_identifier: The metric_identifier of this DataFileFormat. # noqa: E501 - :type metric_identifier: str - :param metric_name: The metric_name of this DataFileFormat. # noqa: E501 - :type metric_name: str - :param metric_tests: The metric_tests of this DataFileFormat. # noqa: E501 - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - :param test_status: The test_status of this DataFileFormat. # noqa: E501 - :type test_status: str - :param score: The score of this DataFileFormat. # noqa: E501 - :type score: FAIRResultCommonScore - :param maturity: The maturity of this DataFileFormat. # noqa: E501 - :type maturity: str - :param output: The output of this DataFileFormat. # noqa: E501 - :type output: DataFileFormatOutput - :param test_debug: The test_debug of this DataFileFormat. # noqa: E501 - :type test_debug: Debug - """ - self.swagger_types = { - "id": int, - "metric_identifier": str, - "metric_name": str, - "metric_tests": dict[str, FAIRResultEvaluationCriterium], - "test_status": str, - "score": FAIRResultCommonScore, - "maturity": str, - "output": DataFileFormatOutput, - "test_debug": Debug, - } - - self.attribute_map = { - "id": "id", - "metric_identifier": "metric_identifier", - "metric_name": "metric_name", - "metric_tests": "metric_tests", - "test_status": "test_status", - "score": "score", - "maturity": "maturity", - "output": "output", - "test_debug": "test_debug", - } - self._id = id - self._metric_identifier = metric_identifier - self._metric_name = metric_name - self._metric_tests = metric_tests - self._test_status = test_status - self._score = score - self._maturity = maturity - self._output = output - self._test_debug = test_debug - - @classmethod - def from_dict(cls, dikt) -> "DataFileFormat": - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The DataFileFormat of this DataFileFormat. # noqa: E501 - :rtype: DataFileFormat - """ - return util.deserialize_model(dikt, cls) - - @property - def id(self) -> int: - """Gets the id of this DataFileFormat. - - - :return: The id of this DataFileFormat. - :rtype: int - """ - return self._id - - @id.setter - def id(self, id: int): - """Sets the id of this DataFileFormat. - - - :param id: The id of this DataFileFormat. - :type id: int - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") - - self._id = id - - @property - def metric_identifier(self) -> str: - """Gets the metric_identifier of this DataFileFormat. - - - :return: The metric_identifier of this DataFileFormat. - :rtype: str - """ - return self._metric_identifier - - @metric_identifier.setter - def metric_identifier(self, metric_identifier: str): - """Sets the metric_identifier of this DataFileFormat. - - - :param metric_identifier: The metric_identifier of this DataFileFormat. - :type metric_identifier: str - """ - if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") - - self._metric_identifier = metric_identifier - - @property - def metric_name(self) -> str: - """Gets the metric_name of this DataFileFormat. - - - :return: The metric_name of this DataFileFormat. - :rtype: str - """ - return self._metric_name - - @metric_name.setter - def metric_name(self, metric_name: str): - """Sets the metric_name of this DataFileFormat. - - - :param metric_name: The metric_name of this DataFileFormat. - :type metric_name: str - """ - if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" - self._metric_name = metric_name +import pprint +import re # noqa: F401 - @property - def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: - """Gets the metric_tests of this DataFileFormat. - - - :return: The metric_tests of this DataFileFormat. - :rtype: Dict[str, FAIRResultEvaluationCriterium] - """ - return self._metric_tests - - @metric_tests.setter - def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): - """Sets the metric_tests of this DataFileFormat. - - - :param metric_tests: The metric_tests of this DataFileFormat. - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - """ - - self._metric_tests = metric_tests - - @property - def test_status(self) -> str: - """Gets the test_status of this DataFileFormat. - - - :return: The test_status of this DataFileFormat. - :rtype: str - """ - return self._test_status - - @test_status.setter - def test_status(self, test_status: str): - """Sets the test_status of this DataFileFormat. - - - :param test_status: The test_status of this DataFileFormat. - :type test_status: str - """ - allowed_values = ["pass", "fail", "indeterminate"] - if test_status not in allowed_values: - raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") - - self._test_status = test_status - - @property - def score(self) -> FAIRResultCommonScore: - """Gets the score of this DataFileFormat. +import six +from swagger_client.models.fair_result_common import FAIRResultCommon - :return: The score of this DataFileFormat. - :rtype: FAIRResultCommonScore - """ - return self._score - - @score.setter - def score(self, score: FAIRResultCommonScore): - """Sets the score of this DataFileFormat. - - - :param score: The score of this DataFileFormat. - :type score: FAIRResultCommonScore - """ - if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") - - self._score = score - - @property - def maturity(self) -> str: - """Gets the maturity of this DataFileFormat. - - - :return: The maturity of this DataFileFormat. - :rtype: str - """ - return self._maturity - - @maturity.setter - def maturity(self, maturity: int): - """Sets the maturity of this Uniqueness. +class DataFileFormat(FAIRResultCommon): + """NOTE: This class is auto generated by the swagger code generator program. - :param maturity: The maturity of this Uniqueness. - :type maturity: int - """ + Do not edit the class manually. + """ - self._maturity = maturity + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"output": "DataFileFormatOutput", "test_debug": "Debug"} + if hasattr(FAIRResultCommon, "swagger_types"): + swagger_types.update(FAIRResultCommon.swagger_types) + + attribute_map = {"output": "output", "test_debug": "test_debug"} + if hasattr(FAIRResultCommon, "attribute_map"): + attribute_map.update(FAIRResultCommon.attribute_map) + + def __init__(self, output=None, test_debug=None, *args, **kwargs): + """DataFileFormat - a model defined in Swagger""" + self._output = None + self._test_debug = None + self.discriminator = None + if output is not None: + self.output = output + if test_debug is not None: + self.test_debug = test_debug + FAIRResultCommon.__init__(self, *args, **kwargs) @property - def output(self) -> DataFileFormatOutput: - """Gets the output of this DataFileFormat. + def output(self): + """Gets the output of this DataFileFormat. # noqa: E501 - :return: The output of this DataFileFormat. + :return: The output of this DataFileFormat. # noqa: E501 :rtype: DataFileFormatOutput """ return self._output @output.setter - def output(self, output: DataFileFormatOutput): + def output(self, output): """Sets the output of this DataFileFormat. - :param output: The output of this DataFileFormat. - :type output: DataFileFormatOutput + :param output: The output of this DataFileFormat. # noqa: E501 + :type: DataFileFormatOutput """ self._output = output @property - def test_debug(self) -> Debug: - """Gets the test_debug of this DataFileFormat. + def test_debug(self): + """Gets the test_debug of this DataFileFormat. # noqa: E501 - :return: The test_debug of this DataFileFormat. + :return: The test_debug of this DataFileFormat. # noqa: E501 :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug: Debug): + def test_debug(self, test_debug): """Sets the test_debug of this DataFileFormat. - :param test_debug: The test_debug of this DataFileFormat. - :type test_debug: Debug + :param test_debug: The test_debug of this DataFileFormat. # noqa: E501 + :type: Debug """ self._test_debug = test_debug + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(DataFileFormat, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DataFileFormat): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/data_file_format_output.py b/fuji_server/models/data_file_format_output.py index bf6010b8..82a81e54 100644 --- a/fuji_server/models/data_file_format_output.py +++ b/fuji_server/models/data_file_format_output.py @@ -1,27 +1,80 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model -from fuji_server.models.data_file_format_output_inner import DataFileFormatOutputInner # noqa: F401 +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class DataFileFormatOutput(Model): + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class DataFileFormatOutput: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {} + + attribute_map = {} + def __init__(self): """DataFileFormatOutput - a model defined in Swagger""" - self.swagger_types = {} + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(DataFileFormatOutput, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() - self.attribute_map = {} + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DataFileFormatOutput): + return False - @classmethod - def from_dict(cls, dikt) -> "DataFileFormatOutput": - """Returns the dict as a model + return self.__dict__ == other.__dict__ - :param dikt: A dict. - :type: dict - :return: The DataFileFormat_output of this DataFileFormatOutput. # noqa: E501 - :rtype: DataFileFormatOutput - """ - return util.deserialize_model(dikt, cls) + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/data_file_format_output_inner.py b/fuji_server/models/data_file_format_output_inner.py index 7a714917..4f8faf30 100644 --- a/fuji_server/models/data_file_format_output_inner.py +++ b/fuji_server/models/data_file_format_output_inner.py @@ -1,167 +1,214 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class DataFileFormatOutputInner(Model): + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class DataFileFormatOutputInner: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + "file_uri": "str", + "mime_type": "str", + "is_preferred_format": "bool", + "preference_reason": "list[str]", + "subject_areas": "list[str]", + } + + attribute_map = { + "file_uri": "file_uri", + "mime_type": "mime_type", + "is_preferred_format": "is_preferred_format", + "preference_reason": "preference_reason", + "subject_areas": "subject_areas", + } + def __init__( - self, - file_uri: str | None = None, - mime_type: str | None = None, - is_preferred_format: bool = False, - preference_reason: list[str] | None = None, - subject_areas: list[str] | None = None, + self, file_uri=None, mime_type=None, is_preferred_format=False, preference_reason=None, subject_areas=None ): - """DataFileFormatOutputInner - a model defined in Swagger - - :param file_uri: The file_uri of this DataFileFormatOutputInner. # noqa: E501 - :type file_uri: str - :param mime_type: The mime_type of this DataFileFormatOutputInner. # noqa: E501 - :type mime_type: str - :param is_preferred_format: The is_preferred_format of this DataFileFormatOutputInner. # noqa: E501 - :type is_preferred_format: bool - :param preference_reason: The preference_reason of this DataFileFormatOutputInner. # noqa: E501 - :type preference_reason: List[str] - :param subject_areas: The subject_areas of this DataFileFormatOutputInner. # noqa: E501 - :type subject_areas: List[str] - """ - self.swagger_types = { - "file_uri": str, - "mime_type": str, - "is_preferred_format": bool, - "preference_reason": list[str], - "subject_areas": list[str], - } - - self.attribute_map = { - "file_uri": "file_uri", - "mime_type": "mime_type", - "is_preferred_format": "is_preferred_format", - "preference_reason": "preference_reason", - "subject_areas": "subject_areas", - } - self._file_uri = file_uri - self._mime_type = mime_type - self._is_preferred_format = is_preferred_format - self._preference_reason = preference_reason - self._subject_areas = subject_areas - - @classmethod - def from_dict(cls, dikt) -> "DataFileFormatOutputInner": - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The DataFileFormat_output_inner of this DataFileFormatOutputInner. # noqa: E501 - :rtype: DataFileFormatOutputInner - """ - return util.deserialize_model(dikt, cls) + """DataFileFormatOutputInner - a model defined in Swagger""" + self._file_uri = None + self._mime_type = None + self._is_preferred_format = None + self._preference_reason = None + self._subject_areas = None + self.discriminator = None + if file_uri is not None: + self.file_uri = file_uri + if mime_type is not None: + self.mime_type = mime_type + if is_preferred_format is not None: + self.is_preferred_format = is_preferred_format + if preference_reason is not None: + self.preference_reason = preference_reason + if subject_areas is not None: + self.subject_areas = subject_areas @property - def file_uri(self) -> str: - """Gets the file_uri of this DataFileFormatOutputInner. + def file_uri(self): + """Gets the file_uri of this DataFileFormatOutputInner. # noqa: E501 - :return: The file_uri of this DataFileFormatOutputInner. + :return: The file_uri of this DataFileFormatOutputInner. # noqa: E501 :rtype: str """ return self._file_uri @file_uri.setter - def file_uri(self, file_uri: str): + def file_uri(self, file_uri): """Sets the file_uri of this DataFileFormatOutputInner. - :param file_uri: The file_uri of this DataFileFormatOutputInner. - :type file_uri: str + :param file_uri: The file_uri of this DataFileFormatOutputInner. # noqa: E501 + :type: str """ self._file_uri = file_uri @property - def mime_type(self) -> str: - """Gets the mime_type of this DataFileFormatOutputInner. + def mime_type(self): + """Gets the mime_type of this DataFileFormatOutputInner. # noqa: E501 - :return: The mime_type of this DataFileFormatOutputInner. + :return: The mime_type of this DataFileFormatOutputInner. # noqa: E501 :rtype: str """ return self._mime_type @mime_type.setter - def mime_type(self, mime_type: str): + def mime_type(self, mime_type): """Sets the mime_type of this DataFileFormatOutputInner. - :param mime_type: The mime_type of this DataFileFormatOutputInner. - :type mime_type: str + :param mime_type: The mime_type of this DataFileFormatOutputInner. # noqa: E501 + :type: str """ self._mime_type = mime_type @property - def is_preferred_format(self) -> bool: - """Gets the is_preferred_format of this DataFileFormatOutputInner. + def is_preferred_format(self): + """Gets the is_preferred_format of this DataFileFormatOutputInner. # noqa: E501 - :return: The is_preferred_format of this DataFileFormatOutputInner. + :return: The is_preferred_format of this DataFileFormatOutputInner. # noqa: E501 :rtype: bool """ return self._is_preferred_format @is_preferred_format.setter - def is_preferred_format(self, is_preferred_format: bool): + def is_preferred_format(self, is_preferred_format): """Sets the is_preferred_format of this DataFileFormatOutputInner. - :param is_preferred_format: The is_preferred_format of this DataFileFormatOutputInner. - :type is_preferred_format: bool + :param is_preferred_format: The is_preferred_format of this DataFileFormatOutputInner. # noqa: E501 + :type: bool """ self._is_preferred_format = is_preferred_format @property - def preference_reason(self) -> list[str]: - """Gets the preference_reason of this DataFileFormatOutputInner. + def preference_reason(self): + """Gets the preference_reason of this DataFileFormatOutputInner. # noqa: E501 - :return: The preference_reason of this DataFileFormatOutputInner. - :rtype: List[str] + :return: The preference_reason of this DataFileFormatOutputInner. # noqa: E501 + :rtype: list[str] """ return self._preference_reason @preference_reason.setter - def preference_reason(self, preference_reason: list[str]): + def preference_reason(self, preference_reason): """Sets the preference_reason of this DataFileFormatOutputInner. - :param preference_reason: The preference_reason of this DataFileFormatOutputInner. - :type preference_reason: List[str] + :param preference_reason: The preference_reason of this DataFileFormatOutputInner. # noqa: E501 + :type: list[str] """ self._preference_reason = preference_reason @property - def subject_areas(self) -> list[str]: - """Gets the subject_areas of this DataFileFormatOutputInner. + def subject_areas(self): + """Gets the subject_areas of this DataFileFormatOutputInner. # noqa: E501 - :return: The subject_areas of this DataFileFormatOutputInner. - :rtype: List[str] + :return: The subject_areas of this DataFileFormatOutputInner. # noqa: E501 + :rtype: list[str] """ return self._subject_areas @subject_areas.setter - def subject_areas(self, subject_areas: list[str]): + def subject_areas(self, subject_areas): """Sets the subject_areas of this DataFileFormatOutputInner. - :param subject_areas: The subject_areas of this DataFileFormatOutputInner. - :type subject_areas: List[str] + :param subject_areas: The subject_areas of this DataFileFormatOutputInner. # noqa: E501 + :type: list[str] """ self._subject_areas = subject_areas + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(DataFileFormatOutputInner, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DataFileFormatOutputInner): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/data_provenance.py b/fuji_server/models/data_provenance.py index 2919542e..1e14e7ba 100644 --- a/fuji_server/models/data_provenance.py +++ b/fuji_server/models/data_provenance.py @@ -1,291 +1,135 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model -from fuji_server.models.data_provenance_output import DataProvenanceOutput -from fuji_server.models.debug import Debug -from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class DataProvenance(Model): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - def __init__( - self, - id: int | None = None, - metric_identifier: str | None = None, - metric_name: str | None = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, - test_status: str = "fail", - score: FAIRResultCommonScore = None, - maturity: str = "incomplete", - output: DataProvenanceOutput = None, - test_debug: Debug = None, - ): - """DataProvenance - a model defined in Swagger - - :param id: The id of this DataProvenance. # noqa: E501 - :type id: int - :param metric_identifier: The metric_identifier of this DataProvenance. # noqa: E501 - :type metric_identifier: str - :param metric_name: The metric_name of this DataProvenance. # noqa: E501 - :type metric_name: str - :param metric_tests: The metric_tests of this DataProvenance. # noqa: E501 - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - :param test_status: The test_status of this DataProvenance. # noqa: E501 - :type test_status: str - :param score: The score of this DataProvenance. # noqa: E501 - :type score: FAIRResultCommonScore - :param maturity: The maturity of this DataProvenance. # noqa: E501 - :type maturity: str - :param output: The output of this DataProvenance. # noqa: E501 - :type output: DataProvenanceOutput - :param test_debug: The test_debug of this DataProvenance. # noqa: E501 - :type test_debug: Debug - """ - self.swagger_types = { - "id": int, - "metric_identifier": str, - "metric_name": str, - "metric_tests": dict[str, FAIRResultEvaluationCriterium], - "test_status": str, - "score": FAIRResultCommonScore, - "maturity": str, - "output": DataProvenanceOutput, - "test_debug": Debug, - } - - self.attribute_map = { - "id": "id", - "metric_identifier": "metric_identifier", - "metric_name": "metric_name", - "metric_tests": "metric_tests", - "test_status": "test_status", - "score": "score", - "maturity": "maturity", - "output": "output", - "test_debug": "test_debug", - } - self._id = id - self._metric_identifier = metric_identifier - self._metric_name = metric_name - self._metric_tests = metric_tests - self._test_status = test_status - self._score = score - self._maturity = maturity - self._output = output - self._test_debug = test_debug - - @classmethod - def from_dict(cls, dikt) -> "DataProvenance": - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The DataProvenance of this DataProvenance. # noqa: E501 - :rtype: DataProvenance - """ - return util.deserialize_model(dikt, cls) - - @property - def id(self) -> int: - """Gets the id of this DataProvenance. - - - :return: The id of this DataProvenance. - :rtype: int - """ - return self._id - - @id.setter - def id(self, id: int): - """Sets the id of this DataProvenance. - - - :param id: The id of this DataProvenance. - :type id: int - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") - - self._id = id - - @property - def metric_identifier(self) -> str: - """Gets the metric_identifier of this DataProvenance. - - - :return: The metric_identifier of this DataProvenance. - :rtype: str - """ - return self._metric_identifier - - @metric_identifier.setter - def metric_identifier(self, metric_identifier: str): - """Sets the metric_identifier of this DataProvenance. - - - :param metric_identifier: The metric_identifier of this DataProvenance. - :type metric_identifier: str - """ - if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") - - self._metric_identifier = metric_identifier - - @property - def metric_name(self) -> str: - """Gets the metric_name of this DataProvenance. - - - :return: The metric_name of this DataProvenance. - :rtype: str - """ - return self._metric_name - - @metric_name.setter - def metric_name(self, metric_name: str): - """Sets the metric_name of this DataProvenance. - - - :param metric_name: The metric_name of this DataProvenance. - :type metric_name: str - """ - if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" - self._metric_name = metric_name +import pprint +import re # noqa: F401 - @property - def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: - """Gets the metric_tests of this DataProvenance. - - - :return: The metric_tests of this DataProvenance. - :rtype: Dict[str, FAIRResultEvaluationCriterium] - """ - return self._metric_tests - - @metric_tests.setter - def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): - """Sets the metric_tests of this DataProvenance. - - - :param metric_tests: The metric_tests of this DataProvenance. - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - """ - - self._metric_tests = metric_tests - - @property - def test_status(self) -> str: - """Gets the test_status of this DataProvenance. - - - :return: The test_status of this DataProvenance. - :rtype: str - """ - return self._test_status - - @test_status.setter - def test_status(self, test_status: str): - """Sets the test_status of this DataProvenance. - - - :param test_status: The test_status of this DataProvenance. - :type test_status: str - """ - allowed_values = ["pass", "fail", "indeterminate"] - if test_status not in allowed_values: - raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") - - self._test_status = test_status - - @property - def score(self) -> FAIRResultCommonScore: - """Gets the score of this DataProvenance. +import six +from swagger_client.models.fair_result_common import FAIRResultCommon - :return: The score of this DataProvenance. - :rtype: FAIRResultCommonScore - """ - return self._score - - @score.setter - def score(self, score: FAIRResultCommonScore): - """Sets the score of this DataProvenance. - - - :param score: The score of this DataProvenance. - :type score: FAIRResultCommonScore - """ - if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") - - self._score = score - - @property - def maturity(self) -> str: - """Gets the maturity of this DataProvenance. - - - :return: The maturity of this DataProvenance. - :rtype: str - """ - return self._maturity - - @maturity.setter - def maturity(self, maturity: int): - """Sets the maturity of this Uniqueness. +class DataProvenance(FAIRResultCommon): + """NOTE: This class is auto generated by the swagger code generator program. - :param maturity: The maturity of this Uniqueness. - :type maturity: int - """ + Do not edit the class manually. + """ - self._maturity = maturity + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"output": "DataProvenanceOutput", "test_debug": "Debug"} + if hasattr(FAIRResultCommon, "swagger_types"): + swagger_types.update(FAIRResultCommon.swagger_types) + + attribute_map = {"output": "output", "test_debug": "test_debug"} + if hasattr(FAIRResultCommon, "attribute_map"): + attribute_map.update(FAIRResultCommon.attribute_map) + + def __init__(self, output=None, test_debug=None, *args, **kwargs): + """DataProvenance - a model defined in Swagger""" + self._output = None + self._test_debug = None + self.discriminator = None + if output is not None: + self.output = output + if test_debug is not None: + self.test_debug = test_debug + FAIRResultCommon.__init__(self, *args, **kwargs) @property - def output(self) -> DataProvenanceOutput: - """Gets the output of this DataProvenance. + def output(self): + """Gets the output of this DataProvenance. # noqa: E501 - :return: The output of this DataProvenance. + :return: The output of this DataProvenance. # noqa: E501 :rtype: DataProvenanceOutput """ return self._output @output.setter - def output(self, output: DataProvenanceOutput): + def output(self, output): """Sets the output of this DataProvenance. - :param output: The output of this DataProvenance. - :type output: DataProvenanceOutput + :param output: The output of this DataProvenance. # noqa: E501 + :type: DataProvenanceOutput """ self._output = output @property - def test_debug(self) -> Debug: - """Gets the test_debug of this DataProvenance. + def test_debug(self): + """Gets the test_debug of this DataProvenance. # noqa: E501 - :return: The test_debug of this DataProvenance. + :return: The test_debug of this DataProvenance. # noqa: E501 :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug: Debug): + def test_debug(self, test_debug): """Sets the test_debug of this DataProvenance. - :param test_debug: The test_debug of this DataProvenance. - :type test_debug: Debug + :param test_debug: The test_debug of this DataProvenance. # noqa: E501 + :type: Debug """ self._test_debug = test_debug + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(DataProvenance, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DataProvenance): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/data_provenance_output.py b/fuji_server/models/data_provenance_output.py index e4715d99..24f6a809 100644 --- a/fuji_server/models/data_provenance_output.py +++ b/fuji_server/models/data_provenance_output.py @@ -1,87 +1,134 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model -from fuji_server.models.data_provenance_output_inner import DataProvenanceOutputInner +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class DataProvenanceOutput(Model): - """NOTE: This class is auto generated by the swagger code generator program. + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" - Do not edit the class manually. - """ +import pprint +import re # noqa: F401 - def __init__( - self, - provenance_metadata_included: DataProvenanceOutputInner = None, - structured_provenance_available: DataProvenanceOutputInner = None, - ): - """DataProvenanceOutput - a model defined in Swagger +import six - :param provenance_metadata_included: The provenance_metadata_included of this DataProvenanceOutput. # noqa: E501 - :type provenance_metadata_included: DataProvenanceOutputInner - :param structured_provenance_available: The structured_provenance_available of this DataProvenanceOutput. # noqa: E501 - :type structured_provenance_available: DataProvenanceOutputInner - """ - self.swagger_types = { - "provenance_metadata_included": DataProvenanceOutputInner, - "structured_provenance_available": DataProvenanceOutputInner, - } - - self.attribute_map = { - "provenance_metadata_included": "provenance_metadata_included", - "structured_provenance_available": "structured_provenance_available", - } - self._provenance_metadata_included = provenance_metadata_included - self._structured_provenance_available = structured_provenance_available - @classmethod - def from_dict(cls, dikt) -> "DataProvenanceOutput": - """Returns the dict as a model +class DataProvenanceOutput: + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ - :param dikt: A dict. - :type: dict - :return: The DataProvenance_output of this DataProvenanceOutput. # noqa: E501 - :rtype: DataProvenanceOutput - """ - return util.deserialize_model(dikt, cls) + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + "provenance_metadata_included": "DataProvenanceOutputInner", + "structured_provenance_available": "DataProvenanceOutputInner", + } + + attribute_map = { + "provenance_metadata_included": "provenance_metadata_included", + "structured_provenance_available": "structured_provenance_available", + } + + def __init__(self, provenance_metadata_included=None, structured_provenance_available=None): + """DataProvenanceOutput - a model defined in Swagger""" + self._provenance_metadata_included = None + self._structured_provenance_available = None + self.discriminator = None + if provenance_metadata_included is not None: + self.provenance_metadata_included = provenance_metadata_included + if structured_provenance_available is not None: + self.structured_provenance_available = structured_provenance_available @property - def provenance_metadata_included(self) -> DataProvenanceOutputInner: - """Gets the provenance_metadata_included of this DataProvenanceOutput. + def provenance_metadata_included(self): + """Gets the provenance_metadata_included of this DataProvenanceOutput. # noqa: E501 - :return: The provenance_metadata_included of this DataProvenanceOutput. + :return: The provenance_metadata_included of this DataProvenanceOutput. # noqa: E501 :rtype: DataProvenanceOutputInner """ return self._provenance_metadata_included @provenance_metadata_included.setter - def provenance_metadata_included(self, provenance_metadata_included: DataProvenanceOutputInner): + def provenance_metadata_included(self, provenance_metadata_included): """Sets the provenance_metadata_included of this DataProvenanceOutput. - :param provenance_metadata_included: The provenance_metadata_included of this DataProvenanceOutput. - :type provenance_metadata_included: DataProvenanceOutputInner + :param provenance_metadata_included: The provenance_metadata_included of this DataProvenanceOutput. # noqa: E501 + :type: DataProvenanceOutputInner """ self._provenance_metadata_included = provenance_metadata_included @property - def structured_provenance_available(self) -> DataProvenanceOutputInner: - """Gets the structured_provenance_available of this DataProvenanceOutput. + def structured_provenance_available(self): + """Gets the structured_provenance_available of this DataProvenanceOutput. # noqa: E501 - :return: The structured_provenance_available of this DataProvenanceOutput. + :return: The structured_provenance_available of this DataProvenanceOutput. # noqa: E501 :rtype: DataProvenanceOutputInner """ return self._structured_provenance_available @structured_provenance_available.setter - def structured_provenance_available(self, structured_provenance_available: DataProvenanceOutputInner): + def structured_provenance_available(self, structured_provenance_available): """Sets the structured_provenance_available of this DataProvenanceOutput. - :param structured_provenance_available: The structured_provenance_available of this DataProvenanceOutput. - :type structured_provenance_available: DataProvenanceOutputInner + :param structured_provenance_available: The structured_provenance_available of this DataProvenanceOutput. # noqa: E501 + :type: DataProvenanceOutputInner """ self._structured_provenance_available = structured_provenance_available + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(DataProvenanceOutput, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DataProvenanceOutput): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/data_provenance_output_inner.py b/fuji_server/models/data_provenance_output_inner.py index 62e89b52..b4cfa63a 100644 --- a/fuji_server/models/data_provenance_output_inner.py +++ b/fuji_server/models/data_provenance_output_inner.py @@ -1,76 +1,128 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class DataProvenanceOutputInner(Model): + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class DataProvenanceOutputInner: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - def __init__(self, is_available: bool = True, provenance_metadata: list[dict[str, str]] | None = None): - """DataProvenanceOutputInner - a model defined in Swagger - - :param is_available: The is_available of this DataProvenanceOutputInner. # noqa: E501 - :type is_available: bool - :param provenance_metadata: The provenance_metadata of this DataProvenanceOutputInner. # noqa: E501 - :type provenance_metadata: List[Dict[str, str]] - """ - self.swagger_types = {"is_available": bool, "provenance_metadata": list[dict[str, str]]} - - self.attribute_map = {"is_available": "is_available", "provenance_metadata": "provenance_metadata"} - self._is_available = is_available - self._provenance_metadata = provenance_metadata + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"is_available": "bool", "provenance_metadata": "list[dict(str, str)]"} - @classmethod - def from_dict(cls, dikt) -> "DataProvenanceOutputInner": - """Returns the dict as a model + attribute_map = {"is_available": "is_available", "provenance_metadata": "provenance_metadata"} - :param dikt: A dict. - :type: dict - :return: The DataProvenance_output_inner of this DataProvenanceOutputInner. # noqa: E501 - :rtype: DataProvenanceOutputInner - """ - return util.deserialize_model(dikt, cls) + def __init__(self, is_available=True, provenance_metadata=None): + """DataProvenanceOutputInner - a model defined in Swagger""" + self._is_available = None + self._provenance_metadata = None + self.discriminator = None + if is_available is not None: + self.is_available = is_available + if provenance_metadata is not None: + self.provenance_metadata = provenance_metadata @property - def is_available(self) -> bool: - """Gets the is_available of this DataProvenanceOutputInner. + def is_available(self): + """Gets the is_available of this DataProvenanceOutputInner. # noqa: E501 - :return: The is_available of this DataProvenanceOutputInner. + :return: The is_available of this DataProvenanceOutputInner. # noqa: E501 :rtype: bool """ return self._is_available @is_available.setter - def is_available(self, is_available: bool): + def is_available(self, is_available): """Sets the is_available of this DataProvenanceOutputInner. - :param is_available: The is_available of this DataProvenanceOutputInner. - :type is_available: bool + :param is_available: The is_available of this DataProvenanceOutputInner. # noqa: E501 + :type: bool """ self._is_available = is_available @property - def provenance_metadata(self) -> list[dict[str, str]]: - """Gets the provenance_metadata of this DataProvenanceOutputInner. + def provenance_metadata(self): + """Gets the provenance_metadata of this DataProvenanceOutputInner. # noqa: E501 - :return: The provenance_metadata of this DataProvenanceOutputInner. - :rtype: List[Dict[str, str]] + :return: The provenance_metadata of this DataProvenanceOutputInner. # noqa: E501 + :rtype: list[dict(str, str)] """ return self._provenance_metadata @provenance_metadata.setter - def provenance_metadata(self, provenance_metadata: list[dict[str, str]]): + def provenance_metadata(self, provenance_metadata): """Sets the provenance_metadata of this DataProvenanceOutputInner. - :param provenance_metadata: The provenance_metadata of this DataProvenanceOutputInner. - :type provenance_metadata: List[Dict[str, str]] + :param provenance_metadata: The provenance_metadata of this DataProvenanceOutputInner. # noqa: E501 + :type: list[dict(str, str)] """ self._provenance_metadata = provenance_metadata + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(DataProvenanceOutputInner, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DataProvenanceOutputInner): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/debug.py b/fuji_server/models/debug.py index 0a59bb4c..7203f961 100644 --- a/fuji_server/models/debug.py +++ b/fuji_server/models/debug.py @@ -1,26 +1,80 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class Debug(Model): + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class Debug: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {} + + attribute_map = {} + def __init__(self): """Debug - a model defined in Swagger""" - self.swagger_types = {} + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(Debug, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() - self.attribute_map = {} + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Debug): + return False - @classmethod - def from_dict(cls, dikt) -> "Debug": - """Returns the dict as a model + return self.__dict__ == other.__dict__ - :param dikt: A dict. - :type: dict - :return: The Debug of this Debug. # noqa: E501 - :rtype: Debug - """ - return util.deserialize_model(dikt, cls) + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/fair_result_common.py b/fuji_server/models/fair_result_common.py index da9439e5..a1c4fca2 100644 --- a/fuji_server/models/fair_result_common.py +++ b/fuji_server/models/fair_result_common.py @@ -1,97 +1,98 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class FAIRResultCommon(Model): + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class FAIRResultCommon: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + "id": "int", + "metric_identifier": "str", + "metric_name": "str", + "metric_tests": "dict(str, FAIRResultEvaluationCriterium)", + "test_status": "str", + "score": "FAIRResultCommonScore", + "maturity": "int", + } + + attribute_map = { + "id": "id", + "metric_identifier": "metric_identifier", + "metric_name": "metric_name", + "metric_tests": "metric_tests", + "test_status": "test_status", + "score": "score", + "maturity": "maturity", + } + def __init__( self, - id: int | None = None, - metric_identifier: str | None = None, - metric_name: str | None = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, - test_status: str = "fail", - score: FAIRResultCommonScore = None, - maturity: int = 0, + id=None, + metric_identifier=None, + metric_name=None, + metric_tests=None, + test_status="fail", + score=None, + maturity=0, ): - """FAIRResultCommon - a model defined in Swagger - - :param id: The id of this FAIRResultCommon. # noqa: E501 - :type id: int - :param metric_identifier: The metric_identifier of this FAIRResultCommon. # noqa: E501 - :type metric_identifier: str - :param metric_name: The metric_name of this FAIRResultCommon. # noqa: E501 - :type metric_name: str - :param metric_tests: The metric_tests of this FAIRResultCommon. # noqa: E501 - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - :param test_status: The test_status of this FAIRResultCommon. # noqa: E501 - :type test_status: str - :param score: The score of this FAIRResultCommon. # noqa: E501 - :type score: FAIRResultCommonScore - :param maturity: The maturity of this FAIRResultCommon. # noqa: E501 - :type maturity: int - """ - self.swagger_types = { - "id": int, - "metric_identifier": str, - "metric_name": str, - "metric_tests": dict[str, FAIRResultEvaluationCriterium], - "test_status": str, - "score": FAIRResultCommonScore, - "maturity": int, - } - - self.attribute_map = { - "id": "id", - "metric_identifier": "metric_identifier", - "metric_name": "metric_name", - "metric_tests": "metric_tests", - "test_status": "test_status", - "score": "score", - "maturity": "maturity", - } - self._id = id - self._metric_identifier = metric_identifier - self._metric_name = metric_name - self._metric_tests = metric_tests - self._test_status = test_status - self._score = score - self._maturity = maturity - - @classmethod - def from_dict(cls, dikt) -> "FAIRResultCommon": - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The FAIRResultCommon of this FAIRResultCommon. # noqa: E501 - :rtype: FAIRResultCommon - """ - return util.deserialize_model(dikt, cls) + """FAIRResultCommon - a model defined in Swagger""" + self._id = None + self._metric_identifier = None + self._metric_name = None + self._metric_tests = None + self._test_status = None + self._score = None + self._maturity = None + self.discriminator = None + self.id = id + self.metric_identifier = metric_identifier + self.metric_name = metric_name + if metric_tests is not None: + self.metric_tests = metric_tests + self.test_status = test_status + self.score = score + if maturity is not None: + self.maturity = maturity @property - def id(self) -> int: - """Gets the id of this FAIRResultCommon. + def id(self): + """Gets the id of this FAIRResultCommon. # noqa: E501 - :return: The id of this FAIRResultCommon. + :return: The id of this FAIRResultCommon. # noqa: E501 :rtype: int """ return self._id @id.setter - def id(self, id: int): + def id(self, id): """Sets the id of this FAIRResultCommon. - :param id: The id of this FAIRResultCommon. - :type id: int + :param id: The id of this FAIRResultCommon. # noqa: E501 + :type: int """ if id is None: raise ValueError("Invalid value for `id`, must not be `None`") @@ -99,22 +100,22 @@ def id(self, id: int): self._id = id @property - def metric_identifier(self) -> str: - """Gets the metric_identifier of this FAIRResultCommon. + def metric_identifier(self): + """Gets the metric_identifier of this FAIRResultCommon. # noqa: E501 - :return: The metric_identifier of this FAIRResultCommon. + :return: The metric_identifier of this FAIRResultCommon. # noqa: E501 :rtype: str """ return self._metric_identifier @metric_identifier.setter - def metric_identifier(self, metric_identifier: str): + def metric_identifier(self, metric_identifier): """Sets the metric_identifier of this FAIRResultCommon. - :param metric_identifier: The metric_identifier of this FAIRResultCommon. - :type metric_identifier: str + :param metric_identifier: The metric_identifier of this FAIRResultCommon. # noqa: E501 + :type: str """ if metric_identifier is None: raise ValueError("Invalid value for `metric_identifier`, must not be `None`") @@ -122,22 +123,22 @@ def metric_identifier(self, metric_identifier: str): self._metric_identifier = metric_identifier @property - def metric_name(self) -> str: - """Gets the metric_name of this FAIRResultCommon. + def metric_name(self): + """Gets the metric_name of this FAIRResultCommon. # noqa: E501 - :return: The metric_name of this FAIRResultCommon. + :return: The metric_name of this FAIRResultCommon. # noqa: E501 :rtype: str """ return self._metric_name @metric_name.setter - def metric_name(self, metric_name: str): + def metric_name(self, metric_name): """Sets the metric_name of this FAIRResultCommon. - :param metric_name: The metric_name of this FAIRResultCommon. - :type metric_name: str + :param metric_name: The metric_name of this FAIRResultCommon. # noqa: E501 + :type: str """ if metric_name is None: raise ValueError("Invalid value for `metric_name`, must not be `None`") @@ -145,44 +146,46 @@ def metric_name(self, metric_name: str): self._metric_name = metric_name @property - def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: - """Gets the metric_tests of this FAIRResultCommon. + def metric_tests(self): + """Gets the metric_tests of this FAIRResultCommon. # noqa: E501 - :return: The metric_tests of this FAIRResultCommon. - :rtype: Dict[str, FAIRResultEvaluationCriterium] + :return: The metric_tests of this FAIRResultCommon. # noqa: E501 + :rtype: dict(str, FAIRResultEvaluationCriterium) """ return self._metric_tests @metric_tests.setter - def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): + def metric_tests(self, metric_tests): """Sets the metric_tests of this FAIRResultCommon. - :param metric_tests: The metric_tests of this FAIRResultCommon. - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + :param metric_tests: The metric_tests of this FAIRResultCommon. # noqa: E501 + :type: dict(str, FAIRResultEvaluationCriterium) """ self._metric_tests = metric_tests @property - def test_status(self) -> str: - """Gets the test_status of this FAIRResultCommon. + def test_status(self): + """Gets the test_status of this FAIRResultCommon. # noqa: E501 - :return: The test_status of this FAIRResultCommon. + :return: The test_status of this FAIRResultCommon. # noqa: E501 :rtype: str """ return self._test_status @test_status.setter - def test_status(self, test_status: str): + def test_status(self, test_status): """Sets the test_status of this FAIRResultCommon. - :param test_status: The test_status of this FAIRResultCommon. - :type test_status: str + :param test_status: The test_status of this FAIRResultCommon. # noqa: E501 + :type: str """ + if test_status is None: + raise ValueError("Invalid value for `test_status`, must not be `None`") allowed_values = ["pass", "fail", "indeterminate"] if test_status not in allowed_values: raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") @@ -190,22 +193,22 @@ def test_status(self, test_status: str): self._test_status = test_status @property - def score(self) -> FAIRResultCommonScore: - """Gets the score of this FAIRResultCommon. + def score(self): + """Gets the score of this FAIRResultCommon. # noqa: E501 - :return: The score of this FAIRResultCommon. + :return: The score of this FAIRResultCommon. # noqa: E501 :rtype: FAIRResultCommonScore """ return self._score @score.setter - def score(self, score: FAIRResultCommonScore): + def score(self, score): """Sets the score of this FAIRResultCommon. - :param score: The score of this FAIRResultCommon. - :type score: FAIRResultCommonScore + :param score: The score of this FAIRResultCommon. # noqa: E501 + :type: FAIRResultCommonScore """ if score is None: raise ValueError("Invalid value for `score`, must not be `None`") @@ -213,22 +216,66 @@ def score(self, score: FAIRResultCommonScore): self._score = score @property - def maturity(self) -> int: - """Gets the maturity of this FAIRResultCommon. + def maturity(self): + """Gets the maturity of this FAIRResultCommon. # noqa: E501 - :return: The maturity of this FAIRResultCommon. + :return: The maturity of this FAIRResultCommon. # noqa: E501 :rtype: int """ return self._maturity @maturity.setter - def maturity(self, maturity: int): + def maturity(self, maturity): """Sets the maturity of this FAIRResultCommon. - :param maturity: The maturity of this FAIRResultCommon. - :type maturity: int + :param maturity: The maturity of this FAIRResultCommon. # noqa: E501 + :type: int """ self._maturity = maturity + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(FAIRResultCommon, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FAIRResultCommon): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/fair_result_common_score.py b/fuji_server/models/fair_result_common_score.py index dd73219d..734bf9fa 100644 --- a/fuji_server/models/fair_result_common_score.py +++ b/fuji_server/models/fair_result_common_score.py @@ -1,76 +1,128 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class FAIRResultCommonScore(Model): + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class FAIRResultCommonScore: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - def __init__(self, earned: float = 0, total: float = 0): - """FAIRResultCommonScore - a model defined in Swagger - - :param earned: The earned of this FAIRResultCommonScore. # noqa: E501 - :type earned: float - :param total: The total of this FAIRResultCommonScore. # noqa: E501 - :type total: float - """ - self.swagger_types = {"earned": float, "total": float} - - self.attribute_map = {"earned": "earned", "total": "total"} - self._earned = earned - self._total = total + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"earned": "float", "total": "float"} - @classmethod - def from_dict(cls, dikt) -> "FAIRResultCommonScore": - """Returns the dict as a model + attribute_map = {"earned": "earned", "total": "total"} - :param dikt: A dict. - :type: dict - :return: The FAIRResultCommon_score of this FAIRResultCommonScore. # noqa: E501 - :rtype: FAIRResultCommonScore - """ - return util.deserialize_model(dikt, cls) + def __init__(self, earned=0, total=0): + """FAIRResultCommonScore - a model defined in Swagger""" + self._earned = None + self._total = None + self.discriminator = None + if earned is not None: + self.earned = earned + if total is not None: + self.total = total @property - def earned(self) -> float: - """Gets the earned of this FAIRResultCommonScore. + def earned(self): + """Gets the earned of this FAIRResultCommonScore. # noqa: E501 - :return: The earned of this FAIRResultCommonScore. + :return: The earned of this FAIRResultCommonScore. # noqa: E501 :rtype: float """ return self._earned @earned.setter - def earned(self, earned: float): + def earned(self, earned): """Sets the earned of this FAIRResultCommonScore. - :param earned: The earned of this FAIRResultCommonScore. - :type earned: float + :param earned: The earned of this FAIRResultCommonScore. # noqa: E501 + :type: float """ self._earned = earned @property - def total(self) -> float: - """Gets the total of this FAIRResultCommonScore. + def total(self): + """Gets the total of this FAIRResultCommonScore. # noqa: E501 - :return: The total of this FAIRResultCommonScore. + :return: The total of this FAIRResultCommonScore. # noqa: E501 :rtype: float """ return self._total @total.setter - def total(self, total: float): + def total(self, total): """Sets the total of this FAIRResultCommonScore. - :param total: The total of this FAIRResultCommonScore. - :type total: float + :param total: The total of this FAIRResultCommonScore. # noqa: E501 + :type: float """ self._total = total + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(FAIRResultCommonScore, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FAIRResultCommonScore): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/fair_result_evaluation_criterium.py b/fuji_server/models/fair_result_evaluation_criterium.py index cbd5ac22..2bbf276b 100644 --- a/fuji_server/models/fair_result_evaluation_criterium.py +++ b/fuji_server/models/fair_result_evaluation_criterium.py @@ -1,168 +1,175 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class FAIRResultEvaluationCriterium(Model): + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class FAIRResultEvaluationCriterium: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + "metric_test_name": "str", + "metric_test_requirements": "list[dict(str, object)]", + "metric_test_score": "FAIRResultCommonScore", + "metric_test_maturity": "int", + "metric_test_status": "str", + } + + attribute_map = { + "metric_test_name": "metric_test_name", + "metric_test_requirements": "metric_test_requirements", + "metric_test_score": "metric_test_score", + "metric_test_maturity": "metric_test_maturity", + "metric_test_status": "metric_test_status", + } + def __init__( self, - metric_test_name: str | None = None, - metric_test_requirements: list[dict] | None = None, - metric_test_score: FAIRResultCommonScore = None, - metric_test_maturity: int | None = None, - metric_test_status: str = "fail", + metric_test_name=None, + metric_test_requirements=None, + metric_test_score=None, + metric_test_maturity=None, + metric_test_status="fail", ): - """FAIRResultEvaluationCriterium - a model defined in Swagger - - :param metric_test_name: The metric_test_name of this FAIRResultEvaluationCriterium. # noqa: E501 - :type metric_test_name: str - :param metric_test_requirements: The metric_test_requirements of this FAIRResultEvaluationCriterium. # noqa: E501 - :type metric_test_requirements: List[Dict] - :param metric_test_score: The metric_test_score of this FAIRResultEvaluationCriterium. # noqa: E501 - :type metric_test_score: FAIRResultCommonScore - :param metric_test_maturity: The metric_test_maturity of this FAIRResultEvaluationCriterium. # noqa: E501 - :type metric_test_maturity: int - :param metric_test_status: The metric_test_status of this FAIRResultEvaluationCriterium. # noqa: E501 - :type metric_test_status: str - """ - self.swagger_types = { - "metric_test_name": str, - "metric_test_requirements": list[dict], - "metric_test_score": FAIRResultCommonScore, - "metric_test_maturity": int, - "metric_test_status": str, - } - - self.attribute_map = { - "metric_test_name": "metric_test_name", - "metric_test_requirements": "metric_test_requirements", - "metric_test_score": "metric_test_score", - "metric_test_maturity": "metric_test_maturity", - "metric_test_status": "metric_test_status", - } - self._metric_test_name = metric_test_name - self._metric_test_requirements = metric_test_requirements - self._metric_test_score = metric_test_score - self._metric_test_maturity = metric_test_maturity - self._metric_test_status = metric_test_status - - @classmethod - def from_dict(cls, dikt) -> "FAIRResultEvaluationCriterium": - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The FAIRResultEvaluationCriterium of this FAIRResultEvaluationCriterium. # noqa: E501 - :rtype: FAIRResultEvaluationCriterium - """ - return util.deserialize_model(dikt, cls) + """FAIRResultEvaluationCriterium - a model defined in Swagger""" + self._metric_test_name = None + self._metric_test_requirements = None + self._metric_test_score = None + self._metric_test_maturity = None + self._metric_test_status = None + self.discriminator = None + if metric_test_name is not None: + self.metric_test_name = metric_test_name + if metric_test_requirements is not None: + self.metric_test_requirements = metric_test_requirements + if metric_test_score is not None: + self.metric_test_score = metric_test_score + if metric_test_maturity is not None: + self.metric_test_maturity = metric_test_maturity + if metric_test_status is not None: + self.metric_test_status = metric_test_status @property - def metric_test_name(self) -> str: - """Gets the metric_test_name of this FAIRResultEvaluationCriterium. + def metric_test_name(self): + """Gets the metric_test_name of this FAIRResultEvaluationCriterium. # noqa: E501 - :return: The metric_test_name of this FAIRResultEvaluationCriterium. + :return: The metric_test_name of this FAIRResultEvaluationCriterium. # noqa: E501 :rtype: str """ return self._metric_test_name @metric_test_name.setter - def metric_test_name(self, metric_test_name: str): + def metric_test_name(self, metric_test_name): """Sets the metric_test_name of this FAIRResultEvaluationCriterium. - :param metric_test_name: The metric_test_name of this FAIRResultEvaluationCriterium. - :type metric_test_name: str + :param metric_test_name: The metric_test_name of this FAIRResultEvaluationCriterium. # noqa: E501 + :type: str """ self._metric_test_name = metric_test_name @property - def metric_test_requirements(self) -> list[dict]: - """Gets the metric_test_requirements of this FAIRResultEvaluationCriterium. + def metric_test_requirements(self): + """Gets the metric_test_requirements of this FAIRResultEvaluationCriterium. # noqa: E501 - :return: The metric_test_requirements of this FAIRResultEvaluationCriterium. - :rtype: List[Dict] + :return: The metric_test_requirements of this FAIRResultEvaluationCriterium. # noqa: E501 + :rtype: list[dict(str, object)] """ return self._metric_test_requirements @metric_test_requirements.setter - def metric_test_requirements(self, metric_test_requirements: list[dict]): + def metric_test_requirements(self, metric_test_requirements): """Sets the metric_test_requirements of this FAIRResultEvaluationCriterium. - :param metric_test_requirements: The metric_test_requirements of this FAIRResultEvaluationCriterium. - :type metric_test_requirements: List[Dict] + :param metric_test_requirements: The metric_test_requirements of this FAIRResultEvaluationCriterium. # noqa: E501 + :type: list[dict(str, object)] """ self._metric_test_requirements = metric_test_requirements @property - def metric_test_score(self) -> FAIRResultCommonScore: - """Gets the metric_test_score of this FAIRResultEvaluationCriterium. + def metric_test_score(self): + """Gets the metric_test_score of this FAIRResultEvaluationCriterium. # noqa: E501 - :return: The metric_test_score of this FAIRResultEvaluationCriterium. + :return: The metric_test_score of this FAIRResultEvaluationCriterium. # noqa: E501 :rtype: FAIRResultCommonScore """ return self._metric_test_score @metric_test_score.setter - def metric_test_score(self, metric_test_score: FAIRResultCommonScore): + def metric_test_score(self, metric_test_score): """Sets the metric_test_score of this FAIRResultEvaluationCriterium. - :param metric_test_score: The metric_test_score of this FAIRResultEvaluationCriterium. - :type metric_test_score: FAIRResultCommonScore + :param metric_test_score: The metric_test_score of this FAIRResultEvaluationCriterium. # noqa: E501 + :type: FAIRResultCommonScore """ self._metric_test_score = metric_test_score @property - def metric_test_maturity(self) -> int: - """Gets the metric_test_maturity of this FAIRResultEvaluationCriterium. + def metric_test_maturity(self): + """Gets the metric_test_maturity of this FAIRResultEvaluationCriterium. # noqa: E501 - :return: The metric_test_maturity of this FAIRResultEvaluationCriterium. + :return: The metric_test_maturity of this FAIRResultEvaluationCriterium. # noqa: E501 :rtype: int """ return self._metric_test_maturity @metric_test_maturity.setter - def metric_test_maturity(self, metric_test_maturity: int): + def metric_test_maturity(self, metric_test_maturity): """Sets the metric_test_maturity of this FAIRResultEvaluationCriterium. - :param metric_test_maturity: The metric_test_maturity of this FAIRResultEvaluationCriterium. - :type metric_test_maturity: int + :param metric_test_maturity: The metric_test_maturity of this FAIRResultEvaluationCriterium. # noqa: E501 + :type: int """ self._metric_test_maturity = metric_test_maturity @property - def metric_test_status(self) -> str: - """Gets the metric_test_status of this FAIRResultEvaluationCriterium. + def metric_test_status(self): + """Gets the metric_test_status of this FAIRResultEvaluationCriterium. # noqa: E501 - :return: The metric_test_status of this FAIRResultEvaluationCriterium. + :return: The metric_test_status of this FAIRResultEvaluationCriterium. # noqa: E501 :rtype: str """ return self._metric_test_status @metric_test_status.setter - def metric_test_status(self, metric_test_status: str): + def metric_test_status(self, metric_test_status): """Sets the metric_test_status of this FAIRResultEvaluationCriterium. - :param metric_test_status: The metric_test_status of this FAIRResultEvaluationCriterium. - :type metric_test_status: str + :param metric_test_status: The metric_test_status of this FAIRResultEvaluationCriterium. # noqa: E501 + :type: str """ allowed_values = ["pass", "fail"] if metric_test_status not in allowed_values: @@ -171,3 +178,47 @@ def metric_test_status(self, metric_test_status: str): ) self._metric_test_status = metric_test_status + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(FAIRResultEvaluationCriterium, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FAIRResultEvaluationCriterium): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/fair_results.py b/fuji_server/models/fair_results.py index 6bcdad1d..09d4b6fe 100644 --- a/fuji_server/models/fair_results.py +++ b/fuji_server/models/fair_results.py @@ -1,360 +1,408 @@ -from datetime import datetime +""" + F-UJI -# from fuji_server.models.any_of_fair_results_results_items import AnyOfFAIRResultsResultsItems -from fuji_server import util -from fuji_server.models.any_of_fair_results_items import AnyOfFAIRResultsResultsItems -from fuji_server.models.base_model_ import Model + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" -class FAIRResults(Model): +import pprint +import re # noqa: F401 + +import six + + +class FAIRResults: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + "test_id": "str", + "request": "dict(str, object)", + "resolved_url": "str", + "start_timestamp": "datetime", + "end_timestamp": "datetime", + "expiry_timestamp": "datetime", + "metric_specification": "str", + "metric_version": "str", + "software_version": "str", + "total_metrics": "int", + "summary": "dict(str, object)", + "results": "list[AnyOfFAIRResultsResultsItems]", + } + + attribute_map = { + "test_id": "test_id", + "request": "request", + "resolved_url": "resolved_url", + "start_timestamp": "start_timestamp", + "end_timestamp": "end_timestamp", + "expiry_timestamp": "expiry_timestamp", + "metric_specification": "metric_specification", + "metric_version": "metric_version", + "software_version": "software_version", + "total_metrics": "total_metrics", + "summary": "summary", + "results": "results", + } + def __init__( self, - test_id: str | None = None, - request: dict | None = None, - resolved_url: str | None = None, - start_timestamp: datetime | None = None, - end_timestamp: datetime | None = None, - expiry_timestamp: datetime | None = None, - metric_specification: str | None = None, - metric_version: str | None = None, - software_version: str | None = None, - total_metrics: int | None = None, - summary: dict | None = None, - results: list[AnyOfFAIRResultsResultsItems] | None = None, + test_id=None, + request=None, + resolved_url=None, + start_timestamp=None, + end_timestamp=None, + expiry_timestamp=None, + metric_specification=None, + metric_version=None, + software_version=None, + total_metrics=None, + summary=None, + results=None, ): - """FAIRResults - a model defined in Swagger - - :param test_id: The test_id of this FAIRResults. # noqa: E501 - :type test_id: str - :param request: The request of this FAIRResults. # noqa: E501 - :type request: Dict - :param resolved_url: The resolved_url of this FAIRResults. # noqa: E501 - :type resolved_url: str - :param start_timestamp: The start_timestamp of this FAIRResults. # noqa: E501 - :type start_timestamp: datetime - :param end_timestamp: The end_timestamp of this FAIRResults. # noqa: E501 - :type end_timestamp: datetime - :param expiry_timestamp: The expiry_timestamp of this FAIRResults. # noqa: E501 - :type expiry_timestamp: datetime - :param metric_specification: The metric_specification of this FAIRResults. # noqa: E501 - :type metric_specification: str - :param metric_version: The metric_version of this FAIRResults. # noqa: E501 - :type metric_version: str - :param software_version: The software_version of this FAIRResults. # noqa: E501 - :type software_version: str - :param total_metrics: The total_metrics of this FAIRResults. # noqa: E501 - :type total_metrics: int - :param summary: The summary of this FAIRResults. # noqa: E501 - :type summary: Dict - :param results: The results of this FAIRResults. # noqa: E501 - :type results: List[AnyOfFAIRResultsResultsItems] - """ - self.swagger_types = { - "test_id": str, - "request": dict, - "resolved_url": str, - "start_timestamp": datetime, - "end_timestamp": datetime, - "expiry_timestamp": datetime, - "metric_specification": str, - "metric_version": str, - "software_version": str, - "total_metrics": int, - "summary": dict, - "results": list[AnyOfFAIRResultsResultsItems], - } - - self.attribute_map = { - "test_id": "test_id", - "request": "request", - "resolved_url": "resolved_url", - "start_timestamp": "start_timestamp", - "end_timestamp": "end_timestamp", - "expiry_timestamp": "expiry_timestamp", - "metric_specification": "metric_specification", - "metric_version": "metric_version", - "software_version": "software_version", - "total_metrics": "total_metrics", - "summary": "summary", - "results": "results", - } - self._test_id = test_id - self._request = request - self._resolved_url = resolved_url - self._start_timestamp = start_timestamp - self._end_timestamp = end_timestamp - self._expiry_timestamp = expiry_timestamp - self._metric_specification = metric_specification - self._metric_version = metric_version - self._software_version = software_version - self._total_metrics = total_metrics - self._summary = summary - self._results = results - - @classmethod - def from_dict(cls, dikt) -> "FAIRResults": - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The FAIRResults of this FAIRResults. # noqa: E501 - :rtype: FAIRResults - """ - return util.deserialize_model(dikt, cls) + """FAIRResults - a model defined in Swagger""" + self._test_id = None + self._request = None + self._resolved_url = None + self._start_timestamp = None + self._end_timestamp = None + self._expiry_timestamp = None + self._metric_specification = None + self._metric_version = None + self._software_version = None + self._total_metrics = None + self._summary = None + self._results = None + self.discriminator = None + if test_id is not None: + self.test_id = test_id + if request is not None: + self.request = request + if resolved_url is not None: + self.resolved_url = resolved_url + if start_timestamp is not None: + self.start_timestamp = start_timestamp + if end_timestamp is not None: + self.end_timestamp = end_timestamp + if expiry_timestamp is not None: + self.expiry_timestamp = expiry_timestamp + if metric_specification is not None: + self.metric_specification = metric_specification + if metric_version is not None: + self.metric_version = metric_version + if software_version is not None: + self.software_version = software_version + if total_metrics is not None: + self.total_metrics = total_metrics + if summary is not None: + self.summary = summary + if results is not None: + self.results = results @property - def test_id(self) -> str: - """Gets the test_id of this FAIRResults. + def test_id(self): + """Gets the test_id of this FAIRResults. # noqa: E501 - :return: The test_id of this FAIRResults. + :return: The test_id of this FAIRResults. # noqa: E501 :rtype: str """ return self._test_id @test_id.setter - def test_id(self, test_id: str): + def test_id(self, test_id): """Sets the test_id of this FAIRResults. - :param test_id: The test_id of this FAIRResults. - :type test_id: str + :param test_id: The test_id of this FAIRResults. # noqa: E501 + :type: str """ self._test_id = test_id @property - def request(self) -> dict: - """Gets the request of this FAIRResults. + def request(self): + """Gets the request of this FAIRResults. # noqa: E501 - :return: The request of this FAIRResults. - :rtype: Dict + :return: The request of this FAIRResults. # noqa: E501 + :rtype: dict(str, object) """ return self._request @request.setter - def request(self, request: dict): + def request(self, request): """Sets the request of this FAIRResults. - :param request: The request of this FAIRResults. - :type request: Dict + :param request: The request of this FAIRResults. # noqa: E501 + :type: dict(str, object) """ self._request = request @property - def resolved_url(self) -> str: - """Gets the resolved_url of this FAIRResults. + def resolved_url(self): + """Gets the resolved_url of this FAIRResults. # noqa: E501 - :return: The resolved_url of this FAIRResults. + :return: The resolved_url of this FAIRResults. # noqa: E501 :rtype: str """ return self._resolved_url @resolved_url.setter - def resolved_url(self, resolved_url: str): + def resolved_url(self, resolved_url): """Sets the resolved_url of this FAIRResults. - :param resolved_url: The resolved_url of this FAIRResults. - :type resolved_url: str + :param resolved_url: The resolved_url of this FAIRResults. # noqa: E501 + :type: str """ self._resolved_url = resolved_url @property - def start_timestamp(self) -> datetime: - """Gets the start_timestamp of this FAIRResults. + def start_timestamp(self): + """Gets the start_timestamp of this FAIRResults. # noqa: E501 - :return: The start_timestamp of this FAIRResults. + :return: The start_timestamp of this FAIRResults. # noqa: E501 :rtype: datetime """ return self._start_timestamp @start_timestamp.setter - def start_timestamp(self, start_timestamp: datetime): + def start_timestamp(self, start_timestamp): """Sets the start_timestamp of this FAIRResults. - :param start_timestamp: The start_timestamp of this FAIRResults. - :type start_timestamp: datetime + :param start_timestamp: The start_timestamp of this FAIRResults. # noqa: E501 + :type: datetime """ self._start_timestamp = start_timestamp @property - def end_timestamp(self) -> datetime: - """Gets the end_timestamp of this FAIRResults. + def end_timestamp(self): + """Gets the end_timestamp of this FAIRResults. # noqa: E501 - :return: The end_timestamp of this FAIRResults. + :return: The end_timestamp of this FAIRResults. # noqa: E501 :rtype: datetime """ return self._end_timestamp @end_timestamp.setter - def end_timestamp(self, end_timestamp: datetime): + def end_timestamp(self, end_timestamp): """Sets the end_timestamp of this FAIRResults. - :param end_timestamp: The end_timestamp of this FAIRResults. - :type end_timestamp: datetime + :param end_timestamp: The end_timestamp of this FAIRResults. # noqa: E501 + :type: datetime """ self._end_timestamp = end_timestamp @property - def expiry_timestamp(self) -> datetime: - """Gets the expiry_timestamp of this FAIRResults. + def expiry_timestamp(self): + """Gets the expiry_timestamp of this FAIRResults. # noqa: E501 - :return: The expiry_timestamp of this FAIRResults. + :return: The expiry_timestamp of this FAIRResults. # noqa: E501 :rtype: datetime """ return self._expiry_timestamp @expiry_timestamp.setter - def expiry_timestamp(self, expiry_timestamp: datetime): + def expiry_timestamp(self, expiry_timestamp): """Sets the expiry_timestamp of this FAIRResults. - :param expiry_timestamp: The expiry_timestamp of this FAIRResults. - :type expiry_timestamp: datetime + :param expiry_timestamp: The expiry_timestamp of this FAIRResults. # noqa: E501 + :type: datetime """ self._expiry_timestamp = expiry_timestamp @property - def metric_specification(self) -> str: - """Gets the metric_specification of this FAIRResults. + def metric_specification(self): + """Gets the metric_specification of this FAIRResults. # noqa: E501 - :return: The metric_specification of this FAIRResults. + :return: The metric_specification of this FAIRResults. # noqa: E501 :rtype: str """ return self._metric_specification @metric_specification.setter - def metric_specification(self, metric_specification: str): + def metric_specification(self, metric_specification): """Sets the metric_specification of this FAIRResults. - :param metric_specification: The metric_specification of this FAIRResults. - :type metric_specification: str + :param metric_specification: The metric_specification of this FAIRResults. # noqa: E501 + :type: str """ self._metric_specification = metric_specification @property - def metric_version(self) -> str: - """Gets the metric_version of this FAIRResults. + def metric_version(self): + """Gets the metric_version of this FAIRResults. # noqa: E501 - :return: The metric_version of this FAIRResults. + :return: The metric_version of this FAIRResults. # noqa: E501 :rtype: str """ return self._metric_version @metric_version.setter - def metric_version(self, metric_version: str): + def metric_version(self, metric_version): """Sets the metric_version of this FAIRResults. - :param metric_version: The metric_version of this FAIRResults. - :type metric_version: str + :param metric_version: The metric_version of this FAIRResults. # noqa: E501 + :type: str """ self._metric_version = metric_version @property - def software_version(self) -> str: - """Gets the software_version of this FAIRResults. + def software_version(self): + """Gets the software_version of this FAIRResults. # noqa: E501 - :return: The software_version of this FAIRResults. + :return: The software_version of this FAIRResults. # noqa: E501 :rtype: str """ return self._software_version @software_version.setter - def software_version(self, software_version: str): + def software_version(self, software_version): """Sets the software_version of this FAIRResults. - :param software_version: The software_version of this FAIRResults. - :type software_version: str + :param software_version: The software_version of this FAIRResults. # noqa: E501 + :type: str """ self._software_version = software_version @property - def total_metrics(self) -> int: - """Gets the total_metrics of this FAIRResults. + def total_metrics(self): + """Gets the total_metrics of this FAIRResults. # noqa: E501 - :return: The total_metrics of this FAIRResults. + :return: The total_metrics of this FAIRResults. # noqa: E501 :rtype: int """ return self._total_metrics @total_metrics.setter - def total_metrics(self, total_metrics: int): + def total_metrics(self, total_metrics): """Sets the total_metrics of this FAIRResults. - :param total_metrics: The total_metrics of this FAIRResults. - :type total_metrics: int + :param total_metrics: The total_metrics of this FAIRResults. # noqa: E501 + :type: int """ self._total_metrics = total_metrics @property - def summary(self) -> dict: - """Gets the summary of this FAIRResults. + def summary(self): + """Gets the summary of this FAIRResults. # noqa: E501 - :return: The summary of this FAIRResults. - :rtype: Dict + :return: The summary of this FAIRResults. # noqa: E501 + :rtype: dict(str, object) """ return self._summary @summary.setter - def summary(self, summary: dict): + def summary(self, summary): """Sets the summary of this FAIRResults. - :param summary: The summary of this FAIRResults. - :type summary: Dict + :param summary: The summary of this FAIRResults. # noqa: E501 + :type: dict(str, object) """ self._summary = summary @property - def results(self) -> list[AnyOfFAIRResultsResultsItems]: - """Gets the results of this FAIRResults. + def results(self): + """Gets the results of this FAIRResults. # noqa: E501 - :return: The results of this FAIRResults. - :rtype: List[AnyOfFAIRResultsResultsItems] + :return: The results of this FAIRResults. # noqa: E501 + :rtype: list[AnyOfFAIRResultsResultsItems] """ return self._results @results.setter - def results(self, results: list[AnyOfFAIRResultsResultsItems]): + def results(self, results): """Sets the results of this FAIRResults. - :param results: The results of this FAIRResults. - :type results: List[AnyOfFAIRResultsResultsItems] + :param results: The results of this FAIRResults. # noqa: E501 + :type: list[AnyOfFAIRResultsResultsItems] """ self._results = results + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(FAIRResults, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FAIRResults): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/formal_metadata.py b/fuji_server/models/formal_metadata.py index 35d80d2a..166bafd7 100644 --- a/fuji_server/models/formal_metadata.py +++ b/fuji_server/models/formal_metadata.py @@ -1,291 +1,135 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model -from fuji_server.models.debug import Debug -from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium -from fuji_server.models.formal_metadata_output import FormalMetadataOutput +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class FormalMetadata(Model): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - def __init__( - self, - id: int | None = None, - metric_identifier: str | None = None, - metric_name: str | None = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, - test_status: str = "fail", - score: FAIRResultCommonScore = None, - maturity: str = "incomplete", - output: FormalMetadataOutput = None, - test_debug: Debug = None, - ): - """FormalMetadata - a model defined in Swagger - - :param id: The id of this FormalMetadata. # noqa: E501 - :type id: int - :param metric_identifier: The metric_identifier of this FormalMetadata. # noqa: E501 - :type metric_identifier: str - :param metric_name: The metric_name of this FormalMetadata. # noqa: E501 - :type metric_name: str - :param metric_tests: The metric_tests of this FormalMetadata. # noqa: E501 - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - :param test_status: The test_status of this FormalMetadata. # noqa: E501 - :type test_status: str - :param score: The score of this FormalMetadata. # noqa: E501 - :type score: FAIRResultCommonScore - :param maturity: The maturity of this FormalMetadata. # noqa: E501 - :type maturity: str - :param output: The output of this FormalMetadata. # noqa: E501 - :type output: FormalMetadataOutput - :param test_debug: The test_debug of this FormalMetadata. # noqa: E501 - :type test_debug: Debug - """ - self.swagger_types = { - "id": int, - "metric_identifier": str, - "metric_name": str, - "metric_tests": dict[str, FAIRResultEvaluationCriterium], - "test_status": str, - "score": FAIRResultCommonScore, - "maturity": str, - "output": FormalMetadataOutput, - "test_debug": Debug, - } - - self.attribute_map = { - "id": "id", - "metric_identifier": "metric_identifier", - "metric_name": "metric_name", - "metric_tests": "metric_tests", - "test_status": "test_status", - "score": "score", - "maturity": "maturity", - "output": "output", - "test_debug": "test_debug", - } - self._id = id - self._metric_identifier = metric_identifier - self._metric_name = metric_name - self._metric_tests = metric_tests - self._test_status = test_status - self._score = score - self._maturity = maturity - self._output = output - self._test_debug = test_debug - - @classmethod - def from_dict(cls, dikt) -> "FormalMetadata": - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The FormalMetadata of this FormalMetadata. # noqa: E501 - :rtype: FormalMetadata - """ - return util.deserialize_model(dikt, cls) - - @property - def id(self) -> int: - """Gets the id of this FormalMetadata. - - - :return: The id of this FormalMetadata. - :rtype: int - """ - return self._id - - @id.setter - def id(self, id: int): - """Sets the id of this FormalMetadata. - - - :param id: The id of this FormalMetadata. - :type id: int - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") - - self._id = id - - @property - def metric_identifier(self) -> str: - """Gets the metric_identifier of this FormalMetadata. - - - :return: The metric_identifier of this FormalMetadata. - :rtype: str - """ - return self._metric_identifier - - @metric_identifier.setter - def metric_identifier(self, metric_identifier: str): - """Sets the metric_identifier of this FormalMetadata. - - - :param metric_identifier: The metric_identifier of this FormalMetadata. - :type metric_identifier: str - """ - if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") - - self._metric_identifier = metric_identifier - - @property - def metric_name(self) -> str: - """Gets the metric_name of this FormalMetadata. - - - :return: The metric_name of this FormalMetadata. - :rtype: str - """ - return self._metric_name - - @metric_name.setter - def metric_name(self, metric_name: str): - """Sets the metric_name of this FormalMetadata. - - - :param metric_name: The metric_name of this FormalMetadata. - :type metric_name: str - """ - if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" - self._metric_name = metric_name +import pprint +import re # noqa: F401 - @property - def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: - """Gets the metric_tests of this FormalMetadata. - - - :return: The metric_tests of this FormalMetadata. - :rtype: Dict[str, FAIRResultEvaluationCriterium] - """ - return self._metric_tests - - @metric_tests.setter - def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): - """Sets the metric_tests of this FormalMetadata. - - - :param metric_tests: The metric_tests of this FormalMetadata. - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - """ - - self._metric_tests = metric_tests - - @property - def test_status(self) -> str: - """Gets the test_status of this FormalMetadata. - - - :return: The test_status of this FormalMetadata. - :rtype: str - """ - return self._test_status - - @test_status.setter - def test_status(self, test_status: str): - """Sets the test_status of this FormalMetadata. - - - :param test_status: The test_status of this FormalMetadata. - :type test_status: str - """ - allowed_values = ["pass", "fail", "indeterminate"] - if test_status not in allowed_values: - raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") - - self._test_status = test_status - - @property - def score(self) -> FAIRResultCommonScore: - """Gets the score of this FormalMetadata. +import six +from swagger_client.models.fair_result_common import FAIRResultCommon - :return: The score of this FormalMetadata. - :rtype: FAIRResultCommonScore - """ - return self._score - - @score.setter - def score(self, score: FAIRResultCommonScore): - """Sets the score of this FormalMetadata. - - - :param score: The score of this FormalMetadata. - :type score: FAIRResultCommonScore - """ - if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") - - self._score = score - - @property - def maturity(self) -> str: - """Gets the maturity of this FormalMetadata. - - - :return: The maturity of this FormalMetadata. - :rtype: str - """ - return self._maturity - - @maturity.setter - def maturity(self, maturity: int): - """Sets the maturity of this Uniqueness. +class FormalMetadata(FAIRResultCommon): + """NOTE: This class is auto generated by the swagger code generator program. - :param maturity: The maturity of this Uniqueness. - :type maturity: int - """ + Do not edit the class manually. + """ - self._maturity = maturity + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"output": "FormalMetadataOutput", "test_debug": "Debug"} + if hasattr(FAIRResultCommon, "swagger_types"): + swagger_types.update(FAIRResultCommon.swagger_types) + + attribute_map = {"output": "output", "test_debug": "test_debug"} + if hasattr(FAIRResultCommon, "attribute_map"): + attribute_map.update(FAIRResultCommon.attribute_map) + + def __init__(self, output=None, test_debug=None, *args, **kwargs): + """FormalMetadata - a model defined in Swagger""" + self._output = None + self._test_debug = None + self.discriminator = None + if output is not None: + self.output = output + if test_debug is not None: + self.test_debug = test_debug + FAIRResultCommon.__init__(self, *args, **kwargs) @property - def output(self) -> FormalMetadataOutput: - """Gets the output of this FormalMetadata. + def output(self): + """Gets the output of this FormalMetadata. # noqa: E501 - :return: The output of this FormalMetadata. + :return: The output of this FormalMetadata. # noqa: E501 :rtype: FormalMetadataOutput """ return self._output @output.setter - def output(self, output: FormalMetadataOutput): + def output(self, output): """Sets the output of this FormalMetadata. - :param output: The output of this FormalMetadata. - :type output: FormalMetadataOutput + :param output: The output of this FormalMetadata. # noqa: E501 + :type: FormalMetadataOutput """ self._output = output @property - def test_debug(self) -> Debug: - """Gets the test_debug of this FormalMetadata. + def test_debug(self): + """Gets the test_debug of this FormalMetadata. # noqa: E501 - :return: The test_debug of this FormalMetadata. + :return: The test_debug of this FormalMetadata. # noqa: E501 :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug: Debug): + def test_debug(self, test_debug): """Sets the test_debug of this FormalMetadata. - :param test_debug: The test_debug of this FormalMetadata. - :type test_debug: Debug + :param test_debug: The test_debug of this FormalMetadata. # noqa: E501 + :type: Debug """ self._test_debug = test_debug + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(FormalMetadata, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FormalMetadata): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/formal_metadata_output.py b/fuji_server/models/formal_metadata_output.py index 8511ad3b..c3d6a93d 100644 --- a/fuji_server/models/formal_metadata_output.py +++ b/fuji_server/models/formal_metadata_output.py @@ -1,27 +1,80 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model -from fuji_server.models.formal_metadata_output_inner import FormalMetadataOutputInner # noqa: F401 +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class FormalMetadataOutput(Model): + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class FormalMetadataOutput: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {} + + attribute_map = {} + def __init__(self): """FormalMetadataOutput - a model defined in Swagger""" - self.swagger_types = {} + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(FormalMetadataOutput, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() - self.attribute_map = {} + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FormalMetadataOutput): + return False - @classmethod - def from_dict(cls, dikt) -> "FormalMetadataOutput": - """Returns the dict as a model + return self.__dict__ == other.__dict__ - :param dikt: A dict. - :type: dict - :return: The FormalMetadata_output of this FormalMetadataOutput. # noqa: E501 - :rtype: FormalMetadataOutput - """ - return util.deserialize_model(dikt, cls) + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/formal_metadata_output_inner.py b/fuji_server/models/formal_metadata_output_inner.py index a23ded48..83f43ab4 100644 --- a/fuji_server/models/formal_metadata_output_inner.py +++ b/fuji_server/models/formal_metadata_output_inner.py @@ -1,85 +1,91 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class FormalMetadataOutputInner(Model): - """NOTE: This class is auto generated by the swagger code generator program. + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" - Do not edit the class manually. - """ +import pprint +import re # noqa: F401 - def __init__( - self, serialization_format: str | None = None, source: str | None = None, is_metadata_found: bool = False - ): - """FormalMetadataOutputInner - a model defined in Swagger +import six - :param serialization_format: The serialization_format of this FormalMetadataOutputInner. # noqa: E501 - :type serialization_format: str - :param source: The source of this FormalMetadataOutputInner. # noqa: E501 - :type source: str - :param is_metadata_found: The is_metadata_found of this FormalMetadataOutputInner. # noqa: E501 - :type is_metadata_found: bool - """ - self.swagger_types = {"serialization_format": str, "source": str, "is_metadata_found": bool} - self.attribute_map = { - "serialization_format": "serialization_format", - "source": "source", - "is_metadata_found": "is_metadata_found", - } - self._serialization_format = serialization_format - self._source = source - self._is_metadata_found = is_metadata_found +class FormalMetadataOutputInner: + """NOTE: This class is auto generated by the swagger code generator program. - @classmethod - def from_dict(cls, dikt) -> "FormalMetadataOutputInner": - """Returns the dict as a model + Do not edit the class manually. + """ - :param dikt: A dict. - :type: dict - :return: The FormalMetadata_output_inner of this FormalMetadataOutputInner. # noqa: E501 - :rtype: FormalMetadataOutputInner - """ - return util.deserialize_model(dikt, cls) + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"serialization_format": "str", "source": "str", "is_metadata_found": "bool"} + + attribute_map = { + "serialization_format": "serialization_format", + "source": "source", + "is_metadata_found": "is_metadata_found", + } + + def __init__(self, serialization_format=None, source=None, is_metadata_found=False): + """FormalMetadataOutputInner - a model defined in Swagger""" + self._serialization_format = None + self._source = None + self._is_metadata_found = None + self.discriminator = None + if serialization_format is not None: + self.serialization_format = serialization_format + if source is not None: + self.source = source + if is_metadata_found is not None: + self.is_metadata_found = is_metadata_found @property - def serialization_format(self) -> str: - """Gets the serialization_format of this FormalMetadataOutputInner. + def serialization_format(self): + """Gets the serialization_format of this FormalMetadataOutputInner. # noqa: E501 - :return: The serialization_format of this FormalMetadataOutputInner. + :return: The serialization_format of this FormalMetadataOutputInner. # noqa: E501 :rtype: str """ return self._serialization_format @serialization_format.setter - def serialization_format(self, serialization_format: str): + def serialization_format(self, serialization_format): """Sets the serialization_format of this FormalMetadataOutputInner. - :param serialization_format: The serialization_format of this FormalMetadataOutputInner. - :type serialization_format: str + :param serialization_format: The serialization_format of this FormalMetadataOutputInner. # noqa: E501 + :type: str """ self._serialization_format = serialization_format @property - def source(self) -> str: - """Gets the source of this FormalMetadataOutputInner. + def source(self): + """Gets the source of this FormalMetadataOutputInner. # noqa: E501 - :return: The source of this FormalMetadataOutputInner. + :return: The source of this FormalMetadataOutputInner. # noqa: E501 :rtype: str """ return self._source @source.setter - def source(self, source: str): + def source(self, source): """Sets the source of this FormalMetadataOutputInner. - :param source: The source of this FormalMetadataOutputInner. - :type source: str + :param source: The source of this FormalMetadataOutputInner. # noqa: E501 + :type: str """ allowed_values = ["typed_link", "content_negotiate", "structured_data", "sparql_endpoint"] if source not in allowed_values: @@ -88,22 +94,66 @@ def source(self, source: str): self._source = source @property - def is_metadata_found(self) -> bool: - """Gets the is_metadata_found of this FormalMetadataOutputInner. + def is_metadata_found(self): + """Gets the is_metadata_found of this FormalMetadataOutputInner. # noqa: E501 - :return: The is_metadata_found of this FormalMetadataOutputInner. + :return: The is_metadata_found of this FormalMetadataOutputInner. # noqa: E501 :rtype: bool """ return self._is_metadata_found @is_metadata_found.setter - def is_metadata_found(self, is_metadata_found: bool): + def is_metadata_found(self, is_metadata_found): """Sets the is_metadata_found of this FormalMetadataOutputInner. - :param is_metadata_found: The is_metadata_found of this FormalMetadataOutputInner. - :type is_metadata_found: bool + :param is_metadata_found: The is_metadata_found of this FormalMetadataOutputInner. # noqa: E501 + :type: bool """ self._is_metadata_found = is_metadata_found + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(FormalMetadataOutputInner, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FormalMetadataOutputInner): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/harvest.py b/fuji_server/models/harvest.py index c91ab0a4..15aabd54 100644 --- a/fuji_server/models/harvest.py +++ b/fuji_server/models/harvest.py @@ -1,119 +1,107 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class Harvest(Model): + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class Harvest: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - def __init__( - self, object_identifier: str | None = None, auth_token: str | None = None, auth_token_type: str | None = None - ): - """Harvest - a model defined in Swagger - - :param object_identifier: The object_identifier of this Harvest. # noqa: E501 - :type object_identifier: str - :param auth_token: The auth_token of this Harvest. # noqa: E501 - :type auth_token: str - :param auth_token_type: The auth_token_type of this Harvest. # noqa: E501 - :type auth_token_type: str - """ - self.swagger_types = {"object_identifier": str, "auth_token": str, "auth_token_type": str} - - self.attribute_map = { - "object_identifier": "object_identifier", - "auth_token": "auth_token", - "auth_token_type": "auth_token_type", - } - self._object_identifier = object_identifier - self._auth_token = auth_token - self._auth_token_type = auth_token_type + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"object_identifier": "str"} - @classmethod - def from_dict(cls, dikt) -> "Harvest": - """Returns the dict as a model + attribute_map = {"object_identifier": "object_identifier"} - :param dikt: A dict. - :type: dict - :return: The harvest of this Harvest. # noqa: E501 - :rtype: Harvest - """ - return util.deserialize_model(dikt, cls) + def __init__(self, object_identifier=None): + """Harvest - a model defined in Swagger""" + self._object_identifier = None + self.discriminator = None + self.object_identifier = object_identifier @property - def object_identifier(self) -> str: - """Gets the object_identifier of this Harvest. + def object_identifier(self): + """Gets the object_identifier of this Harvest. # noqa: E501 The full identifier of data object that needs to be harvested # noqa: E501 - :return: The object_identifier of this Harvest. + :return: The object_identifier of this Harvest. # noqa: E501 :rtype: str """ return self._object_identifier @object_identifier.setter - def object_identifier(self, object_identifier: str): + def object_identifier(self, object_identifier): """Sets the object_identifier of this Harvest. The full identifier of data object that needs to be harvested # noqa: E501 - :param object_identifier: The object_identifier of this Harvest. - :type object_identifier: str + :param object_identifier: The object_identifier of this Harvest. # noqa: E501 + :type: str """ if object_identifier is None: raise ValueError("Invalid value for `object_identifier`, must not be `None`") self._object_identifier = object_identifier - @property - def auth_token(self) -> str: - """Gets the auth_token of this Harvest. - - The authentication token required to access protected data # noqa: E501 - - :return: The auth_token of this Harvest. - :rtype: str - """ - return self._auth_token - - @auth_token.setter - def auth_token(self, auth_token: str): - """Sets the auth_token of this Harvest. - - The authentication token required to access protected data # noqa: E501 - - :param auth_token: The auth_token of this Harvest. - :type auth_token: str - """ - - self._auth_token = auth_token - - @property - def auth_token_type(self) -> str: - """Gets the auth_token_type of this Harvest. - - The type of authentication (Oauth Bearer or HTTP Basic) needed to use the auth token # noqa: E501 - - :return: The auth_token_type of this Harvest. - :rtype: str - """ - return self._auth_token_type - - @auth_token_type.setter - def auth_token_type(self, auth_token_type: str): - """Sets the auth_token_type of this Harvest. - - The type of authentication (Oauth Bearer or HTTP Basic) needed to use the auth token # noqa: E501 - - :param auth_token_type: The auth_token_type of this Harvest. - :type auth_token_type: str - """ - allowed_values = ["Bearer", "Basic"] - if auth_token_type not in allowed_values: - raise ValueError( - f"Invalid value for `auth_token_type` ({auth_token_type}), must be one of {allowed_values}" - ) - - self._auth_token_type = auth_token_type + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(Harvest, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Harvest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/harvest_results.py b/fuji_server/models/harvest_results.py index 86644242..fd190dc7 100644 --- a/fuji_server/models/harvest_results.py +++ b/fuji_server/models/harvest_results.py @@ -1,77 +1,128 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model -from fuji_server.models.harvest_results_metadata import HarvestResultsMetadata +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class HarvestResults(Model): + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class HarvestResults: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - def __init__(self, target_uri: str | None = None, metadata: list[HarvestResultsMetadata] | None = None): - """HarvestResults - a model defined in Swagger - - :param target_uri: The target_uri of this HarvestResults. # noqa: E501 - :type target_uri: str - :param metadata: The metadata of this HarvestResults. # noqa: E501 - :type metadata: List[HarvestResultsMetadata] - """ - self.swagger_types = {"target_uri": str, "metadata": list[HarvestResultsMetadata]} - - self.attribute_map = {"target_uri": "target_uri", "metadata": "metadata"} - self._target_uri = target_uri - self._metadata = metadata + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"target_uri": "str", "metadata": "list[HarvestResultsMetadata]"} - @classmethod - def from_dict(cls, dikt) -> "HarvestResults": - """Returns the dict as a model + attribute_map = {"target_uri": "target_uri", "metadata": "metadata"} - :param dikt: A dict. - :type: dict - :return: The HarvestResults of this HarvestResults. # noqa: E501 - :rtype: HarvestResults - """ - return util.deserialize_model(dikt, cls) + def __init__(self, target_uri=None, metadata=None): + """HarvestResults - a model defined in Swagger""" + self._target_uri = None + self._metadata = None + self.discriminator = None + if target_uri is not None: + self.target_uri = target_uri + if metadata is not None: + self.metadata = metadata @property - def target_uri(self) -> str: - """Gets the target_uri of this HarvestResults. + def target_uri(self): + """Gets the target_uri of this HarvestResults. # noqa: E501 - :return: The target_uri of this HarvestResults. + :return: The target_uri of this HarvestResults. # noqa: E501 :rtype: str """ return self._target_uri @target_uri.setter - def target_uri(self, target_uri: str): + def target_uri(self, target_uri): """Sets the target_uri of this HarvestResults. - :param target_uri: The target_uri of this HarvestResults. - :type target_uri: str + :param target_uri: The target_uri of this HarvestResults. # noqa: E501 + :type: str """ self._target_uri = target_uri @property - def metadata(self) -> list[HarvestResultsMetadata]: - """Gets the metadata of this HarvestResults. + def metadata(self): + """Gets the metadata of this HarvestResults. # noqa: E501 - :return: The metadata of this HarvestResults. - :rtype: List[HarvestResultsMetadata] + :return: The metadata of this HarvestResults. # noqa: E501 + :rtype: list[HarvestResultsMetadata] """ return self._metadata @metadata.setter - def metadata(self, metadata: list[HarvestResultsMetadata]): + def metadata(self, metadata): """Sets the metadata of this HarvestResults. - :param metadata: The metadata of this HarvestResults. - :type metadata: List[HarvestResultsMetadata] + :param metadata: The metadata of this HarvestResults. # noqa: E501 + :type: list[HarvestResultsMetadata] """ self._metadata = metadata + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(HarvestResults, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, HarvestResults): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/harvest_results_metadata.py b/fuji_server/models/harvest_results_metadata.py index f013ad27..f6bee106 100644 --- a/fuji_server/models/harvest_results_metadata.py +++ b/fuji_server/models/harvest_results_metadata.py @@ -1,194 +1,238 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class HarvestResultsMetadata(Model): - """NOTE: This class is auto generated by the swagger code generator program. + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" - Do not edit the class manually. - """ +import pprint +import re # noqa: F401 - def __init__( - self, - method: str | None = None, - url: str | None = None, - format: str | None = None, - schema: str | None = None, - namespaces: list[str] | None = None, - metadata: dict | None = None, - ): - """HarvestResultsMetadata - a model defined in Swagger +import six - :param method: The method of this HarvestResultsMetadata. # noqa: E501 - :type method: str - :param url: The url of this HarvestResultsMetadata. # noqa: E501 - :type url: str - :param format: The format of this HarvestResultsMetadata. # noqa: E501 - :type format: str - :param schema: The schema of this HarvestResultsMetadata. # noqa: E501 - :type schema: str - :param namespaces: The namespaces of this HarvestResultsMetadata. # noqa: E501 - :type namespaces: List[str] - :param metadata: The metadata of this HarvestResultsMetadata. # noqa: E501 - :type metadata: Dict - """ - self.swagger_types = { - "method": str, - "url": str, - "format": str, - "schema": str, - "namespaces": list[str], - "metadata": dict, - } - - self.attribute_map = { - "method": "method", - "url": "url", - "format": "format", - "schema": "schema", - "namespaces": "namespaces", - "metadata": "metadata", - } - self._method = method - self._url = url - self._format = format - self._schema = schema - self._namespaces = namespaces - self._metadata = metadata - @classmethod - def from_dict(cls, dikt) -> "HarvestResultsMetadata": - """Returns the dict as a model +class HarvestResultsMetadata: + """NOTE: This class is auto generated by the swagger code generator program. - :param dikt: A dict. - :type: dict - :return: The HarvestResults_metadata of this HarvestResultsMetadata. # noqa: E501 - :rtype: HarvestResultsMetadata - """ - return util.deserialize_model(dikt, cls) + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + "method": "str", + "url": "str", + "format": "str", + "schema": "str", + "namespaces": "list[str]", + "metadata": "dict(str, object)", + } + + attribute_map = { + "method": "method", + "url": "url", + "format": "format", + "schema": "schema", + "namespaces": "namespaces", + "metadata": "metadata", + } + + def __init__(self, method=None, url=None, format=None, schema=None, namespaces=None, metadata=None): + """HarvestResultsMetadata - a model defined in Swagger""" + self._method = None + self._url = None + self._format = None + self._schema = None + self._namespaces = None + self._metadata = None + self.discriminator = None + if method is not None: + self.method = method + if url is not None: + self.url = url + if format is not None: + self.format = format + if schema is not None: + self.schema = schema + if namespaces is not None: + self.namespaces = namespaces + if metadata is not None: + self.metadata = metadata @property - def method(self) -> str: - """Gets the method of this HarvestResultsMetadata. + def method(self): + """Gets the method of this HarvestResultsMetadata. # noqa: E501 - :return: The method of this HarvestResultsMetadata. + :return: The method of this HarvestResultsMetadata. # noqa: E501 :rtype: str """ return self._method @method.setter - def method(self, method: str): + def method(self, method): """Sets the method of this HarvestResultsMetadata. - :param method: The method of this HarvestResultsMetadata. - :type method: str + :param method: The method of this HarvestResultsMetadata. # noqa: E501 + :type: str """ self._method = method @property - def url(self) -> str: - """Gets the url of this HarvestResultsMetadata. + def url(self): + """Gets the url of this HarvestResultsMetadata. # noqa: E501 - :return: The url of this HarvestResultsMetadata. + :return: The url of this HarvestResultsMetadata. # noqa: E501 :rtype: str """ return self._url @url.setter - def url(self, url: str): + def url(self, url): """Sets the url of this HarvestResultsMetadata. - :param url: The url of this HarvestResultsMetadata. - :type url: str + :param url: The url of this HarvestResultsMetadata. # noqa: E501 + :type: str """ self._url = url @property - def format(self) -> str: - """Gets the format of this HarvestResultsMetadata. + def format(self): + """Gets the format of this HarvestResultsMetadata. # noqa: E501 - :return: The format of this HarvestResultsMetadata. + :return: The format of this HarvestResultsMetadata. # noqa: E501 :rtype: str """ return self._format @format.setter - def format(self, format: str): + def format(self, format): """Sets the format of this HarvestResultsMetadata. - :param format: The format of this HarvestResultsMetadata. - :type format: str + :param format: The format of this HarvestResultsMetadata. # noqa: E501 + :type: str """ self._format = format @property - def schema(self) -> str: - """Gets the schema of this HarvestResultsMetadata. + def schema(self): + """Gets the schema of this HarvestResultsMetadata. # noqa: E501 - :return: The schema of this HarvestResultsMetadata. + :return: The schema of this HarvestResultsMetadata. # noqa: E501 :rtype: str """ return self._schema @schema.setter - def schema(self, schema: str): + def schema(self, schema): """Sets the schema of this HarvestResultsMetadata. - :param schema: The schema of this HarvestResultsMetadata. - :type schema: str + :param schema: The schema of this HarvestResultsMetadata. # noqa: E501 + :type: str """ self._schema = schema @property - def namespaces(self) -> list[str]: - """Gets the namespaces of this HarvestResultsMetadata. + def namespaces(self): + """Gets the namespaces of this HarvestResultsMetadata. # noqa: E501 - :return: The namespaces of this HarvestResultsMetadata. - :rtype: List[str] + :return: The namespaces of this HarvestResultsMetadata. # noqa: E501 + :rtype: list[str] """ return self._namespaces @namespaces.setter - def namespaces(self, namespaces: list[str]): + def namespaces(self, namespaces): """Sets the namespaces of this HarvestResultsMetadata. - :param namespaces: The namespaces of this HarvestResultsMetadata. - :type namespaces: List[str] + :param namespaces: The namespaces of this HarvestResultsMetadata. # noqa: E501 + :type: list[str] """ self._namespaces = namespaces @property - def metadata(self) -> dict: - """Gets the metadata of this HarvestResultsMetadata. + def metadata(self): + """Gets the metadata of this HarvestResultsMetadata. # noqa: E501 - :return: The metadata of this HarvestResultsMetadata. - :rtype: Dict + :return: The metadata of this HarvestResultsMetadata. # noqa: E501 + :rtype: dict(str, object) """ return self._metadata @metadata.setter - def metadata(self, metadata: dict): + def metadata(self, metadata): """Sets the metadata of this HarvestResultsMetadata. - :param metadata: The metadata of this HarvestResultsMetadata. - :type metadata: Dict + :param metadata: The metadata of this HarvestResultsMetadata. # noqa: E501 + :type: dict(str, object) """ self._metadata = metadata + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(HarvestResultsMetadata, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, HarvestResultsMetadata): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/identifier_included.py b/fuji_server/models/identifier_included.py index 1749d116..aceff53b 100644 --- a/fuji_server/models/identifier_included.py +++ b/fuji_server/models/identifier_included.py @@ -1,291 +1,135 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model -from fuji_server.models.debug import Debug -from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium -from fuji_server.models.identifier_included_output import IdentifierIncludedOutput +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class IdentifierIncluded(Model): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - def __init__( - self, - id: int | None = None, - metric_identifier: str | None = None, - metric_name: str | None = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, - test_status: str = "fail", - score: FAIRResultCommonScore = None, - maturity: str = "incomplete", - output: IdentifierIncludedOutput = None, - test_debug: Debug = None, - ): - """IdentifierIncluded - a model defined in Swagger - - :param id: The id of this IdentifierIncluded. # noqa: E501 - :type id: int - :param metric_identifier: The metric_identifier of this IdentifierIncluded. # noqa: E501 - :type metric_identifier: str - :param metric_name: The metric_name of this IdentifierIncluded. # noqa: E501 - :type metric_name: str - :param metric_tests: The metric_tests of this IdentifierIncluded. # noqa: E501 - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - :param test_status: The test_status of this IdentifierIncluded. # noqa: E501 - :type test_status: str - :param score: The score of this IdentifierIncluded. # noqa: E501 - :type score: FAIRResultCommonScore - :param maturity: The maturity of this IdentifierIncluded. # noqa: E501 - :type maturity: str - :param output: The output of this IdentifierIncluded. # noqa: E501 - :type output: IdentifierIncludedOutput - :param test_debug: The test_debug of this IdentifierIncluded. # noqa: E501 - :type test_debug: Debug - """ - self.swagger_types = { - "id": int, - "metric_identifier": str, - "metric_name": str, - "metric_tests": dict[str, FAIRResultEvaluationCriterium], - "test_status": str, - "score": FAIRResultCommonScore, - "maturity": str, - "output": IdentifierIncludedOutput, - "test_debug": Debug, - } - - self.attribute_map = { - "id": "id", - "metric_identifier": "metric_identifier", - "metric_name": "metric_name", - "metric_tests": "metric_tests", - "test_status": "test_status", - "score": "score", - "maturity": "maturity", - "output": "output", - "test_debug": "test_debug", - } - self._id = id - self._metric_identifier = metric_identifier - self._metric_name = metric_name - self._metric_tests = metric_tests - self._test_status = test_status - self._score = score - self._maturity = maturity - self._output = output - self._test_debug = test_debug - - @classmethod - def from_dict(cls, dikt) -> "IdentifierIncluded": - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The IdentifierIncluded of this IdentifierIncluded. # noqa: E501 - :rtype: IdentifierIncluded - """ - return util.deserialize_model(dikt, cls) - - @property - def id(self) -> int: - """Gets the id of this IdentifierIncluded. - - - :return: The id of this IdentifierIncluded. - :rtype: int - """ - return self._id - - @id.setter - def id(self, id: int): - """Sets the id of this IdentifierIncluded. - - - :param id: The id of this IdentifierIncluded. - :type id: int - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") - - self._id = id - - @property - def metric_identifier(self) -> str: - """Gets the metric_identifier of this IdentifierIncluded. - - - :return: The metric_identifier of this IdentifierIncluded. - :rtype: str - """ - return self._metric_identifier - - @metric_identifier.setter - def metric_identifier(self, metric_identifier: str): - """Sets the metric_identifier of this IdentifierIncluded. - - - :param metric_identifier: The metric_identifier of this IdentifierIncluded. - :type metric_identifier: str - """ - if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") - - self._metric_identifier = metric_identifier - - @property - def metric_name(self) -> str: - """Gets the metric_name of this IdentifierIncluded. - - - :return: The metric_name of this IdentifierIncluded. - :rtype: str - """ - return self._metric_name - - @metric_name.setter - def metric_name(self, metric_name: str): - """Sets the metric_name of this IdentifierIncluded. - - - :param metric_name: The metric_name of this IdentifierIncluded. - :type metric_name: str - """ - if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" - self._metric_name = metric_name +import pprint +import re # noqa: F401 - @property - def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: - """Gets the metric_tests of this IdentifierIncluded. - - - :return: The metric_tests of this IdentifierIncluded. - :rtype: Dict[str, FAIRResultEvaluationCriterium] - """ - return self._metric_tests - - @metric_tests.setter - def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): - """Sets the metric_tests of this IdentifierIncluded. - - - :param metric_tests: The metric_tests of this IdentifierIncluded. - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - """ - - self._metric_tests = metric_tests - - @property - def test_status(self) -> str: - """Gets the test_status of this IdentifierIncluded. - - - :return: The test_status of this IdentifierIncluded. - :rtype: str - """ - return self._test_status - - @test_status.setter - def test_status(self, test_status: str): - """Sets the test_status of this IdentifierIncluded. - - - :param test_status: The test_status of this IdentifierIncluded. - :type test_status: str - """ - allowed_values = ["pass", "fail", "indeterminate"] - if test_status not in allowed_values: - raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") - - self._test_status = test_status - - @property - def score(self) -> FAIRResultCommonScore: - """Gets the score of this IdentifierIncluded. +import six +from swagger_client.models.fair_result_common import FAIRResultCommon - :return: The score of this IdentifierIncluded. - :rtype: FAIRResultCommonScore - """ - return self._score - - @score.setter - def score(self, score: FAIRResultCommonScore): - """Sets the score of this IdentifierIncluded. - - - :param score: The score of this IdentifierIncluded. - :type score: FAIRResultCommonScore - """ - if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") - - self._score = score - - @property - def maturity(self) -> str: - """Gets the maturity of this IdentifierIncluded. - - - :return: The maturity of this IdentifierIncluded. - :rtype: str - """ - return self._maturity - - @maturity.setter - def maturity(self, maturity: str): - """Sets the maturity of this IdentifierIncluded. +class IdentifierIncluded(FAIRResultCommon): + """NOTE: This class is auto generated by the swagger code generator program. - :param maturity: The maturity of this IdentifierIncluded. - :type maturity: str - """ + Do not edit the class manually. + """ - self._maturity = maturity + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"output": "IdentifierIncludedOutput", "test_debug": "Debug"} + if hasattr(FAIRResultCommon, "swagger_types"): + swagger_types.update(FAIRResultCommon.swagger_types) + + attribute_map = {"output": "output", "test_debug": "test_debug"} + if hasattr(FAIRResultCommon, "attribute_map"): + attribute_map.update(FAIRResultCommon.attribute_map) + + def __init__(self, output=None, test_debug=None, *args, **kwargs): + """IdentifierIncluded - a model defined in Swagger""" + self._output = None + self._test_debug = None + self.discriminator = None + if output is not None: + self.output = output + if test_debug is not None: + self.test_debug = test_debug + FAIRResultCommon.__init__(self, *args, **kwargs) @property - def output(self) -> IdentifierIncludedOutput: - """Gets the output of this IdentifierIncluded. + def output(self): + """Gets the output of this IdentifierIncluded. # noqa: E501 - :return: The output of this IdentifierIncluded. + :return: The output of this IdentifierIncluded. # noqa: E501 :rtype: IdentifierIncludedOutput """ return self._output @output.setter - def output(self, output: IdentifierIncludedOutput): + def output(self, output): """Sets the output of this IdentifierIncluded. - :param output: The output of this IdentifierIncluded. - :type output: IdentifierIncludedOutput + :param output: The output of this IdentifierIncluded. # noqa: E501 + :type: IdentifierIncludedOutput """ self._output = output @property - def test_debug(self) -> Debug: - """Gets the test_debug of this IdentifierIncluded. + def test_debug(self): + """Gets the test_debug of this IdentifierIncluded. # noqa: E501 - :return: The test_debug of this IdentifierIncluded. + :return: The test_debug of this IdentifierIncluded. # noqa: E501 :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug: Debug): + def test_debug(self, test_debug): """Sets the test_debug of this IdentifierIncluded. - :param test_debug: The test_debug of this IdentifierIncluded. - :type test_debug: Debug + :param test_debug: The test_debug of this IdentifierIncluded. # noqa: E501 + :type: Debug """ self._test_debug = test_debug + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(IdentifierIncluded, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, IdentifierIncluded): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/identifier_included_output.py b/fuji_server/models/identifier_included_output.py index ee8f8640..bb351c91 100644 --- a/fuji_server/models/identifier_included_output.py +++ b/fuji_server/models/identifier_included_output.py @@ -1,55 +1,134 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model -from fuji_server.models.identifier_included_output_inner import IdentifierIncludedOutputInner +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class IdentifierIncludedOutput(Model): + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class IdentifierIncludedOutput: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - def __init__(self, object_content_identifier_included: list[IdentifierIncludedOutputInner] | None = None): - """IdentifierIncludedOutput - a model defined in Swagger + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + "object_identifier_included": "str", + "object_content_identifier_included": "list[IdentifierIncludedOutputInner]", + } + + attribute_map = { + "object_identifier_included": "object_identifier_included", + "object_content_identifier_included": "object_content_identifier_included", + } - :param object_content_identifier_included: The object_content_identifier_included of this IdentifierIncludedOutput. # noqa: E501 - :type object_content_identifier_included: List[IdentifierIncludedOutputInner] + def __init__(self, object_identifier_included=None, object_content_identifier_included=None): + """IdentifierIncludedOutput - a model defined in Swagger""" + self._object_identifier_included = None + self._object_content_identifier_included = None + self.discriminator = None + if object_identifier_included is not None: + self.object_identifier_included = object_identifier_included + if object_content_identifier_included is not None: + self.object_content_identifier_included = object_content_identifier_included + + @property + def object_identifier_included(self): + """Gets the object_identifier_included of this IdentifierIncludedOutput. # noqa: E501 + + + :return: The object_identifier_included of this IdentifierIncludedOutput. # noqa: E501 + :rtype: str """ - self.swagger_types = {"object_content_identifier_included": list[IdentifierIncludedOutputInner]} + return self._object_identifier_included - self.attribute_map = {"object_content_identifier_included": "object_content_identifier_included"} - self._object_content_identifier_included = object_content_identifier_included + @object_identifier_included.setter + def object_identifier_included(self, object_identifier_included): + """Sets the object_identifier_included of this IdentifierIncludedOutput. - @classmethod - def from_dict(cls, dikt) -> "IdentifierIncludedOutput": - """Returns the dict as a model - :param dikt: A dict. - :type: dict - :return: The IdentifierIncluded_output of this IdentifierIncludedOutput. # noqa: E501 - :rtype: IdentifierIncludedOutput + :param object_identifier_included: The object_identifier_included of this IdentifierIncludedOutput. # noqa: E501 + :type: str """ - return util.deserialize_model(dikt, cls) + + self._object_identifier_included = object_identifier_included @property - def object_content_identifier_included(self) -> list[IdentifierIncludedOutputInner]: - """Gets the object_content_identifier_included of this IdentifierIncludedOutput. + def object_content_identifier_included(self): + """Gets the object_content_identifier_included of this IdentifierIncludedOutput. # noqa: E501 - :return: The object_content_identifier_included of this IdentifierIncludedOutput. - :rtype: List[IdentifierIncludedOutputInner] + :return: The object_content_identifier_included of this IdentifierIncludedOutput. # noqa: E501 + :rtype: list[IdentifierIncludedOutputInner] """ return self._object_content_identifier_included @object_content_identifier_included.setter - def object_content_identifier_included( - self, object_content_identifier_included: list[IdentifierIncludedOutputInner] - ): + def object_content_identifier_included(self, object_content_identifier_included): """Sets the object_content_identifier_included of this IdentifierIncludedOutput. - :param object_content_identifier_included: The object_content_identifier_included of this IdentifierIncludedOutput. - :type object_content_identifier_included: List[IdentifierIncludedOutputInner] + :param object_content_identifier_included: The object_content_identifier_included of this IdentifierIncludedOutput. # noqa: E501 + :type: list[IdentifierIncludedOutputInner] """ self._object_content_identifier_included = object_content_identifier_included + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(IdentifierIncludedOutput, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, IdentifierIncludedOutput): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/identifier_included_output_inner.py b/fuji_server/models/identifier_included_output_inner.py index 2cf4e8b0..89dfb8fb 100644 --- a/fuji_server/models/identifier_included_output_inner.py +++ b/fuji_server/models/identifier_included_output_inner.py @@ -1,52 +1,104 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class IdentifierIncludedOutputInner(Model): + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class IdentifierIncludedOutputInner: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - def __init__(self, content_identifier_included: str | None = None): - """IdentifierIncludedOutputInner - a model defined in Swagger - - :param content_identifier_included: The content_identifier_included of this IdentifierIncludedOutputInner. # noqa: E501 - :type content_identifier_included: str - """ - self.swagger_types = {"content_identifier_included": str} + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"content_identifier_included": "str"} - self.attribute_map = {"content_identifier_included": "content_identifier_included"} - self._content_identifier_included = content_identifier_included + attribute_map = {"content_identifier_included": "content_identifier_included"} - @classmethod - def from_dict(cls, dikt) -> "IdentifierIncludedOutputInner": - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The IdentifierIncluded_output_inner of this IdentifierIncludedOutputInner. # noqa: E501 - :rtype: IdentifierIncludedOutputInner - """ - return util.deserialize_model(dikt, cls) + def __init__(self, content_identifier_included=None): + """IdentifierIncludedOutputInner - a model defined in Swagger""" + self._content_identifier_included = None + self.discriminator = None + if content_identifier_included is not None: + self.content_identifier_included = content_identifier_included @property - def content_identifier_included(self) -> str: - """Gets the content_identifier_included of this IdentifierIncludedOutputInner. + def content_identifier_included(self): + """Gets the content_identifier_included of this IdentifierIncludedOutputInner. # noqa: E501 - :return: The content_identifier_included of this IdentifierIncludedOutputInner. + :return: The content_identifier_included of this IdentifierIncludedOutputInner. # noqa: E501 :rtype: str """ return self._content_identifier_included @content_identifier_included.setter - def content_identifier_included(self, content_identifier_included: str): + def content_identifier_included(self, content_identifier_included): """Sets the content_identifier_included of this IdentifierIncludedOutputInner. - :param content_identifier_included: The content_identifier_included of this IdentifierIncludedOutputInner. - :type content_identifier_included: str + :param content_identifier_included: The content_identifier_included of this IdentifierIncludedOutputInner. # noqa: E501 + :type: str """ self._content_identifier_included = content_identifier_included + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(IdentifierIncludedOutputInner, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, IdentifierIncludedOutputInner): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/license.py b/fuji_server/models/license.py index 93b83e6d..391472d6 100644 --- a/fuji_server/models/license.py +++ b/fuji_server/models/license.py @@ -1,291 +1,135 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model -from fuji_server.models.debug import Debug -from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium -from fuji_server.models.license_output import LicenseOutput +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class License(Model): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - def __init__( - self, - id: int | None = None, - metric_identifier: str | None = None, - metric_name: str | None = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, - test_status: str = "fail", - score: FAIRResultCommonScore = None, - maturity: str = "incomplete", - output: LicenseOutput = None, - test_debug: Debug = None, - ): - """License - a model defined in Swagger - - :param id: The id of this License. # noqa: E501 - :type id: int - :param metric_identifier: The metric_identifier of this License. # noqa: E501 - :type metric_identifier: str - :param metric_name: The metric_name of this License. # noqa: E501 - :type metric_name: str - :param metric_tests: The metric_tests of this License. # noqa: E501 - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - :param test_status: The test_status of this License. # noqa: E501 - :type test_status: str - :param score: The score of this License. # noqa: E501 - :type score: FAIRResultCommonScore - :param maturity: The maturity of this License. # noqa: E501 - :type maturity: str - :param output: The output of this License. # noqa: E501 - :type output: LicenseOutput - :param test_debug: The test_debug of this License. # noqa: E501 - :type test_debug: Debug - """ - self.swagger_types = { - "id": int, - "metric_identifier": str, - "metric_name": str, - "metric_tests": dict[str, FAIRResultEvaluationCriterium], - "test_status": str, - "score": FAIRResultCommonScore, - "maturity": str, - "output": LicenseOutput, - "test_debug": Debug, - } - - self.attribute_map = { - "id": "id", - "metric_identifier": "metric_identifier", - "metric_name": "metric_name", - "metric_tests": "metric_tests", - "test_status": "test_status", - "score": "score", - "maturity": "maturity", - "output": "output", - "test_debug": "test_debug", - } - self._id = id - self._metric_identifier = metric_identifier - self._metric_name = metric_name - self._metric_tests = metric_tests - self._test_status = test_status - self._score = score - self._maturity = maturity - self._output = output - self._test_debug = test_debug - - @classmethod - def from_dict(cls, dikt) -> "License": - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The License of this License. # noqa: E501 - :rtype: License - """ - return util.deserialize_model(dikt, cls) - - @property - def id(self) -> int: - """Gets the id of this License. - - - :return: The id of this License. - :rtype: int - """ - return self._id - - @id.setter - def id(self, id: int): - """Sets the id of this License. - - - :param id: The id of this License. - :type id: int - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") - - self._id = id - - @property - def metric_identifier(self) -> str: - """Gets the metric_identifier of this License. - - - :return: The metric_identifier of this License. - :rtype: str - """ - return self._metric_identifier - - @metric_identifier.setter - def metric_identifier(self, metric_identifier: str): - """Sets the metric_identifier of this License. - - - :param metric_identifier: The metric_identifier of this License. - :type metric_identifier: str - """ - if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") - - self._metric_identifier = metric_identifier - - @property - def metric_name(self) -> str: - """Gets the metric_name of this License. - - - :return: The metric_name of this License. - :rtype: str - """ - return self._metric_name - - @metric_name.setter - def metric_name(self, metric_name: str): - """Sets the metric_name of this License. - - - :param metric_name: The metric_name of this License. - :type metric_name: str - """ - if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" - self._metric_name = metric_name +import pprint +import re # noqa: F401 - @property - def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: - """Gets the metric_tests of this License. - - - :return: The metric_tests of this License. - :rtype: Dict[str, FAIRResultEvaluationCriterium] - """ - return self._metric_tests - - @metric_tests.setter - def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): - """Sets the metric_tests of this License. - - - :param metric_tests: The metric_tests of this License. - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - """ - - self._metric_tests = metric_tests - - @property - def test_status(self) -> str: - """Gets the test_status of this License. - - - :return: The test_status of this License. - :rtype: str - """ - return self._test_status - - @test_status.setter - def test_status(self, test_status: str): - """Sets the test_status of this License. - - - :param test_status: The test_status of this License. - :type test_status: str - """ - allowed_values = ["pass", "fail", "indeterminate"] - if test_status not in allowed_values: - raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") - - self._test_status = test_status - - @property - def score(self) -> FAIRResultCommonScore: - """Gets the score of this License. +import six +from swagger_client.models.fair_result_common import FAIRResultCommon - :return: The score of this License. - :rtype: FAIRResultCommonScore - """ - return self._score - - @score.setter - def score(self, score: FAIRResultCommonScore): - """Sets the score of this License. - - - :param score: The score of this License. - :type score: FAIRResultCommonScore - """ - if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") - - self._score = score - - @property - def maturity(self) -> str: - """Gets the maturity of this License. - - - :return: The maturity of this License. - :rtype: str - """ - return self._maturity - - @maturity.setter - def maturity(self, maturity: int): - """Sets the maturity of this Uniqueness. +class License(FAIRResultCommon): + """NOTE: This class is auto generated by the swagger code generator program. - :param maturity: The maturity of this Uniqueness. - :type maturity: int - """ + Do not edit the class manually. + """ - self._maturity = maturity + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"output": "LicenseOutput", "test_debug": "Debug"} + if hasattr(FAIRResultCommon, "swagger_types"): + swagger_types.update(FAIRResultCommon.swagger_types) + + attribute_map = {"output": "output", "test_debug": "test_debug"} + if hasattr(FAIRResultCommon, "attribute_map"): + attribute_map.update(FAIRResultCommon.attribute_map) + + def __init__(self, output=None, test_debug=None, *args, **kwargs): + """License - a model defined in Swagger""" + self._output = None + self._test_debug = None + self.discriminator = None + if output is not None: + self.output = output + if test_debug is not None: + self.test_debug = test_debug + FAIRResultCommon.__init__(self, *args, **kwargs) @property - def output(self) -> LicenseOutput: - """Gets the output of this License. + def output(self): + """Gets the output of this License. # noqa: E501 - :return: The output of this License. + :return: The output of this License. # noqa: E501 :rtype: LicenseOutput """ return self._output @output.setter - def output(self, output: LicenseOutput): + def output(self, output): """Sets the output of this License. - :param output: The output of this License. - :type output: LicenseOutput + :param output: The output of this License. # noqa: E501 + :type: LicenseOutput """ self._output = output @property - def test_debug(self) -> Debug: - """Gets the test_debug of this License. + def test_debug(self): + """Gets the test_debug of this License. # noqa: E501 - :return: The test_debug of this License. + :return: The test_debug of this License. # noqa: E501 :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug: Debug): + def test_debug(self, test_debug): """Sets the test_debug of this License. - :param test_debug: The test_debug of this License. - :type test_debug: Debug + :param test_debug: The test_debug of this License. # noqa: E501 + :type: Debug """ self._test_debug = test_debug + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(License, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, License): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/license_output.py b/fuji_server/models/license_output.py index bab98134..b66c713e 100644 --- a/fuji_server/models/license_output.py +++ b/fuji_server/models/license_output.py @@ -1,27 +1,80 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model -from fuji_server.models.license_output_inner import LicenseOutputInner # noqa: F401 +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class LicenseOutput(Model): + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class LicenseOutput: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {} + + attribute_map = {} + def __init__(self): """LicenseOutput - a model defined in Swagger""" - self.swagger_types = {} + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(LicenseOutput, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() - self.attribute_map = {} + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LicenseOutput): + return False - @classmethod - def from_dict(cls, dikt) -> "LicenseOutput": - """Returns the dict as a model + return self.__dict__ == other.__dict__ - :param dikt: A dict. - :type: dict - :return: The License_output of this LicenseOutput. # noqa: E501 - :rtype: LicenseOutput - """ - return util.deserialize_model(dikt, cls) + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/license_output_inner.py b/fuji_server/models/license_output_inner.py index c92fc759..297eb116 100644 --- a/fuji_server/models/license_output_inner.py +++ b/fuji_server/models/license_output_inner.py @@ -1,100 +1,152 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class LicenseOutputInner(Model): - """NOTE: This class is auto generated by the swagger code generator program. + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" - Do not edit the class manually. - """ +import pprint +import re # noqa: F401 - def __init__(self, license: str | None = None, osi_approved: bool = False, details_url: str | None = None): - """LicenseOutputInner - a model defined in Swagger +import six - :param license: The license of this LicenseOutputInner. # noqa: E501 - :type license: str - :param osi_approved: The osi_approved of this LicenseOutputInner. # noqa: E501 - :type osi_approved: bool - :param details_url: The details_url of this LicenseOutputInner. # noqa: E501 - :type details_url: str - """ - self.swagger_types = {"license": str, "osi_approved": bool, "details_url": str} - self.attribute_map = {"license": "license", "osi_approved": "OSI_approved", "details_url": "details_url"} - self._license = license - self._osi_approved = osi_approved - self._details_url = details_url +class LicenseOutputInner: + """NOTE: This class is auto generated by the swagger code generator program. - @classmethod - def from_dict(cls, dikt) -> "LicenseOutputInner": - """Returns the dict as a model + Do not edit the class manually. + """ - :param dikt: A dict. - :type: dict - :return: The License_output_inner of this LicenseOutputInner. # noqa: E501 - :rtype: LicenseOutputInner - """ - return util.deserialize_model(dikt, cls) + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"license": "str", "osi_approved": "bool", "details_url": "str"} + + attribute_map = {"license": "license", "osi_approved": "OSI_approved", "details_url": "details_url"} + + def __init__(self, license=None, osi_approved=False, details_url=None): + """LicenseOutputInner - a model defined in Swagger""" + self._license = None + self._osi_approved = None + self._details_url = None + self.discriminator = None + if license is not None: + self.license = license + if osi_approved is not None: + self.osi_approved = osi_approved + if details_url is not None: + self.details_url = details_url @property - def license(self) -> str: - """Gets the license of this LicenseOutputInner. + def license(self): + """Gets the license of this LicenseOutputInner. # noqa: E501 - :return: The license of this LicenseOutputInner. + :return: The license of this LicenseOutputInner. # noqa: E501 :rtype: str """ return self._license @license.setter - def license(self, license: str): + def license(self, license): """Sets the license of this LicenseOutputInner. - :param license: The license of this LicenseOutputInner. - :type license: str + :param license: The license of this LicenseOutputInner. # noqa: E501 + :type: str """ self._license = license @property - def osi_approved(self) -> bool: - """Gets the osi_approved of this LicenseOutputInner. + def osi_approved(self): + """Gets the osi_approved of this LicenseOutputInner. # noqa: E501 - :return: The osi_approved of this LicenseOutputInner. + :return: The osi_approved of this LicenseOutputInner. # noqa: E501 :rtype: bool """ return self._osi_approved @osi_approved.setter - def osi_approved(self, osi_approved: bool): + def osi_approved(self, osi_approved): """Sets the osi_approved of this LicenseOutputInner. - :param osi_approved: The osi_approved of this LicenseOutputInner. - :type osi_approved: bool + :param osi_approved: The osi_approved of this LicenseOutputInner. # noqa: E501 + :type: bool """ self._osi_approved = osi_approved @property - def details_url(self) -> str: - """Gets the details_url of this LicenseOutputInner. + def details_url(self): + """Gets the details_url of this LicenseOutputInner. # noqa: E501 - :return: The details_url of this LicenseOutputInner. + :return: The details_url of this LicenseOutputInner. # noqa: E501 :rtype: str """ return self._details_url @details_url.setter - def details_url(self, details_url: str): + def details_url(self, details_url): """Sets the details_url of this LicenseOutputInner. - :param details_url: The details_url of this LicenseOutputInner. - :type details_url: str + :param details_url: The details_url of this LicenseOutputInner. # noqa: E501 + :type: str """ self._details_url = details_url + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(LicenseOutputInner, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LicenseOutputInner): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/metadata_preserved.py b/fuji_server/models/metadata_preserved.py index c2d55e14..b8f71b5f 100644 --- a/fuji_server/models/metadata_preserved.py +++ b/fuji_server/models/metadata_preserved.py @@ -1,291 +1,135 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model -from fuji_server.models.debug import Debug -from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium -from fuji_server.models.metadata_preserved_output import MetadataPreservedOutput +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class MetadataPreserved(Model): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - def __init__( - self, - id: int | None = None, - metric_identifier: str | None = None, - metric_name: str | None = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, - test_status: str = "fail", - score: FAIRResultCommonScore = None, - maturity: str = "incomplete", - output: MetadataPreservedOutput = None, - test_debug: Debug = None, - ): - """MetadataPreserved - a model defined in Swagger - - :param id: The id of this MetadataPreserved. # noqa: E501 - :type id: int - :param metric_identifier: The metric_identifier of this MetadataPreserved. # noqa: E501 - :type metric_identifier: str - :param metric_name: The metric_name of this MetadataPreserved. # noqa: E501 - :type metric_name: str - :param metric_tests: The metric_tests of this MetadataPreserved. # noqa: E501 - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - :param test_status: The test_status of this MetadataPreserved. # noqa: E501 - :type test_status: str - :param score: The score of this MetadataPreserved. # noqa: E501 - :type score: FAIRResultCommonScore - :param maturity: The maturity of this MetadataPreserved. # noqa: E501 - :type maturity: str - :param output: The output of this MetadataPreserved. # noqa: E501 - :type output: MetadataPreservedOutput - :param test_debug: The test_debug of this MetadataPreserved. # noqa: E501 - :type test_debug: Debug - """ - self.swagger_types = { - "id": int, - "metric_identifier": str, - "metric_name": str, - "metric_tests": dict[str, FAIRResultEvaluationCriterium], - "test_status": str, - "score": FAIRResultCommonScore, - "maturity": str, - "output": MetadataPreservedOutput, - "test_debug": Debug, - } - - self.attribute_map = { - "id": "id", - "metric_identifier": "metric_identifier", - "metric_name": "metric_name", - "metric_tests": "metric_tests", - "test_status": "test_status", - "score": "score", - "maturity": "maturity", - "output": "output", - "test_debug": "test_debug", - } - self._id = id - self._metric_identifier = metric_identifier - self._metric_name = metric_name - self._metric_tests = metric_tests - self._test_status = test_status - self._score = score - self._maturity = maturity - self._output = output - self._test_debug = test_debug - - @classmethod - def from_dict(cls, dikt) -> "MetadataPreserved": - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The MetadataPreserved of this MetadataPreserved. # noqa: E501 - :rtype: MetadataPreserved - """ - return util.deserialize_model(dikt, cls) - - @property - def id(self) -> int: - """Gets the id of this MetadataPreserved. - - - :return: The id of this MetadataPreserved. - :rtype: int - """ - return self._id - - @id.setter - def id(self, id: int): - """Sets the id of this MetadataPreserved. - - - :param id: The id of this MetadataPreserved. - :type id: int - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") - - self._id = id - - @property - def metric_identifier(self) -> str: - """Gets the metric_identifier of this MetadataPreserved. - - - :return: The metric_identifier of this MetadataPreserved. - :rtype: str - """ - return self._metric_identifier - - @metric_identifier.setter - def metric_identifier(self, metric_identifier: str): - """Sets the metric_identifier of this MetadataPreserved. - - - :param metric_identifier: The metric_identifier of this MetadataPreserved. - :type metric_identifier: str - """ - if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") - - self._metric_identifier = metric_identifier - - @property - def metric_name(self) -> str: - """Gets the metric_name of this MetadataPreserved. - - - :return: The metric_name of this MetadataPreserved. - :rtype: str - """ - return self._metric_name - - @metric_name.setter - def metric_name(self, metric_name: str): - """Sets the metric_name of this MetadataPreserved. - - - :param metric_name: The metric_name of this MetadataPreserved. - :type metric_name: str - """ - if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" - self._metric_name = metric_name +import pprint +import re # noqa: F401 - @property - def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: - """Gets the metric_tests of this MetadataPreserved. - - - :return: The metric_tests of this MetadataPreserved. - :rtype: Dict[str, FAIRResultEvaluationCriterium] - """ - return self._metric_tests - - @metric_tests.setter - def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): - """Sets the metric_tests of this MetadataPreserved. - - - :param metric_tests: The metric_tests of this MetadataPreserved. - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - """ - - self._metric_tests = metric_tests - - @property - def test_status(self) -> str: - """Gets the test_status of this MetadataPreserved. - - - :return: The test_status of this MetadataPreserved. - :rtype: str - """ - return self._test_status - - @test_status.setter - def test_status(self, test_status: str): - """Sets the test_status of this MetadataPreserved. - - - :param test_status: The test_status of this MetadataPreserved. - :type test_status: str - """ - allowed_values = ["pass", "fail", "indeterminate"] - if test_status not in allowed_values: - raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") - - self._test_status = test_status - - @property - def score(self) -> FAIRResultCommonScore: - """Gets the score of this MetadataPreserved. +import six +from swagger_client.models.fair_result_common import FAIRResultCommon - :return: The score of this MetadataPreserved. - :rtype: FAIRResultCommonScore - """ - return self._score - - @score.setter - def score(self, score: FAIRResultCommonScore): - """Sets the score of this MetadataPreserved. - - - :param score: The score of this MetadataPreserved. - :type score: FAIRResultCommonScore - """ - if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") - - self._score = score - - @property - def maturity(self) -> str: - """Gets the maturity of this MetadataPreserved. - - - :return: The maturity of this MetadataPreserved. - :rtype: str - """ - return self._maturity - - @maturity.setter - def maturity(self, maturity: int): - """Sets the maturity of this Uniqueness. +class MetadataPreserved(FAIRResultCommon): + """NOTE: This class is auto generated by the swagger code generator program. - :param maturity: The maturity of this Uniqueness. - :type maturity: int - """ + Do not edit the class manually. + """ - self._maturity = maturity + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"output": "MetadataPreservedOutput", "test_debug": "Debug"} + if hasattr(FAIRResultCommon, "swagger_types"): + swagger_types.update(FAIRResultCommon.swagger_types) + + attribute_map = {"output": "output", "test_debug": "test_debug"} + if hasattr(FAIRResultCommon, "attribute_map"): + attribute_map.update(FAIRResultCommon.attribute_map) + + def __init__(self, output=None, test_debug=None, *args, **kwargs): + """MetadataPreserved - a model defined in Swagger""" + self._output = None + self._test_debug = None + self.discriminator = None + if output is not None: + self.output = output + if test_debug is not None: + self.test_debug = test_debug + FAIRResultCommon.__init__(self, *args, **kwargs) @property - def output(self) -> MetadataPreservedOutput: - """Gets the output of this MetadataPreserved. + def output(self): + """Gets the output of this MetadataPreserved. # noqa: E501 - :return: The output of this MetadataPreserved. + :return: The output of this MetadataPreserved. # noqa: E501 :rtype: MetadataPreservedOutput """ return self._output @output.setter - def output(self, output: MetadataPreservedOutput): + def output(self, output): """Sets the output of this MetadataPreserved. - :param output: The output of this MetadataPreserved. - :type output: MetadataPreservedOutput + :param output: The output of this MetadataPreserved. # noqa: E501 + :type: MetadataPreservedOutput """ self._output = output @property - def test_debug(self) -> Debug: - """Gets the test_debug of this MetadataPreserved. + def test_debug(self): + """Gets the test_debug of this MetadataPreserved. # noqa: E501 - :return: The test_debug of this MetadataPreserved. + :return: The test_debug of this MetadataPreserved. # noqa: E501 :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug: Debug): + def test_debug(self, test_debug): """Sets the test_debug of this MetadataPreserved. - :param test_debug: The test_debug of this MetadataPreserved. - :type test_debug: Debug + :param test_debug: The test_debug of this MetadataPreserved. # noqa: E501 + :type: Debug """ self._test_debug = test_debug + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(MetadataPreserved, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MetadataPreserved): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/metadata_preserved_output.py b/fuji_server/models/metadata_preserved_output.py index 4842b195..30647ca9 100644 --- a/fuji_server/models/metadata_preserved_output.py +++ b/fuji_server/models/metadata_preserved_output.py @@ -1,52 +1,60 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class MetadataPreservedOutput(Model): + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class MetadataPreservedOutput: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - def __init__(self, metadata_preservation_method: list[str] | None = None): - """MetadataPreservedOutput - a model defined in Swagger - - :param metadata_preservation_method: The metadata_preservation_method of this MetadataPreservedOutput. # noqa: E501 - :type metadata_preservation_method: List[str] - """ - self.swagger_types = {"metadata_preservation_method": list[str]} - - self.attribute_map = {"metadata_preservation_method": "metadata_preservation_method"} - self._metadata_preservation_method = metadata_preservation_method + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"metadata_preservation_method": "list[str]"} - @classmethod - def from_dict(cls, dikt) -> "MetadataPreservedOutput": - """Returns the dict as a model + attribute_map = {"metadata_preservation_method": "metadata_preservation_method"} - :param dikt: A dict. - :type: dict - :return: The MetadataPreserved_output of this MetadataPreservedOutput. # noqa: E501 - :rtype: MetadataPreservedOutput - """ - return util.deserialize_model(dikt, cls) + def __init__(self, metadata_preservation_method=None): + """MetadataPreservedOutput - a model defined in Swagger""" + self._metadata_preservation_method = None + self.discriminator = None + if metadata_preservation_method is not None: + self.metadata_preservation_method = metadata_preservation_method @property - def metadata_preservation_method(self) -> list[str]: - """Gets the metadata_preservation_method of this MetadataPreservedOutput. + def metadata_preservation_method(self): + """Gets the metadata_preservation_method of this MetadataPreservedOutput. # noqa: E501 - :return: The metadata_preservation_method of this MetadataPreservedOutput. - :rtype: List[str] + :return: The metadata_preservation_method of this MetadataPreservedOutput. # noqa: E501 + :rtype: list[str] """ return self._metadata_preservation_method @metadata_preservation_method.setter - def metadata_preservation_method(self, metadata_preservation_method: list[str]): + def metadata_preservation_method(self, metadata_preservation_method): """Sets the metadata_preservation_method of this MetadataPreservedOutput. - :param metadata_preservation_method: The metadata_preservation_method of this MetadataPreservedOutput. - :type metadata_preservation_method: List[str] + :param metadata_preservation_method: The metadata_preservation_method of this MetadataPreservedOutput. # noqa: E501 + :type: list[str] """ allowed_values = ["datacite", "tombstone"] if not set(metadata_preservation_method).issubset(set(allowed_values)): @@ -58,3 +66,47 @@ def metadata_preservation_method(self, metadata_preservation_method: list[str]): ) self._metadata_preservation_method = metadata_preservation_method + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(MetadataPreservedOutput, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MetadataPreservedOutput): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/metric.py b/fuji_server/models/metric.py index d35ebc0f..ab41d61c 100644 --- a/fuji_server/models/metric.py +++ b/fuji_server/models/metric.py @@ -1,304 +1,354 @@ -from datetime import date +""" + F-UJI -from fuji_server import util -from fuji_server.models.base_model_ import Model + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" -class Metric(Model): +import pprint +import re # noqa: F401 + +import six + + +class Metric: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + "metric_identifier": "str", + "metric_name": "str", + "description": "str", + "fair_principle": "str", + "evaluation_mechanism": "str", + "date_created": "date", + "date_updated": "date", + "created_by": "str", + "version": "float", + "total_score": "int", + } + + attribute_map = { + "metric_identifier": "metric_identifier", + "metric_name": "metric_name", + "description": "description", + "fair_principle": "fair_principle", + "evaluation_mechanism": "evaluation_mechanism", + "date_created": "date_created", + "date_updated": "date_updated", + "created_by": "created_by", + "version": "version", + "total_score": "total_score", + } + def __init__( self, - metric_identifier: str | None = None, - metric_name: str | None = None, - description: str | None = None, - fair_principle: str | None = None, - evaluation_mechanism: str | None = None, - date_created: date | None = None, - date_updated: date | None = None, - created_by: str | None = None, - version: float | None = None, - total_score: int | None = None, + metric_identifier=None, + metric_name=None, + description=None, + fair_principle=None, + evaluation_mechanism=None, + date_created=None, + date_updated=None, + created_by=None, + version=None, + total_score=None, ): - """Metric - a model defined in Swagger - - :param metric_identifier: The metric_identifier of this Metric. # noqa: E501 - :type metric_identifier: str - :param metric_name: The metric_name of this Metric. # noqa: E501 - :type metric_name: str - :param description: The description of this Metric. # noqa: E501 - :type description: str - :param fair_principle: The fair_principle of this Metric. # noqa: E501 - :type fair_principle: str - :param evaluation_mechanism: The evaluation_mechanism of this Metric. # noqa: E501 - :type evaluation_mechanism: str - :param date_created: The date_created of this Metric. # noqa: E501 - :type date_created: date - :param date_updated: The date_updated of this Metric. # noqa: E501 - :type date_updated: date - :param created_by: The created_by of this Metric. # noqa: E501 - :type created_by: str - :param version: The version of this Metric. # noqa: E501 - :type version: float - :param total_score: The total_score of this Metric. # noqa: E501 - :type total_score: int - """ - self.swagger_types = { - "metric_identifier": str, - "metric_name": str, - "description": str, - "fair_principle": str, - "evaluation_mechanism": str, - "date_created": date, - "date_updated": date, - "created_by": str, - "version": float, - "total_score": int, - } - - self.attribute_map = { - "metric_identifier": "metric_identifier", - "metric_name": "metric_name", - "description": "description", - "fair_principle": "fair_principle", - "evaluation_mechanism": "evaluation_mechanism", - "date_created": "date_created", - "date_updated": "date_updated", - "created_by": "created_by", - "version": "version", - "total_score": "total_score", - } - self._metric_identifier = metric_identifier - self._metric_name = metric_name - self._description = description - self._fair_principle = fair_principle - self._evaluation_mechanism = evaluation_mechanism - self._date_created = date_created - self._date_updated = date_updated - self._created_by = created_by - self._version = version - self._total_score = total_score - - @classmethod - def from_dict(cls, dikt) -> "Metric": - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The Metric of this Metric. # noqa: E501 - :rtype: Metric - """ - return util.deserialize_model(dikt, cls) + """Metric - a model defined in Swagger""" + self._metric_identifier = None + self._metric_name = None + self._description = None + self._fair_principle = None + self._evaluation_mechanism = None + self._date_created = None + self._date_updated = None + self._created_by = None + self._version = None + self._total_score = None + self.discriminator = None + if metric_identifier is not None: + self.metric_identifier = metric_identifier + if metric_name is not None: + self.metric_name = metric_name + if description is not None: + self.description = description + if fair_principle is not None: + self.fair_principle = fair_principle + if evaluation_mechanism is not None: + self.evaluation_mechanism = evaluation_mechanism + if date_created is not None: + self.date_created = date_created + if date_updated is not None: + self.date_updated = date_updated + if created_by is not None: + self.created_by = created_by + if version is not None: + self.version = version + if total_score is not None: + self.total_score = total_score @property - def metric_identifier(self) -> str: - """Gets the metric_identifier of this Metric. + def metric_identifier(self): + """Gets the metric_identifier of this Metric. # noqa: E501 - :return: The metric_identifier of this Metric. + :return: The metric_identifier of this Metric. # noqa: E501 :rtype: str """ return self._metric_identifier @metric_identifier.setter - def metric_identifier(self, metric_identifier: str): + def metric_identifier(self, metric_identifier): """Sets the metric_identifier of this Metric. - :param metric_identifier: The metric_identifier of this Metric. - :type metric_identifier: str + :param metric_identifier: The metric_identifier of this Metric. # noqa: E501 + :type: str """ self._metric_identifier = metric_identifier @property - def metric_name(self) -> str: - """Gets the metric_name of this Metric. + def metric_name(self): + """Gets the metric_name of this Metric. # noqa: E501 - :return: The metric_name of this Metric. + :return: The metric_name of this Metric. # noqa: E501 :rtype: str """ return self._metric_name @metric_name.setter - def metric_name(self, metric_name: str): + def metric_name(self, metric_name): """Sets the metric_name of this Metric. - :param metric_name: The metric_name of this Metric. - :type metric_name: str + :param metric_name: The metric_name of this Metric. # noqa: E501 + :type: str """ self._metric_name = metric_name @property - def description(self) -> str: - """Gets the description of this Metric. + def description(self): + """Gets the description of this Metric. # noqa: E501 - :return: The description of this Metric. + :return: The description of this Metric. # noqa: E501 :rtype: str """ return self._description @description.setter - def description(self, description: str): + def description(self, description): """Sets the description of this Metric. - :param description: The description of this Metric. - :type description: str + :param description: The description of this Metric. # noqa: E501 + :type: str """ self._description = description @property - def fair_principle(self) -> str: - """Gets the fair_principle of this Metric. + def fair_principle(self): + """Gets the fair_principle of this Metric. # noqa: E501 - :return: The fair_principle of this Metric. + :return: The fair_principle of this Metric. # noqa: E501 :rtype: str """ return self._fair_principle @fair_principle.setter - def fair_principle(self, fair_principle: str): + def fair_principle(self, fair_principle): """Sets the fair_principle of this Metric. - :param fair_principle: The fair_principle of this Metric. - :type fair_principle: str + :param fair_principle: The fair_principle of this Metric. # noqa: E501 + :type: str """ self._fair_principle = fair_principle @property - def evaluation_mechanism(self) -> str: - """Gets the evaluation_mechanism of this Metric. + def evaluation_mechanism(self): + """Gets the evaluation_mechanism of this Metric. # noqa: E501 - :return: The evaluation_mechanism of this Metric. + :return: The evaluation_mechanism of this Metric. # noqa: E501 :rtype: str """ return self._evaluation_mechanism @evaluation_mechanism.setter - def evaluation_mechanism(self, evaluation_mechanism: str): + def evaluation_mechanism(self, evaluation_mechanism): """Sets the evaluation_mechanism of this Metric. - :param evaluation_mechanism: The evaluation_mechanism of this Metric. - :type evaluation_mechanism: str + :param evaluation_mechanism: The evaluation_mechanism of this Metric. # noqa: E501 + :type: str """ self._evaluation_mechanism = evaluation_mechanism @property - def date_created(self) -> date: - """Gets the date_created of this Metric. + def date_created(self): + """Gets the date_created of this Metric. # noqa: E501 - :return: The date_created of this Metric. + :return: The date_created of this Metric. # noqa: E501 :rtype: date """ return self._date_created @date_created.setter - def date_created(self, date_created: date): + def date_created(self, date_created): """Sets the date_created of this Metric. - :param date_created: The date_created of this Metric. - :type date_created: date + :param date_created: The date_created of this Metric. # noqa: E501 + :type: date """ self._date_created = date_created @property - def date_updated(self) -> date: - """Gets the date_updated of this Metric. + def date_updated(self): + """Gets the date_updated of this Metric. # noqa: E501 - :return: The date_updated of this Metric. + :return: The date_updated of this Metric. # noqa: E501 :rtype: date """ return self._date_updated @date_updated.setter - def date_updated(self, date_updated: date): + def date_updated(self, date_updated): """Sets the date_updated of this Metric. - :param date_updated: The date_updated of this Metric. - :type date_updated: date + :param date_updated: The date_updated of this Metric. # noqa: E501 + :type: date """ self._date_updated = date_updated @property - def created_by(self) -> str: - """Gets the created_by of this Metric. + def created_by(self): + """Gets the created_by of this Metric. # noqa: E501 - :return: The created_by of this Metric. + :return: The created_by of this Metric. # noqa: E501 :rtype: str """ return self._created_by @created_by.setter - def created_by(self, created_by: str): + def created_by(self, created_by): """Sets the created_by of this Metric. - :param created_by: The created_by of this Metric. - :type created_by: str + :param created_by: The created_by of this Metric. # noqa: E501 + :type: str """ self._created_by = created_by @property - def version(self) -> float: - """Gets the version of this Metric. + def version(self): + """Gets the version of this Metric. # noqa: E501 - :return: The version of this Metric. + :return: The version of this Metric. # noqa: E501 :rtype: float """ return self._version @version.setter - def version(self, version: float): + def version(self, version): """Sets the version of this Metric. - :param version: The version of this Metric. - :type version: float + :param version: The version of this Metric. # noqa: E501 + :type: float """ self._version = version @property - def total_score(self) -> int: - """Gets the total_score of this Metric. + def total_score(self): + """Gets the total_score of this Metric. # noqa: E501 - :return: The total_score of this Metric. + :return: The total_score of this Metric. # noqa: E501 :rtype: int """ return self._total_score @total_score.setter - def total_score(self, total_score: int): + def total_score(self, total_score): """Sets the total_score of this Metric. - :param total_score: The total_score of this Metric. - :type total_score: int + :param total_score: The total_score of this Metric. # noqa: E501 + :type: int """ self._total_score = total_score + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(Metric, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Metric): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/metrics.py b/fuji_server/models/metrics.py index 66c5c753..4dea6804 100644 --- a/fuji_server/models/metrics.py +++ b/fuji_server/models/metrics.py @@ -1,77 +1,128 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model -from fuji_server.models.metric import Metric +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class Metrics(Model): + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class Metrics: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - def __init__(self, total: int | None = None, metrics: list[Metric] | None = None): - """Metrics - a model defined in Swagger - - :param total: The total of this Metrics. # noqa: E501 - :type total: int - :param metrics: The metrics of this Metrics. # noqa: E501 - :type metrics: List[Metric] - """ - self.swagger_types = {"total": int, "metrics": list[Metric]} - - self.attribute_map = {"total": "total", "metrics": "metrics"} - self._total = total - self._metrics = metrics + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"total": "int", "metrics": "list[Metric]"} - @classmethod - def from_dict(cls, dikt) -> "Metrics": - """Returns the dict as a model + attribute_map = {"total": "total", "metrics": "metrics"} - :param dikt: A dict. - :type: dict - :return: The Metrics of this Metrics. # noqa: E501 - :rtype: Metrics - """ - return util.deserialize_model(dikt, cls) + def __init__(self, total=None, metrics=None): + """Metrics - a model defined in Swagger""" + self._total = None + self._metrics = None + self.discriminator = None + if total is not None: + self.total = total + if metrics is not None: + self.metrics = metrics @property - def total(self) -> int: - """Gets the total of this Metrics. + def total(self): + """Gets the total of this Metrics. # noqa: E501 - :return: The total of this Metrics. + :return: The total of this Metrics. # noqa: E501 :rtype: int """ return self._total @total.setter - def total(self, total: int): + def total(self, total): """Sets the total of this Metrics. - :param total: The total of this Metrics. - :type total: int + :param total: The total of this Metrics. # noqa: E501 + :type: int """ self._total = total @property - def metrics(self) -> list[Metric]: - """Gets the metrics of this Metrics. + def metrics(self): + """Gets the metrics of this Metrics. # noqa: E501 - :return: The metrics of this Metrics. - :rtype: List[Metric] + :return: The metrics of this Metrics. # noqa: E501 + :rtype: list[Metric] """ return self._metrics @metrics.setter - def metrics(self, metrics: list[Metric]): + def metrics(self, metrics): """Sets the metrics of this Metrics. - :param metrics: The metrics of this Metrics. - :type metrics: List[Metric] + :param metrics: The metrics of this Metrics. # noqa: E501 + :type: list[Metric] """ self._metrics = metrics + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(Metrics, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Metrics): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/output_core_metadata_found.py b/fuji_server/models/output_core_metadata_found.py index b674073c..44a205b8 100644 --- a/fuji_server/models/output_core_metadata_found.py +++ b/fuji_server/models/output_core_metadata_found.py @@ -1,26 +1,85 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class OutputCoreMetadataFound(Model): + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class OutputCoreMetadataFound(dict): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - def __init__(self): + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {} + if hasattr(dict, "swagger_types"): + swagger_types.update(dict.swagger_types) + + attribute_map = {} + if hasattr(dict, "attribute_map"): + attribute_map.update(dict.attribute_map) + + def __init__(self, *args, **kwargs): """OutputCoreMetadataFound - a model defined in Swagger""" - self.swagger_types = {} + self.discriminator = None + dict.__init__(self, *args, **kwargs) + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(OutputCoreMetadataFound, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() - self.attribute_map = {} + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OutputCoreMetadataFound): + return False - @classmethod - def from_dict(cls, dikt) -> "OutputCoreMetadataFound": - """Returns the dict as a model + return self.__dict__ == other.__dict__ - :param dikt: A dict. - :type: dict - :return: The output_core_metadata_found of this OutputCoreMetadataFound. # noqa: E501 - :rtype: OutputCoreMetadataFound - """ - return util.deserialize_model(dikt, cls) + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/output_search_mechanisms.py b/fuji_server/models/output_search_mechanisms.py index d130a4f3..81fe1506 100644 --- a/fuji_server/models/output_search_mechanisms.py +++ b/fuji_server/models/output_search_mechanisms.py @@ -1,55 +1,63 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class OutputSearchMechanisms(Model): + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class OutputSearchMechanisms: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - def __init__(self, mechanism: str | None = None, mechanism_info: list[str] | None = None): - """OutputSearchMechanisms - a model defined in Swagger - - :param mechanism: The mechanism of this OutputSearchMechanisms. # noqa: E501 - :type mechanism: str - :param mechanism_info: The mechanism_info of this OutputSearchMechanisms. # noqa: E501 - :type mechanism_info: List[str] - """ - self.swagger_types = {"mechanism": str, "mechanism_info": list[str]} - - self.attribute_map = {"mechanism": "mechanism", "mechanism_info": "mechanism_info"} - self._mechanism = mechanism - self._mechanism_info = mechanism_info + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"mechanism": "str", "mechanism_info": "list[str]"} - @classmethod - def from_dict(cls, dikt) -> "OutputSearchMechanisms": - """Returns the dict as a model + attribute_map = {"mechanism": "mechanism", "mechanism_info": "mechanism_info"} - :param dikt: A dict. - :type: dict - :return: The output_search_mechanisms of this OutputSearchMechanisms. # noqa: E501 - :rtype: OutputSearchMechanisms - """ - return util.deserialize_model(dikt, cls) + def __init__(self, mechanism=None, mechanism_info=None): + """OutputSearchMechanisms - a model defined in Swagger""" + self._mechanism = None + self._mechanism_info = None + self.discriminator = None + if mechanism is not None: + self.mechanism = mechanism + if mechanism_info is not None: + self.mechanism_info = mechanism_info @property - def mechanism(self) -> str: - """Gets the mechanism of this OutputSearchMechanisms. + def mechanism(self): + """Gets the mechanism of this OutputSearchMechanisms. # noqa: E501 - :return: The mechanism of this OutputSearchMechanisms. + :return: The mechanism of this OutputSearchMechanisms. # noqa: E501 :rtype: str """ return self._mechanism @mechanism.setter - def mechanism(self, mechanism: str): + def mechanism(self, mechanism): """Sets the mechanism of this OutputSearchMechanisms. - :param mechanism: The mechanism of this OutputSearchMechanisms. - :type mechanism: str + :param mechanism: The mechanism of this OutputSearchMechanisms. # noqa: E501 + :type: str """ allowed_values = ["metadata registry", "structured data"] if mechanism not in allowed_values: @@ -58,22 +66,66 @@ def mechanism(self, mechanism: str): self._mechanism = mechanism @property - def mechanism_info(self) -> list[str]: - """Gets the mechanism_info of this OutputSearchMechanisms. + def mechanism_info(self): + """Gets the mechanism_info of this OutputSearchMechanisms. # noqa: E501 - :return: The mechanism_info of this OutputSearchMechanisms. - :rtype: List[str] + :return: The mechanism_info of this OutputSearchMechanisms. # noqa: E501 + :rtype: list[str] """ return self._mechanism_info @mechanism_info.setter - def mechanism_info(self, mechanism_info: list[str]): + def mechanism_info(self, mechanism_info): """Sets the mechanism_info of this OutputSearchMechanisms. - :param mechanism_info: The mechanism_info of this OutputSearchMechanisms. - :type mechanism_info: List[str] + :param mechanism_info: The mechanism_info of this OutputSearchMechanisms. # noqa: E501 + :type: list[str] """ self._mechanism_info = mechanism_info + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(OutputSearchMechanisms, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OutputSearchMechanisms): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/persistence.py b/fuji_server/models/persistence.py index 648bc336..62188563 100644 --- a/fuji_server/models/persistence.py +++ b/fuji_server/models/persistence.py @@ -1,291 +1,135 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model -from fuji_server.models.debug import Debug -from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium -from fuji_server.models.persistence_output import PersistenceOutput +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class Persistence(Model): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - def __init__( - self, - id: int | None = None, - metric_identifier: str | None = None, - metric_name: str | None = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, - test_status: str = "fail", - score: FAIRResultCommonScore = None, - maturity: str = "incomplete", - output: PersistenceOutput = None, - test_debug: Debug = None, - ): - """Persistence - a model defined in Swagger - - :param id: The id of this Persistence. # noqa: E501 - :type id: int - :param metric_identifier: The metric_identifier of this Persistence. # noqa: E501 - :type metric_identifier: str - :param metric_name: The metric_name of this Persistence. # noqa: E501 - :type metric_name: str - :param metric_tests: The metric_tests of this Persistence. # noqa: E501 - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - :param test_status: The test_status of this Persistence. # noqa: E501 - :type test_status: str - :param score: The score of this Persistence. # noqa: E501 - :type score: FAIRResultCommonScore - :param maturity: The maturity of this Persistence. # noqa: E501 - :type maturity: str - :param output: The output of this Persistence. # noqa: E501 - :type output: PersistenceOutput - :param test_debug: The test_debug of this Persistence. # noqa: E501 - :type test_debug: Debug - """ - self.swagger_types = { - "id": int, - "metric_identifier": str, - "metric_name": str, - "metric_tests": dict[str, FAIRResultEvaluationCriterium], - "test_status": str, - "score": FAIRResultCommonScore, - "maturity": str, - "output": PersistenceOutput, - "test_debug": Debug, - } - - self.attribute_map = { - "id": "id", - "metric_identifier": "metric_identifier", - "metric_name": "metric_name", - "metric_tests": "metric_tests", - "test_status": "test_status", - "score": "score", - "maturity": "maturity", - "output": "output", - "test_debug": "test_debug", - } - self._id = id - self._metric_identifier = metric_identifier - self._metric_name = metric_name - self._metric_tests = metric_tests - self._test_status = test_status - self._score = score - self._maturity = maturity - self._output = output - self._test_debug = test_debug - - @classmethod - def from_dict(cls, dikt) -> "Persistence": - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The Persistence of this Persistence. # noqa: E501 - :rtype: Persistence - """ - return util.deserialize_model(dikt, cls) - - @property - def id(self) -> int: - """Gets the id of this Persistence. - - - :return: The id of this Persistence. - :rtype: int - """ - return self._id - - @id.setter - def id(self, id: int): - """Sets the id of this Persistence. - - - :param id: The id of this Persistence. - :type id: int - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") - - self._id = id - - @property - def metric_identifier(self) -> str: - """Gets the metric_identifier of this Persistence. - - - :return: The metric_identifier of this Persistence. - :rtype: str - """ - return self._metric_identifier - - @metric_identifier.setter - def metric_identifier(self, metric_identifier: str): - """Sets the metric_identifier of this Persistence. - - - :param metric_identifier: The metric_identifier of this Persistence. - :type metric_identifier: str - """ - if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") - - self._metric_identifier = metric_identifier - - @property - def metric_name(self) -> str: - """Gets the metric_name of this Persistence. - - - :return: The metric_name of this Persistence. - :rtype: str - """ - return self._metric_name - - @metric_name.setter - def metric_name(self, metric_name: str): - """Sets the metric_name of this Persistence. - - - :param metric_name: The metric_name of this Persistence. - :type metric_name: str - """ - if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" - self._metric_name = metric_name +import pprint +import re # noqa: F401 - @property - def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: - """Gets the metric_tests of this Persistence. - - - :return: The metric_tests of this Persistence. - :rtype: Dict[str, FAIRResultEvaluationCriterium] - """ - return self._metric_tests - - @metric_tests.setter - def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): - """Sets the metric_tests of this Persistence. - - - :param metric_tests: The metric_tests of this Persistence. - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - """ - - self._metric_tests = metric_tests - - @property - def test_status(self) -> str: - """Gets the test_status of this Persistence. - - - :return: The test_status of this Persistence. - :rtype: str - """ - return self._test_status - - @test_status.setter - def test_status(self, test_status: str): - """Sets the test_status of this Persistence. - - - :param test_status: The test_status of this Persistence. - :type test_status: str - """ - allowed_values = ["pass", "fail", "indeterminate"] - if test_status not in allowed_values: - raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") - - self._test_status = test_status - - @property - def score(self) -> FAIRResultCommonScore: - """Gets the score of this Persistence. +import six +from swagger_client.models.fair_result_common import FAIRResultCommon - :return: The score of this Persistence. - :rtype: FAIRResultCommonScore - """ - return self._score - - @score.setter - def score(self, score: FAIRResultCommonScore): - """Sets the score of this Persistence. - - - :param score: The score of this Persistence. - :type score: FAIRResultCommonScore - """ - if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") - - self._score = score - - @property - def maturity(self) -> str: - """Gets the maturity of this Persistence. - - - :return: The maturity of this Persistence. - :rtype: str - """ - return self._maturity - - @maturity.setter - def maturity(self, maturity: int): - """Sets the maturity of this Uniqueness. +class Persistence(FAIRResultCommon): + """NOTE: This class is auto generated by the swagger code generator program. - :param maturity: The maturity of this Uniqueness. - :type maturity: int - """ + Do not edit the class manually. + """ - self._maturity = maturity + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"output": "PersistenceOutput", "test_debug": "Debug"} + if hasattr(FAIRResultCommon, "swagger_types"): + swagger_types.update(FAIRResultCommon.swagger_types) + + attribute_map = {"output": "output", "test_debug": "test_debug"} + if hasattr(FAIRResultCommon, "attribute_map"): + attribute_map.update(FAIRResultCommon.attribute_map) + + def __init__(self, output=None, test_debug=None, *args, **kwargs): + """Persistence - a model defined in Swagger""" + self._output = None + self._test_debug = None + self.discriminator = None + if output is not None: + self.output = output + if test_debug is not None: + self.test_debug = test_debug + FAIRResultCommon.__init__(self, *args, **kwargs) @property - def output(self) -> PersistenceOutput: - """Gets the output of this Persistence. + def output(self): + """Gets the output of this Persistence. # noqa: E501 - :return: The output of this Persistence. + :return: The output of this Persistence. # noqa: E501 :rtype: PersistenceOutput """ return self._output @output.setter - def output(self, output: PersistenceOutput): + def output(self, output): """Sets the output of this Persistence. - :param output: The output of this Persistence. - :type output: PersistenceOutput + :param output: The output of this Persistence. # noqa: E501 + :type: PersistenceOutput """ self._output = output @property - def test_debug(self) -> Debug: - """Gets the test_debug of this Persistence. + def test_debug(self): + """Gets the test_debug of this Persistence. # noqa: E501 - :return: The test_debug of this Persistence. + :return: The test_debug of this Persistence. # noqa: E501 :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug: Debug): + def test_debug(self, test_debug): """Sets the test_debug of this Persistence. - :param test_debug: The test_debug of this Persistence. - :type test_debug: Debug + :param test_debug: The test_debug of this Persistence. # noqa: E501 + :type: Debug """ self._test_debug = test_debug + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(Persistence, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Persistence): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/persistence_output.py b/fuji_server/models/persistence_output.py index 125eb386..fbd2c781 100644 --- a/fuji_server/models/persistence_output.py +++ b/fuji_server/models/persistence_output.py @@ -1,53 +1,104 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model -from fuji_server.models.persistence_output_inner import PersistenceOutputInner +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class PersistenceOutput(Model): + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class PersistenceOutput: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - def __init__(self, persistent_identifiers: list[PersistenceOutputInner] | None = None): - """PersistenceOutput - a model defined in Swagger - - :param persistent_identifiers: The persistent_identifiers of this PersistenceOutput. # noqa: E501 - :type persistent_identifiers: List[PersistenceOutputInner] - """ - self.swagger_types = {"persistent_identifiers": list[PersistenceOutputInner]} + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"persistent_identifiers": "list[PersistenceOutputInner]"} - self.attribute_map = {"persistent_identifiers": "persistent_identifiers"} - self._persistent_identifiers = persistent_identifiers + attribute_map = {"persistent_identifiers": "persistent_identifiers"} - @classmethod - def from_dict(cls, dikt) -> "PersistenceOutput": - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The Persistence_output of this PersistenceOutput. # noqa: E501 - :rtype: PersistenceOutput - """ - return util.deserialize_model(dikt, cls) + def __init__(self, persistent_identifiers=None): + """PersistenceOutput - a model defined in Swagger""" + self._persistent_identifiers = None + self.discriminator = None + if persistent_identifiers is not None: + self.persistent_identifiers = persistent_identifiers @property - def persistent_identifiers(self) -> list[PersistenceOutputInner]: - """Gets the persistent_identifiers of this PersistenceOutput. + def persistent_identifiers(self): + """Gets the persistent_identifiers of this PersistenceOutput. # noqa: E501 - :return: The persistent_identifiers of this PersistenceOutput. - :rtype: List[PersistenceOutputInner] + :return: The persistent_identifiers of this PersistenceOutput. # noqa: E501 + :rtype: list[PersistenceOutputInner] """ return self._persistent_identifiers @persistent_identifiers.setter - def persistent_identifiers(self, persistent_identifiers: list[PersistenceOutputInner]): + def persistent_identifiers(self, persistent_identifiers): """Sets the persistent_identifiers of this PersistenceOutput. - :param persistent_identifiers: The persistent_identifiers of this PersistenceOutput. - :type persistent_identifiers: List[PersistenceOutputInner] + :param persistent_identifiers: The persistent_identifiers of this PersistenceOutput. # noqa: E501 + :type: list[PersistenceOutputInner] """ self._persistent_identifiers = persistent_identifiers + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(PersistenceOutput, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PersistenceOutput): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/persistence_output_inner.py b/fuji_server/models/persistence_output_inner.py index e6132557..0d845bb4 100644 --- a/fuji_server/models/persistence_output_inner.py +++ b/fuji_server/models/persistence_output_inner.py @@ -1,135 +1,181 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class PersistenceOutputInner(Model): - """NOTE: This class is auto generated by the swagger code generator program. + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" - Do not edit the class manually. - """ +import pprint +import re # noqa: F401 - def __init__( - self, - pid: str | None = None, - pid_scheme: str | None = None, - resolvable_status: bool = False, - resolved_url: str | None = None, - ): - """PersistenceOutputInner - a model defined in Swagger +import six - :param pid: The pid of this PersistenceOutputInner. # noqa: E501 - :type pid: str - :param pid_scheme: The pid_scheme of this PersistenceOutputInner. # noqa: E501 - :type pid_scheme: str - :param resolvable_status: The resolvable_status of this PersistenceOutputInner. # noqa: E501 - :type resolvable_status: bool - :param resolved_url: The resolved_url of this PersistenceOutputInner. # noqa: E501 - :type resolved_url: str - """ - self.swagger_types = {"pid": str, "pid_scheme": str, "resolvable_status": bool, "resolved_url": str} - - self.attribute_map = { - "pid": "pid", - "pid_scheme": "pid_scheme", - "resolvable_status": "resolvable_status", - "resolved_url": "resolved_url", - } - self._pid = pid - self._pid_scheme = pid_scheme - self._resolvable_status = resolvable_status - self._resolved_url = resolved_url - @classmethod - def from_dict(cls, dikt) -> "PersistenceOutputInner": - """Returns the dict as a model +class PersistenceOutputInner: + """NOTE: This class is auto generated by the swagger code generator program. - :param dikt: A dict. - :type: dict - :return: The Persistence_output_inner of this PersistenceOutputInner. # noqa: E501 - :rtype: PersistenceOutputInner - """ - return util.deserialize_model(dikt, cls) + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"pid": "str", "pid_scheme": "str", "resolvable_status": "bool", "resolved_url": "str"} + + attribute_map = { + "pid": "pid", + "pid_scheme": "pid_scheme", + "resolvable_status": "resolvable_status", + "resolved_url": "resolved_url", + } + + def __init__(self, pid=None, pid_scheme=None, resolvable_status=False, resolved_url=None): + """PersistenceOutputInner - a model defined in Swagger""" + self._pid = None + self._pid_scheme = None + self._resolvable_status = None + self._resolved_url = None + self.discriminator = None + if pid is not None: + self.pid = pid + if pid_scheme is not None: + self.pid_scheme = pid_scheme + if resolvable_status is not None: + self.resolvable_status = resolvable_status + if resolved_url is not None: + self.resolved_url = resolved_url @property - def pid(self) -> str: - """Gets the pid of this PersistenceOutputInner. + def pid(self): + """Gets the pid of this PersistenceOutputInner. # noqa: E501 - :return: The pid of this PersistenceOutputInner. + :return: The pid of this PersistenceOutputInner. # noqa: E501 :rtype: str """ return self._pid @pid.setter - def pid(self, pid: str): + def pid(self, pid): """Sets the pid of this PersistenceOutputInner. - :param pid: The pid of this PersistenceOutputInner. - :type pid: str + :param pid: The pid of this PersistenceOutputInner. # noqa: E501 + :type: str """ self._pid = pid @property - def pid_scheme(self) -> str: - """Gets the pid_scheme of this PersistenceOutputInner. + def pid_scheme(self): + """Gets the pid_scheme of this PersistenceOutputInner. # noqa: E501 - :return: The pid_scheme of this PersistenceOutputInner. + :return: The pid_scheme of this PersistenceOutputInner. # noqa: E501 :rtype: str """ return self._pid_scheme @pid_scheme.setter - def pid_scheme(self, pid_scheme: str): + def pid_scheme(self, pid_scheme): """Sets the pid_scheme of this PersistenceOutputInner. - :param pid_scheme: The pid_scheme of this PersistenceOutputInner. - :type pid_scheme: str + :param pid_scheme: The pid_scheme of this PersistenceOutputInner. # noqa: E501 + :type: str """ self._pid_scheme = pid_scheme @property - def resolvable_status(self) -> bool: - """Gets the resolvable_status of this PersistenceOutputInner. + def resolvable_status(self): + """Gets the resolvable_status of this PersistenceOutputInner. # noqa: E501 - :return: The resolvable_status of this PersistenceOutputInner. + :return: The resolvable_status of this PersistenceOutputInner. # noqa: E501 :rtype: bool """ return self._resolvable_status @resolvable_status.setter - def resolvable_status(self, resolvable_status: bool): + def resolvable_status(self, resolvable_status): """Sets the resolvable_status of this PersistenceOutputInner. - :param resolvable_status: The resolvable_status of this PersistenceOutputInner. - :type resolvable_status: bool + :param resolvable_status: The resolvable_status of this PersistenceOutputInner. # noqa: E501 + :type: bool """ self._resolvable_status = resolvable_status @property - def resolved_url(self) -> str: - """Gets the resolved_url of this PersistenceOutputInner. + def resolved_url(self): + """Gets the resolved_url of this PersistenceOutputInner. # noqa: E501 - :return: The resolved_url of this PersistenceOutputInner. + :return: The resolved_url of this PersistenceOutputInner. # noqa: E501 :rtype: str """ return self._resolved_url @resolved_url.setter - def resolved_url(self, resolved_url: str): + def resolved_url(self, resolved_url): """Sets the resolved_url of this PersistenceOutputInner. - :param resolved_url: The resolved_url of this PersistenceOutputInner. - :type resolved_url: str + :param resolved_url: The resolved_url of this PersistenceOutputInner. # noqa: E501 + :type: str """ self._resolved_url = resolved_url + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(PersistenceOutputInner, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PersistenceOutputInner): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/related_resource.py b/fuji_server/models/related_resource.py index df927133..6f9036b8 100644 --- a/fuji_server/models/related_resource.py +++ b/fuji_server/models/related_resource.py @@ -1,291 +1,135 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model -from fuji_server.models.debug import Debug -from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium -from fuji_server.models.related_resource_output import RelatedResourceOutput +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class RelatedResource(Model): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - def __init__( - self, - id: int | None = None, - metric_identifier: str | None = None, - metric_name: str | None = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, - test_status: str = "fail", - score: FAIRResultCommonScore = None, - maturity: str = "incomplete", - output: RelatedResourceOutput = None, - test_debug: Debug = None, - ): - """RelatedResource - a model defined in Swagger - - :param id: The id of this RelatedResource. # noqa: E501 - :type id: int - :param metric_identifier: The metric_identifier of this RelatedResource. # noqa: E501 - :type metric_identifier: str - :param metric_name: The metric_name of this RelatedResource. # noqa: E501 - :type metric_name: str - :param metric_tests: The metric_tests of this RelatedResource. # noqa: E501 - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - :param test_status: The test_status of this RelatedResource. # noqa: E501 - :type test_status: str - :param score: The score of this RelatedResource. # noqa: E501 - :type score: FAIRResultCommonScore - :param maturity: The maturity of this RelatedResource. # noqa: E501 - :type maturity: str - :param output: The output of this RelatedResource. # noqa: E501 - :type output: RelatedResourceOutput - :param test_debug: The test_debug of this RelatedResource. # noqa: E501 - :type test_debug: Debug - """ - self.swagger_types = { - "id": int, - "metric_identifier": str, - "metric_name": str, - "metric_tests": dict[str, FAIRResultEvaluationCriterium], - "test_status": str, - "score": FAIRResultCommonScore, - "maturity": str, - "output": RelatedResourceOutput, - "test_debug": Debug, - } - - self.attribute_map = { - "id": "id", - "metric_identifier": "metric_identifier", - "metric_name": "metric_name", - "metric_tests": "metric_tests", - "test_status": "test_status", - "score": "score", - "maturity": "maturity", - "output": "output", - "test_debug": "test_debug", - } - self._id = id - self._metric_identifier = metric_identifier - self._metric_name = metric_name - self._metric_tests = metric_tests - self._test_status = test_status - self._score = score - self._maturity = maturity - self._output = output - self._test_debug = test_debug - - @classmethod - def from_dict(cls, dikt) -> "RelatedResource": - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The RelatedResource of this RelatedResource. # noqa: E501 - :rtype: RelatedResource - """ - return util.deserialize_model(dikt, cls) - - @property - def id(self) -> int: - """Gets the id of this RelatedResource. - - - :return: The id of this RelatedResource. - :rtype: int - """ - return self._id - - @id.setter - def id(self, id: int): - """Sets the id of this RelatedResource. - - - :param id: The id of this RelatedResource. - :type id: int - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") - - self._id = id - - @property - def metric_identifier(self) -> str: - """Gets the metric_identifier of this RelatedResource. - - - :return: The metric_identifier of this RelatedResource. - :rtype: str - """ - return self._metric_identifier - - @metric_identifier.setter - def metric_identifier(self, metric_identifier: str): - """Sets the metric_identifier of this RelatedResource. - - - :param metric_identifier: The metric_identifier of this RelatedResource. - :type metric_identifier: str - """ - if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") - - self._metric_identifier = metric_identifier - - @property - def metric_name(self) -> str: - """Gets the metric_name of this RelatedResource. - - - :return: The metric_name of this RelatedResource. - :rtype: str - """ - return self._metric_name - - @metric_name.setter - def metric_name(self, metric_name: str): - """Sets the metric_name of this RelatedResource. - - - :param metric_name: The metric_name of this RelatedResource. - :type metric_name: str - """ - if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" - self._metric_name = metric_name +import pprint +import re # noqa: F401 - @property - def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: - """Gets the metric_tests of this RelatedResource. - - - :return: The metric_tests of this RelatedResource. - :rtype: Dict[str, FAIRResultEvaluationCriterium] - """ - return self._metric_tests - - @metric_tests.setter - def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): - """Sets the metric_tests of this RelatedResource. - - - :param metric_tests: The metric_tests of this RelatedResource. - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - """ - - self._metric_tests = metric_tests - - @property - def test_status(self) -> str: - """Gets the test_status of this RelatedResource. - - - :return: The test_status of this RelatedResource. - :rtype: str - """ - return self._test_status - - @test_status.setter - def test_status(self, test_status: str): - """Sets the test_status of this RelatedResource. - - - :param test_status: The test_status of this RelatedResource. - :type test_status: str - """ - allowed_values = ["pass", "fail", "indeterminate"] - if test_status not in allowed_values: - raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") - - self._test_status = test_status - - @property - def score(self) -> FAIRResultCommonScore: - """Gets the score of this RelatedResource. +import six +from swagger_client.models.fair_result_common import FAIRResultCommon - :return: The score of this RelatedResource. - :rtype: FAIRResultCommonScore - """ - return self._score - - @score.setter - def score(self, score: FAIRResultCommonScore): - """Sets the score of this RelatedResource. - - - :param score: The score of this RelatedResource. - :type score: FAIRResultCommonScore - """ - if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") - - self._score = score - - @property - def maturity(self) -> str: - """Gets the maturity of this RelatedResource. - - - :return: The maturity of this RelatedResource. - :rtype: str - """ - return self._maturity - - @maturity.setter - def maturity(self, maturity: int): - """Sets the maturity of this Uniqueness. +class RelatedResource(FAIRResultCommon): + """NOTE: This class is auto generated by the swagger code generator program. - :param maturity: The maturity of this Uniqueness. - :type maturity: int - """ + Do not edit the class manually. + """ - self._maturity = maturity + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"output": "RelatedResourceOutput", "test_debug": "Debug"} + if hasattr(FAIRResultCommon, "swagger_types"): + swagger_types.update(FAIRResultCommon.swagger_types) + + attribute_map = {"output": "output", "test_debug": "test_debug"} + if hasattr(FAIRResultCommon, "attribute_map"): + attribute_map.update(FAIRResultCommon.attribute_map) + + def __init__(self, output=None, test_debug=None, *args, **kwargs): + """RelatedResource - a model defined in Swagger""" + self._output = None + self._test_debug = None + self.discriminator = None + if output is not None: + self.output = output + if test_debug is not None: + self.test_debug = test_debug + FAIRResultCommon.__init__(self, *args, **kwargs) @property - def output(self) -> RelatedResourceOutput: - """Gets the output of this RelatedResource. + def output(self): + """Gets the output of this RelatedResource. # noqa: E501 - :return: The output of this RelatedResource. + :return: The output of this RelatedResource. # noqa: E501 :rtype: RelatedResourceOutput """ return self._output @output.setter - def output(self, output: RelatedResourceOutput): + def output(self, output): """Sets the output of this RelatedResource. - :param output: The output of this RelatedResource. - :type output: RelatedResourceOutput + :param output: The output of this RelatedResource. # noqa: E501 + :type: RelatedResourceOutput """ self._output = output @property - def test_debug(self) -> Debug: - """Gets the test_debug of this RelatedResource. + def test_debug(self): + """Gets the test_debug of this RelatedResource. # noqa: E501 - :return: The test_debug of this RelatedResource. + :return: The test_debug of this RelatedResource. # noqa: E501 :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug: Debug): + def test_debug(self, test_debug): """Sets the test_debug of this RelatedResource. - :param test_debug: The test_debug of this RelatedResource. - :type test_debug: Debug + :param test_debug: The test_debug of this RelatedResource. # noqa: E501 + :type: Debug """ self._test_debug = test_debug + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(RelatedResource, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RelatedResource): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/related_resource_output.py b/fuji_server/models/related_resource_output.py index d24d4a61..3861781b 100644 --- a/fuji_server/models/related_resource_output.py +++ b/fuji_server/models/related_resource_output.py @@ -1,27 +1,80 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model -from fuji_server.models.related_resource_output_inner import RelatedResourceOutputInner # noqa: F401 +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class RelatedResourceOutput(Model): + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class RelatedResourceOutput: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {} + + attribute_map = {} + def __init__(self): """RelatedResourceOutput - a model defined in Swagger""" - self.swagger_types = {} + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(RelatedResourceOutput, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() - self.attribute_map = {} + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RelatedResourceOutput): + return False - @classmethod - def from_dict(cls, dikt) -> "RelatedResourceOutput": - """Returns the dict as a model + return self.__dict__ == other.__dict__ - :param dikt: A dict. - :type: dict - :return: The RelatedResource_output of this RelatedResourceOutput. # noqa: E501 - :rtype: RelatedResourceOutput - """ - return util.deserialize_model(dikt, cls) + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/related_resource_output_inner.py b/fuji_server/models/related_resource_output_inner.py index 3a869488..05743e74 100644 --- a/fuji_server/models/related_resource_output_inner.py +++ b/fuji_server/models/related_resource_output_inner.py @@ -1,76 +1,128 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class RelatedResourceOutputInner(Model): + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class RelatedResourceOutputInner: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - def __init__(self, related_resource: str | None = None, relation_type: str | None = None): - """RelatedResourceOutputInner - a model defined in Swagger - - :param related_resource: The related_resource of this RelatedResourceOutputInner. # noqa: E501 - :type related_resource: str - :param relation_type: The relation_type of this RelatedResourceOutputInner. # noqa: E501 - :type relation_type: str - """ - self.swagger_types = {"related_resource": str, "relation_type": str} - - self.attribute_map = {"related_resource": "related_resource", "relation_type": "relation_type"} - self._related_resource = related_resource - self._relation_type = relation_type + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"related_resource": "str", "relation_type": "str"} - @classmethod - def from_dict(cls, dikt) -> "RelatedResourceOutputInner": - """Returns the dict as a model + attribute_map = {"related_resource": "related_resource", "relation_type": "relation_type"} - :param dikt: A dict. - :type: dict - :return: The RelatedResource_output_inner of this RelatedResourceOutputInner. # noqa: E501 - :rtype: RelatedResourceOutputInner - """ - return util.deserialize_model(dikt, cls) + def __init__(self, related_resource=None, relation_type=None): + """RelatedResourceOutputInner - a model defined in Swagger""" + self._related_resource = None + self._relation_type = None + self.discriminator = None + if related_resource is not None: + self.related_resource = related_resource + if relation_type is not None: + self.relation_type = relation_type @property - def related_resource(self) -> str: - """Gets the related_resource of this RelatedResourceOutputInner. + def related_resource(self): + """Gets the related_resource of this RelatedResourceOutputInner. # noqa: E501 - :return: The related_resource of this RelatedResourceOutputInner. + :return: The related_resource of this RelatedResourceOutputInner. # noqa: E501 :rtype: str """ return self._related_resource @related_resource.setter - def related_resource(self, related_resource: str): + def related_resource(self, related_resource): """Sets the related_resource of this RelatedResourceOutputInner. - :param related_resource: The related_resource of this RelatedResourceOutputInner. - :type related_resource: str + :param related_resource: The related_resource of this RelatedResourceOutputInner. # noqa: E501 + :type: str """ self._related_resource = related_resource @property - def relation_type(self) -> str: - """Gets the relation_type of this RelatedResourceOutputInner. + def relation_type(self): + """Gets the relation_type of this RelatedResourceOutputInner. # noqa: E501 - :return: The relation_type of this RelatedResourceOutputInner. + :return: The relation_type of this RelatedResourceOutputInner. # noqa: E501 :rtype: str """ return self._relation_type @relation_type.setter - def relation_type(self, relation_type: str): + def relation_type(self, relation_type): """Sets the relation_type of this RelatedResourceOutputInner. - :param relation_type: The relation_type of this RelatedResourceOutputInner. - :type relation_type: str + :param relation_type: The relation_type of this RelatedResourceOutputInner. # noqa: E501 + :type: str """ self._relation_type = relation_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(RelatedResourceOutputInner, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RelatedResourceOutputInner): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/searchable.py b/fuji_server/models/searchable.py index 7d6b9453..cfbafead 100644 --- a/fuji_server/models/searchable.py +++ b/fuji_server/models/searchable.py @@ -1,291 +1,135 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model -from fuji_server.models.debug import Debug -from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium -from fuji_server.models.searchable_output import SearchableOutput +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class Searchable(Model): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - def __init__( - self, - id: int | None = None, - metric_identifier: str | None = None, - metric_name: str | None = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, - test_status: str = "fail", - score: FAIRResultCommonScore = None, - maturity: str = "incomplete", - output: SearchableOutput = None, - test_debug: Debug = None, - ): - """Searchable - a model defined in Swagger - - :param id: The id of this Searchable. # noqa: E501 - :type id: int - :param metric_identifier: The metric_identifier of this Searchable. # noqa: E501 - :type metric_identifier: str - :param metric_name: The metric_name of this Searchable. # noqa: E501 - :type metric_name: str - :param metric_tests: The metric_tests of this Searchable. # noqa: E501 - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - :param test_status: The test_status of this Searchable. # noqa: E501 - :type test_status: str - :param score: The score of this Searchable. # noqa: E501 - :type score: FAIRResultCommonScore - :param maturity: The maturity of this Searchable. # noqa: E501 - :type maturity: str - :param output: The output of this Searchable. # noqa: E501 - :type output: SearchableOutput - :param test_debug: The test_debug of this Searchable. # noqa: E501 - :type test_debug: Debug - """ - self.swagger_types = { - "id": int, - "metric_identifier": str, - "metric_name": str, - "metric_tests": dict[str, FAIRResultEvaluationCriterium], - "test_status": str, - "score": FAIRResultCommonScore, - "maturity": str, - "output": SearchableOutput, - "test_debug": Debug, - } - - self.attribute_map = { - "id": "id", - "metric_identifier": "metric_identifier", - "metric_name": "metric_name", - "metric_tests": "metric_tests", - "test_status": "test_status", - "score": "score", - "maturity": "maturity", - "output": "output", - "test_debug": "test_debug", - } - self._id = id - self._metric_identifier = metric_identifier - self._metric_name = metric_name - self._metric_tests = metric_tests - self._test_status = test_status - self._score = score - self._maturity = maturity - self._output = output - self._test_debug = test_debug - - @classmethod - def from_dict(cls, dikt) -> "Searchable": - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The Searchable of this Searchable. # noqa: E501 - :rtype: Searchable - """ - return util.deserialize_model(dikt, cls) - - @property - def id(self) -> int: - """Gets the id of this Searchable. - - - :return: The id of this Searchable. - :rtype: int - """ - return self._id - - @id.setter - def id(self, id: int): - """Sets the id of this Searchable. - - - :param id: The id of this Searchable. - :type id: int - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") - - self._id = id - - @property - def metric_identifier(self) -> str: - """Gets the metric_identifier of this Searchable. - - - :return: The metric_identifier of this Searchable. - :rtype: str - """ - return self._metric_identifier - - @metric_identifier.setter - def metric_identifier(self, metric_identifier: str): - """Sets the metric_identifier of this Searchable. - - - :param metric_identifier: The metric_identifier of this Searchable. - :type metric_identifier: str - """ - if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") - - self._metric_identifier = metric_identifier - - @property - def metric_name(self) -> str: - """Gets the metric_name of this Searchable. - - - :return: The metric_name of this Searchable. - :rtype: str - """ - return self._metric_name - - @metric_name.setter - def metric_name(self, metric_name: str): - """Sets the metric_name of this Searchable. - - - :param metric_name: The metric_name of this Searchable. - :type metric_name: str - """ - if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" - self._metric_name = metric_name +import pprint +import re # noqa: F401 - @property - def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: - """Gets the metric_tests of this Searchable. - - - :return: The metric_tests of this Searchable. - :rtype: Dict[str, FAIRResultEvaluationCriterium] - """ - return self._metric_tests - - @metric_tests.setter - def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): - """Sets the metric_tests of this Searchable. - - - :param metric_tests: The metric_tests of this Searchable. - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - """ - - self._metric_tests = metric_tests - - @property - def test_status(self) -> str: - """Gets the test_status of this Searchable. - - - :return: The test_status of this Searchable. - :rtype: str - """ - return self._test_status - - @test_status.setter - def test_status(self, test_status: str): - """Sets the test_status of this Searchable. - - - :param test_status: The test_status of this Searchable. - :type test_status: str - """ - allowed_values = ["pass", "fail", "indeterminate"] - if test_status not in allowed_values: - raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") - - self._test_status = test_status - - @property - def score(self) -> FAIRResultCommonScore: - """Gets the score of this Searchable. +import six +from swagger_client.models.fair_result_common import FAIRResultCommon - :return: The score of this Searchable. - :rtype: FAIRResultCommonScore - """ - return self._score - - @score.setter - def score(self, score: FAIRResultCommonScore): - """Sets the score of this Searchable. - - - :param score: The score of this Searchable. - :type score: FAIRResultCommonScore - """ - if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") - - self._score = score - - @property - def maturity(self) -> str: - """Gets the maturity of this Searchable. - - - :return: The maturity of this Searchable. - :rtype: str - """ - return self._maturity - - @maturity.setter - def maturity(self, maturity: int): - """Sets the maturity of this Uniqueness. +class Searchable(FAIRResultCommon): + """NOTE: This class is auto generated by the swagger code generator program. - :param maturity: The maturity of this Uniqueness. - :type maturity: int - """ + Do not edit the class manually. + """ - self._maturity = maturity + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"output": "SearchableOutput", "test_debug": "Debug"} + if hasattr(FAIRResultCommon, "swagger_types"): + swagger_types.update(FAIRResultCommon.swagger_types) + + attribute_map = {"output": "output", "test_debug": "test_debug"} + if hasattr(FAIRResultCommon, "attribute_map"): + attribute_map.update(FAIRResultCommon.attribute_map) + + def __init__(self, output=None, test_debug=None, *args, **kwargs): + """Searchable - a model defined in Swagger""" + self._output = None + self._test_debug = None + self.discriminator = None + if output is not None: + self.output = output + if test_debug is not None: + self.test_debug = test_debug + FAIRResultCommon.__init__(self, *args, **kwargs) @property - def output(self) -> SearchableOutput: - """Gets the output of this Searchable. + def output(self): + """Gets the output of this Searchable. # noqa: E501 - :return: The output of this Searchable. + :return: The output of this Searchable. # noqa: E501 :rtype: SearchableOutput """ return self._output @output.setter - def output(self, output: SearchableOutput): + def output(self, output): """Sets the output of this Searchable. - :param output: The output of this Searchable. - :type output: SearchableOutput + :param output: The output of this Searchable. # noqa: E501 + :type: SearchableOutput """ self._output = output @property - def test_debug(self) -> Debug: - """Gets the test_debug of this Searchable. + def test_debug(self): + """Gets the test_debug of this Searchable. # noqa: E501 - :return: The test_debug of this Searchable. + :return: The test_debug of this Searchable. # noqa: E501 :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug: Debug): + def test_debug(self, test_debug): """Sets the test_debug of this Searchable. - :param test_debug: The test_debug of this Searchable. - :type test_debug: Debug + :param test_debug: The test_debug of this Searchable. # noqa: E501 + :type: Debug """ self._test_debug = test_debug + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(Searchable, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Searchable): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/searchable_output.py b/fuji_server/models/searchable_output.py index 08786e29..9ad683b6 100644 --- a/fuji_server/models/searchable_output.py +++ b/fuji_server/models/searchable_output.py @@ -1,53 +1,104 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model -from fuji_server.models.output_search_mechanisms import OutputSearchMechanisms +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class SearchableOutput(Model): + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class SearchableOutput: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - def __init__(self, search_mechanisms: list[OutputSearchMechanisms] | None = None): - """SearchableOutput - a model defined in Swagger - - :param search_mechanisms: The search_mechanisms of this SearchableOutput. # noqa: E501 - :type search_mechanisms: List[OutputSearchMechanisms] - """ - self.swagger_types = {"search_mechanisms": list[OutputSearchMechanisms]} + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"search_mechanisms": "list[OutputSearchMechanisms]"} - self.attribute_map = {"search_mechanisms": "search_mechanisms"} - self._search_mechanisms = search_mechanisms + attribute_map = {"search_mechanisms": "search_mechanisms"} - @classmethod - def from_dict(cls, dikt) -> "SearchableOutput": - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The Searchable_output of this SearchableOutput. # noqa: E501 - :rtype: SearchableOutput - """ - return util.deserialize_model(dikt, cls) + def __init__(self, search_mechanisms=None): + """SearchableOutput - a model defined in Swagger""" + self._search_mechanisms = None + self.discriminator = None + if search_mechanisms is not None: + self.search_mechanisms = search_mechanisms @property - def search_mechanisms(self) -> list[OutputSearchMechanisms]: - """Gets the search_mechanisms of this SearchableOutput. + def search_mechanisms(self): + """Gets the search_mechanisms of this SearchableOutput. # noqa: E501 - :return: The search_mechanisms of this SearchableOutput. - :rtype: List[OutputSearchMechanisms] + :return: The search_mechanisms of this SearchableOutput. # noqa: E501 + :rtype: list[OutputSearchMechanisms] """ return self._search_mechanisms @search_mechanisms.setter - def search_mechanisms(self, search_mechanisms: list[OutputSearchMechanisms]): + def search_mechanisms(self, search_mechanisms): """Sets the search_mechanisms of this SearchableOutput. - :param search_mechanisms: The search_mechanisms of this SearchableOutput. - :type search_mechanisms: List[OutputSearchMechanisms] + :param search_mechanisms: The search_mechanisms of this SearchableOutput. # noqa: E501 + :type: list[OutputSearchMechanisms] """ self._search_mechanisms = search_mechanisms + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(SearchableOutput, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SearchableOutput): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/semantic_vocabulary.py b/fuji_server/models/semantic_vocabulary.py index 105dd00c..8536ccbf 100644 --- a/fuji_server/models/semantic_vocabulary.py +++ b/fuji_server/models/semantic_vocabulary.py @@ -1,291 +1,135 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model -from fuji_server.models.debug import Debug -from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium -from fuji_server.models.semantic_vocabulary_output import SemanticVocabularyOutput +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class SemanticVocabulary(Model): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - def __init__( - self, - id: int | None = None, - metric_identifier: str | None = None, - metric_name: str | None = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, - test_status: str = "fail", - score: FAIRResultCommonScore = None, - maturity: str = "incomplete", - output: SemanticVocabularyOutput = None, - test_debug: Debug = None, - ): - """SemanticVocabulary - a model defined in Swagger - - :param id: The id of this SemanticVocabulary. # noqa: E501 - :type id: int - :param metric_identifier: The metric_identifier of this SemanticVocabulary. # noqa: E501 - :type metric_identifier: str - :param metric_name: The metric_name of this SemanticVocabulary. # noqa: E501 - :type metric_name: str - :param metric_tests: The metric_tests of this SemanticVocabulary. # noqa: E501 - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - :param test_status: The test_status of this SemanticVocabulary. # noqa: E501 - :type test_status: str - :param score: The score of this SemanticVocabulary. # noqa: E501 - :type score: FAIRResultCommonScore - :param maturity: The maturity of this SemanticVocabulary. # noqa: E501 - :type maturity: str - :param output: The output of this SemanticVocabulary. # noqa: E501 - :type output: SemanticVocabularyOutput - :param test_debug: The test_debug of this SemanticVocabulary. # noqa: E501 - :type test_debug: Debug - """ - self.swagger_types = { - "id": int, - "metric_identifier": str, - "metric_name": str, - "metric_tests": dict[str, FAIRResultEvaluationCriterium], - "test_status": str, - "score": FAIRResultCommonScore, - "maturity": str, - "output": SemanticVocabularyOutput, - "test_debug": Debug, - } - - self.attribute_map = { - "id": "id", - "metric_identifier": "metric_identifier", - "metric_name": "metric_name", - "metric_tests": "metric_tests", - "test_status": "test_status", - "score": "score", - "maturity": "maturity", - "output": "output", - "test_debug": "test_debug", - } - self._id = id - self._metric_identifier = metric_identifier - self._metric_name = metric_name - self._metric_tests = metric_tests - self._test_status = test_status - self._score = score - self._maturity = maturity - self._output = output - self._test_debug = test_debug - - @classmethod - def from_dict(cls, dikt) -> "SemanticVocabulary": - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The SemanticVocabulary of this SemanticVocabulary. # noqa: E501 - :rtype: SemanticVocabulary - """ - return util.deserialize_model(dikt, cls) - - @property - def id(self) -> int: - """Gets the id of this SemanticVocabulary. - - - :return: The id of this SemanticVocabulary. - :rtype: int - """ - return self._id - - @id.setter - def id(self, id: int): - """Sets the id of this SemanticVocabulary. - - - :param id: The id of this SemanticVocabulary. - :type id: int - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") - - self._id = id - - @property - def metric_identifier(self) -> str: - """Gets the metric_identifier of this SemanticVocabulary. - - - :return: The metric_identifier of this SemanticVocabulary. - :rtype: str - """ - return self._metric_identifier - - @metric_identifier.setter - def metric_identifier(self, metric_identifier: str): - """Sets the metric_identifier of this SemanticVocabulary. - - - :param metric_identifier: The metric_identifier of this SemanticVocabulary. - :type metric_identifier: str - """ - if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") - - self._metric_identifier = metric_identifier - - @property - def metric_name(self) -> str: - """Gets the metric_name of this SemanticVocabulary. - - - :return: The metric_name of this SemanticVocabulary. - :rtype: str - """ - return self._metric_name - - @metric_name.setter - def metric_name(self, metric_name: str): - """Sets the metric_name of this SemanticVocabulary. - - - :param metric_name: The metric_name of this SemanticVocabulary. - :type metric_name: str - """ - if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" - self._metric_name = metric_name +import pprint +import re # noqa: F401 - @property - def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: - """Gets the metric_tests of this SemanticVocabulary. - - - :return: The metric_tests of this SemanticVocabulary. - :rtype: Dict[str, FAIRResultEvaluationCriterium] - """ - return self._metric_tests - - @metric_tests.setter - def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): - """Sets the metric_tests of this SemanticVocabulary. - - - :param metric_tests: The metric_tests of this SemanticVocabulary. - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - """ - - self._metric_tests = metric_tests - - @property - def test_status(self) -> str: - """Gets the test_status of this SemanticVocabulary. - - - :return: The test_status of this SemanticVocabulary. - :rtype: str - """ - return self._test_status - - @test_status.setter - def test_status(self, test_status: str): - """Sets the test_status of this SemanticVocabulary. - - - :param test_status: The test_status of this SemanticVocabulary. - :type test_status: str - """ - allowed_values = ["pass", "fail", "indeterminate"] - if test_status not in allowed_values: - raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") - - self._test_status = test_status - - @property - def score(self) -> FAIRResultCommonScore: - """Gets the score of this SemanticVocabulary. +import six +from swagger_client.models.fair_result_common import FAIRResultCommon - :return: The score of this SemanticVocabulary. - :rtype: FAIRResultCommonScore - """ - return self._score - - @score.setter - def score(self, score: FAIRResultCommonScore): - """Sets the score of this SemanticVocabulary. - - - :param score: The score of this SemanticVocabulary. - :type score: FAIRResultCommonScore - """ - if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") - - self._score = score - - @property - def maturity(self) -> str: - """Gets the maturity of this SemanticVocabulary. - - - :return: The maturity of this SemanticVocabulary. - :rtype: str - """ - return self._maturity - - @maturity.setter - def maturity(self, maturity: int): - """Sets the maturity of this Uniqueness. +class SemanticVocabulary(FAIRResultCommon): + """NOTE: This class is auto generated by the swagger code generator program. - :param maturity: The maturity of this Uniqueness. - :type maturity: int - """ + Do not edit the class manually. + """ - self._maturity = maturity + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"output": "SemanticVocabularyOutput", "test_debug": "Debug"} + if hasattr(FAIRResultCommon, "swagger_types"): + swagger_types.update(FAIRResultCommon.swagger_types) + + attribute_map = {"output": "output", "test_debug": "test_debug"} + if hasattr(FAIRResultCommon, "attribute_map"): + attribute_map.update(FAIRResultCommon.attribute_map) + + def __init__(self, output=None, test_debug=None, *args, **kwargs): + """SemanticVocabulary - a model defined in Swagger""" + self._output = None + self._test_debug = None + self.discriminator = None + if output is not None: + self.output = output + if test_debug is not None: + self.test_debug = test_debug + FAIRResultCommon.__init__(self, *args, **kwargs) @property - def output(self) -> SemanticVocabularyOutput: - """Gets the output of this SemanticVocabulary. + def output(self): + """Gets the output of this SemanticVocabulary. # noqa: E501 - :return: The output of this SemanticVocabulary. + :return: The output of this SemanticVocabulary. # noqa: E501 :rtype: SemanticVocabularyOutput """ return self._output @output.setter - def output(self, output: SemanticVocabularyOutput): + def output(self, output): """Sets the output of this SemanticVocabulary. - :param output: The output of this SemanticVocabulary. - :type output: SemanticVocabularyOutput + :param output: The output of this SemanticVocabulary. # noqa: E501 + :type: SemanticVocabularyOutput """ self._output = output @property - def test_debug(self) -> Debug: - """Gets the test_debug of this SemanticVocabulary. + def test_debug(self): + """Gets the test_debug of this SemanticVocabulary. # noqa: E501 - :return: The test_debug of this SemanticVocabulary. + :return: The test_debug of this SemanticVocabulary. # noqa: E501 :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug: Debug): + def test_debug(self, test_debug): """Sets the test_debug of this SemanticVocabulary. - :param test_debug: The test_debug of this SemanticVocabulary. - :type test_debug: Debug + :param test_debug: The test_debug of this SemanticVocabulary. # noqa: E501 + :type: Debug """ self._test_debug = test_debug + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(SemanticVocabulary, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SemanticVocabulary): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/semantic_vocabulary_output.py b/fuji_server/models/semantic_vocabulary_output.py index 5e7416d0..855fe5a9 100644 --- a/fuji_server/models/semantic_vocabulary_output.py +++ b/fuji_server/models/semantic_vocabulary_output.py @@ -1,27 +1,80 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model -from fuji_server.models.semantic_vocabulary_output_inner import SemanticVocabularyOutputInner # noqa: F401 +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class SemanticVocabularyOutput(Model): + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class SemanticVocabularyOutput: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {} + + attribute_map = {} + def __init__(self): """SemanticVocabularyOutput - a model defined in Swagger""" - self.swagger_types = {} + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(SemanticVocabularyOutput, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() - self.attribute_map = {} + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SemanticVocabularyOutput): + return False - @classmethod - def from_dict(cls, dikt) -> "SemanticVocabularyOutput": - """Returns the dict as a model + return self.__dict__ == other.__dict__ - :param dikt: A dict. - :type: dict - :return: The SemanticVocabulary_output of this SemanticVocabularyOutput. # noqa: E501 - :rtype: SemanticVocabularyOutput - """ - return util.deserialize_model(dikt, cls) + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/semantic_vocabulary_output_inner.py b/fuji_server/models/semantic_vocabulary_output_inner.py index c7d1118b..07ac1b2c 100644 --- a/fuji_server/models/semantic_vocabulary_output_inner.py +++ b/fuji_server/models/semantic_vocabulary_output_inner.py @@ -1,76 +1,128 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class SemanticVocabularyOutputInner(Model): + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class SemanticVocabularyOutputInner: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - def __init__(self, namespace: str | None = None, is_namespace_active: bool = False): - """SemanticVocabularyOutputInner - a model defined in Swagger - - :param namespace: The namespace of this SemanticVocabularyOutputInner. # noqa: E501 - :type namespace: str - :param is_namespace_active: The is_namespace_active of this SemanticVocabularyOutputInner. # noqa: E501 - :type is_namespace_active: bool - """ - self.swagger_types = {"namespace": str, "is_namespace_active": bool} - - self.attribute_map = {"namespace": "namespace", "is_namespace_active": "is_namespace_active"} - self._namespace = namespace - self._is_namespace_active = is_namespace_active + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"namespace": "str", "is_namespace_active": "bool"} - @classmethod - def from_dict(cls, dikt) -> "SemanticVocabularyOutputInner": - """Returns the dict as a model + attribute_map = {"namespace": "namespace", "is_namespace_active": "is_namespace_active"} - :param dikt: A dict. - :type: dict - :return: The SemanticVocabulary_output_inner of this SemanticVocabularyOutputInner. # noqa: E501 - :rtype: SemanticVocabularyOutputInner - """ - return util.deserialize_model(dikt, cls) + def __init__(self, namespace=None, is_namespace_active=False): + """SemanticVocabularyOutputInner - a model defined in Swagger""" + self._namespace = None + self._is_namespace_active = None + self.discriminator = None + if namespace is not None: + self.namespace = namespace + if is_namespace_active is not None: + self.is_namespace_active = is_namespace_active @property - def namespace(self) -> str: - """Gets the namespace of this SemanticVocabularyOutputInner. + def namespace(self): + """Gets the namespace of this SemanticVocabularyOutputInner. # noqa: E501 - :return: The namespace of this SemanticVocabularyOutputInner. + :return: The namespace of this SemanticVocabularyOutputInner. # noqa: E501 :rtype: str """ return self._namespace @namespace.setter - def namespace(self, namespace: str): + def namespace(self, namespace): """Sets the namespace of this SemanticVocabularyOutputInner. - :param namespace: The namespace of this SemanticVocabularyOutputInner. - :type namespace: str + :param namespace: The namespace of this SemanticVocabularyOutputInner. # noqa: E501 + :type: str """ self._namespace = namespace @property - def is_namespace_active(self) -> bool: - """Gets the is_namespace_active of this SemanticVocabularyOutputInner. + def is_namespace_active(self): + """Gets the is_namespace_active of this SemanticVocabularyOutputInner. # noqa: E501 - :return: The is_namespace_active of this SemanticVocabularyOutputInner. + :return: The is_namespace_active of this SemanticVocabularyOutputInner. # noqa: E501 :rtype: bool """ return self._is_namespace_active @is_namespace_active.setter - def is_namespace_active(self, is_namespace_active: bool): + def is_namespace_active(self, is_namespace_active): """Sets the is_namespace_active of this SemanticVocabularyOutputInner. - :param is_namespace_active: The is_namespace_active of this SemanticVocabularyOutputInner. - :type is_namespace_active: bool + :param is_namespace_active: The is_namespace_active of this SemanticVocabularyOutputInner. # noqa: E501 + :type: bool """ self._is_namespace_active = is_namespace_active + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(SemanticVocabularyOutputInner, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SemanticVocabularyOutputInner): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/standardised_protocol_data.py b/fuji_server/models/standardised_protocol_data.py index 89ab52ae..680626d2 100644 --- a/fuji_server/models/standardised_protocol_data.py +++ b/fuji_server/models/standardised_protocol_data.py @@ -1,291 +1,135 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model -from fuji_server.models.debug import Debug -from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium -from fuji_server.models.standardised_protocol_data_output import StandardisedProtocolDataOutput +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class StandardisedProtocolData(Model): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - def __init__( - self, - id: int | None = None, - metric_identifier: str | None = None, - metric_name: str | None = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, - test_status: str = "fail", - score: FAIRResultCommonScore = None, - maturity: str = "incomplete", - output: StandardisedProtocolDataOutput = None, - test_debug: Debug = None, - ): - """StandardisedProtocolData - a model defined in Swagger - - :param id: The id of this StandardisedProtocolData. # noqa: E501 - :type id: int - :param metric_identifier: The metric_identifier of this StandardisedProtocolData. # noqa: E501 - :type metric_identifier: str - :param metric_name: The metric_name of this StandardisedProtocolData. # noqa: E501 - :type metric_name: str - :param metric_tests: The metric_tests of this StandardisedProtocolData. # noqa: E501 - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - :param test_status: The test_status of this StandardisedProtocolData. # noqa: E501 - :type test_status: str - :param score: The score of this StandardisedProtocolData. # noqa: E501 - :type score: FAIRResultCommonScore - :param maturity: The maturity of this StandardisedProtocolData. # noqa: E501 - :type maturity: str - :param output: The output of this StandardisedProtocolData. # noqa: E501 - :type output: StandardisedProtocolDataOutput - :param test_debug: The test_debug of this StandardisedProtocolData. # noqa: E501 - :type test_debug: Debug - """ - self.swagger_types = { - "id": int, - "metric_identifier": str, - "metric_name": str, - "metric_tests": dict[str, FAIRResultEvaluationCriterium], - "test_status": str, - "score": FAIRResultCommonScore, - "maturity": str, - "output": StandardisedProtocolDataOutput, - "test_debug": Debug, - } - - self.attribute_map = { - "id": "id", - "metric_identifier": "metric_identifier", - "metric_name": "metric_name", - "metric_tests": "metric_tests", - "test_status": "test_status", - "score": "score", - "maturity": "maturity", - "output": "output", - "test_debug": "test_debug", - } - self._id = id - self._metric_identifier = metric_identifier - self._metric_name = metric_name - self._metric_tests = metric_tests - self._test_status = test_status - self._score = score - self._maturity = maturity - self._output = output - self._test_debug = test_debug - - @classmethod - def from_dict(cls, dikt) -> "StandardisedProtocolData": - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The StandardisedProtocolData of this StandardisedProtocolData. # noqa: E501 - :rtype: StandardisedProtocolData - """ - return util.deserialize_model(dikt, cls) - - @property - def id(self) -> int: - """Gets the id of this StandardisedProtocolData. - - - :return: The id of this StandardisedProtocolData. - :rtype: int - """ - return self._id - - @id.setter - def id(self, id: int): - """Sets the id of this StandardisedProtocolData. - - - :param id: The id of this StandardisedProtocolData. - :type id: int - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") - - self._id = id - - @property - def metric_identifier(self) -> str: - """Gets the metric_identifier of this StandardisedProtocolData. - - - :return: The metric_identifier of this StandardisedProtocolData. - :rtype: str - """ - return self._metric_identifier - - @metric_identifier.setter - def metric_identifier(self, metric_identifier: str): - """Sets the metric_identifier of this StandardisedProtocolData. - - - :param metric_identifier: The metric_identifier of this StandardisedProtocolData. - :type metric_identifier: str - """ - if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") - - self._metric_identifier = metric_identifier - - @property - def metric_name(self) -> str: - """Gets the metric_name of this StandardisedProtocolData. - - - :return: The metric_name of this StandardisedProtocolData. - :rtype: str - """ - return self._metric_name - - @metric_name.setter - def metric_name(self, metric_name: str): - """Sets the metric_name of this StandardisedProtocolData. - - - :param metric_name: The metric_name of this StandardisedProtocolData. - :type metric_name: str - """ - if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" - self._metric_name = metric_name +import pprint +import re # noqa: F401 - @property - def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: - """Gets the metric_tests of this StandardisedProtocolData. - - - :return: The metric_tests of this StandardisedProtocolData. - :rtype: Dict[str, FAIRResultEvaluationCriterium] - """ - return self._metric_tests - - @metric_tests.setter - def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): - """Sets the metric_tests of this StandardisedProtocolData. - - - :param metric_tests: The metric_tests of this StandardisedProtocolData. - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - """ - - self._metric_tests = metric_tests - - @property - def test_status(self) -> str: - """Gets the test_status of this StandardisedProtocolData. - - - :return: The test_status of this StandardisedProtocolData. - :rtype: str - """ - return self._test_status - - @test_status.setter - def test_status(self, test_status: str): - """Sets the test_status of this StandardisedProtocolData. - - - :param test_status: The test_status of this StandardisedProtocolData. - :type test_status: str - """ - allowed_values = ["pass", "fail", "indeterminate"] - if test_status not in allowed_values: - raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") - - self._test_status = test_status - - @property - def score(self) -> FAIRResultCommonScore: - """Gets the score of this StandardisedProtocolData. +import six +from swagger_client.models.fair_result_common import FAIRResultCommon - :return: The score of this StandardisedProtocolData. - :rtype: FAIRResultCommonScore - """ - return self._score - - @score.setter - def score(self, score: FAIRResultCommonScore): - """Sets the score of this StandardisedProtocolData. - - - :param score: The score of this StandardisedProtocolData. - :type score: FAIRResultCommonScore - """ - if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") - - self._score = score - - @property - def maturity(self) -> str: - """Gets the maturity of this StandardisedProtocolData. - - - :return: The maturity of this StandardisedProtocolData. - :rtype: str - """ - return self._maturity - - @maturity.setter - def maturity(self, maturity: int): - """Sets the maturity of this Uniqueness. +class StandardisedProtocolData(FAIRResultCommon): + """NOTE: This class is auto generated by the swagger code generator program. - :param maturity: The maturity of this Uniqueness. - :type maturity: int - """ + Do not edit the class manually. + """ - self._maturity = maturity + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"output": "StandardisedProtocolDataOutput", "test_debug": "Debug"} + if hasattr(FAIRResultCommon, "swagger_types"): + swagger_types.update(FAIRResultCommon.swagger_types) + + attribute_map = {"output": "output", "test_debug": "test_debug"} + if hasattr(FAIRResultCommon, "attribute_map"): + attribute_map.update(FAIRResultCommon.attribute_map) + + def __init__(self, output=None, test_debug=None, *args, **kwargs): + """StandardisedProtocolData - a model defined in Swagger""" + self._output = None + self._test_debug = None + self.discriminator = None + if output is not None: + self.output = output + if test_debug is not None: + self.test_debug = test_debug + FAIRResultCommon.__init__(self, *args, **kwargs) @property - def output(self) -> StandardisedProtocolDataOutput: - """Gets the output of this StandardisedProtocolData. + def output(self): + """Gets the output of this StandardisedProtocolData. # noqa: E501 - :return: The output of this StandardisedProtocolData. + :return: The output of this StandardisedProtocolData. # noqa: E501 :rtype: StandardisedProtocolDataOutput """ return self._output @output.setter - def output(self, output: StandardisedProtocolDataOutput): + def output(self, output): """Sets the output of this StandardisedProtocolData. - :param output: The output of this StandardisedProtocolData. - :type output: StandardisedProtocolDataOutput + :param output: The output of this StandardisedProtocolData. # noqa: E501 + :type: StandardisedProtocolDataOutput """ self._output = output @property - def test_debug(self) -> Debug: - """Gets the test_debug of this StandardisedProtocolData. + def test_debug(self): + """Gets the test_debug of this StandardisedProtocolData. # noqa: E501 - :return: The test_debug of this StandardisedProtocolData. + :return: The test_debug of this StandardisedProtocolData. # noqa: E501 :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug: Debug): + def test_debug(self, test_debug): """Sets the test_debug of this StandardisedProtocolData. - :param test_debug: The test_debug of this StandardisedProtocolData. - :type test_debug: Debug + :param test_debug: The test_debug of this StandardisedProtocolData. # noqa: E501 + :type: Debug """ self._test_debug = test_debug + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(StandardisedProtocolData, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StandardisedProtocolData): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/standardised_protocol_data_output.py b/fuji_server/models/standardised_protocol_data_output.py index 6fd4ff67..b795f097 100644 --- a/fuji_server/models/standardised_protocol_data_output.py +++ b/fuji_server/models/standardised_protocol_data_output.py @@ -1,52 +1,104 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class StandardisedProtocolDataOutput(Model): + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class StandardisedProtocolDataOutput: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - def __init__(self, standard_data_protocol: str | None = None): - """StandardisedProtocolDataOutput - a model defined in Swagger - - :param standard_data_protocol: The standard_data_protocol of this StandardisedProtocolDataOutput. # noqa: E501 - :type standard_data_protocol: str - """ - self.swagger_types = {"standard_data_protocol": str} + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"standard_data_protocol": "str"} - self.attribute_map = {"standard_data_protocol": "standard_data_protocol"} - self._standard_data_protocol = standard_data_protocol + attribute_map = {"standard_data_protocol": "standard_data_protocol"} - @classmethod - def from_dict(cls, dikt) -> "StandardisedProtocolDataOutput": - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The StandardisedProtocolData_output of this StandardisedProtocolDataOutput. # noqa: E501 - :rtype: StandardisedProtocolDataOutput - """ - return util.deserialize_model(dikt, cls) + def __init__(self, standard_data_protocol=None): + """StandardisedProtocolDataOutput - a model defined in Swagger""" + self._standard_data_protocol = None + self.discriminator = None + if standard_data_protocol is not None: + self.standard_data_protocol = standard_data_protocol @property - def standard_data_protocol(self) -> str: - """Gets the standard_data_protocol of this StandardisedProtocolDataOutput. + def standard_data_protocol(self): + """Gets the standard_data_protocol of this StandardisedProtocolDataOutput. # noqa: E501 - :return: The standard_data_protocol of this StandardisedProtocolDataOutput. + :return: The standard_data_protocol of this StandardisedProtocolDataOutput. # noqa: E501 :rtype: str """ return self._standard_data_protocol @standard_data_protocol.setter - def standard_data_protocol(self, standard_data_protocol: str): + def standard_data_protocol(self, standard_data_protocol): """Sets the standard_data_protocol of this StandardisedProtocolDataOutput. - :param standard_data_protocol: The standard_data_protocol of this StandardisedProtocolDataOutput. - :type standard_data_protocol: str + :param standard_data_protocol: The standard_data_protocol of this StandardisedProtocolDataOutput. # noqa: E501 + :type: str """ self._standard_data_protocol = standard_data_protocol + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(StandardisedProtocolDataOutput, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StandardisedProtocolDataOutput): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/standardised_protocol_metadata.py b/fuji_server/models/standardised_protocol_metadata.py index aeda0370..ad76b44d 100644 --- a/fuji_server/models/standardised_protocol_metadata.py +++ b/fuji_server/models/standardised_protocol_metadata.py @@ -1,293 +1,135 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model -from fuji_server.models.debug import Debug -from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium -from fuji_server.models.standardised_protocol_metadata_output import ( - StandardisedProtocolMetadataOutput, -) - - -class StandardisedProtocolMetadata(Model): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - def __init__( - self, - id: int | None = None, - metric_identifier: str | None = None, - metric_name: str | None = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, - test_status: str = "fail", - score: FAIRResultCommonScore = None, - maturity: str = "incomplete", - output: StandardisedProtocolMetadataOutput = None, - test_debug: Debug = None, - ): - """StandardisedProtocolMetadata - a model defined in Swagger - - :param id: The id of this StandardisedProtocolMetadata. # noqa: E501 - :type id: int - :param metric_identifier: The metric_identifier of this StandardisedProtocolMetadata. # noqa: E501 - :type metric_identifier: str - :param metric_name: The metric_name of this StandardisedProtocolMetadata. # noqa: E501 - :type metric_name: str - :param metric_tests: The metric_tests of this StandardisedProtocolMetadata. # noqa: E501 - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - :param test_status: The test_status of this StandardisedProtocolMetadata. # noqa: E501 - :type test_status: str - :param score: The score of this StandardisedProtocolMetadata. # noqa: E501 - :type score: FAIRResultCommonScore - :param maturity: The maturity of this StandardisedProtocolMetadata. # noqa: E501 - :type maturity: str - :param output: The output of this StandardisedProtocolMetadata. # noqa: E501 - :type output: StandardisedProtocolMetadataOutput - :param test_debug: The test_debug of this StandardisedProtocolMetadata. # noqa: E501 - :type test_debug: Debug - """ - self.swagger_types = { - "id": int, - "metric_identifier": str, - "metric_name": str, - "metric_tests": dict[str, FAIRResultEvaluationCriterium], - "test_status": str, - "score": FAIRResultCommonScore, - "maturity": str, - "output": StandardisedProtocolMetadataOutput, - "test_debug": Debug, - } - - self.attribute_map = { - "id": "id", - "metric_identifier": "metric_identifier", - "metric_name": "metric_name", - "metric_tests": "metric_tests", - "test_status": "test_status", - "score": "score", - "maturity": "maturity", - "output": "output", - "test_debug": "test_debug", - } - self._id = id - self._metric_identifier = metric_identifier - self._metric_name = metric_name - self._metric_tests = metric_tests - self._test_status = test_status - self._score = score - self._maturity = maturity - self._output = output - self._test_debug = test_debug - - @classmethod - def from_dict(cls, dikt) -> "StandardisedProtocolMetadata": - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The StandardisedProtocolMetadata of this StandardisedProtocolMetadata. # noqa: E501 - :rtype: StandardisedProtocolMetadata - """ - return util.deserialize_model(dikt, cls) - - @property - def id(self) -> int: - """Gets the id of this StandardisedProtocolMetadata. - - - :return: The id of this StandardisedProtocolMetadata. - :rtype: int - """ - return self._id - - @id.setter - def id(self, id: int): - """Sets the id of this StandardisedProtocolMetadata. - - - :param id: The id of this StandardisedProtocolMetadata. - :type id: int - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") - - self._id = id - - @property - def metric_identifier(self) -> str: - """Gets the metric_identifier of this StandardisedProtocolMetadata. - - - :return: The metric_identifier of this StandardisedProtocolMetadata. - :rtype: str - """ - return self._metric_identifier - - @metric_identifier.setter - def metric_identifier(self, metric_identifier: str): - """Sets the metric_identifier of this StandardisedProtocolMetadata. - - - :param metric_identifier: The metric_identifier of this StandardisedProtocolMetadata. - :type metric_identifier: str - """ - if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") - - self._metric_identifier = metric_identifier - - @property - def metric_name(self) -> str: - """Gets the metric_name of this StandardisedProtocolMetadata. - - - :return: The metric_name of this StandardisedProtocolMetadata. - :rtype: str - """ - return self._metric_name - - @metric_name.setter - def metric_name(self, metric_name: str): - """Sets the metric_name of this StandardisedProtocolMetadata. - - - :param metric_name: The metric_name of this StandardisedProtocolMetadata. - :type metric_name: str - """ - if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") - - self._metric_name = metric_name - - @property - def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: - """Gets the metric_tests of this StandardisedProtocolMetadata. +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - :return: The metric_tests of this StandardisedProtocolMetadata. - :rtype: Dict[str, FAIRResultEvaluationCriterium] - """ - return self._metric_tests + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" - @metric_tests.setter - def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): - """Sets the metric_tests of this StandardisedProtocolMetadata. +import pprint +import re # noqa: F401 +import six - :param metric_tests: The metric_tests of this StandardisedProtocolMetadata. - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - """ +from swagger_client.models.fair_result_common import FAIRResultCommon - self._metric_tests = metric_tests - - @property - def test_status(self) -> str: - """Gets the test_status of this StandardisedProtocolMetadata. - - - :return: The test_status of this StandardisedProtocolMetadata. - :rtype: str - """ - return self._test_status - - @test_status.setter - def test_status(self, test_status: str): - """Sets the test_status of this StandardisedProtocolMetadata. - - - :param test_status: The test_status of this StandardisedProtocolMetadata. - :type test_status: str - """ - allowed_values = ["pass", "fail", "indeterminate"] - if test_status not in allowed_values: - raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") - - self._test_status = test_status - - @property - def score(self) -> FAIRResultCommonScore: - """Gets the score of this StandardisedProtocolMetadata. - - - :return: The score of this StandardisedProtocolMetadata. - :rtype: FAIRResultCommonScore - """ - return self._score - - @score.setter - def score(self, score: FAIRResultCommonScore): - """Sets the score of this StandardisedProtocolMetadata. - - - :param score: The score of this StandardisedProtocolMetadata. - :type score: FAIRResultCommonScore - """ - if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") - - self._score = score - - @property - def maturity(self) -> str: - """Gets the maturity of this StandardisedProtocolMetadata. - - - :return: The maturity of this StandardisedProtocolMetadata. - :rtype: str - """ - return self._maturity - - @maturity.setter - def maturity(self, maturity: int): - """Sets the maturity of this Uniqueness. +class StandardisedProtocolMetadata(FAIRResultCommon): + """NOTE: This class is auto generated by the swagger code generator program. - :param maturity: The maturity of this Uniqueness. - :type maturity: int - """ + Do not edit the class manually. + """ - self._maturity = maturity + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"output": "StandardisedProtocolMetadataOutput", "test_debug": "Debug"} + if hasattr(FAIRResultCommon, "swagger_types"): + swagger_types.update(FAIRResultCommon.swagger_types) + + attribute_map = {"output": "output", "test_debug": "test_debug"} + if hasattr(FAIRResultCommon, "attribute_map"): + attribute_map.update(FAIRResultCommon.attribute_map) + + def __init__(self, output=None, test_debug=None, *args, **kwargs): + """StandardisedProtocolMetadata - a model defined in Swagger""" + self._output = None + self._test_debug = None + self.discriminator = None + if output is not None: + self.output = output + if test_debug is not None: + self.test_debug = test_debug + FAIRResultCommon.__init__(self, *args, **kwargs) @property - def output(self) -> StandardisedProtocolMetadataOutput: - """Gets the output of this StandardisedProtocolMetadata. + def output(self): + """Gets the output of this StandardisedProtocolMetadata. # noqa: E501 - :return: The output of this StandardisedProtocolMetadata. + :return: The output of this StandardisedProtocolMetadata. # noqa: E501 :rtype: StandardisedProtocolMetadataOutput """ return self._output @output.setter - def output(self, output: StandardisedProtocolMetadataOutput): + def output(self, output): """Sets the output of this StandardisedProtocolMetadata. - :param output: The output of this StandardisedProtocolMetadata. - :type output: StandardisedProtocolMetadataOutput + :param output: The output of this StandardisedProtocolMetadata. # noqa: E501 + :type: StandardisedProtocolMetadataOutput """ self._output = output @property - def test_debug(self) -> Debug: - """Gets the test_debug of this StandardisedProtocolMetadata. + def test_debug(self): + """Gets the test_debug of this StandardisedProtocolMetadata. # noqa: E501 - :return: The test_debug of this StandardisedProtocolMetadata. + :return: The test_debug of this StandardisedProtocolMetadata. # noqa: E501 :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug: Debug): + def test_debug(self, test_debug): """Sets the test_debug of this StandardisedProtocolMetadata. - :param test_debug: The test_debug of this StandardisedProtocolMetadata. - :type test_debug: Debug + :param test_debug: The test_debug of this StandardisedProtocolMetadata. # noqa: E501 + :type: Debug """ self._test_debug = test_debug + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(StandardisedProtocolMetadata, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StandardisedProtocolMetadata): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/standardised_protocol_metadata_output.py b/fuji_server/models/standardised_protocol_metadata_output.py index e1b5e1d8..9fe709a6 100644 --- a/fuji_server/models/standardised_protocol_metadata_output.py +++ b/fuji_server/models/standardised_protocol_metadata_output.py @@ -1,52 +1,104 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class StandardisedProtocolMetadataOutput(Model): + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class StandardisedProtocolMetadataOutput: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - def __init__(self, standard_metadata_protocol: str | None = None): - """StandardisedProtocolMetadataOutput - a model defined in Swagger - - :param standard_metadata_protocol: The standard_metadata_protocol of this StandardisedProtocolMetadataOutput. # noqa: E501 - :type standard_metadata_protocol: str - """ - self.swagger_types = {"standard_metadata_protocol": str} + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"standard_metadata_protocol": "str"} - self.attribute_map = {"standard_metadata_protocol": "standard_metadata_protocol"} - self._standard_metadata_protocol = standard_metadata_protocol + attribute_map = {"standard_metadata_protocol": "standard_metadata_protocol"} - @classmethod - def from_dict(cls, dikt) -> "StandardisedProtocolMetadataOutput": - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The StandardisedProtocolMetadata_output of this StandardisedProtocolMetadataOutput. # noqa: E501 - :rtype: StandardisedProtocolMetadataOutput - """ - return util.deserialize_model(dikt, cls) + def __init__(self, standard_metadata_protocol=None): + """StandardisedProtocolMetadataOutput - a model defined in Swagger""" + self._standard_metadata_protocol = None + self.discriminator = None + if standard_metadata_protocol is not None: + self.standard_metadata_protocol = standard_metadata_protocol @property - def standard_metadata_protocol(self) -> str: - """Gets the standard_metadata_protocol of this StandardisedProtocolMetadataOutput. + def standard_metadata_protocol(self): + """Gets the standard_metadata_protocol of this StandardisedProtocolMetadataOutput. # noqa: E501 - :return: The standard_metadata_protocol of this StandardisedProtocolMetadataOutput. + :return: The standard_metadata_protocol of this StandardisedProtocolMetadataOutput. # noqa: E501 :rtype: str """ return self._standard_metadata_protocol @standard_metadata_protocol.setter - def standard_metadata_protocol(self, standard_metadata_protocol: str): + def standard_metadata_protocol(self, standard_metadata_protocol): """Sets the standard_metadata_protocol of this StandardisedProtocolMetadataOutput. - :param standard_metadata_protocol: The standard_metadata_protocol of this StandardisedProtocolMetadataOutput. - :type standard_metadata_protocol: str + :param standard_metadata_protocol: The standard_metadata_protocol of this StandardisedProtocolMetadataOutput. # noqa: E501 + :type: str """ self._standard_metadata_protocol = standard_metadata_protocol + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(StandardisedProtocolMetadataOutput, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StandardisedProtocolMetadataOutput): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/uniqueness.py b/fuji_server/models/uniqueness.py index 8cf73eeb..9a55f7b9 100644 --- a/fuji_server/models/uniqueness.py +++ b/fuji_server/models/uniqueness.py @@ -1,291 +1,135 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model -from fuji_server.models.debug import Debug -from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 -from fuji_server.models.fair_result_common_score import FAIRResultCommonScore -from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium -from fuji_server.models.uniqueness_output import UniquenessOutput +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class Uniqueness(Model): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - - def __init__( - self, - id: int | None = None, - metric_identifier: str | None = None, - metric_name: str | None = None, - metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, - test_status: str = "fail", - score: FAIRResultCommonScore = None, - maturity: str = "incomplete", - output: UniquenessOutput = None, - test_debug: Debug = None, - ): - """Uniqueness - a model defined in Swagger - - :param id: The id of this Uniqueness. # noqa: E501 - :type id: int - :param metric_identifier: The metric_identifier of this Uniqueness. # noqa: E501 - :type metric_identifier: str - :param metric_name: The metric_name of this Uniqueness. # noqa: E501 - :type metric_name: str - :param metric_tests: The metric_tests of this Uniqueness. # noqa: E501 - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - :param test_status: The test_status of this Uniqueness. # noqa: E501 - :type test_status: str - :param score: The score of this Uniqueness. # noqa: E501 - :type score: FAIRResultCommonScore - :param maturity: The maturity of this Uniqueness. # noqa: E501 - :type maturity: str - :param output: The output of this Uniqueness. # noqa: E501 - :type output: UniquenessOutput - :param test_debug: The test_debug of this Uniqueness. # noqa: E501 - :type test_debug: Debug - """ - self.swagger_types = { - "id": int, - "metric_identifier": str, - "metric_name": str, - "metric_tests": dict[str, FAIRResultEvaluationCriterium], - "test_status": str, - "score": FAIRResultCommonScore, - "maturity": str, - "output": UniquenessOutput, - "test_debug": Debug, - } - - self.attribute_map = { - "id": "id", - "metric_identifier": "metric_identifier", - "metric_name": "metric_name", - "metric_tests": "metric_tests", - "test_status": "test_status", - "score": "score", - "maturity": "maturity", - "output": "output", - "test_debug": "test_debug", - } - self._id = id - self._metric_identifier = metric_identifier - self._metric_name = metric_name - self._metric_tests = metric_tests - self._test_status = test_status - self._score = score - self._maturity = maturity - self._output = output - self._test_debug = test_debug - - @classmethod - def from_dict(cls, dikt) -> "Uniqueness": - """Returns the dict as a model - - :param dikt: A dict. - :type: dict - :return: The Uniqueness of this Uniqueness. # noqa: E501 - :rtype: Uniqueness - """ - return util.deserialize_model(dikt, cls) - - @property - def id(self) -> int: - """Gets the id of this Uniqueness. - - - :return: The id of this Uniqueness. - :rtype: int - """ - return self._id - - @id.setter - def id(self, id: int): - """Sets the id of this Uniqueness. - - - :param id: The id of this Uniqueness. - :type id: int - """ - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") - - self._id = id - - @property - def metric_identifier(self) -> str: - """Gets the metric_identifier of this Uniqueness. - - - :return: The metric_identifier of this Uniqueness. - :rtype: str - """ - return self._metric_identifier - - @metric_identifier.setter - def metric_identifier(self, metric_identifier: str): - """Sets the metric_identifier of this Uniqueness. - - - :param metric_identifier: The metric_identifier of this Uniqueness. - :type metric_identifier: str - """ - if metric_identifier is None: - raise ValueError("Invalid value for `metric_identifier`, must not be `None`") - - self._metric_identifier = metric_identifier - - @property - def metric_name(self) -> str: - """Gets the metric_name of this Uniqueness. - - - :return: The metric_name of this Uniqueness. - :rtype: str - """ - return self._metric_name - - @metric_name.setter - def metric_name(self, metric_name: str): - """Sets the metric_name of this Uniqueness. - - - :param metric_name: The metric_name of this Uniqueness. - :type metric_name: str - """ - if metric_name is None: - raise ValueError("Invalid value for `metric_name`, must not be `None`") + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" - self._metric_name = metric_name +import pprint +import re # noqa: F401 - @property - def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: - """Gets the metric_tests of this Uniqueness. - - - :return: The metric_tests of this Uniqueness. - :rtype: Dict[str, FAIRResultEvaluationCriterium] - """ - return self._metric_tests - - @metric_tests.setter - def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): - """Sets the metric_tests of this Uniqueness. - - - :param metric_tests: The metric_tests of this Uniqueness. - :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] - """ - - self._metric_tests = metric_tests - - @property - def test_status(self) -> str: - """Gets the test_status of this Uniqueness. - - - :return: The test_status of this Uniqueness. - :rtype: str - """ - return self._test_status - - @test_status.setter - def test_status(self, test_status: str): - """Sets the test_status of this Uniqueness. - - - :param test_status: The test_status of this Uniqueness. - :type test_status: str - """ - allowed_values = ["pass", "fail", "indeterminate"] - if test_status not in allowed_values: - raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") - - self._test_status = test_status - - @property - def score(self) -> FAIRResultCommonScore: - """Gets the score of this Uniqueness. +import six +from swagger_client.models.fair_result_common import FAIRResultCommon - :return: The score of this Uniqueness. - :rtype: FAIRResultCommonScore - """ - return self._score - - @score.setter - def score(self, score: FAIRResultCommonScore): - """Sets the score of this Uniqueness. - - - :param score: The score of this Uniqueness. - :type score: FAIRResultCommonScore - """ - if score is None: - raise ValueError("Invalid value for `score`, must not be `None`") - - self._score = score - - @property - def maturity(self) -> str: - """Gets the maturity of this Uniqueness. - - - :return: The maturity of this Uniqueness. - :rtype: str - """ - return self._maturity - - @maturity.setter - def maturity(self, maturity: int): - """Sets the maturity of this Uniqueness. +class Uniqueness(FAIRResultCommon): + """NOTE: This class is auto generated by the swagger code generator program. - :param maturity: The maturity of this Uniqueness. - :type maturity: int - """ + Do not edit the class manually. + """ - self._maturity = maturity + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"output": "UniquenessOutput", "test_debug": "Debug"} + if hasattr(FAIRResultCommon, "swagger_types"): + swagger_types.update(FAIRResultCommon.swagger_types) + + attribute_map = {"output": "output", "test_debug": "test_debug"} + if hasattr(FAIRResultCommon, "attribute_map"): + attribute_map.update(FAIRResultCommon.attribute_map) + + def __init__(self, output=None, test_debug=None, *args, **kwargs): + """Uniqueness - a model defined in Swagger""" + self._output = None + self._test_debug = None + self.discriminator = None + if output is not None: + self.output = output + if test_debug is not None: + self.test_debug = test_debug + FAIRResultCommon.__init__(self, *args, **kwargs) @property - def output(self) -> UniquenessOutput: - """Gets the output of this Uniqueness. + def output(self): + """Gets the output of this Uniqueness. # noqa: E501 - :return: The output of this Uniqueness. + :return: The output of this Uniqueness. # noqa: E501 :rtype: UniquenessOutput """ return self._output @output.setter - def output(self, output: UniquenessOutput): + def output(self, output): """Sets the output of this Uniqueness. - :param output: The output of this Uniqueness. - :type output: UniquenessOutput + :param output: The output of this Uniqueness. # noqa: E501 + :type: UniquenessOutput """ self._output = output @property - def test_debug(self) -> Debug: - """Gets the test_debug of this Uniqueness. + def test_debug(self): + """Gets the test_debug of this Uniqueness. # noqa: E501 - :return: The test_debug of this Uniqueness. + :return: The test_debug of this Uniqueness. # noqa: E501 :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug: Debug): + def test_debug(self, test_debug): """Sets the test_debug of this Uniqueness. - :param test_debug: The test_debug of this Uniqueness. - :type test_debug: Debug + :param test_debug: The test_debug of this Uniqueness. # noqa: E501 + :type: Debug """ self._test_debug = test_debug + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(Uniqueness, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Uniqueness): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/fuji_server/models/uniqueness_output.py b/fuji_server/models/uniqueness_output.py index b477973e..3cf4167a 100644 --- a/fuji_server/models/uniqueness_output.py +++ b/fuji_server/models/uniqueness_output.py @@ -1,76 +1,128 @@ -from fuji_server import util -from fuji_server.models.base_model_ import Model +""" + F-UJI + A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 -class UniquenessOutput(Model): + OpenAPI spec version: 3.0.1 + Contact: anusuriya.devaraju@googlemail.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + + +class UniquenessOutput: """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - def __init__(self, guid: str | None = None, guid_scheme: str | None = None): - """UniquenessOutput - a model defined in Swagger - - :param guid: The guid of this UniquenessOutput. # noqa: E501 - :type guid: str - :param guid_scheme: The guid_scheme of this UniquenessOutput. # noqa: E501 - :type guid_scheme: str - """ - self.swagger_types = {"guid": str, "guid_scheme": str} - - self.attribute_map = {"guid": "guid", "guid_scheme": "guid_scheme"} - self._guid = guid - self._guid_scheme = guid_scheme + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = {"guid": "str", "guid_scheme": "str"} - @classmethod - def from_dict(cls, dikt) -> "UniquenessOutput": - """Returns the dict as a model + attribute_map = {"guid": "guid", "guid_scheme": "guid_scheme"} - :param dikt: A dict. - :type: dict - :return: The Uniqueness_output of this UniquenessOutput. # noqa: E501 - :rtype: UniquenessOutput - """ - return util.deserialize_model(dikt, cls) + def __init__(self, guid=None, guid_scheme=None): + """UniquenessOutput - a model defined in Swagger""" + self._guid = None + self._guid_scheme = None + self.discriminator = None + if guid is not None: + self.guid = guid + if guid_scheme is not None: + self.guid_scheme = guid_scheme @property - def guid(self) -> str: - """Gets the guid of this UniquenessOutput. + def guid(self): + """Gets the guid of this UniquenessOutput. # noqa: E501 - :return: The guid of this UniquenessOutput. + :return: The guid of this UniquenessOutput. # noqa: E501 :rtype: str """ return self._guid @guid.setter - def guid(self, guid: str): + def guid(self, guid): """Sets the guid of this UniquenessOutput. - :param guid: The guid of this UniquenessOutput. - :type guid: str + :param guid: The guid of this UniquenessOutput. # noqa: E501 + :type: str """ self._guid = guid @property - def guid_scheme(self) -> str: - """Gets the guid_scheme of this UniquenessOutput. + def guid_scheme(self): + """Gets the guid_scheme of this UniquenessOutput. # noqa: E501 - :return: The guid_scheme of this UniquenessOutput. + :return: The guid_scheme of this UniquenessOutput. # noqa: E501 :rtype: str """ return self._guid_scheme @guid_scheme.setter - def guid_scheme(self, guid_scheme: str): + def guid_scheme(self, guid_scheme): """Sets the guid_scheme of this UniquenessOutput. - :param guid_scheme: The guid_scheme of this UniquenessOutput. - :type guid_scheme: str + :param guid_scheme: The guid_scheme of this UniquenessOutput. # noqa: E501 + :type: str """ self._guid_scheme = guid_scheme + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict( + map( + lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, + value.items(), + ) + ) + else: + result[attr] = value + if issubclass(UniquenessOutput, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UniquenessOutput): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other From 2e71b2b01312642f643a14b9e875b876d9611a11 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Fri, 12 Jan 2024 13:00:47 +0000 Subject: [PATCH 36/45] Revert "regenerated swagger" This reverts commit 850ad34109dd07e72b439e29cffb1a1b3d7aca30. --- fuji_server/models/__init__.py | 74 ---- .../models/any_of_fair_results_items.py | 82 +--- fuji_server/models/body.py | 340 ++++++--------- .../models/community_endorsed_standard.py | 348 +++++++++++----- .../community_endorsed_standard_output.py | 82 +--- ...ommunity_endorsed_standard_output_inner.py | 217 ++++------ fuji_server/models/core_metadata.py | 348 +++++++++++----- fuji_server/models/core_metadata_output.py | 172 +++----- fuji_server/models/data_access_level.py | 348 +++++++++++----- fuji_server/models/data_access_output.py | 126 ++---- fuji_server/models/data_content_metadata.py | 347 +++++++++++----- .../models/data_content_metadata_output.py | 133 ++---- .../data_content_metadata_output_inner.py | 156 +++---- fuji_server/models/data_file_format.py | 348 +++++++++++----- fuji_server/models/data_file_format_output.py | 83 +--- .../models/data_file_format_output_inner.py | 217 ++++------ fuji_server/models/data_provenance.py | 348 +++++++++++----- fuji_server/models/data_provenance_output.py | 147 +++---- .../models/data_provenance_output_inner.py | 128 ++---- fuji_server/models/debug.py | 82 +--- fuji_server/models/fair_result_common.py | 265 +++++------- .../models/fair_result_common_score.py | 126 ++---- .../fair_result_evaluation_criterium.py | 219 ++++------ fuji_server/models/fair_results.py | 392 ++++++++---------- fuji_server/models/formal_metadata.py | 348 +++++++++++----- fuji_server/models/formal_metadata_output.py | 83 +--- .../models/formal_metadata_output_inner.py | 156 +++---- fuji_server/models/harvest.py | 168 ++++---- fuji_server/models/harvest_results.py | 129 ++---- .../models/harvest_results_metadata.py | 242 +++++------ fuji_server/models/identifier_included.py | 348 +++++++++++----- .../models/identifier_included_output.py | 135 ++---- .../identifier_included_output_inner.py | 108 ++--- fuji_server/models/license.py | 348 +++++++++++----- fuji_server/models/license_output.py | 83 +--- fuji_server/models/license_output_inner.py | 146 +++---- fuji_server/models/metadata_preserved.py | 348 +++++++++++----- .../models/metadata_preserved_output.py | 110 ++--- fuji_server/models/metric.py | 336 +++++++-------- fuji_server/models/metrics.py | 129 ++---- .../models/output_core_metadata_found.py | 89 +--- .../models/output_search_mechanisms.py | 128 ++---- fuji_server/models/persistence.py | 348 +++++++++++----- fuji_server/models/persistence_output.py | 111 ++--- .../models/persistence_output_inner.py | 182 +++----- fuji_server/models/related_resource.py | 348 +++++++++++----- fuji_server/models/related_resource_output.py | 83 +--- .../models/related_resource_output_inner.py | 126 ++---- fuji_server/models/searchable.py | 348 +++++++++++----- fuji_server/models/searchable_output.py | 111 ++--- fuji_server/models/semantic_vocabulary.py | 348 +++++++++++----- .../models/semantic_vocabulary_output.py | 83 +--- .../semantic_vocabulary_output_inner.py | 126 ++---- .../models/standardised_protocol_data.py | 348 +++++++++++----- .../standardised_protocol_data_output.py | 108 ++--- .../models/standardised_protocol_metadata.py | 350 +++++++++++----- .../standardised_protocol_metadata_output.py | 108 ++--- fuji_server/models/uniqueness.py | 348 +++++++++++----- fuji_server/models/uniqueness_output.py | 126 ++---- 59 files changed, 6332 insertions(+), 5832 deletions(-) mode change 100755 => 100644 fuji_server/models/any_of_fair_results_items.py diff --git a/fuji_server/models/__init__.py b/fuji_server/models/__init__.py index def51357..e69de29b 100644 --- a/fuji_server/models/__init__.py +++ b/fuji_server/models/__init__.py @@ -1,74 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - F-UJI - - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -from __future__ import absolute_import - -# import models into model package -from swagger_client.models.any_of_fair_results_results_items import AnyOfFAIRResultsResultsItems -from swagger_client.models.body import Body -from swagger_client.models.community_endorsed_standard import CommunityEndorsedStandard -from swagger_client.models.community_endorsed_standard_output import CommunityEndorsedStandardOutput -from swagger_client.models.community_endorsed_standard_output_inner import CommunityEndorsedStandardOutputInner -from swagger_client.models.core_metadata import CoreMetadata -from swagger_client.models.core_metadata_output import CoreMetadataOutput -from swagger_client.models.data_access_level import DataAccessLevel -from swagger_client.models.data_access_output import DataAccessOutput -from swagger_client.models.data_content_metadata import DataContentMetadata -from swagger_client.models.data_content_metadata_output import DataContentMetadataOutput -from swagger_client.models.data_content_metadata_output_inner import DataContentMetadataOutputInner -from swagger_client.models.data_file_format import DataFileFormat -from swagger_client.models.data_file_format_output import DataFileFormatOutput -from swagger_client.models.data_file_format_output_inner import DataFileFormatOutputInner -from swagger_client.models.data_provenance import DataProvenance -from swagger_client.models.data_provenance_output import DataProvenanceOutput -from swagger_client.models.data_provenance_output_inner import DataProvenanceOutputInner -from swagger_client.models.debug import Debug -from swagger_client.models.fair_result_common import FAIRResultCommon -from swagger_client.models.fair_result_common_score import FAIRResultCommonScore -from swagger_client.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium -from swagger_client.models.fair_results import FAIRResults -from swagger_client.models.formal_metadata import FormalMetadata -from swagger_client.models.formal_metadata_output import FormalMetadataOutput -from swagger_client.models.formal_metadata_output_inner import FormalMetadataOutputInner -from swagger_client.models.harvest import Harvest -from swagger_client.models.harvest_results import HarvestResults -from swagger_client.models.harvest_results_metadata import HarvestResultsMetadata -from swagger_client.models.identifier_included import IdentifierIncluded -from swagger_client.models.identifier_included_output import IdentifierIncludedOutput -from swagger_client.models.identifier_included_output_inner import IdentifierIncludedOutputInner -from swagger_client.models.license import License -from swagger_client.models.license_output import LicenseOutput -from swagger_client.models.license_output_inner import LicenseOutputInner -from swagger_client.models.metadata_preserved import MetadataPreserved -from swagger_client.models.metadata_preserved_output import MetadataPreservedOutput -from swagger_client.models.metric import Metric -from swagger_client.models.metrics import Metrics -from swagger_client.models.output_core_metadata_found import OutputCoreMetadataFound -from swagger_client.models.output_search_mechanisms import OutputSearchMechanisms -from swagger_client.models.persistence import Persistence -from swagger_client.models.persistence_output import PersistenceOutput -from swagger_client.models.persistence_output_inner import PersistenceOutputInner -from swagger_client.models.related_resource import RelatedResource -from swagger_client.models.related_resource_output import RelatedResourceOutput -from swagger_client.models.related_resource_output_inner import RelatedResourceOutputInner -from swagger_client.models.searchable import Searchable -from swagger_client.models.searchable_output import SearchableOutput -from swagger_client.models.semantic_vocabulary import SemanticVocabulary -from swagger_client.models.semantic_vocabulary_output import SemanticVocabularyOutput -from swagger_client.models.semantic_vocabulary_output_inner import SemanticVocabularyOutputInner -from swagger_client.models.standardised_protocol_data import StandardisedProtocolData -from swagger_client.models.standardised_protocol_data_output import StandardisedProtocolDataOutput -from swagger_client.models.standardised_protocol_metadata import StandardisedProtocolMetadata -from swagger_client.models.standardised_protocol_metadata_output import StandardisedProtocolMetadataOutput -from swagger_client.models.uniqueness import Uniqueness -from swagger_client.models.uniqueness_output import UniquenessOutput diff --git a/fuji_server/models/any_of_fair_results_items.py b/fuji_server/models/any_of_fair_results_items.py old mode 100755 new mode 100644 index ad886fe1..de3416c7 --- a/fuji_server/models/any_of_fair_results_items.py +++ b/fuji_server/models/any_of_fair_results_items.py @@ -1,80 +1,26 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class AnyOfFAIRResultsResultsItems: +class AnyOfFAIRResultsResultsItems(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {} - - attribute_map = {} - def __init__(self): """AnyOfFAIRResultsResultsItems - a model defined in Swagger""" - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(AnyOfFAIRResultsResultsItems, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() + self.swagger_types = {} - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, AnyOfFAIRResultsResultsItems): - return False + self.attribute_map = {} - return self.__dict__ == other.__dict__ + @classmethod + def from_dict(cls, dikt) -> "AnyOfFAIRResultsResultsItems": + """Returns the dict as a model - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other + :param dikt: A dict. + :type: dict + :return: The AnyOfFAIRResultsResultsItems of this AnyOfFAIRResultsResultsItems. # noqa: E501 + :rtype: AnyOfFAIRResultsResultsItems + """ + return util.deserialize_model(dikt, cls) diff --git a/fuji_server/models/body.py b/fuji_server/models/body.py index 3ca68167..2bdb1321 100644 --- a/fuji_server/models/body.py +++ b/fuji_server/models/body.py @@ -1,122 +1,109 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class Body: +class Body(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - "object_identifier": "str", - "test_debug": "bool", - "metadata_service_endpoint": "str", - "metadata_service_type": "str", - "use_datacite": "bool", - "use_github": "bool", - "metric_version": "str", - "auth_token": "str", - "auth_token_type": "str", - "oaipmh_endpoint": "str", - } - - attribute_map = { - "object_identifier": "object_identifier", - "test_debug": "test_debug", - "metadata_service_endpoint": "metadata_service_endpoint", - "metadata_service_type": "metadata_service_type", - "use_datacite": "use_datacite", - "use_github": "use_github", - "metric_version": "metric_version", - "auth_token": "auth_token", - "auth_token_type": "auth_token_type", - "oaipmh_endpoint": "oaipmh_endpoint", - } - def __init__( self, - object_identifier=None, - test_debug=False, - metadata_service_endpoint=None, - metadata_service_type=None, - use_datacite=None, - use_github=None, - metric_version=None, - auth_token=None, - auth_token_type=None, - oaipmh_endpoint=None, + object_identifier: str | None = None, + test_debug: bool = False, + metadata_service_endpoint: str | None = None, + metadata_service_type: str | None = None, + use_datacite: bool | None = None, + metric_version: str | None = None, + auth_token: str | None = None, + auth_token_type: str | None = None, + oaipmh_endpoint: str | None = None, ): - """Body - a model defined in Swagger""" - self._object_identifier = None - self._test_debug = None - self._metadata_service_endpoint = None - self._metadata_service_type = None - self._use_datacite = None - self._use_github = None - self._metric_version = None - self._auth_token = None - self._auth_token_type = None - self._oaipmh_endpoint = None - self.discriminator = None - self.object_identifier = object_identifier - if test_debug is not None: - self.test_debug = test_debug - if metadata_service_endpoint is not None: - self.metadata_service_endpoint = metadata_service_endpoint - if metadata_service_type is not None: - self.metadata_service_type = metadata_service_type - if use_datacite is not None: - self.use_datacite = use_datacite - if use_github is not None: - self.use_github = use_github - if metric_version is not None: - self.metric_version = metric_version - if auth_token is not None: - self.auth_token = auth_token - if auth_token_type is not None: - self.auth_token_type = auth_token_type - if oaipmh_endpoint is not None: - self.oaipmh_endpoint = oaipmh_endpoint + """Body - a model defined in Swagger + + :param object_identifier: The object_identifier of this Body. # noqa: E501 + :type object_identifier: str + :param test_debug: The test_debug of this Body. # noqa: E501 + :type test_debug: bool + :param metadata_service_endpoint: The metadata_service_endpoint of this Body. # noqa: E501 + :type metadata_service_endpoint: str + :param metadata_service_type: The metadata_service_type of this Body. # noqa: E501 + :type metadata_service_type: str + :param use_datacite: The use_datacite of this Body. # noqa: E501 + :type use_datacite: bool + :param metric_version: The metric_version of this Body. # noqa: E501 + :type metric_version: str + :param auth_token: The auth_token of this Body. # noqa: E501 + :type auth_token: str + :param auth_token_type: The auth_token_type of this Body. # noqa: E501 + :type auth_token_type: str + :param oaipmh_endpoint: The oaipmh_endpoint of this Body. # noqa: E501 + :type oaipmh_endpoint: str + """ + self.swagger_types = { + "object_identifier": str, + "test_debug": bool, + "metadata_service_endpoint": str, + "metadata_service_type": str, + "use_datacite": bool, + "metric_version": str, + "auth_token": str, + "auth_token_type": str, + "oaipmh_endpoint": str, + } + + self.attribute_map = { + "object_identifier": "object_identifier", + "test_debug": "test_debug", + "metadata_service_endpoint": "metadata_service_endpoint", + "metadata_service_type": "metadata_service_type", + "use_datacite": "use_datacite", + "metric_version": "metric_version", + "auth_token": "auth_token", + "auth_token_type": "auth_token_type", + "oaipmh_endpoint": "oaipmh_endpoint", + } + self._object_identifier = object_identifier + self._test_debug = test_debug + self._metadata_service_endpoint = metadata_service_endpoint + self._metadata_service_type = metadata_service_type + self._use_datacite = use_datacite + self._metric_version = metric_version + self._auth_token = auth_token + self._auth_token_type = auth_token_type + self._oaipmh_endpoint = oaipmh_endpoint + + @classmethod + def from_dict(cls, dikt) -> "Body": + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The body of this Body. # noqa: E501 + :rtype: Body + """ + return util.deserialize_model(dikt, cls) @property - def object_identifier(self): - """Gets the object_identifier of this Body. # noqa: E501 + def object_identifier(self) -> str: + """Gets the object_identifier of this Body. The full identifier of data object that needs to be evaluated # noqa: E501 - :return: The object_identifier of this Body. # noqa: E501 + :return: The object_identifier of this Body. :rtype: str """ return self._object_identifier @object_identifier.setter - def object_identifier(self, object_identifier): + def object_identifier(self, object_identifier: str): """Sets the object_identifier of this Body. The full identifier of data object that needs to be evaluated # noqa: E501 - :param object_identifier: The object_identifier of this Body. # noqa: E501 - :type: str + :param object_identifier: The object_identifier of this Body. + :type object_identifier: str """ if object_identifier is None: raise ValueError("Invalid value for `object_identifier`, must not be `None`") @@ -124,250 +111,183 @@ def object_identifier(self, object_identifier): self._object_identifier = object_identifier @property - def test_debug(self): - """Gets the test_debug of this Body. # noqa: E501 + def test_debug(self) -> bool: + """Gets the test_debug of this Body. Indicate if the detailed evaluation procedure of the metrics should to be included in the response # noqa: E501 - :return: The test_debug of this Body. # noqa: E501 + :return: The test_debug of this Body. :rtype: bool """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug): + def test_debug(self, test_debug: bool): """Sets the test_debug of this Body. Indicate if the detailed evaluation procedure of the metrics should to be included in the response # noqa: E501 - :param test_debug: The test_debug of this Body. # noqa: E501 - :type: bool + :param test_debug: The test_debug of this Body. + :type test_debug: bool """ self._test_debug = test_debug @property - def metadata_service_endpoint(self): - """Gets the metadata_service_endpoint of this Body. # noqa: E501 + def metadata_service_endpoint(self) -> str: + """Gets the metadata_service_endpoint of this Body. The URL of the catalogue endpoint (e.g. OAI-PMH data-provider) # noqa: E501 - :return: The metadata_service_endpoint of this Body. # noqa: E501 + :return: The metadata_service_endpoint of this Body. :rtype: str """ return self._metadata_service_endpoint @metadata_service_endpoint.setter - def metadata_service_endpoint(self, metadata_service_endpoint): + def metadata_service_endpoint(self, metadata_service_endpoint: str): """Sets the metadata_service_endpoint of this Body. The URL of the catalogue endpoint (e.g. OAI-PMH data-provider) # noqa: E501 - :param metadata_service_endpoint: The metadata_service_endpoint of this Body. # noqa: E501 - :type: str + :param metadata_service_endpoint: The metadata_service_endpoint of this Body. + :type metadata_service_endpoint: str """ self._metadata_service_endpoint = metadata_service_endpoint @property - def metadata_service_type(self): - """Gets the metadata_service_type of this Body. # noqa: E501 + def metadata_service_type(self) -> str: + """Gets the metadata_service_type of this Body. - :return: The metadata_service_type of this Body. # noqa: E501 + :return: The metadata_service_type of this Body. :rtype: str """ return self._metadata_service_type @metadata_service_type.setter - def metadata_service_type(self, metadata_service_type): + def metadata_service_type(self, metadata_service_type: str): """Sets the metadata_service_type of this Body. - :param metadata_service_type: The metadata_service_type of this Body. # noqa: E501 - :type: str + :param metadata_service_type: The metadata_service_type of this Body. + :type metadata_service_type: str """ self._metadata_service_type = metadata_service_type @property - def use_datacite(self): - """Gets the use_datacite of this Body. # noqa: E501 + def use_datacite(self) -> bool: + """Gets the use_datacite of this Body. Indicates if DataCite content negotiation (using the DOI) shall be used to collect metadata # noqa: E501 - :return: The use_datacite of this Body. # noqa: E501 + :return: The use_datacite of this Body. :rtype: bool """ return self._use_datacite @use_datacite.setter - def use_datacite(self, use_datacite): + def use_datacite(self, use_datacite: bool): """Sets the use_datacite of this Body. Indicates if DataCite content negotiation (using the DOI) shall be used to collect metadata # noqa: E501 - :param use_datacite: The use_datacite of this Body. # noqa: E501 - :type: bool + :param use_datacite: The use_datacite of this Body. + :type use_datacite: bool """ self._use_datacite = use_datacite @property - def use_github(self): - """Gets the use_github of this Body. # noqa: E501 - - Indicates if the GitHub REST API shall be used to collect (meta)data # noqa: E501 - - :return: The use_github of this Body. # noqa: E501 - :rtype: bool - """ - return self._use_github - - @use_github.setter - def use_github(self, use_github): - """Sets the use_github of this Body. - - Indicates if the GitHub REST API shall be used to collect (meta)data # noqa: E501 - - :param use_github: The use_github of this Body. # noqa: E501 - :type: bool - """ - - self._use_github = use_github - - @property - def metric_version(self): - """Gets the metric_version of this Body. # noqa: E501 + def metric_version(self) -> str: + """Gets the metric_version of this Body. The FAIRsFAIR metric version be used fo rthe assessment # noqa: E501 - :return: The metric_version of this Body. # noqa: E501 + :return: The metric_version of this Body. :rtype: str """ return self._metric_version @metric_version.setter - def metric_version(self, metric_version): + def metric_version(self, metric_version: str): """Sets the metric_version of this Body. The FAIRsFAIR metric version be used fo rthe assessment # noqa: E501 - :param metric_version: The metric_version of this Body. # noqa: E501 - :type: str + :param metric_version: The metric_version of this Body. + :type metric_version: str """ self._metric_version = metric_version @property - def auth_token(self): - """Gets the auth_token of this Body. # noqa: E501 + def auth_token(self) -> str: + """Gets the auth_token of this Body. The authentication token for HTTP authentication # noqa: E501 - :return: The auth_token of this Body. # noqa: E501 + :return: The auth_token of this Body. :rtype: str """ return self._auth_token @auth_token.setter - def auth_token(self, auth_token): + def auth_token(self, auth_token: str): """Sets the auth_token of this Body. The authentication token for HTTP authentication # noqa: E501 - :param auth_token: The auth_token of this Body. # noqa: E501 - :type: str + :param auth_token: The auth_token of this Body. + :type auth_token: str """ self._auth_token = auth_token @property - def auth_token_type(self): - """Gets the auth_token_type of this Body. # noqa: E501 + def auth_token_type(self) -> str: + """Gets the auth_token_type of this Body. The authentication token type, 'Basic' or 'Bearer' # noqa: E501 - :return: The auth_token_type of this Body. # noqa: E501 + :return: The auth_token_type of this Body. :rtype: str """ return self._auth_token_type @auth_token_type.setter - def auth_token_type(self, auth_token_type): + def auth_token_type(self, auth_token_type: str): """Sets the auth_token_type of this Body. The authentication token type, 'Basic' or 'Bearer' # noqa: E501 - :param auth_token_type: The auth_token_type of this Body. # noqa: E501 - :type: str + :param auth_token_type: The auth_token_type of this Body. + :type auth_token_type: str """ self._auth_token_type = auth_token_type @property - def oaipmh_endpoint(self): - """Gets the oaipmh_endpoint of this Body. # noqa: E501 + def oaipmh_endpoint(self) -> str: + """Gets the oaipmh_endpoint of this Body. (Deprecated) The URL of the OAI-PMH data-provider # noqa: E501 - :return: The oaipmh_endpoint of this Body. # noqa: E501 + :return: The oaipmh_endpoint of this Body. :rtype: str """ return self._oaipmh_endpoint @oaipmh_endpoint.setter - def oaipmh_endpoint(self, oaipmh_endpoint): + def oaipmh_endpoint(self, oaipmh_endpoint: str): """Sets the oaipmh_endpoint of this Body. (Deprecated) The URL of the OAI-PMH data-provider # noqa: E501 - :param oaipmh_endpoint: The oaipmh_endpoint of this Body. # noqa: E501 - :type: str + :param oaipmh_endpoint: The oaipmh_endpoint of this Body. + :type oaipmh_endpoint: str """ self._oaipmh_endpoint = oaipmh_endpoint - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(Body, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Body): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/community_endorsed_standard.py b/fuji_server/models/community_endorsed_standard.py index a5880ef6..eb700955 100644 --- a/fuji_server/models/community_endorsed_standard.py +++ b/fuji_server/models/community_endorsed_standard.py @@ -1,135 +1,291 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model +from fuji_server.models.community_endorsed_standard_output import CommunityEndorsedStandardOutput +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" +class CommunityEndorsedStandard(Model): + """NOTE: This class is auto generated by the swagger code generator program. -import pprint -import re # noqa: F401 + Do not edit the class manually. + """ -import six + def __init__( + self, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, + test_status: str = "fail", + score: FAIRResultCommonScore = None, + maturity: str = "incomplete", + output: CommunityEndorsedStandardOutput = None, + test_debug: Debug = None, + ): + """CommunityEndorsedStandard - a model defined in Swagger + + :param id: The id of this CommunityEndorsedStandard. # noqa: E501 + :type id: int + :param metric_identifier: The metric_identifier of this CommunityEndorsedStandard. # noqa: E501 + :type metric_identifier: str + :param metric_name: The metric_name of this CommunityEndorsedStandard. # noqa: E501 + :type metric_name: str + :param metric_tests: The metric_tests of this CommunityEndorsedStandard. # noqa: E501 + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + :param test_status: The test_status of this CommunityEndorsedStandard. # noqa: E501 + :type test_status: str + :param score: The score of this CommunityEndorsedStandard. # noqa: E501 + :type score: FAIRResultCommonScore + :param maturity: The maturity of this CommunityEndorsedStandard. # noqa: E501 + :type maturity: str + :param output: The output of this CommunityEndorsedStandard. # noqa: E501 + :type output: CommunityEndorsedStandardOutput + :param test_debug: The test_debug of this CommunityEndorsedStandard. # noqa: E501 + :type test_debug: Debug + """ + self.swagger_types = { + "id": int, + "metric_identifier": str, + "metric_name": str, + "metric_tests": dict[str, FAIRResultEvaluationCriterium], + "test_status": str, + "score": FAIRResultCommonScore, + "maturity": str, + "output": CommunityEndorsedStandardOutput, + "test_debug": Debug, + } + + self.attribute_map = { + "id": "id", + "metric_identifier": "metric_identifier", + "metric_name": "metric_name", + "metric_tests": "metric_tests", + "test_status": "test_status", + "score": "score", + "maturity": "maturity", + "output": "output", + "test_debug": "test_debug", + } + self._id = id + self._metric_identifier = metric_identifier + self._metric_name = metric_name + self._metric_tests = metric_tests + self._test_status = test_status + self._score = score + self._maturity = maturity + self._output = output + self._test_debug = test_debug -from swagger_client.models.fair_result_common import FAIRResultCommon + @classmethod + def from_dict(cls, dikt) -> "CommunityEndorsedStandard": + """Returns the dict as a model + :param dikt: A dict. + :type: dict + :return: The CommunityEndorsedStandard of this CommunityEndorsedStandard. # noqa: E501 + :rtype: CommunityEndorsedStandard + """ + return util.deserialize_model(dikt, cls) -class CommunityEndorsedStandard(FAIRResultCommon): - """NOTE: This class is auto generated by the swagger code generator program. + @property + def id(self) -> int: + """Gets the id of this CommunityEndorsedStandard. - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"output": "CommunityEndorsedStandardOutput", "test_debug": "Debug"} - if hasattr(FAIRResultCommon, "swagger_types"): - swagger_types.update(FAIRResultCommon.swagger_types) - - attribute_map = {"output": "output", "test_debug": "test_debug"} - if hasattr(FAIRResultCommon, "attribute_map"): - attribute_map.update(FAIRResultCommon.attribute_map) - - def __init__(self, output=None, test_debug=None, *args, **kwargs): - """CommunityEndorsedStandard - a model defined in Swagger""" - self._output = None - self._test_debug = None - self.discriminator = None - if output is not None: - self.output = output - if test_debug is not None: - self.test_debug = test_debug - FAIRResultCommon.__init__(self, *args, **kwargs) + :return: The id of this CommunityEndorsedStandard. + :rtype: int + """ + return self._id + + @id.setter + def id(self, id: int): + """Sets the id of this CommunityEndorsedStandard. + + + :param id: The id of this CommunityEndorsedStandard. + :type id: int + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") + + self._id = id + + @property + def metric_identifier(self) -> str: + """Gets the metric_identifier of this CommunityEndorsedStandard. + + + :return: The metric_identifier of this CommunityEndorsedStandard. + :rtype: str + """ + return self._metric_identifier + + @metric_identifier.setter + def metric_identifier(self, metric_identifier: str): + """Sets the metric_identifier of this CommunityEndorsedStandard. + + + :param metric_identifier: The metric_identifier of this CommunityEndorsedStandard. + :type metric_identifier: str + """ + if metric_identifier is None: + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") + + self._metric_identifier = metric_identifier + + @property + def metric_name(self) -> str: + """Gets the metric_name of this CommunityEndorsedStandard. + + + :return: The metric_name of this CommunityEndorsedStandard. + :rtype: str + """ + return self._metric_name + + @metric_name.setter + def metric_name(self, metric_name: str): + """Sets the metric_name of this CommunityEndorsedStandard. + + + :param metric_name: The metric_name of this CommunityEndorsedStandard. + :type metric_name: str + """ + if metric_name is None: + raise ValueError("Invalid value for `metric_name`, must not be `None`") + + self._metric_name = metric_name + + @property + def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: + """Gets the metric_tests of this CommunityEndorsedStandard. + + + :return: The metric_tests of this CommunityEndorsedStandard. + :rtype: Dict[str, FAIRResultEvaluationCriterium] + """ + return self._metric_tests + + @metric_tests.setter + def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): + """Sets the metric_tests of this CommunityEndorsedStandard. + + + :param metric_tests: The metric_tests of this CommunityEndorsedStandard. + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + """ + + self._metric_tests = metric_tests + + @property + def test_status(self) -> str: + """Gets the test_status of this CommunityEndorsedStandard. + + + :return: The test_status of this CommunityEndorsedStandard. + :rtype: str + """ + return self._test_status + + @test_status.setter + def test_status(self, test_status: str): + """Sets the test_status of this CommunityEndorsedStandard. + + + :param test_status: The test_status of this CommunityEndorsedStandard. + :type test_status: str + """ + allowed_values = ["pass", "fail", "indeterminate"] + if test_status not in allowed_values: + raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") + + self._test_status = test_status + + @property + def score(self) -> FAIRResultCommonScore: + """Gets the score of this CommunityEndorsedStandard. + + + :return: The score of this CommunityEndorsedStandard. + :rtype: FAIRResultCommonScore + """ + return self._score + + @score.setter + def score(self, score: FAIRResultCommonScore): + """Sets the score of this CommunityEndorsedStandard. + + + :param score: The score of this CommunityEndorsedStandard. + :type score: FAIRResultCommonScore + """ + if score is None: + raise ValueError("Invalid value for `score`, must not be `None`") + + self._score = score @property - def output(self): - """Gets the output of this CommunityEndorsedStandard. # noqa: E501 + def maturity(self) -> str: + """Gets the maturity of this CommunityEndorsedStandard. + + + :return: The maturity of this CommunityEndorsedStandard. + :rtype: str + """ + return self._maturity + @maturity.setter + def maturity(self, maturity: int): + """Sets the maturity of this Uniqueness. - :return: The output of this CommunityEndorsedStandard. # noqa: E501 + + :param maturity: The maturity of this Uniqueness. + :type maturity: int + """ + + self._maturity = maturity + + @property + def output(self) -> CommunityEndorsedStandardOutput: + """Gets the output of this CommunityEndorsedStandard. + + + :return: The output of this CommunityEndorsedStandard. :rtype: CommunityEndorsedStandardOutput """ return self._output @output.setter - def output(self, output): + def output(self, output: CommunityEndorsedStandardOutput): """Sets the output of this CommunityEndorsedStandard. - :param output: The output of this CommunityEndorsedStandard. # noqa: E501 - :type: CommunityEndorsedStandardOutput + :param output: The output of this CommunityEndorsedStandard. + :type output: CommunityEndorsedStandardOutput """ self._output = output @property - def test_debug(self): - """Gets the test_debug of this CommunityEndorsedStandard. # noqa: E501 + def test_debug(self) -> Debug: + """Gets the test_debug of this CommunityEndorsedStandard. - :return: The test_debug of this CommunityEndorsedStandard. # noqa: E501 + :return: The test_debug of this CommunityEndorsedStandard. :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug): + def test_debug(self, test_debug: Debug): """Sets the test_debug of this CommunityEndorsedStandard. - :param test_debug: The test_debug of this CommunityEndorsedStandard. # noqa: E501 - :type: Debug + :param test_debug: The test_debug of this CommunityEndorsedStandard. + :type test_debug: Debug """ self._test_debug = test_debug - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(CommunityEndorsedStandard, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CommunityEndorsedStandard): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/community_endorsed_standard_output.py b/fuji_server/models/community_endorsed_standard_output.py index 7e0bdfee..1d4b8d7d 100644 --- a/fuji_server/models/community_endorsed_standard_output.py +++ b/fuji_server/models/community_endorsed_standard_output.py @@ -1,80 +1,26 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class CommunityEndorsedStandardOutput: +class CommunityEndorsedStandardOutput(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {} - - attribute_map = {} - def __init__(self): """CommunityEndorsedStandardOutput - a model defined in Swagger""" - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(CommunityEndorsedStandardOutput, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() + self.swagger_types = {} - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CommunityEndorsedStandardOutput): - return False + self.attribute_map = {} - return self.__dict__ == other.__dict__ + @classmethod + def from_dict(cls, dikt) -> "CommunityEndorsedStandardOutput": + """Returns the dict as a model - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other + :param dikt: A dict. + :type: dict + :return: The CommunityEndorsedStandard_output of this CommunityEndorsedStandardOutput. # noqa: E501 + :rtype: CommunityEndorsedStandardOutput + """ + return util.deserialize_model(dikt, cls) diff --git a/fuji_server/models/community_endorsed_standard_output_inner.py b/fuji_server/models/community_endorsed_standard_output_inner.py index 0fabb700..0f2ca895 100644 --- a/fuji_server/models/community_endorsed_standard_output_inner.py +++ b/fuji_server/models/community_endorsed_standard_output_inner.py @@ -1,212 +1,167 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class CommunityEndorsedStandardOutputInner: +class CommunityEndorsedStandardOutputInner(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - "metadata_standard": "str", - "url": "str", - "subject_areas": "list[str]", - "type": "str", - "source": "str", - } - - attribute_map = { - "metadata_standard": "metadata_standard", - "url": "url", - "subject_areas": "subject_areas", - "type": "type", - "source": "source", - } - - def __init__(self, metadata_standard=None, url=None, subject_areas=None, type=None, source=None): - """CommunityEndorsedStandardOutputInner - a model defined in Swagger""" - self._metadata_standard = None - self._url = None - self._subject_areas = None - self._type = None - self._source = None - self.discriminator = None - if metadata_standard is not None: - self.metadata_standard = metadata_standard - if url is not None: - self.url = url - if subject_areas is not None: - self.subject_areas = subject_areas - if type is not None: - self.type = type - if source is not None: - self.source = source + def __init__( + self, + metadata_standard: str | None = None, + url: str | None = None, + subject_areas: list[str] | None = None, + type: str | None = None, + source: str | None = None, + ): + """CommunityEndorsedStandardOutputInner - a model defined in Swagger + + :param metadata_standard: The metadata_standard of this CommunityEndorsedStandardOutputInner. # noqa: E501 + :type metadata_standard: str + :param url: The url of this CommunityEndorsedStandardOutputInner. # noqa: E501 + :type url: str + :param subject_areas: The subject_areas of this CommunityEndorsedStandardOutputInner. # noqa: E501 + :type subject_areas: List[str] + :param type: The type of this CommunityEndorsedStandardOutputInner. # noqa: E501 + :type type: str + :param source: The source of this CommunityEndorsedStandardOutputInner. # noqa: E501 + :type source: str + """ + self.swagger_types = { + "metadata_standard": str, + "url": str, + "subject_areas": list[str], + "type": str, + "source": str, + } + + self.attribute_map = { + "metadata_standard": "metadata_standard", + "url": "url", + "subject_areas": "subject_areas", + "type": "type", + "source": "source", + } + self._metadata_standard = metadata_standard + self._url = url + self._subject_areas = subject_areas + self._type = type + self._source = source + + @classmethod + def from_dict(cls, dikt) -> "CommunityEndorsedStandardOutputInner": + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The CommunityEndorsedStandard_output_inner of this CommunityEndorsedStandardOutputInner. # noqa: E501 + :rtype: CommunityEndorsedStandardOutputInner + """ + return util.deserialize_model(dikt, cls) @property - def metadata_standard(self): - """Gets the metadata_standard of this CommunityEndorsedStandardOutputInner. # noqa: E501 + def metadata_standard(self) -> str: + """Gets the metadata_standard of this CommunityEndorsedStandardOutputInner. - :return: The metadata_standard of this CommunityEndorsedStandardOutputInner. # noqa: E501 + :return: The metadata_standard of this CommunityEndorsedStandardOutputInner. :rtype: str """ return self._metadata_standard @metadata_standard.setter - def metadata_standard(self, metadata_standard): + def metadata_standard(self, metadata_standard: str): """Sets the metadata_standard of this CommunityEndorsedStandardOutputInner. - :param metadata_standard: The metadata_standard of this CommunityEndorsedStandardOutputInner. # noqa: E501 - :type: str + :param metadata_standard: The metadata_standard of this CommunityEndorsedStandardOutputInner. + :type metadata_standard: str """ self._metadata_standard = metadata_standard @property - def url(self): - """Gets the url of this CommunityEndorsedStandardOutputInner. # noqa: E501 + def url(self) -> str: + """Gets the url of this CommunityEndorsedStandardOutputInner. - :return: The url of this CommunityEndorsedStandardOutputInner. # noqa: E501 + :return: The url of this CommunityEndorsedStandardOutputInner. :rtype: str """ return self._url @url.setter - def url(self, url): + def url(self, url: str): """Sets the url of this CommunityEndorsedStandardOutputInner. - :param url: The url of this CommunityEndorsedStandardOutputInner. # noqa: E501 - :type: str + :param url: The url of this CommunityEndorsedStandardOutputInner. + :type url: str """ self._url = url @property - def subject_areas(self): - """Gets the subject_areas of this CommunityEndorsedStandardOutputInner. # noqa: E501 + def subject_areas(self) -> list[str]: + """Gets the subject_areas of this CommunityEndorsedStandardOutputInner. - :return: The subject_areas of this CommunityEndorsedStandardOutputInner. # noqa: E501 - :rtype: list[str] + :return: The subject_areas of this CommunityEndorsedStandardOutputInner. + :rtype: List[str] """ return self._subject_areas @subject_areas.setter - def subject_areas(self, subject_areas): + def subject_areas(self, subject_areas: list[str]): """Sets the subject_areas of this CommunityEndorsedStandardOutputInner. - :param subject_areas: The subject_areas of this CommunityEndorsedStandardOutputInner. # noqa: E501 - :type: list[str] + :param subject_areas: The subject_areas of this CommunityEndorsedStandardOutputInner. + :type subject_areas: List[str] """ self._subject_areas = subject_areas @property - def type(self): - """Gets the type of this CommunityEndorsedStandardOutputInner. # noqa: E501 + def type(self) -> str: + """Gets the type of this CommunityEndorsedStandardOutputInner. - :return: The type of this CommunityEndorsedStandardOutputInner. # noqa: E501 + :return: The type of this CommunityEndorsedStandardOutputInner. :rtype: str """ return self._type @type.setter - def type(self, type): + def type(self, type: str): """Sets the type of this CommunityEndorsedStandardOutputInner. - :param type: The type of this CommunityEndorsedStandardOutputInner. # noqa: E501 - :type: str + :param type: The type of this CommunityEndorsedStandardOutputInner. + :type type: str """ self._type = type @property - def source(self): - """Gets the source of this CommunityEndorsedStandardOutputInner. # noqa: E501 + def source(self) -> str: + """Gets the source of this CommunityEndorsedStandardOutputInner. - :return: The source of this CommunityEndorsedStandardOutputInner. # noqa: E501 + :return: The source of this CommunityEndorsedStandardOutputInner. :rtype: str """ return self._source @source.setter - def source(self, source): + def source(self, source: str): """Sets the source of this CommunityEndorsedStandardOutputInner. - :param source: The source of this CommunityEndorsedStandardOutputInner. # noqa: E501 - :type: str + :param source: The source of this CommunityEndorsedStandardOutputInner. + :type source: str """ self._source = source - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(CommunityEndorsedStandardOutputInner, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CommunityEndorsedStandardOutputInner): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/core_metadata.py b/fuji_server/models/core_metadata.py index 9b02a8e0..b9a42dfb 100644 --- a/fuji_server/models/core_metadata.py +++ b/fuji_server/models/core_metadata.py @@ -1,135 +1,291 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model +from fuji_server.models.core_metadata_output import CoreMetadataOutput +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" +class CoreMetadata(Model): + """NOTE: This class is auto generated by the swagger code generator program. -import pprint -import re # noqa: F401 + Do not edit the class manually. + """ -import six + def __init__( + self, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, + test_status: str = "fail", + score: FAIRResultCommonScore = None, + maturity: int = 0, + output: CoreMetadataOutput = None, + test_debug: Debug = None, + ): + """CoreMetadata - a model defined in Swagger + + :param id: The id of this CoreMetadata. # noqa: E501 + :type id: int + :param metric_identifier: The metric_identifier of this CoreMetadata. # noqa: E501 + :type metric_identifier: str + :param metric_name: The metric_name of this CoreMetadata. # noqa: E501 + :type metric_name: str + :param metric_tests: The metric_tests of this CoreMetadata. # noqa: E501 + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + :param test_status: The test_status of this CoreMetadata. # noqa: E501 + :type test_status: str + :param score: The score of this CoreMetadata. # noqa: E501 + :type score: FAIRResultCommonScore + :param maturity: The maturity of this CoreMetadata. # noqa: E501 + :type maturity: int + :param output: The output of this CoreMetadata. # noqa: E501 + :type output: CoreMetadataOutput + :param test_debug: The test_debug of this CoreMetadata. # noqa: E501 + :type test_debug: Debug + """ + self.swagger_types = { + "id": int, + "metric_identifier": str, + "metric_name": str, + "metric_tests": dict[str, FAIRResultEvaluationCriterium], + "test_status": str, + "score": FAIRResultCommonScore, + "maturity": int, + "output": CoreMetadataOutput, + "test_debug": Debug, + } + + self.attribute_map = { + "id": "id", + "metric_identifier": "metric_identifier", + "metric_name": "metric_name", + "metric_tests": "metric_tests", + "test_status": "test_status", + "score": "score", + "maturity": "maturity", + "output": "output", + "test_debug": "test_debug", + } + self._id = id + self._metric_identifier = metric_identifier + self._metric_name = metric_name + self._metric_tests = metric_tests + self._test_status = test_status + self._score = score + self._maturity = maturity + self._output = output + self._test_debug = test_debug -from swagger_client.models.fair_result_common import FAIRResultCommon + @classmethod + def from_dict(cls, dikt) -> "CoreMetadata": + """Returns the dict as a model + :param dikt: A dict. + :type: dict + :return: The CoreMetadata of this CoreMetadata. # noqa: E501 + :rtype: CoreMetadata + """ + return util.deserialize_model(dikt, cls) -class CoreMetadata(FAIRResultCommon): - """NOTE: This class is auto generated by the swagger code generator program. + @property + def id(self) -> int: + """Gets the id of this CoreMetadata. - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"output": "CoreMetadataOutput", "test_debug": "Debug"} - if hasattr(FAIRResultCommon, "swagger_types"): - swagger_types.update(FAIRResultCommon.swagger_types) - - attribute_map = {"output": "output", "test_debug": "test_debug"} - if hasattr(FAIRResultCommon, "attribute_map"): - attribute_map.update(FAIRResultCommon.attribute_map) - - def __init__(self, output=None, test_debug=None, *args, **kwargs): - """CoreMetadata - a model defined in Swagger""" - self._output = None - self._test_debug = None - self.discriminator = None - if output is not None: - self.output = output - if test_debug is not None: - self.test_debug = test_debug - FAIRResultCommon.__init__(self, *args, **kwargs) + :return: The id of this CoreMetadata. + :rtype: int + """ + return self._id + + @id.setter + def id(self, id: int): + """Sets the id of this CoreMetadata. + + + :param id: The id of this CoreMetadata. + :type id: int + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") + + self._id = id + + @property + def metric_identifier(self) -> str: + """Gets the metric_identifier of this CoreMetadata. + + + :return: The metric_identifier of this CoreMetadata. + :rtype: str + """ + return self._metric_identifier + + @metric_identifier.setter + def metric_identifier(self, metric_identifier: str): + """Sets the metric_identifier of this CoreMetadata. + + + :param metric_identifier: The metric_identifier of this CoreMetadata. + :type metric_identifier: str + """ + if metric_identifier is None: + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") + + self._metric_identifier = metric_identifier + + @property + def metric_name(self) -> str: + """Gets the metric_name of this CoreMetadata. + + + :return: The metric_name of this CoreMetadata. + :rtype: str + """ + return self._metric_name + + @metric_name.setter + def metric_name(self, metric_name: str): + """Sets the metric_name of this CoreMetadata. + + + :param metric_name: The metric_name of this CoreMetadata. + :type metric_name: str + """ + if metric_name is None: + raise ValueError("Invalid value for `metric_name`, must not be `None`") + + self._metric_name = metric_name + + @property + def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: + """Gets the metric_tests of this CoreMetadata. + + + :return: The metric_tests of this CoreMetadata. + :rtype: Dict[str, FAIRResultEvaluationCriterium] + """ + return self._metric_tests + + @metric_tests.setter + def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): + """Sets the metric_tests of this CoreMetadata. + + + :param metric_tests: The metric_tests of this CoreMetadata. + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + """ + + self._metric_tests = metric_tests + + @property + def test_status(self) -> str: + """Gets the test_status of this CoreMetadata. + + + :return: The test_status of this CoreMetadata. + :rtype: str + """ + return self._test_status + + @test_status.setter + def test_status(self, test_status: str): + """Sets the test_status of this CoreMetadata. + + + :param test_status: The test_status of this CoreMetadata. + :type test_status: str + """ + allowed_values = ["pass", "fail", "indeterminate"] + if test_status not in allowed_values: + raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") + + self._test_status = test_status + + @property + def score(self) -> FAIRResultCommonScore: + """Gets the score of this CoreMetadata. + + + :return: The score of this CoreMetadata. + :rtype: FAIRResultCommonScore + """ + return self._score + + @score.setter + def score(self, score: FAIRResultCommonScore): + """Sets the score of this CoreMetadata. + + + :param score: The score of this CoreMetadata. + :type score: FAIRResultCommonScore + """ + if score is None: + raise ValueError("Invalid value for `score`, must not be `None`") + + self._score = score @property - def output(self): - """Gets the output of this CoreMetadata. # noqa: E501 + def maturity(self) -> int: + """Gets the maturity of this CoreMetadata. + + + :return: The maturity of this CoreMetadata. + :rtype: int + """ + return self._maturity + @maturity.setter + def maturity(self, maturity: int): + """Sets the maturity of this CoreMetadata. - :return: The output of this CoreMetadata. # noqa: E501 + + :param maturity: The maturity of this CoreMetadata. + :type maturity: int + """ + + self._maturity = maturity + + @property + def output(self) -> CoreMetadataOutput: + """Gets the output of this CoreMetadata. + + + :return: The output of this CoreMetadata. :rtype: CoreMetadataOutput """ return self._output @output.setter - def output(self, output): + def output(self, output: CoreMetadataOutput): """Sets the output of this CoreMetadata. - :param output: The output of this CoreMetadata. # noqa: E501 - :type: CoreMetadataOutput + :param output: The output of this CoreMetadata. + :type output: CoreMetadataOutput """ self._output = output @property - def test_debug(self): - """Gets the test_debug of this CoreMetadata. # noqa: E501 + def test_debug(self) -> Debug: + """Gets the test_debug of this CoreMetadata. - :return: The test_debug of this CoreMetadata. # noqa: E501 + :return: The test_debug of this CoreMetadata. :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug): + def test_debug(self, test_debug: Debug): """Sets the test_debug of this CoreMetadata. - :param test_debug: The test_debug of this CoreMetadata. # noqa: E501 - :type: Debug + :param test_debug: The test_debug of this CoreMetadata. + :type test_debug: Debug """ self._test_debug = test_debug - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(CoreMetadata, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CoreMetadata): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/core_metadata_output.py b/fuji_server/models/core_metadata_output.py index 4f282ec0..01954a5b 100644 --- a/fuji_server/models/core_metadata_output.py +++ b/fuji_server/models/core_metadata_output.py @@ -1,74 +1,72 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model +from fuji_server.models.output_core_metadata_found import OutputCoreMetadataFound - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class CoreMetadataOutput: +class CoreMetadataOutput(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - "core_metadata_status": "str", - "core_metadata_found": "OutputCoreMetadataFound", - "core_metadata_source": "list[str]", - } - - attribute_map = { - "core_metadata_status": "core_metadata_status", - "core_metadata_found": "core_metadata_found", - "core_metadata_source": "core_metadata_source", - } - - def __init__(self, core_metadata_status=None, core_metadata_found=None, core_metadata_source=None): - """CoreMetadataOutput - a model defined in Swagger""" - self._core_metadata_status = None - self._core_metadata_found = None - self._core_metadata_source = None - self.discriminator = None - if core_metadata_status is not None: - self.core_metadata_status = core_metadata_status - if core_metadata_found is not None: - self.core_metadata_found = core_metadata_found - if core_metadata_source is not None: - self.core_metadata_source = core_metadata_source + def __init__( + self, + core_metadata_status: str | None = None, + core_metadata_found: OutputCoreMetadataFound = None, + core_metadata_source: list[str] | None = None, + ): + """CoreMetadataOutput - a model defined in Swagger + + :param core_metadata_status: The core_metadata_status of this CoreMetadataOutput. # noqa: E501 + :type core_metadata_status: str + :param core_metadata_found: The core_metadata_found of this CoreMetadataOutput. # noqa: E501 + :type core_metadata_found: OutputCoreMetadataFound + :param core_metadata_source: The core_metadata_source of this CoreMetadataOutput. # noqa: E501 + :type core_metadata_source: List[str] + """ + self.swagger_types = { + "core_metadata_status": str, + "core_metadata_found": OutputCoreMetadataFound, + "core_metadata_source": list[str], + } + + self.attribute_map = { + "core_metadata_status": "core_metadata_status", + "core_metadata_found": "core_metadata_found", + "core_metadata_source": "core_metadata_source", + } + self._core_metadata_status = core_metadata_status + self._core_metadata_found = core_metadata_found + self._core_metadata_source = core_metadata_source + + @classmethod + def from_dict(cls, dikt) -> "CoreMetadataOutput": + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The CoreMetadata_output of this CoreMetadataOutput. # noqa: E501 + :rtype: CoreMetadataOutput + """ + return util.deserialize_model(dikt, cls) @property - def core_metadata_status(self): - """Gets the core_metadata_status of this CoreMetadataOutput. # noqa: E501 + def core_metadata_status(self) -> str: + """Gets the core_metadata_status of this CoreMetadataOutput. - :return: The core_metadata_status of this CoreMetadataOutput. # noqa: E501 + :return: The core_metadata_status of this CoreMetadataOutput. :rtype: str """ return self._core_metadata_status @core_metadata_status.setter - def core_metadata_status(self, core_metadata_status): + def core_metadata_status(self, core_metadata_status: str): """Sets the core_metadata_status of this CoreMetadataOutput. - :param core_metadata_status: The core_metadata_status of this CoreMetadataOutput. # noqa: E501 - :type: str + :param core_metadata_status: The core_metadata_status of this CoreMetadataOutput. + :type core_metadata_status: str """ allowed_values = ["insufficent metadata", "partial metadata", "all metadata"] if core_metadata_status not in allowed_values: @@ -79,87 +77,43 @@ def core_metadata_status(self, core_metadata_status): self._core_metadata_status = core_metadata_status @property - def core_metadata_found(self): - """Gets the core_metadata_found of this CoreMetadataOutput. # noqa: E501 + def core_metadata_found(self) -> OutputCoreMetadataFound: + """Gets the core_metadata_found of this CoreMetadataOutput. - :return: The core_metadata_found of this CoreMetadataOutput. # noqa: E501 + :return: The core_metadata_found of this CoreMetadataOutput. :rtype: OutputCoreMetadataFound """ return self._core_metadata_found @core_metadata_found.setter - def core_metadata_found(self, core_metadata_found): + def core_metadata_found(self, core_metadata_found: OutputCoreMetadataFound): """Sets the core_metadata_found of this CoreMetadataOutput. - :param core_metadata_found: The core_metadata_found of this CoreMetadataOutput. # noqa: E501 - :type: OutputCoreMetadataFound + :param core_metadata_found: The core_metadata_found of this CoreMetadataOutput. + :type core_metadata_found: OutputCoreMetadataFound """ self._core_metadata_found = core_metadata_found @property - def core_metadata_source(self): - """Gets the core_metadata_source of this CoreMetadataOutput. # noqa: E501 + def core_metadata_source(self) -> list[str]: + """Gets the core_metadata_source of this CoreMetadataOutput. - :return: The core_metadata_source of this CoreMetadataOutput. # noqa: E501 - :rtype: list[str] + :return: The core_metadata_source of this CoreMetadataOutput. + :rtype: List[str] """ return self._core_metadata_source @core_metadata_source.setter - def core_metadata_source(self, core_metadata_source): + def core_metadata_source(self, core_metadata_source: list[str]): """Sets the core_metadata_source of this CoreMetadataOutput. - :param core_metadata_source: The core_metadata_source of this CoreMetadataOutput. # noqa: E501 - :type: list[str] + :param core_metadata_source: The core_metadata_source of this CoreMetadataOutput. + :type core_metadata_source: List[str] """ self._core_metadata_source = core_metadata_source - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(CoreMetadataOutput, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, CoreMetadataOutput): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/data_access_level.py b/fuji_server/models/data_access_level.py index 4a9adad1..b2f94fd4 100644 --- a/fuji_server/models/data_access_level.py +++ b/fuji_server/models/data_access_level.py @@ -1,135 +1,291 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model +from fuji_server.models.data_access_output import DataAccessOutput +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" +class DataAccessLevel(Model): + """NOTE: This class is auto generated by the swagger code generator program. -import pprint -import re # noqa: F401 + Do not edit the class manually. + """ -import six + def __init__( + self, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, + test_status: str = "fail", + score: FAIRResultCommonScore = None, + maturity: str = "incomplete", + output: DataAccessOutput = None, + test_debug: Debug = None, + ): + """DataAccessLevel - a model defined in Swagger + + :param id: The id of this DataAccessLevel. # noqa: E501 + :type id: int + :param metric_identifier: The metric_identifier of this DataAccessLevel. # noqa: E501 + :type metric_identifier: str + :param metric_name: The metric_name of this DataAccessLevel. # noqa: E501 + :type metric_name: str + :param metric_tests: The metric_tests of this DataAccessLevel. # noqa: E501 + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + :param test_status: The test_status of this DataAccessLevel. # noqa: E501 + :type test_status: str + :param score: The score of this DataAccessLevel. # noqa: E501 + :type score: FAIRResultCommonScore + :param maturity: The maturity of this DataAccessLevel. # noqa: E501 + :type maturity: str + :param output: The output of this DataAccessLevel. # noqa: E501 + :type output: DataAccessOutput + :param test_debug: The test_debug of this DataAccessLevel. # noqa: E501 + :type test_debug: Debug + """ + self.swagger_types = { + "id": int, + "metric_identifier": str, + "metric_name": str, + "metric_tests": dict[str, FAIRResultEvaluationCriterium], + "test_status": str, + "score": FAIRResultCommonScore, + "maturity": str, + "output": DataAccessOutput, + "test_debug": Debug, + } + + self.attribute_map = { + "id": "id", + "metric_identifier": "metric_identifier", + "metric_name": "metric_name", + "metric_tests": "metric_tests", + "test_status": "test_status", + "score": "score", + "maturity": "maturity", + "output": "output", + "test_debug": "test_debug", + } + self._id = id + self._metric_identifier = metric_identifier + self._metric_name = metric_name + self._metric_tests = metric_tests + self._test_status = test_status + self._score = score + self._maturity = maturity + self._output = output + self._test_debug = test_debug -from swagger_client.models.fair_result_common import FAIRResultCommon + @classmethod + def from_dict(cls, dikt) -> "DataAccessLevel": + """Returns the dict as a model + :param dikt: A dict. + :type: dict + :return: The DataAccessLevel of this DataAccessLevel. # noqa: E501 + :rtype: DataAccessLevel + """ + return util.deserialize_model(dikt, cls) -class DataAccessLevel(FAIRResultCommon): - """NOTE: This class is auto generated by the swagger code generator program. + @property + def id(self) -> int: + """Gets the id of this DataAccessLevel. - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"output": "DataAccessOutput", "test_debug": "Debug"} - if hasattr(FAIRResultCommon, "swagger_types"): - swagger_types.update(FAIRResultCommon.swagger_types) - - attribute_map = {"output": "output", "test_debug": "test_debug"} - if hasattr(FAIRResultCommon, "attribute_map"): - attribute_map.update(FAIRResultCommon.attribute_map) - - def __init__(self, output=None, test_debug=None, *args, **kwargs): - """DataAccessLevel - a model defined in Swagger""" - self._output = None - self._test_debug = None - self.discriminator = None - if output is not None: - self.output = output - if test_debug is not None: - self.test_debug = test_debug - FAIRResultCommon.__init__(self, *args, **kwargs) + :return: The id of this DataAccessLevel. + :rtype: int + """ + return self._id + + @id.setter + def id(self, id: int): + """Sets the id of this DataAccessLevel. + + + :param id: The id of this DataAccessLevel. + :type id: int + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") + + self._id = id + + @property + def metric_identifier(self) -> str: + """Gets the metric_identifier of this DataAccessLevel. + + + :return: The metric_identifier of this DataAccessLevel. + :rtype: str + """ + return self._metric_identifier + + @metric_identifier.setter + def metric_identifier(self, metric_identifier: str): + """Sets the metric_identifier of this DataAccessLevel. + + + :param metric_identifier: The metric_identifier of this DataAccessLevel. + :type metric_identifier: str + """ + if metric_identifier is None: + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") + + self._metric_identifier = metric_identifier + + @property + def metric_name(self) -> str: + """Gets the metric_name of this DataAccessLevel. + + + :return: The metric_name of this DataAccessLevel. + :rtype: str + """ + return self._metric_name + + @metric_name.setter + def metric_name(self, metric_name: str): + """Sets the metric_name of this DataAccessLevel. + + + :param metric_name: The metric_name of this DataAccessLevel. + :type metric_name: str + """ + if metric_name is None: + raise ValueError("Invalid value for `metric_name`, must not be `None`") + + self._metric_name = metric_name + + @property + def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: + """Gets the metric_tests of this DataAccessLevel. + + + :return: The metric_tests of this DataAccessLevel. + :rtype: Dict[str, FAIRResultEvaluationCriterium] + """ + return self._metric_tests + + @metric_tests.setter + def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): + """Sets the metric_tests of this DataAccessLevel. + + + :param metric_tests: The metric_tests of this DataAccessLevel. + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + """ + + self._metric_tests = metric_tests + + @property + def test_status(self) -> str: + """Gets the test_status of this DataAccessLevel. + + + :return: The test_status of this DataAccessLevel. + :rtype: str + """ + return self._test_status + + @test_status.setter + def test_status(self, test_status: str): + """Sets the test_status of this DataAccessLevel. + + + :param test_status: The test_status of this DataAccessLevel. + :type test_status: str + """ + allowed_values = ["pass", "fail", "indeterminate"] + if test_status not in allowed_values: + raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") + + self._test_status = test_status + + @property + def score(self) -> FAIRResultCommonScore: + """Gets the score of this DataAccessLevel. + + + :return: The score of this DataAccessLevel. + :rtype: FAIRResultCommonScore + """ + return self._score + + @score.setter + def score(self, score: FAIRResultCommonScore): + """Sets the score of this DataAccessLevel. + + + :param score: The score of this DataAccessLevel. + :type score: FAIRResultCommonScore + """ + if score is None: + raise ValueError("Invalid value for `score`, must not be `None`") + + self._score = score @property - def output(self): - """Gets the output of this DataAccessLevel. # noqa: E501 + def maturity(self) -> str: + """Gets the maturity of this DataAccessLevel. + + + :return: The maturity of this DataAccessLevel. + :rtype: str + """ + return self._maturity + @maturity.setter + def maturity(self, maturity: int): + """Sets the maturity of this Uniqueness. - :return: The output of this DataAccessLevel. # noqa: E501 + + :param maturity: The maturity of this Uniqueness. + :type maturity: int + """ + + self._maturity = maturity + + @property + def output(self) -> DataAccessOutput: + """Gets the output of this DataAccessLevel. + + + :return: The output of this DataAccessLevel. :rtype: DataAccessOutput """ return self._output @output.setter - def output(self, output): + def output(self, output: DataAccessOutput): """Sets the output of this DataAccessLevel. - :param output: The output of this DataAccessLevel. # noqa: E501 - :type: DataAccessOutput + :param output: The output of this DataAccessLevel. + :type output: DataAccessOutput """ self._output = output @property - def test_debug(self): - """Gets the test_debug of this DataAccessLevel. # noqa: E501 + def test_debug(self) -> Debug: + """Gets the test_debug of this DataAccessLevel. - :return: The test_debug of this DataAccessLevel. # noqa: E501 + :return: The test_debug of this DataAccessLevel. :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug): + def test_debug(self, test_debug: Debug): """Sets the test_debug of this DataAccessLevel. - :param test_debug: The test_debug of this DataAccessLevel. # noqa: E501 - :type: Debug + :param test_debug: The test_debug of this DataAccessLevel. + :type test_debug: Debug """ self._test_debug = test_debug - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(DataAccessLevel, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, DataAccessLevel): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/data_access_output.py b/fuji_server/models/data_access_output.py index ccf3a118..6f133b4e 100644 --- a/fuji_server/models/data_access_output.py +++ b/fuji_server/models/data_access_output.py @@ -1,63 +1,55 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class DataAccessOutput: +class DataAccessOutput(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"access_level": "str", "access_details": "object"} + def __init__(self, access_level: str | None = None, access_details: object = None): + """DataAccessOutput - a model defined in Swagger - attribute_map = {"access_level": "access_level", "access_details": "access_details"} + :param access_level: The access_level of this DataAccessOutput. # noqa: E501 + :type access_level: str + :param access_details: The access_details of this DataAccessOutput. # noqa: E501 + :type access_details: object + """ + self.swagger_types = {"access_level": str, "access_details": object} - def __init__(self, access_level=None, access_details=None): - """DataAccessOutput - a model defined in Swagger""" - self._access_level = None - self._access_details = None - self.discriminator = None - if access_level is not None: - self.access_level = access_level - if access_details is not None: - self.access_details = access_details + self.attribute_map = {"access_level": "access_level", "access_details": "access_details"} + self._access_level = access_level + self._access_details = access_details + + @classmethod + def from_dict(cls, dikt) -> "DataAccessOutput": + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The DataAccess_output of this DataAccessOutput. # noqa: E501 + :rtype: DataAccessOutput + """ + return util.deserialize_model(dikt, cls) @property - def access_level(self): - """Gets the access_level of this DataAccessOutput. # noqa: E501 + def access_level(self) -> str: + """Gets the access_level of this DataAccessOutput. - :return: The access_level of this DataAccessOutput. # noqa: E501 + :return: The access_level of this DataAccessOutput. :rtype: str """ return self._access_level @access_level.setter - def access_level(self, access_level): + def access_level(self, access_level: str): """Sets the access_level of this DataAccessOutput. - :param access_level: The access_level of this DataAccessOutput. # noqa: E501 - :type: str + :param access_level: The access_level of this DataAccessOutput. + :type access_level: str """ allowed_values = ["public", "embargoed", "restricted", "closed", "metadataonly"] if access_level not in allowed_values: @@ -66,66 +58,22 @@ def access_level(self, access_level): self._access_level = access_level @property - def access_details(self): - """Gets the access_details of this DataAccessOutput. # noqa: E501 + def access_details(self) -> object: + """Gets the access_details of this DataAccessOutput. - :return: The access_details of this DataAccessOutput. # noqa: E501 + :return: The access_details of this DataAccessOutput. :rtype: object """ return self._access_details @access_details.setter - def access_details(self, access_details): + def access_details(self, access_details: object): """Sets the access_details of this DataAccessOutput. - :param access_details: The access_details of this DataAccessOutput. # noqa: E501 - :type: object + :param access_details: The access_details of this DataAccessOutput. + :type access_details: object """ self._access_details = access_details - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(DataAccessOutput, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, DataAccessOutput): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/data_content_metadata.py b/fuji_server/models/data_content_metadata.py index c7523e08..64321e34 100644 --- a/fuji_server/models/data_content_metadata.py +++ b/fuji_server/models/data_content_metadata.py @@ -1,135 +1,290 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model +from fuji_server.models.data_content_metadata_output import DataContentMetadataOutput +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" +class DataContentMetadata(Model): + """NOTE: This class is auto generated by the swagger code generator program. -import pprint -import re # noqa: F401 + Do not edit the class manually. + """ -import six + def __init__( + self, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, + test_status: str = "fail", + score: FAIRResultCommonScore = None, + maturity: str = "incomplete", + output: DataContentMetadataOutput = None, + test_debug: Debug = None, + ): + """DataContentMetadata - a model defined in Swagger + + :param id: The id of this DataContentMetadata. # noqa: E501 + :type id: int + :param metric_identifier: The metric_identifier of this DataContentMetadata. # noqa: E501 + :type metric_identifier: str + :param metric_name: The metric_name of this DataContentMetadata. # noqa: E501 + :type metric_name: str + :param metric_tests: The metric_tests of this DataContentMetadata. # noqa: E501 + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + :param test_status: The test_status of this DataContentMetadata. # noqa: E501 + :type test_status: str + :param score: The score of this DataContentMetadata. # noqa: E501 + :type score: FAIRResultCommonScore + :param maturity: The maturity of this DataContentMetadata. # noqa: E501 + :type maturity: str + :param output: The output of this DataContentMetadata. # noqa: E501 + :type output: DataContentMetadataOutput + :param test_debug: The test_debug of this DataContentMetadata. # noqa: E501 + :type test_debug: Debug + """ + self.swagger_types = { + "id": int, + "metric_identifier": str, + "metric_name": str, + "metric_tests": dict[str, FAIRResultEvaluationCriterium], + "test_status": str, + "score": FAIRResultCommonScore, + "maturity": str, + "output": DataContentMetadataOutput, + "test_debug": Debug, + } + + self.attribute_map = { + "id": "id", + "metric_identifier": "metric_identifier", + "metric_name": "metric_name", + "metric_tests": "metric_tests", + "test_status": "test_status", + "score": "score", + "maturity": "maturity", + "output": "output", + "test_debug": "test_debug", + } + self._id = id + self._metric_identifier = metric_identifier + self._metric_name = metric_name + self._metric_tests = metric_tests + self._test_status = test_status + self._score = score + self._maturity = maturity + self._output = output + self._test_debug = test_debug -from swagger_client.models.fair_result_common import FAIRResultCommon + @classmethod + def from_dict(cls, dikt) -> "DataContentMetadata": + """Returns the dict as a model + :param dikt: A dict. + :type: dict + :return: The DataContentMetadata of this DataContentMetadata. # noqa: E501 + :rtype: DataContentMetadata + """ + return util.deserialize_model(dikt, cls) -class DataContentMetadata(FAIRResultCommon): - """NOTE: This class is auto generated by the swagger code generator program. + @property + def id(self) -> int: + """Gets the id of this DataContentMetadata. - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"output": "DataContentMetadataOutput", "test_debug": "Debug"} - if hasattr(FAIRResultCommon, "swagger_types"): - swagger_types.update(FAIRResultCommon.swagger_types) - - attribute_map = {"output": "output", "test_debug": "test_debug"} - if hasattr(FAIRResultCommon, "attribute_map"): - attribute_map.update(FAIRResultCommon.attribute_map) - - def __init__(self, output=None, test_debug=None, *args, **kwargs): - """DataContentMetadata - a model defined in Swagger""" - self._output = None - self._test_debug = None - self.discriminator = None - if output is not None: - self.output = output - if test_debug is not None: - self.test_debug = test_debug - FAIRResultCommon.__init__(self, *args, **kwargs) + :return: The id of this DataContentMetadata. + :rtype: int + """ + return self._id + + @id.setter + def id(self, id: int): + """Sets the id of this DataContentMetadata. + + + :param id: The id of this DataContentMetadata. + :type id: int + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") + + self._id = id + + @property + def metric_identifier(self) -> str: + """Gets the metric_identifier of this DataContentMetadata. + + + :return: The metric_identifier of this DataContentMetadata. + :rtype: str + """ + return self._metric_identifier + + @metric_identifier.setter + def metric_identifier(self, metric_identifier: str): + """Sets the metric_identifier of this DataContentMetadata. + + + :param metric_identifier: The metric_identifier of this DataContentMetadata. + :type metric_identifier: str + """ + if metric_identifier is None: + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") + + self._metric_identifier = metric_identifier + + @property + def metric_name(self) -> str: + """Gets the metric_name of this DataContentMetadata. + + + :return: The metric_name of this DataContentMetadata. + :rtype: str + """ + return self._metric_name + + @metric_name.setter + def metric_name(self, metric_name: str): + """Sets the metric_name of this DataContentMetadata. + + + :param metric_name: The metric_name of this DataContentMetadata. + :type metric_name: str + """ + if metric_name is None: + raise ValueError("Invalid value for `metric_name`, must not be `None`") + + self._metric_name = metric_name + + @property + def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: + """Gets the metric_tests of this DataContentMetadata. + + + :return: The metric_tests of this DataContentMetadata. + :rtype: Dict[str, FAIRResultEvaluationCriterium] + """ + return self._metric_tests + + @metric_tests.setter + def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): + """Sets the metric_tests of this DataContentMetadata. + + + :param metric_tests: The metric_tests of this DataContentMetadata. + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + """ + + self._metric_tests = metric_tests + + @property + def test_status(self) -> str: + """Gets the test_status of this DataContentMetadata. + + + :return: The test_status of this DataContentMetadata. + :rtype: str + """ + return self._test_status + + @test_status.setter + def test_status(self, test_status: str): + """Sets the test_status of this DataContentMetadata. + + + :param test_status: The test_status of this DataContentMetadata. + :type test_status: str + """ + allowed_values = ["pass", "fail", "indeterminate"] + if test_status not in allowed_values: + raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") + + self._test_status = test_status + + @property + def score(self) -> FAIRResultCommonScore: + """Gets the score of this DataContentMetadata. + + + :return: The score of this DataContentMetadata. + :rtype: FAIRResultCommonScore + """ + return self._score + + @score.setter + def score(self, score: FAIRResultCommonScore): + """Sets the score of this DataContentMetadata. + + + :param score: The score of this DataContentMetadata. + :type score: FAIRResultCommonScore + """ + if score is None: + raise ValueError("Invalid value for `score`, must not be `None`") + + self._score = score @property - def output(self): - """Gets the output of this DataContentMetadata. # noqa: E501 + def maturity(self) -> str: + """Gets the maturity of this DataContentMetadata. + + + :return: The maturity of this DataContentMetadata. + :rtype: str + """ + return self._maturity + @maturity.setter + def maturity(self, maturity: int): + """Sets the maturity of this Uniqueness. - :return: The output of this DataContentMetadata. # noqa: E501 + + :param maturity: The maturity of this Uniqueness. + :type maturity: int + """ + + self._maturity = maturity + + @property + def output(self) -> DataContentMetadataOutput: + """Gets the output of this DataContentMetadata. + + + :return: The output of this DataContentMetadata. :rtype: DataContentMetadataOutput """ return self._output @output.setter - def output(self, output): + def output(self, output: DataContentMetadataOutput): """Sets the output of this DataContentMetadata. - :param output: The output of this DataContentMetadata. # noqa: E501 - :type: DataContentMetadataOutput + :param output: The output of this DataContentMetadata. + :type output: DataContentMetadataOutput """ self._output = output @property - def test_debug(self): - """Gets the test_debug of this DataContentMetadata. # noqa: E501 + def test_debug(self) -> Debug: + """Gets the test_debug of this DataContentMetadata. - :return: The test_debug of this DataContentMetadata. # noqa: E501 + :return: The test_debug of this DataContentMetadata. :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug): + def test_debug(self, test_debug: Debug): """Sets the test_debug of this DataContentMetadata. - :param test_debug: The test_debug of this DataContentMetadata. # noqa: E501 - :type: Debug + :param test_debug: The test_debug of this DataContentMetadata. + :type test_debug: Debug """ self._test_debug = test_debug - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(DataContentMetadata, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, DataContentMetadata): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/data_content_metadata_output.py b/fuji_server/models/data_content_metadata_output.py index 0e1565c6..c49e1c87 100644 --- a/fuji_server/models/data_content_metadata_output.py +++ b/fuji_server/models/data_content_metadata_output.py @@ -1,128 +1,81 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model +from fuji_server.models.data_content_metadata_output_inner import DataContentMetadataOutputInner - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class DataContentMetadataOutput: +class DataContentMetadataOutput(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"object_type": "str", "data_content_descriptor": "list[DataContentMetadataOutputInner]"} + def __init__( + self, + object_type: str | None = None, + data_content_descriptor: list[DataContentMetadataOutputInner] | None = None, + ): + """DataContentMetadataOutput - a model defined in Swagger - attribute_map = {"object_type": "object_type", "data_content_descriptor": "data_content_descriptor"} + :param object_type: The object_type of this DataContentMetadataOutput. # noqa: E501 + :type object_type: str + :param data_content_descriptor: The data_content_descriptor of this DataContentMetadataOutput. # noqa: E501 + :type data_content_descriptor: List[DataContentMetadataOutputInner] + """ + self.swagger_types = {"object_type": str, "data_content_descriptor": list[DataContentMetadataOutputInner]} - def __init__(self, object_type=None, data_content_descriptor=None): - """DataContentMetadataOutput - a model defined in Swagger""" - self._object_type = None - self._data_content_descriptor = None - self.discriminator = None - if object_type is not None: - self.object_type = object_type - if data_content_descriptor is not None: - self.data_content_descriptor = data_content_descriptor + self.attribute_map = {"object_type": "object_type", "data_content_descriptor": "data_content_descriptor"} + self._object_type = object_type + self._data_content_descriptor = data_content_descriptor + + @classmethod + def from_dict(cls, dikt) -> "DataContentMetadataOutput": + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The DataContentMetadata_output of this DataContentMetadataOutput. # noqa: E501 + :rtype: DataContentMetadataOutput + """ + return util.deserialize_model(dikt, cls) @property - def object_type(self): - """Gets the object_type of this DataContentMetadataOutput. # noqa: E501 + def object_type(self) -> str: + """Gets the object_type of this DataContentMetadataOutput. - :return: The object_type of this DataContentMetadataOutput. # noqa: E501 + :return: The object_type of this DataContentMetadataOutput. :rtype: str """ return self._object_type @object_type.setter - def object_type(self, object_type): + def object_type(self, object_type: str): """Sets the object_type of this DataContentMetadataOutput. - :param object_type: The object_type of this DataContentMetadataOutput. # noqa: E501 - :type: str + :param object_type: The object_type of this DataContentMetadataOutput. + :type object_type: str """ self._object_type = object_type @property - def data_content_descriptor(self): - """Gets the data_content_descriptor of this DataContentMetadataOutput. # noqa: E501 + def data_content_descriptor(self) -> list[DataContentMetadataOutputInner]: + """Gets the data_content_descriptor of this DataContentMetadataOutput. - :return: The data_content_descriptor of this DataContentMetadataOutput. # noqa: E501 - :rtype: list[DataContentMetadataOutputInner] + :return: The data_content_descriptor of this DataContentMetadataOutput. + :rtype: List[DataContentMetadataOutputInner] """ return self._data_content_descriptor @data_content_descriptor.setter - def data_content_descriptor(self, data_content_descriptor): + def data_content_descriptor(self, data_content_descriptor: list[DataContentMetadataOutputInner]): """Sets the data_content_descriptor of this DataContentMetadataOutput. - :param data_content_descriptor: The data_content_descriptor of this DataContentMetadataOutput. # noqa: E501 - :type: list[DataContentMetadataOutputInner] + :param data_content_descriptor: The data_content_descriptor of this DataContentMetadataOutput. + :type data_content_descriptor: List[DataContentMetadataOutputInner] """ self._data_content_descriptor = data_content_descriptor - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(DataContentMetadataOutput, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, DataContentMetadataOutput): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/data_content_metadata_output_inner.py b/fuji_server/models/data_content_metadata_output_inner.py index d2da5e60..7ad51ec4 100644 --- a/fuji_server/models/data_content_metadata_output_inner.py +++ b/fuji_server/models/data_content_metadata_output_inner.py @@ -1,156 +1,106 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" +class DataContentMetadataOutputInner(Model): + """NOTE: This class is auto generated by the swagger code generator program. -import pprint -import re # noqa: F401 + Do not edit the class manually. + """ -import six + def __init__( + self, descriptor: str | None = None, descriptor_value: str | None = None, matches_content: bool = False + ): + """DataContentMetadataOutputInner - a model defined in Swagger + :param descriptor: The descriptor of this DataContentMetadataOutputInner. # noqa: E501 + :type descriptor: str + :param descriptor_value: The descriptor_value of this DataContentMetadataOutputInner. # noqa: E501 + :type descriptor_value: str + :param matches_content: The matches_content of this DataContentMetadataOutputInner. # noqa: E501 + :type matches_content: bool + """ + self.swagger_types = {"descriptor": str, "descriptor_value": str, "matches_content": bool} -class DataContentMetadataOutputInner: - """NOTE: This class is auto generated by the swagger code generator program. + self.attribute_map = { + "descriptor": "descriptor", + "descriptor_value": "descriptor_value", + "matches_content": "matches_content", + } + self._descriptor = descriptor + self._descriptor_value = descriptor_value + self._matches_content = matches_content - Do not edit the class manually. - """ + @classmethod + def from_dict(cls, dikt) -> "DataContentMetadataOutputInner": + """Returns the dict as a model - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"descriptor": "str", "descriptor_value": "str", "matches_content": "bool"} - - attribute_map = { - "descriptor": "descriptor", - "descriptor_value": "descriptor_value", - "matches_content": "matches_content", - } - - def __init__(self, descriptor=None, descriptor_value=None, matches_content=False): - """DataContentMetadataOutputInner - a model defined in Swagger""" - self._descriptor = None - self._descriptor_value = None - self._matches_content = None - self.discriminator = None - if descriptor is not None: - self.descriptor = descriptor - if descriptor_value is not None: - self.descriptor_value = descriptor_value - if matches_content is not None: - self.matches_content = matches_content + :param dikt: A dict. + :type: dict + :return: The DataContentMetadata_output_inner of this DataContentMetadataOutputInner. # noqa: E501 + :rtype: DataContentMetadataOutputInner + """ + return util.deserialize_model(dikt, cls) @property - def descriptor(self): - """Gets the descriptor of this DataContentMetadataOutputInner. # noqa: E501 + def descriptor(self) -> str: + """Gets the descriptor of this DataContentMetadataOutputInner. - :return: The descriptor of this DataContentMetadataOutputInner. # noqa: E501 + :return: The descriptor of this DataContentMetadataOutputInner. :rtype: str """ return self._descriptor @descriptor.setter - def descriptor(self, descriptor): + def descriptor(self, descriptor: str): """Sets the descriptor of this DataContentMetadataOutputInner. - :param descriptor: The descriptor of this DataContentMetadataOutputInner. # noqa: E501 - :type: str + :param descriptor: The descriptor of this DataContentMetadataOutputInner. + :type descriptor: str """ self._descriptor = descriptor @property - def descriptor_value(self): - """Gets the descriptor_value of this DataContentMetadataOutputInner. # noqa: E501 + def descriptor_value(self) -> str: + """Gets the descriptor_value of this DataContentMetadataOutputInner. - :return: The descriptor_value of this DataContentMetadataOutputInner. # noqa: E501 + :return: The descriptor_value of this DataContentMetadataOutputInner. :rtype: str """ return self._descriptor_value @descriptor_value.setter - def descriptor_value(self, descriptor_value): + def descriptor_value(self, descriptor_value: str): """Sets the descriptor_value of this DataContentMetadataOutputInner. - :param descriptor_value: The descriptor_value of this DataContentMetadataOutputInner. # noqa: E501 - :type: str + :param descriptor_value: The descriptor_value of this DataContentMetadataOutputInner. + :type descriptor_value: str """ self._descriptor_value = descriptor_value @property - def matches_content(self): - """Gets the matches_content of this DataContentMetadataOutputInner. # noqa: E501 + def matches_content(self) -> bool: + """Gets the matches_content of this DataContentMetadataOutputInner. - :return: The matches_content of this DataContentMetadataOutputInner. # noqa: E501 + :return: The matches_content of this DataContentMetadataOutputInner. :rtype: bool """ return self._matches_content @matches_content.setter - def matches_content(self, matches_content): + def matches_content(self, matches_content: bool): """Sets the matches_content of this DataContentMetadataOutputInner. - :param matches_content: The matches_content of this DataContentMetadataOutputInner. # noqa: E501 - :type: bool + :param matches_content: The matches_content of this DataContentMetadataOutputInner. + :type matches_content: bool """ self._matches_content = matches_content - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(DataContentMetadataOutputInner, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, DataContentMetadataOutputInner): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/data_file_format.py b/fuji_server/models/data_file_format.py index 22037af9..63fca363 100644 --- a/fuji_server/models/data_file_format.py +++ b/fuji_server/models/data_file_format.py @@ -1,135 +1,291 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model +from fuji_server.models.data_file_format_output import DataFileFormatOutput +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" +class DataFileFormat(Model): + """NOTE: This class is auto generated by the swagger code generator program. -import pprint -import re # noqa: F401 + Do not edit the class manually. + """ -import six + def __init__( + self, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, + test_status: str = "fail", + score: FAIRResultCommonScore = None, + maturity: str = "incomplete", + output: DataFileFormatOutput = None, + test_debug: Debug = None, + ): + """DataFileFormat - a model defined in Swagger + + :param id: The id of this DataFileFormat. # noqa: E501 + :type id: int + :param metric_identifier: The metric_identifier of this DataFileFormat. # noqa: E501 + :type metric_identifier: str + :param metric_name: The metric_name of this DataFileFormat. # noqa: E501 + :type metric_name: str + :param metric_tests: The metric_tests of this DataFileFormat. # noqa: E501 + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + :param test_status: The test_status of this DataFileFormat. # noqa: E501 + :type test_status: str + :param score: The score of this DataFileFormat. # noqa: E501 + :type score: FAIRResultCommonScore + :param maturity: The maturity of this DataFileFormat. # noqa: E501 + :type maturity: str + :param output: The output of this DataFileFormat. # noqa: E501 + :type output: DataFileFormatOutput + :param test_debug: The test_debug of this DataFileFormat. # noqa: E501 + :type test_debug: Debug + """ + self.swagger_types = { + "id": int, + "metric_identifier": str, + "metric_name": str, + "metric_tests": dict[str, FAIRResultEvaluationCriterium], + "test_status": str, + "score": FAIRResultCommonScore, + "maturity": str, + "output": DataFileFormatOutput, + "test_debug": Debug, + } + + self.attribute_map = { + "id": "id", + "metric_identifier": "metric_identifier", + "metric_name": "metric_name", + "metric_tests": "metric_tests", + "test_status": "test_status", + "score": "score", + "maturity": "maturity", + "output": "output", + "test_debug": "test_debug", + } + self._id = id + self._metric_identifier = metric_identifier + self._metric_name = metric_name + self._metric_tests = metric_tests + self._test_status = test_status + self._score = score + self._maturity = maturity + self._output = output + self._test_debug = test_debug -from swagger_client.models.fair_result_common import FAIRResultCommon + @classmethod + def from_dict(cls, dikt) -> "DataFileFormat": + """Returns the dict as a model + :param dikt: A dict. + :type: dict + :return: The DataFileFormat of this DataFileFormat. # noqa: E501 + :rtype: DataFileFormat + """ + return util.deserialize_model(dikt, cls) -class DataFileFormat(FAIRResultCommon): - """NOTE: This class is auto generated by the swagger code generator program. + @property + def id(self) -> int: + """Gets the id of this DataFileFormat. - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"output": "DataFileFormatOutput", "test_debug": "Debug"} - if hasattr(FAIRResultCommon, "swagger_types"): - swagger_types.update(FAIRResultCommon.swagger_types) - - attribute_map = {"output": "output", "test_debug": "test_debug"} - if hasattr(FAIRResultCommon, "attribute_map"): - attribute_map.update(FAIRResultCommon.attribute_map) - - def __init__(self, output=None, test_debug=None, *args, **kwargs): - """DataFileFormat - a model defined in Swagger""" - self._output = None - self._test_debug = None - self.discriminator = None - if output is not None: - self.output = output - if test_debug is not None: - self.test_debug = test_debug - FAIRResultCommon.__init__(self, *args, **kwargs) + :return: The id of this DataFileFormat. + :rtype: int + """ + return self._id + + @id.setter + def id(self, id: int): + """Sets the id of this DataFileFormat. + + + :param id: The id of this DataFileFormat. + :type id: int + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") + + self._id = id + + @property + def metric_identifier(self) -> str: + """Gets the metric_identifier of this DataFileFormat. + + + :return: The metric_identifier of this DataFileFormat. + :rtype: str + """ + return self._metric_identifier + + @metric_identifier.setter + def metric_identifier(self, metric_identifier: str): + """Sets the metric_identifier of this DataFileFormat. + + + :param metric_identifier: The metric_identifier of this DataFileFormat. + :type metric_identifier: str + """ + if metric_identifier is None: + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") + + self._metric_identifier = metric_identifier + + @property + def metric_name(self) -> str: + """Gets the metric_name of this DataFileFormat. + + + :return: The metric_name of this DataFileFormat. + :rtype: str + """ + return self._metric_name + + @metric_name.setter + def metric_name(self, metric_name: str): + """Sets the metric_name of this DataFileFormat. + + + :param metric_name: The metric_name of this DataFileFormat. + :type metric_name: str + """ + if metric_name is None: + raise ValueError("Invalid value for `metric_name`, must not be `None`") + + self._metric_name = metric_name + + @property + def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: + """Gets the metric_tests of this DataFileFormat. + + + :return: The metric_tests of this DataFileFormat. + :rtype: Dict[str, FAIRResultEvaluationCriterium] + """ + return self._metric_tests + + @metric_tests.setter + def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): + """Sets the metric_tests of this DataFileFormat. + + + :param metric_tests: The metric_tests of this DataFileFormat. + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + """ + + self._metric_tests = metric_tests + + @property + def test_status(self) -> str: + """Gets the test_status of this DataFileFormat. + + + :return: The test_status of this DataFileFormat. + :rtype: str + """ + return self._test_status + + @test_status.setter + def test_status(self, test_status: str): + """Sets the test_status of this DataFileFormat. + + + :param test_status: The test_status of this DataFileFormat. + :type test_status: str + """ + allowed_values = ["pass", "fail", "indeterminate"] + if test_status not in allowed_values: + raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") + + self._test_status = test_status + + @property + def score(self) -> FAIRResultCommonScore: + """Gets the score of this DataFileFormat. + + + :return: The score of this DataFileFormat. + :rtype: FAIRResultCommonScore + """ + return self._score + + @score.setter + def score(self, score: FAIRResultCommonScore): + """Sets the score of this DataFileFormat. + + + :param score: The score of this DataFileFormat. + :type score: FAIRResultCommonScore + """ + if score is None: + raise ValueError("Invalid value for `score`, must not be `None`") + + self._score = score @property - def output(self): - """Gets the output of this DataFileFormat. # noqa: E501 + def maturity(self) -> str: + """Gets the maturity of this DataFileFormat. + + + :return: The maturity of this DataFileFormat. + :rtype: str + """ + return self._maturity + @maturity.setter + def maturity(self, maturity: int): + """Sets the maturity of this Uniqueness. - :return: The output of this DataFileFormat. # noqa: E501 + + :param maturity: The maturity of this Uniqueness. + :type maturity: int + """ + + self._maturity = maturity + + @property + def output(self) -> DataFileFormatOutput: + """Gets the output of this DataFileFormat. + + + :return: The output of this DataFileFormat. :rtype: DataFileFormatOutput """ return self._output @output.setter - def output(self, output): + def output(self, output: DataFileFormatOutput): """Sets the output of this DataFileFormat. - :param output: The output of this DataFileFormat. # noqa: E501 - :type: DataFileFormatOutput + :param output: The output of this DataFileFormat. + :type output: DataFileFormatOutput """ self._output = output @property - def test_debug(self): - """Gets the test_debug of this DataFileFormat. # noqa: E501 + def test_debug(self) -> Debug: + """Gets the test_debug of this DataFileFormat. - :return: The test_debug of this DataFileFormat. # noqa: E501 + :return: The test_debug of this DataFileFormat. :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug): + def test_debug(self, test_debug: Debug): """Sets the test_debug of this DataFileFormat. - :param test_debug: The test_debug of this DataFileFormat. # noqa: E501 - :type: Debug + :param test_debug: The test_debug of this DataFileFormat. + :type test_debug: Debug """ self._test_debug = test_debug - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(DataFileFormat, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, DataFileFormat): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/data_file_format_output.py b/fuji_server/models/data_file_format_output.py index 82a81e54..bf6010b8 100644 --- a/fuji_server/models/data_file_format_output.py +++ b/fuji_server/models/data_file_format_output.py @@ -1,80 +1,27 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model +from fuji_server.models.data_file_format_output_inner import DataFileFormatOutputInner # noqa: F401 - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class DataFileFormatOutput: +class DataFileFormatOutput(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {} - - attribute_map = {} - def __init__(self): """DataFileFormatOutput - a model defined in Swagger""" - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(DataFileFormatOutput, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() + self.swagger_types = {} - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, DataFileFormatOutput): - return False + self.attribute_map = {} - return self.__dict__ == other.__dict__ + @classmethod + def from_dict(cls, dikt) -> "DataFileFormatOutput": + """Returns the dict as a model - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other + :param dikt: A dict. + :type: dict + :return: The DataFileFormat_output of this DataFileFormatOutput. # noqa: E501 + :rtype: DataFileFormatOutput + """ + return util.deserialize_model(dikt, cls) diff --git a/fuji_server/models/data_file_format_output_inner.py b/fuji_server/models/data_file_format_output_inner.py index 4f8faf30..7a714917 100644 --- a/fuji_server/models/data_file_format_output_inner.py +++ b/fuji_server/models/data_file_format_output_inner.py @@ -1,214 +1,167 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class DataFileFormatOutputInner: +class DataFileFormatOutputInner(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - "file_uri": "str", - "mime_type": "str", - "is_preferred_format": "bool", - "preference_reason": "list[str]", - "subject_areas": "list[str]", - } - - attribute_map = { - "file_uri": "file_uri", - "mime_type": "mime_type", - "is_preferred_format": "is_preferred_format", - "preference_reason": "preference_reason", - "subject_areas": "subject_areas", - } - def __init__( - self, file_uri=None, mime_type=None, is_preferred_format=False, preference_reason=None, subject_areas=None + self, + file_uri: str | None = None, + mime_type: str | None = None, + is_preferred_format: bool = False, + preference_reason: list[str] | None = None, + subject_areas: list[str] | None = None, ): - """DataFileFormatOutputInner - a model defined in Swagger""" - self._file_uri = None - self._mime_type = None - self._is_preferred_format = None - self._preference_reason = None - self._subject_areas = None - self.discriminator = None - if file_uri is not None: - self.file_uri = file_uri - if mime_type is not None: - self.mime_type = mime_type - if is_preferred_format is not None: - self.is_preferred_format = is_preferred_format - if preference_reason is not None: - self.preference_reason = preference_reason - if subject_areas is not None: - self.subject_areas = subject_areas + """DataFileFormatOutputInner - a model defined in Swagger + + :param file_uri: The file_uri of this DataFileFormatOutputInner. # noqa: E501 + :type file_uri: str + :param mime_type: The mime_type of this DataFileFormatOutputInner. # noqa: E501 + :type mime_type: str + :param is_preferred_format: The is_preferred_format of this DataFileFormatOutputInner. # noqa: E501 + :type is_preferred_format: bool + :param preference_reason: The preference_reason of this DataFileFormatOutputInner. # noqa: E501 + :type preference_reason: List[str] + :param subject_areas: The subject_areas of this DataFileFormatOutputInner. # noqa: E501 + :type subject_areas: List[str] + """ + self.swagger_types = { + "file_uri": str, + "mime_type": str, + "is_preferred_format": bool, + "preference_reason": list[str], + "subject_areas": list[str], + } + + self.attribute_map = { + "file_uri": "file_uri", + "mime_type": "mime_type", + "is_preferred_format": "is_preferred_format", + "preference_reason": "preference_reason", + "subject_areas": "subject_areas", + } + self._file_uri = file_uri + self._mime_type = mime_type + self._is_preferred_format = is_preferred_format + self._preference_reason = preference_reason + self._subject_areas = subject_areas + + @classmethod + def from_dict(cls, dikt) -> "DataFileFormatOutputInner": + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The DataFileFormat_output_inner of this DataFileFormatOutputInner. # noqa: E501 + :rtype: DataFileFormatOutputInner + """ + return util.deserialize_model(dikt, cls) @property - def file_uri(self): - """Gets the file_uri of this DataFileFormatOutputInner. # noqa: E501 + def file_uri(self) -> str: + """Gets the file_uri of this DataFileFormatOutputInner. - :return: The file_uri of this DataFileFormatOutputInner. # noqa: E501 + :return: The file_uri of this DataFileFormatOutputInner. :rtype: str """ return self._file_uri @file_uri.setter - def file_uri(self, file_uri): + def file_uri(self, file_uri: str): """Sets the file_uri of this DataFileFormatOutputInner. - :param file_uri: The file_uri of this DataFileFormatOutputInner. # noqa: E501 - :type: str + :param file_uri: The file_uri of this DataFileFormatOutputInner. + :type file_uri: str """ self._file_uri = file_uri @property - def mime_type(self): - """Gets the mime_type of this DataFileFormatOutputInner. # noqa: E501 + def mime_type(self) -> str: + """Gets the mime_type of this DataFileFormatOutputInner. - :return: The mime_type of this DataFileFormatOutputInner. # noqa: E501 + :return: The mime_type of this DataFileFormatOutputInner. :rtype: str """ return self._mime_type @mime_type.setter - def mime_type(self, mime_type): + def mime_type(self, mime_type: str): """Sets the mime_type of this DataFileFormatOutputInner. - :param mime_type: The mime_type of this DataFileFormatOutputInner. # noqa: E501 - :type: str + :param mime_type: The mime_type of this DataFileFormatOutputInner. + :type mime_type: str """ self._mime_type = mime_type @property - def is_preferred_format(self): - """Gets the is_preferred_format of this DataFileFormatOutputInner. # noqa: E501 + def is_preferred_format(self) -> bool: + """Gets the is_preferred_format of this DataFileFormatOutputInner. - :return: The is_preferred_format of this DataFileFormatOutputInner. # noqa: E501 + :return: The is_preferred_format of this DataFileFormatOutputInner. :rtype: bool """ return self._is_preferred_format @is_preferred_format.setter - def is_preferred_format(self, is_preferred_format): + def is_preferred_format(self, is_preferred_format: bool): """Sets the is_preferred_format of this DataFileFormatOutputInner. - :param is_preferred_format: The is_preferred_format of this DataFileFormatOutputInner. # noqa: E501 - :type: bool + :param is_preferred_format: The is_preferred_format of this DataFileFormatOutputInner. + :type is_preferred_format: bool """ self._is_preferred_format = is_preferred_format @property - def preference_reason(self): - """Gets the preference_reason of this DataFileFormatOutputInner. # noqa: E501 + def preference_reason(self) -> list[str]: + """Gets the preference_reason of this DataFileFormatOutputInner. - :return: The preference_reason of this DataFileFormatOutputInner. # noqa: E501 - :rtype: list[str] + :return: The preference_reason of this DataFileFormatOutputInner. + :rtype: List[str] """ return self._preference_reason @preference_reason.setter - def preference_reason(self, preference_reason): + def preference_reason(self, preference_reason: list[str]): """Sets the preference_reason of this DataFileFormatOutputInner. - :param preference_reason: The preference_reason of this DataFileFormatOutputInner. # noqa: E501 - :type: list[str] + :param preference_reason: The preference_reason of this DataFileFormatOutputInner. + :type preference_reason: List[str] """ self._preference_reason = preference_reason @property - def subject_areas(self): - """Gets the subject_areas of this DataFileFormatOutputInner. # noqa: E501 + def subject_areas(self) -> list[str]: + """Gets the subject_areas of this DataFileFormatOutputInner. - :return: The subject_areas of this DataFileFormatOutputInner. # noqa: E501 - :rtype: list[str] + :return: The subject_areas of this DataFileFormatOutputInner. + :rtype: List[str] """ return self._subject_areas @subject_areas.setter - def subject_areas(self, subject_areas): + def subject_areas(self, subject_areas: list[str]): """Sets the subject_areas of this DataFileFormatOutputInner. - :param subject_areas: The subject_areas of this DataFileFormatOutputInner. # noqa: E501 - :type: list[str] + :param subject_areas: The subject_areas of this DataFileFormatOutputInner. + :type subject_areas: List[str] """ self._subject_areas = subject_areas - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(DataFileFormatOutputInner, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, DataFileFormatOutputInner): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/data_provenance.py b/fuji_server/models/data_provenance.py index 1e14e7ba..2919542e 100644 --- a/fuji_server/models/data_provenance.py +++ b/fuji_server/models/data_provenance.py @@ -1,135 +1,291 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model +from fuji_server.models.data_provenance_output import DataProvenanceOutput +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" +class DataProvenance(Model): + """NOTE: This class is auto generated by the swagger code generator program. -import pprint -import re # noqa: F401 + Do not edit the class manually. + """ -import six + def __init__( + self, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, + test_status: str = "fail", + score: FAIRResultCommonScore = None, + maturity: str = "incomplete", + output: DataProvenanceOutput = None, + test_debug: Debug = None, + ): + """DataProvenance - a model defined in Swagger + + :param id: The id of this DataProvenance. # noqa: E501 + :type id: int + :param metric_identifier: The metric_identifier of this DataProvenance. # noqa: E501 + :type metric_identifier: str + :param metric_name: The metric_name of this DataProvenance. # noqa: E501 + :type metric_name: str + :param metric_tests: The metric_tests of this DataProvenance. # noqa: E501 + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + :param test_status: The test_status of this DataProvenance. # noqa: E501 + :type test_status: str + :param score: The score of this DataProvenance. # noqa: E501 + :type score: FAIRResultCommonScore + :param maturity: The maturity of this DataProvenance. # noqa: E501 + :type maturity: str + :param output: The output of this DataProvenance. # noqa: E501 + :type output: DataProvenanceOutput + :param test_debug: The test_debug of this DataProvenance. # noqa: E501 + :type test_debug: Debug + """ + self.swagger_types = { + "id": int, + "metric_identifier": str, + "metric_name": str, + "metric_tests": dict[str, FAIRResultEvaluationCriterium], + "test_status": str, + "score": FAIRResultCommonScore, + "maturity": str, + "output": DataProvenanceOutput, + "test_debug": Debug, + } + + self.attribute_map = { + "id": "id", + "metric_identifier": "metric_identifier", + "metric_name": "metric_name", + "metric_tests": "metric_tests", + "test_status": "test_status", + "score": "score", + "maturity": "maturity", + "output": "output", + "test_debug": "test_debug", + } + self._id = id + self._metric_identifier = metric_identifier + self._metric_name = metric_name + self._metric_tests = metric_tests + self._test_status = test_status + self._score = score + self._maturity = maturity + self._output = output + self._test_debug = test_debug -from swagger_client.models.fair_result_common import FAIRResultCommon + @classmethod + def from_dict(cls, dikt) -> "DataProvenance": + """Returns the dict as a model + :param dikt: A dict. + :type: dict + :return: The DataProvenance of this DataProvenance. # noqa: E501 + :rtype: DataProvenance + """ + return util.deserialize_model(dikt, cls) -class DataProvenance(FAIRResultCommon): - """NOTE: This class is auto generated by the swagger code generator program. + @property + def id(self) -> int: + """Gets the id of this DataProvenance. - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"output": "DataProvenanceOutput", "test_debug": "Debug"} - if hasattr(FAIRResultCommon, "swagger_types"): - swagger_types.update(FAIRResultCommon.swagger_types) - - attribute_map = {"output": "output", "test_debug": "test_debug"} - if hasattr(FAIRResultCommon, "attribute_map"): - attribute_map.update(FAIRResultCommon.attribute_map) - - def __init__(self, output=None, test_debug=None, *args, **kwargs): - """DataProvenance - a model defined in Swagger""" - self._output = None - self._test_debug = None - self.discriminator = None - if output is not None: - self.output = output - if test_debug is not None: - self.test_debug = test_debug - FAIRResultCommon.__init__(self, *args, **kwargs) + :return: The id of this DataProvenance. + :rtype: int + """ + return self._id + + @id.setter + def id(self, id: int): + """Sets the id of this DataProvenance. + + + :param id: The id of this DataProvenance. + :type id: int + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") + + self._id = id + + @property + def metric_identifier(self) -> str: + """Gets the metric_identifier of this DataProvenance. + + + :return: The metric_identifier of this DataProvenance. + :rtype: str + """ + return self._metric_identifier + + @metric_identifier.setter + def metric_identifier(self, metric_identifier: str): + """Sets the metric_identifier of this DataProvenance. + + + :param metric_identifier: The metric_identifier of this DataProvenance. + :type metric_identifier: str + """ + if metric_identifier is None: + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") + + self._metric_identifier = metric_identifier + + @property + def metric_name(self) -> str: + """Gets the metric_name of this DataProvenance. + + + :return: The metric_name of this DataProvenance. + :rtype: str + """ + return self._metric_name + + @metric_name.setter + def metric_name(self, metric_name: str): + """Sets the metric_name of this DataProvenance. + + + :param metric_name: The metric_name of this DataProvenance. + :type metric_name: str + """ + if metric_name is None: + raise ValueError("Invalid value for `metric_name`, must not be `None`") + + self._metric_name = metric_name + + @property + def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: + """Gets the metric_tests of this DataProvenance. + + + :return: The metric_tests of this DataProvenance. + :rtype: Dict[str, FAIRResultEvaluationCriterium] + """ + return self._metric_tests + + @metric_tests.setter + def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): + """Sets the metric_tests of this DataProvenance. + + + :param metric_tests: The metric_tests of this DataProvenance. + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + """ + + self._metric_tests = metric_tests + + @property + def test_status(self) -> str: + """Gets the test_status of this DataProvenance. + + + :return: The test_status of this DataProvenance. + :rtype: str + """ + return self._test_status + + @test_status.setter + def test_status(self, test_status: str): + """Sets the test_status of this DataProvenance. + + + :param test_status: The test_status of this DataProvenance. + :type test_status: str + """ + allowed_values = ["pass", "fail", "indeterminate"] + if test_status not in allowed_values: + raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") + + self._test_status = test_status + + @property + def score(self) -> FAIRResultCommonScore: + """Gets the score of this DataProvenance. + + + :return: The score of this DataProvenance. + :rtype: FAIRResultCommonScore + """ + return self._score + + @score.setter + def score(self, score: FAIRResultCommonScore): + """Sets the score of this DataProvenance. + + + :param score: The score of this DataProvenance. + :type score: FAIRResultCommonScore + """ + if score is None: + raise ValueError("Invalid value for `score`, must not be `None`") + + self._score = score @property - def output(self): - """Gets the output of this DataProvenance. # noqa: E501 + def maturity(self) -> str: + """Gets the maturity of this DataProvenance. + + + :return: The maturity of this DataProvenance. + :rtype: str + """ + return self._maturity + @maturity.setter + def maturity(self, maturity: int): + """Sets the maturity of this Uniqueness. - :return: The output of this DataProvenance. # noqa: E501 + + :param maturity: The maturity of this Uniqueness. + :type maturity: int + """ + + self._maturity = maturity + + @property + def output(self) -> DataProvenanceOutput: + """Gets the output of this DataProvenance. + + + :return: The output of this DataProvenance. :rtype: DataProvenanceOutput """ return self._output @output.setter - def output(self, output): + def output(self, output: DataProvenanceOutput): """Sets the output of this DataProvenance. - :param output: The output of this DataProvenance. # noqa: E501 - :type: DataProvenanceOutput + :param output: The output of this DataProvenance. + :type output: DataProvenanceOutput """ self._output = output @property - def test_debug(self): - """Gets the test_debug of this DataProvenance. # noqa: E501 + def test_debug(self) -> Debug: + """Gets the test_debug of this DataProvenance. - :return: The test_debug of this DataProvenance. # noqa: E501 + :return: The test_debug of this DataProvenance. :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug): + def test_debug(self, test_debug: Debug): """Sets the test_debug of this DataProvenance. - :param test_debug: The test_debug of this DataProvenance. # noqa: E501 - :type: Debug + :param test_debug: The test_debug of this DataProvenance. + :type test_debug: Debug """ self._test_debug = test_debug - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(DataProvenance, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, DataProvenance): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/data_provenance_output.py b/fuji_server/models/data_provenance_output.py index 24f6a809..e4715d99 100644 --- a/fuji_server/models/data_provenance_output.py +++ b/fuji_server/models/data_provenance_output.py @@ -1,134 +1,87 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model +from fuji_server.models.data_provenance_output_inner import DataProvenanceOutputInner - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class DataProvenanceOutput: +class DataProvenanceOutput(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - "provenance_metadata_included": "DataProvenanceOutputInner", - "structured_provenance_available": "DataProvenanceOutputInner", - } - - attribute_map = { - "provenance_metadata_included": "provenance_metadata_included", - "structured_provenance_available": "structured_provenance_available", - } - - def __init__(self, provenance_metadata_included=None, structured_provenance_available=None): - """DataProvenanceOutput - a model defined in Swagger""" - self._provenance_metadata_included = None - self._structured_provenance_available = None - self.discriminator = None - if provenance_metadata_included is not None: - self.provenance_metadata_included = provenance_metadata_included - if structured_provenance_available is not None: - self.structured_provenance_available = structured_provenance_available + def __init__( + self, + provenance_metadata_included: DataProvenanceOutputInner = None, + structured_provenance_available: DataProvenanceOutputInner = None, + ): + """DataProvenanceOutput - a model defined in Swagger + + :param provenance_metadata_included: The provenance_metadata_included of this DataProvenanceOutput. # noqa: E501 + :type provenance_metadata_included: DataProvenanceOutputInner + :param structured_provenance_available: The structured_provenance_available of this DataProvenanceOutput. # noqa: E501 + :type structured_provenance_available: DataProvenanceOutputInner + """ + self.swagger_types = { + "provenance_metadata_included": DataProvenanceOutputInner, + "structured_provenance_available": DataProvenanceOutputInner, + } + + self.attribute_map = { + "provenance_metadata_included": "provenance_metadata_included", + "structured_provenance_available": "structured_provenance_available", + } + self._provenance_metadata_included = provenance_metadata_included + self._structured_provenance_available = structured_provenance_available + + @classmethod + def from_dict(cls, dikt) -> "DataProvenanceOutput": + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The DataProvenance_output of this DataProvenanceOutput. # noqa: E501 + :rtype: DataProvenanceOutput + """ + return util.deserialize_model(dikt, cls) @property - def provenance_metadata_included(self): - """Gets the provenance_metadata_included of this DataProvenanceOutput. # noqa: E501 + def provenance_metadata_included(self) -> DataProvenanceOutputInner: + """Gets the provenance_metadata_included of this DataProvenanceOutput. - :return: The provenance_metadata_included of this DataProvenanceOutput. # noqa: E501 + :return: The provenance_metadata_included of this DataProvenanceOutput. :rtype: DataProvenanceOutputInner """ return self._provenance_metadata_included @provenance_metadata_included.setter - def provenance_metadata_included(self, provenance_metadata_included): + def provenance_metadata_included(self, provenance_metadata_included: DataProvenanceOutputInner): """Sets the provenance_metadata_included of this DataProvenanceOutput. - :param provenance_metadata_included: The provenance_metadata_included of this DataProvenanceOutput. # noqa: E501 - :type: DataProvenanceOutputInner + :param provenance_metadata_included: The provenance_metadata_included of this DataProvenanceOutput. + :type provenance_metadata_included: DataProvenanceOutputInner """ self._provenance_metadata_included = provenance_metadata_included @property - def structured_provenance_available(self): - """Gets the structured_provenance_available of this DataProvenanceOutput. # noqa: E501 + def structured_provenance_available(self) -> DataProvenanceOutputInner: + """Gets the structured_provenance_available of this DataProvenanceOutput. - :return: The structured_provenance_available of this DataProvenanceOutput. # noqa: E501 + :return: The structured_provenance_available of this DataProvenanceOutput. :rtype: DataProvenanceOutputInner """ return self._structured_provenance_available @structured_provenance_available.setter - def structured_provenance_available(self, structured_provenance_available): + def structured_provenance_available(self, structured_provenance_available: DataProvenanceOutputInner): """Sets the structured_provenance_available of this DataProvenanceOutput. - :param structured_provenance_available: The structured_provenance_available of this DataProvenanceOutput. # noqa: E501 - :type: DataProvenanceOutputInner + :param structured_provenance_available: The structured_provenance_available of this DataProvenanceOutput. + :type structured_provenance_available: DataProvenanceOutputInner """ self._structured_provenance_available = structured_provenance_available - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(DataProvenanceOutput, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, DataProvenanceOutput): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/data_provenance_output_inner.py b/fuji_server/models/data_provenance_output_inner.py index b4cfa63a..62e89b52 100644 --- a/fuji_server/models/data_provenance_output_inner.py +++ b/fuji_server/models/data_provenance_output_inner.py @@ -1,128 +1,76 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class DataProvenanceOutputInner: +class DataProvenanceOutputInner(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"is_available": "bool", "provenance_metadata": "list[dict(str, str)]"} + def __init__(self, is_available: bool = True, provenance_metadata: list[dict[str, str]] | None = None): + """DataProvenanceOutputInner - a model defined in Swagger - attribute_map = {"is_available": "is_available", "provenance_metadata": "provenance_metadata"} + :param is_available: The is_available of this DataProvenanceOutputInner. # noqa: E501 + :type is_available: bool + :param provenance_metadata: The provenance_metadata of this DataProvenanceOutputInner. # noqa: E501 + :type provenance_metadata: List[Dict[str, str]] + """ + self.swagger_types = {"is_available": bool, "provenance_metadata": list[dict[str, str]]} - def __init__(self, is_available=True, provenance_metadata=None): - """DataProvenanceOutputInner - a model defined in Swagger""" - self._is_available = None - self._provenance_metadata = None - self.discriminator = None - if is_available is not None: - self.is_available = is_available - if provenance_metadata is not None: - self.provenance_metadata = provenance_metadata + self.attribute_map = {"is_available": "is_available", "provenance_metadata": "provenance_metadata"} + self._is_available = is_available + self._provenance_metadata = provenance_metadata + + @classmethod + def from_dict(cls, dikt) -> "DataProvenanceOutputInner": + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The DataProvenance_output_inner of this DataProvenanceOutputInner. # noqa: E501 + :rtype: DataProvenanceOutputInner + """ + return util.deserialize_model(dikt, cls) @property - def is_available(self): - """Gets the is_available of this DataProvenanceOutputInner. # noqa: E501 + def is_available(self) -> bool: + """Gets the is_available of this DataProvenanceOutputInner. - :return: The is_available of this DataProvenanceOutputInner. # noqa: E501 + :return: The is_available of this DataProvenanceOutputInner. :rtype: bool """ return self._is_available @is_available.setter - def is_available(self, is_available): + def is_available(self, is_available: bool): """Sets the is_available of this DataProvenanceOutputInner. - :param is_available: The is_available of this DataProvenanceOutputInner. # noqa: E501 - :type: bool + :param is_available: The is_available of this DataProvenanceOutputInner. + :type is_available: bool """ self._is_available = is_available @property - def provenance_metadata(self): - """Gets the provenance_metadata of this DataProvenanceOutputInner. # noqa: E501 + def provenance_metadata(self) -> list[dict[str, str]]: + """Gets the provenance_metadata of this DataProvenanceOutputInner. - :return: The provenance_metadata of this DataProvenanceOutputInner. # noqa: E501 - :rtype: list[dict(str, str)] + :return: The provenance_metadata of this DataProvenanceOutputInner. + :rtype: List[Dict[str, str]] """ return self._provenance_metadata @provenance_metadata.setter - def provenance_metadata(self, provenance_metadata): + def provenance_metadata(self, provenance_metadata: list[dict[str, str]]): """Sets the provenance_metadata of this DataProvenanceOutputInner. - :param provenance_metadata: The provenance_metadata of this DataProvenanceOutputInner. # noqa: E501 - :type: list[dict(str, str)] + :param provenance_metadata: The provenance_metadata of this DataProvenanceOutputInner. + :type provenance_metadata: List[Dict[str, str]] """ self._provenance_metadata = provenance_metadata - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(DataProvenanceOutputInner, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, DataProvenanceOutputInner): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/debug.py b/fuji_server/models/debug.py index 7203f961..0a59bb4c 100644 --- a/fuji_server/models/debug.py +++ b/fuji_server/models/debug.py @@ -1,80 +1,26 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class Debug: +class Debug(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {} - - attribute_map = {} - def __init__(self): """Debug - a model defined in Swagger""" - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(Debug, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() + self.swagger_types = {} - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Debug): - return False + self.attribute_map = {} - return self.__dict__ == other.__dict__ + @classmethod + def from_dict(cls, dikt) -> "Debug": + """Returns the dict as a model - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other + :param dikt: A dict. + :type: dict + :return: The Debug of this Debug. # noqa: E501 + :rtype: Debug + """ + return util.deserialize_model(dikt, cls) diff --git a/fuji_server/models/fair_result_common.py b/fuji_server/models/fair_result_common.py index a1c4fca2..da9439e5 100644 --- a/fuji_server/models/fair_result_common.py +++ b/fuji_server/models/fair_result_common.py @@ -1,98 +1,97 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class FAIRResultCommon: +class FAIRResultCommon(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - "id": "int", - "metric_identifier": "str", - "metric_name": "str", - "metric_tests": "dict(str, FAIRResultEvaluationCriterium)", - "test_status": "str", - "score": "FAIRResultCommonScore", - "maturity": "int", - } - - attribute_map = { - "id": "id", - "metric_identifier": "metric_identifier", - "metric_name": "metric_name", - "metric_tests": "metric_tests", - "test_status": "test_status", - "score": "score", - "maturity": "maturity", - } - def __init__( self, - id=None, - metric_identifier=None, - metric_name=None, - metric_tests=None, - test_status="fail", - score=None, - maturity=0, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, + test_status: str = "fail", + score: FAIRResultCommonScore = None, + maturity: int = 0, ): - """FAIRResultCommon - a model defined in Swagger""" - self._id = None - self._metric_identifier = None - self._metric_name = None - self._metric_tests = None - self._test_status = None - self._score = None - self._maturity = None - self.discriminator = None - self.id = id - self.metric_identifier = metric_identifier - self.metric_name = metric_name - if metric_tests is not None: - self.metric_tests = metric_tests - self.test_status = test_status - self.score = score - if maturity is not None: - self.maturity = maturity + """FAIRResultCommon - a model defined in Swagger + + :param id: The id of this FAIRResultCommon. # noqa: E501 + :type id: int + :param metric_identifier: The metric_identifier of this FAIRResultCommon. # noqa: E501 + :type metric_identifier: str + :param metric_name: The metric_name of this FAIRResultCommon. # noqa: E501 + :type metric_name: str + :param metric_tests: The metric_tests of this FAIRResultCommon. # noqa: E501 + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + :param test_status: The test_status of this FAIRResultCommon. # noqa: E501 + :type test_status: str + :param score: The score of this FAIRResultCommon. # noqa: E501 + :type score: FAIRResultCommonScore + :param maturity: The maturity of this FAIRResultCommon. # noqa: E501 + :type maturity: int + """ + self.swagger_types = { + "id": int, + "metric_identifier": str, + "metric_name": str, + "metric_tests": dict[str, FAIRResultEvaluationCriterium], + "test_status": str, + "score": FAIRResultCommonScore, + "maturity": int, + } + + self.attribute_map = { + "id": "id", + "metric_identifier": "metric_identifier", + "metric_name": "metric_name", + "metric_tests": "metric_tests", + "test_status": "test_status", + "score": "score", + "maturity": "maturity", + } + self._id = id + self._metric_identifier = metric_identifier + self._metric_name = metric_name + self._metric_tests = metric_tests + self._test_status = test_status + self._score = score + self._maturity = maturity + + @classmethod + def from_dict(cls, dikt) -> "FAIRResultCommon": + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The FAIRResultCommon of this FAIRResultCommon. # noqa: E501 + :rtype: FAIRResultCommon + """ + return util.deserialize_model(dikt, cls) @property - def id(self): - """Gets the id of this FAIRResultCommon. # noqa: E501 + def id(self) -> int: + """Gets the id of this FAIRResultCommon. - :return: The id of this FAIRResultCommon. # noqa: E501 + :return: The id of this FAIRResultCommon. :rtype: int """ return self._id @id.setter - def id(self, id): + def id(self, id: int): """Sets the id of this FAIRResultCommon. - :param id: The id of this FAIRResultCommon. # noqa: E501 - :type: int + :param id: The id of this FAIRResultCommon. + :type id: int """ if id is None: raise ValueError("Invalid value for `id`, must not be `None`") @@ -100,22 +99,22 @@ def id(self, id): self._id = id @property - def metric_identifier(self): - """Gets the metric_identifier of this FAIRResultCommon. # noqa: E501 + def metric_identifier(self) -> str: + """Gets the metric_identifier of this FAIRResultCommon. - :return: The metric_identifier of this FAIRResultCommon. # noqa: E501 + :return: The metric_identifier of this FAIRResultCommon. :rtype: str """ return self._metric_identifier @metric_identifier.setter - def metric_identifier(self, metric_identifier): + def metric_identifier(self, metric_identifier: str): """Sets the metric_identifier of this FAIRResultCommon. - :param metric_identifier: The metric_identifier of this FAIRResultCommon. # noqa: E501 - :type: str + :param metric_identifier: The metric_identifier of this FAIRResultCommon. + :type metric_identifier: str """ if metric_identifier is None: raise ValueError("Invalid value for `metric_identifier`, must not be `None`") @@ -123,22 +122,22 @@ def metric_identifier(self, metric_identifier): self._metric_identifier = metric_identifier @property - def metric_name(self): - """Gets the metric_name of this FAIRResultCommon. # noqa: E501 + def metric_name(self) -> str: + """Gets the metric_name of this FAIRResultCommon. - :return: The metric_name of this FAIRResultCommon. # noqa: E501 + :return: The metric_name of this FAIRResultCommon. :rtype: str """ return self._metric_name @metric_name.setter - def metric_name(self, metric_name): + def metric_name(self, metric_name: str): """Sets the metric_name of this FAIRResultCommon. - :param metric_name: The metric_name of this FAIRResultCommon. # noqa: E501 - :type: str + :param metric_name: The metric_name of this FAIRResultCommon. + :type metric_name: str """ if metric_name is None: raise ValueError("Invalid value for `metric_name`, must not be `None`") @@ -146,46 +145,44 @@ def metric_name(self, metric_name): self._metric_name = metric_name @property - def metric_tests(self): - """Gets the metric_tests of this FAIRResultCommon. # noqa: E501 + def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: + """Gets the metric_tests of this FAIRResultCommon. - :return: The metric_tests of this FAIRResultCommon. # noqa: E501 - :rtype: dict(str, FAIRResultEvaluationCriterium) + :return: The metric_tests of this FAIRResultCommon. + :rtype: Dict[str, FAIRResultEvaluationCriterium] """ return self._metric_tests @metric_tests.setter - def metric_tests(self, metric_tests): + def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): """Sets the metric_tests of this FAIRResultCommon. - :param metric_tests: The metric_tests of this FAIRResultCommon. # noqa: E501 - :type: dict(str, FAIRResultEvaluationCriterium) + :param metric_tests: The metric_tests of this FAIRResultCommon. + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] """ self._metric_tests = metric_tests @property - def test_status(self): - """Gets the test_status of this FAIRResultCommon. # noqa: E501 + def test_status(self) -> str: + """Gets the test_status of this FAIRResultCommon. - :return: The test_status of this FAIRResultCommon. # noqa: E501 + :return: The test_status of this FAIRResultCommon. :rtype: str """ return self._test_status @test_status.setter - def test_status(self, test_status): + def test_status(self, test_status: str): """Sets the test_status of this FAIRResultCommon. - :param test_status: The test_status of this FAIRResultCommon. # noqa: E501 - :type: str + :param test_status: The test_status of this FAIRResultCommon. + :type test_status: str """ - if test_status is None: - raise ValueError("Invalid value for `test_status`, must not be `None`") allowed_values = ["pass", "fail", "indeterminate"] if test_status not in allowed_values: raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") @@ -193,22 +190,22 @@ def test_status(self, test_status): self._test_status = test_status @property - def score(self): - """Gets the score of this FAIRResultCommon. # noqa: E501 + def score(self) -> FAIRResultCommonScore: + """Gets the score of this FAIRResultCommon. - :return: The score of this FAIRResultCommon. # noqa: E501 + :return: The score of this FAIRResultCommon. :rtype: FAIRResultCommonScore """ return self._score @score.setter - def score(self, score): + def score(self, score: FAIRResultCommonScore): """Sets the score of this FAIRResultCommon. - :param score: The score of this FAIRResultCommon. # noqa: E501 - :type: FAIRResultCommonScore + :param score: The score of this FAIRResultCommon. + :type score: FAIRResultCommonScore """ if score is None: raise ValueError("Invalid value for `score`, must not be `None`") @@ -216,66 +213,22 @@ def score(self, score): self._score = score @property - def maturity(self): - """Gets the maturity of this FAIRResultCommon. # noqa: E501 + def maturity(self) -> int: + """Gets the maturity of this FAIRResultCommon. - :return: The maturity of this FAIRResultCommon. # noqa: E501 + :return: The maturity of this FAIRResultCommon. :rtype: int """ return self._maturity @maturity.setter - def maturity(self, maturity): + def maturity(self, maturity: int): """Sets the maturity of this FAIRResultCommon. - :param maturity: The maturity of this FAIRResultCommon. # noqa: E501 - :type: int + :param maturity: The maturity of this FAIRResultCommon. + :type maturity: int """ self._maturity = maturity - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(FAIRResultCommon, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FAIRResultCommon): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/fair_result_common_score.py b/fuji_server/models/fair_result_common_score.py index 734bf9fa..dd73219d 100644 --- a/fuji_server/models/fair_result_common_score.py +++ b/fuji_server/models/fair_result_common_score.py @@ -1,128 +1,76 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class FAIRResultCommonScore: +class FAIRResultCommonScore(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"earned": "float", "total": "float"} + def __init__(self, earned: float = 0, total: float = 0): + """FAIRResultCommonScore - a model defined in Swagger - attribute_map = {"earned": "earned", "total": "total"} + :param earned: The earned of this FAIRResultCommonScore. # noqa: E501 + :type earned: float + :param total: The total of this FAIRResultCommonScore. # noqa: E501 + :type total: float + """ + self.swagger_types = {"earned": float, "total": float} - def __init__(self, earned=0, total=0): - """FAIRResultCommonScore - a model defined in Swagger""" - self._earned = None - self._total = None - self.discriminator = None - if earned is not None: - self.earned = earned - if total is not None: - self.total = total + self.attribute_map = {"earned": "earned", "total": "total"} + self._earned = earned + self._total = total + + @classmethod + def from_dict(cls, dikt) -> "FAIRResultCommonScore": + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The FAIRResultCommon_score of this FAIRResultCommonScore. # noqa: E501 + :rtype: FAIRResultCommonScore + """ + return util.deserialize_model(dikt, cls) @property - def earned(self): - """Gets the earned of this FAIRResultCommonScore. # noqa: E501 + def earned(self) -> float: + """Gets the earned of this FAIRResultCommonScore. - :return: The earned of this FAIRResultCommonScore. # noqa: E501 + :return: The earned of this FAIRResultCommonScore. :rtype: float """ return self._earned @earned.setter - def earned(self, earned): + def earned(self, earned: float): """Sets the earned of this FAIRResultCommonScore. - :param earned: The earned of this FAIRResultCommonScore. # noqa: E501 - :type: float + :param earned: The earned of this FAIRResultCommonScore. + :type earned: float """ self._earned = earned @property - def total(self): - """Gets the total of this FAIRResultCommonScore. # noqa: E501 + def total(self) -> float: + """Gets the total of this FAIRResultCommonScore. - :return: The total of this FAIRResultCommonScore. # noqa: E501 + :return: The total of this FAIRResultCommonScore. :rtype: float """ return self._total @total.setter - def total(self, total): + def total(self, total: float): """Sets the total of this FAIRResultCommonScore. - :param total: The total of this FAIRResultCommonScore. # noqa: E501 - :type: float + :param total: The total of this FAIRResultCommonScore. + :type total: float """ self._total = total - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(FAIRResultCommonScore, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FAIRResultCommonScore): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/fair_result_evaluation_criterium.py b/fuji_server/models/fair_result_evaluation_criterium.py index 2bbf276b..cbd5ac22 100644 --- a/fuji_server/models/fair_result_evaluation_criterium.py +++ b/fuji_server/models/fair_result_evaluation_criterium.py @@ -1,175 +1,168 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class FAIRResultEvaluationCriterium: +class FAIRResultEvaluationCriterium(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - "metric_test_name": "str", - "metric_test_requirements": "list[dict(str, object)]", - "metric_test_score": "FAIRResultCommonScore", - "metric_test_maturity": "int", - "metric_test_status": "str", - } - - attribute_map = { - "metric_test_name": "metric_test_name", - "metric_test_requirements": "metric_test_requirements", - "metric_test_score": "metric_test_score", - "metric_test_maturity": "metric_test_maturity", - "metric_test_status": "metric_test_status", - } - def __init__( self, - metric_test_name=None, - metric_test_requirements=None, - metric_test_score=None, - metric_test_maturity=None, - metric_test_status="fail", + metric_test_name: str | None = None, + metric_test_requirements: list[dict] | None = None, + metric_test_score: FAIRResultCommonScore = None, + metric_test_maturity: int | None = None, + metric_test_status: str = "fail", ): - """FAIRResultEvaluationCriterium - a model defined in Swagger""" - self._metric_test_name = None - self._metric_test_requirements = None - self._metric_test_score = None - self._metric_test_maturity = None - self._metric_test_status = None - self.discriminator = None - if metric_test_name is not None: - self.metric_test_name = metric_test_name - if metric_test_requirements is not None: - self.metric_test_requirements = metric_test_requirements - if metric_test_score is not None: - self.metric_test_score = metric_test_score - if metric_test_maturity is not None: - self.metric_test_maturity = metric_test_maturity - if metric_test_status is not None: - self.metric_test_status = metric_test_status + """FAIRResultEvaluationCriterium - a model defined in Swagger + + :param metric_test_name: The metric_test_name of this FAIRResultEvaluationCriterium. # noqa: E501 + :type metric_test_name: str + :param metric_test_requirements: The metric_test_requirements of this FAIRResultEvaluationCriterium. # noqa: E501 + :type metric_test_requirements: List[Dict] + :param metric_test_score: The metric_test_score of this FAIRResultEvaluationCriterium. # noqa: E501 + :type metric_test_score: FAIRResultCommonScore + :param metric_test_maturity: The metric_test_maturity of this FAIRResultEvaluationCriterium. # noqa: E501 + :type metric_test_maturity: int + :param metric_test_status: The metric_test_status of this FAIRResultEvaluationCriterium. # noqa: E501 + :type metric_test_status: str + """ + self.swagger_types = { + "metric_test_name": str, + "metric_test_requirements": list[dict], + "metric_test_score": FAIRResultCommonScore, + "metric_test_maturity": int, + "metric_test_status": str, + } + + self.attribute_map = { + "metric_test_name": "metric_test_name", + "metric_test_requirements": "metric_test_requirements", + "metric_test_score": "metric_test_score", + "metric_test_maturity": "metric_test_maturity", + "metric_test_status": "metric_test_status", + } + self._metric_test_name = metric_test_name + self._metric_test_requirements = metric_test_requirements + self._metric_test_score = metric_test_score + self._metric_test_maturity = metric_test_maturity + self._metric_test_status = metric_test_status + + @classmethod + def from_dict(cls, dikt) -> "FAIRResultEvaluationCriterium": + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The FAIRResultEvaluationCriterium of this FAIRResultEvaluationCriterium. # noqa: E501 + :rtype: FAIRResultEvaluationCriterium + """ + return util.deserialize_model(dikt, cls) @property - def metric_test_name(self): - """Gets the metric_test_name of this FAIRResultEvaluationCriterium. # noqa: E501 + def metric_test_name(self) -> str: + """Gets the metric_test_name of this FAIRResultEvaluationCriterium. - :return: The metric_test_name of this FAIRResultEvaluationCriterium. # noqa: E501 + :return: The metric_test_name of this FAIRResultEvaluationCriterium. :rtype: str """ return self._metric_test_name @metric_test_name.setter - def metric_test_name(self, metric_test_name): + def metric_test_name(self, metric_test_name: str): """Sets the metric_test_name of this FAIRResultEvaluationCriterium. - :param metric_test_name: The metric_test_name of this FAIRResultEvaluationCriterium. # noqa: E501 - :type: str + :param metric_test_name: The metric_test_name of this FAIRResultEvaluationCriterium. + :type metric_test_name: str """ self._metric_test_name = metric_test_name @property - def metric_test_requirements(self): - """Gets the metric_test_requirements of this FAIRResultEvaluationCriterium. # noqa: E501 + def metric_test_requirements(self) -> list[dict]: + """Gets the metric_test_requirements of this FAIRResultEvaluationCriterium. - :return: The metric_test_requirements of this FAIRResultEvaluationCriterium. # noqa: E501 - :rtype: list[dict(str, object)] + :return: The metric_test_requirements of this FAIRResultEvaluationCriterium. + :rtype: List[Dict] """ return self._metric_test_requirements @metric_test_requirements.setter - def metric_test_requirements(self, metric_test_requirements): + def metric_test_requirements(self, metric_test_requirements: list[dict]): """Sets the metric_test_requirements of this FAIRResultEvaluationCriterium. - :param metric_test_requirements: The metric_test_requirements of this FAIRResultEvaluationCriterium. # noqa: E501 - :type: list[dict(str, object)] + :param metric_test_requirements: The metric_test_requirements of this FAIRResultEvaluationCriterium. + :type metric_test_requirements: List[Dict] """ self._metric_test_requirements = metric_test_requirements @property - def metric_test_score(self): - """Gets the metric_test_score of this FAIRResultEvaluationCriterium. # noqa: E501 + def metric_test_score(self) -> FAIRResultCommonScore: + """Gets the metric_test_score of this FAIRResultEvaluationCriterium. - :return: The metric_test_score of this FAIRResultEvaluationCriterium. # noqa: E501 + :return: The metric_test_score of this FAIRResultEvaluationCriterium. :rtype: FAIRResultCommonScore """ return self._metric_test_score @metric_test_score.setter - def metric_test_score(self, metric_test_score): + def metric_test_score(self, metric_test_score: FAIRResultCommonScore): """Sets the metric_test_score of this FAIRResultEvaluationCriterium. - :param metric_test_score: The metric_test_score of this FAIRResultEvaluationCriterium. # noqa: E501 - :type: FAIRResultCommonScore + :param metric_test_score: The metric_test_score of this FAIRResultEvaluationCriterium. + :type metric_test_score: FAIRResultCommonScore """ self._metric_test_score = metric_test_score @property - def metric_test_maturity(self): - """Gets the metric_test_maturity of this FAIRResultEvaluationCriterium. # noqa: E501 + def metric_test_maturity(self) -> int: + """Gets the metric_test_maturity of this FAIRResultEvaluationCriterium. - :return: The metric_test_maturity of this FAIRResultEvaluationCriterium. # noqa: E501 + :return: The metric_test_maturity of this FAIRResultEvaluationCriterium. :rtype: int """ return self._metric_test_maturity @metric_test_maturity.setter - def metric_test_maturity(self, metric_test_maturity): + def metric_test_maturity(self, metric_test_maturity: int): """Sets the metric_test_maturity of this FAIRResultEvaluationCriterium. - :param metric_test_maturity: The metric_test_maturity of this FAIRResultEvaluationCriterium. # noqa: E501 - :type: int + :param metric_test_maturity: The metric_test_maturity of this FAIRResultEvaluationCriterium. + :type metric_test_maturity: int """ self._metric_test_maturity = metric_test_maturity @property - def metric_test_status(self): - """Gets the metric_test_status of this FAIRResultEvaluationCriterium. # noqa: E501 + def metric_test_status(self) -> str: + """Gets the metric_test_status of this FAIRResultEvaluationCriterium. - :return: The metric_test_status of this FAIRResultEvaluationCriterium. # noqa: E501 + :return: The metric_test_status of this FAIRResultEvaluationCriterium. :rtype: str """ return self._metric_test_status @metric_test_status.setter - def metric_test_status(self, metric_test_status): + def metric_test_status(self, metric_test_status: str): """Sets the metric_test_status of this FAIRResultEvaluationCriterium. - :param metric_test_status: The metric_test_status of this FAIRResultEvaluationCriterium. # noqa: E501 - :type: str + :param metric_test_status: The metric_test_status of this FAIRResultEvaluationCriterium. + :type metric_test_status: str """ allowed_values = ["pass", "fail"] if metric_test_status not in allowed_values: @@ -178,47 +171,3 @@ def metric_test_status(self, metric_test_status): ) self._metric_test_status = metric_test_status - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(FAIRResultEvaluationCriterium, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FAIRResultEvaluationCriterium): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/fair_results.py b/fuji_server/models/fair_results.py index 09d4b6fe..6bcdad1d 100644 --- a/fuji_server/models/fair_results.py +++ b/fuji_server/models/fair_results.py @@ -1,408 +1,360 @@ -""" - F-UJI +from datetime import datetime - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 +# from fuji_server.models.any_of_fair_results_results_items import AnyOfFAIRResultsResultsItems +from fuji_server import util +from fuji_server.models.any_of_fair_results_items import AnyOfFAIRResultsResultsItems +from fuji_server.models.base_model_ import Model - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" -import pprint -import re # noqa: F401 - -import six - - -class FAIRResults: +class FAIRResults(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - "test_id": "str", - "request": "dict(str, object)", - "resolved_url": "str", - "start_timestamp": "datetime", - "end_timestamp": "datetime", - "expiry_timestamp": "datetime", - "metric_specification": "str", - "metric_version": "str", - "software_version": "str", - "total_metrics": "int", - "summary": "dict(str, object)", - "results": "list[AnyOfFAIRResultsResultsItems]", - } - - attribute_map = { - "test_id": "test_id", - "request": "request", - "resolved_url": "resolved_url", - "start_timestamp": "start_timestamp", - "end_timestamp": "end_timestamp", - "expiry_timestamp": "expiry_timestamp", - "metric_specification": "metric_specification", - "metric_version": "metric_version", - "software_version": "software_version", - "total_metrics": "total_metrics", - "summary": "summary", - "results": "results", - } - def __init__( self, - test_id=None, - request=None, - resolved_url=None, - start_timestamp=None, - end_timestamp=None, - expiry_timestamp=None, - metric_specification=None, - metric_version=None, - software_version=None, - total_metrics=None, - summary=None, - results=None, + test_id: str | None = None, + request: dict | None = None, + resolved_url: str | None = None, + start_timestamp: datetime | None = None, + end_timestamp: datetime | None = None, + expiry_timestamp: datetime | None = None, + metric_specification: str | None = None, + metric_version: str | None = None, + software_version: str | None = None, + total_metrics: int | None = None, + summary: dict | None = None, + results: list[AnyOfFAIRResultsResultsItems] | None = None, ): - """FAIRResults - a model defined in Swagger""" - self._test_id = None - self._request = None - self._resolved_url = None - self._start_timestamp = None - self._end_timestamp = None - self._expiry_timestamp = None - self._metric_specification = None - self._metric_version = None - self._software_version = None - self._total_metrics = None - self._summary = None - self._results = None - self.discriminator = None - if test_id is not None: - self.test_id = test_id - if request is not None: - self.request = request - if resolved_url is not None: - self.resolved_url = resolved_url - if start_timestamp is not None: - self.start_timestamp = start_timestamp - if end_timestamp is not None: - self.end_timestamp = end_timestamp - if expiry_timestamp is not None: - self.expiry_timestamp = expiry_timestamp - if metric_specification is not None: - self.metric_specification = metric_specification - if metric_version is not None: - self.metric_version = metric_version - if software_version is not None: - self.software_version = software_version - if total_metrics is not None: - self.total_metrics = total_metrics - if summary is not None: - self.summary = summary - if results is not None: - self.results = results + """FAIRResults - a model defined in Swagger + + :param test_id: The test_id of this FAIRResults. # noqa: E501 + :type test_id: str + :param request: The request of this FAIRResults. # noqa: E501 + :type request: Dict + :param resolved_url: The resolved_url of this FAIRResults. # noqa: E501 + :type resolved_url: str + :param start_timestamp: The start_timestamp of this FAIRResults. # noqa: E501 + :type start_timestamp: datetime + :param end_timestamp: The end_timestamp of this FAIRResults. # noqa: E501 + :type end_timestamp: datetime + :param expiry_timestamp: The expiry_timestamp of this FAIRResults. # noqa: E501 + :type expiry_timestamp: datetime + :param metric_specification: The metric_specification of this FAIRResults. # noqa: E501 + :type metric_specification: str + :param metric_version: The metric_version of this FAIRResults. # noqa: E501 + :type metric_version: str + :param software_version: The software_version of this FAIRResults. # noqa: E501 + :type software_version: str + :param total_metrics: The total_metrics of this FAIRResults. # noqa: E501 + :type total_metrics: int + :param summary: The summary of this FAIRResults. # noqa: E501 + :type summary: Dict + :param results: The results of this FAIRResults. # noqa: E501 + :type results: List[AnyOfFAIRResultsResultsItems] + """ + self.swagger_types = { + "test_id": str, + "request": dict, + "resolved_url": str, + "start_timestamp": datetime, + "end_timestamp": datetime, + "expiry_timestamp": datetime, + "metric_specification": str, + "metric_version": str, + "software_version": str, + "total_metrics": int, + "summary": dict, + "results": list[AnyOfFAIRResultsResultsItems], + } + + self.attribute_map = { + "test_id": "test_id", + "request": "request", + "resolved_url": "resolved_url", + "start_timestamp": "start_timestamp", + "end_timestamp": "end_timestamp", + "expiry_timestamp": "expiry_timestamp", + "metric_specification": "metric_specification", + "metric_version": "metric_version", + "software_version": "software_version", + "total_metrics": "total_metrics", + "summary": "summary", + "results": "results", + } + self._test_id = test_id + self._request = request + self._resolved_url = resolved_url + self._start_timestamp = start_timestamp + self._end_timestamp = end_timestamp + self._expiry_timestamp = expiry_timestamp + self._metric_specification = metric_specification + self._metric_version = metric_version + self._software_version = software_version + self._total_metrics = total_metrics + self._summary = summary + self._results = results + + @classmethod + def from_dict(cls, dikt) -> "FAIRResults": + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The FAIRResults of this FAIRResults. # noqa: E501 + :rtype: FAIRResults + """ + return util.deserialize_model(dikt, cls) @property - def test_id(self): - """Gets the test_id of this FAIRResults. # noqa: E501 + def test_id(self) -> str: + """Gets the test_id of this FAIRResults. - :return: The test_id of this FAIRResults. # noqa: E501 + :return: The test_id of this FAIRResults. :rtype: str """ return self._test_id @test_id.setter - def test_id(self, test_id): + def test_id(self, test_id: str): """Sets the test_id of this FAIRResults. - :param test_id: The test_id of this FAIRResults. # noqa: E501 - :type: str + :param test_id: The test_id of this FAIRResults. + :type test_id: str """ self._test_id = test_id @property - def request(self): - """Gets the request of this FAIRResults. # noqa: E501 + def request(self) -> dict: + """Gets the request of this FAIRResults. - :return: The request of this FAIRResults. # noqa: E501 - :rtype: dict(str, object) + :return: The request of this FAIRResults. + :rtype: Dict """ return self._request @request.setter - def request(self, request): + def request(self, request: dict): """Sets the request of this FAIRResults. - :param request: The request of this FAIRResults. # noqa: E501 - :type: dict(str, object) + :param request: The request of this FAIRResults. + :type request: Dict """ self._request = request @property - def resolved_url(self): - """Gets the resolved_url of this FAIRResults. # noqa: E501 + def resolved_url(self) -> str: + """Gets the resolved_url of this FAIRResults. - :return: The resolved_url of this FAIRResults. # noqa: E501 + :return: The resolved_url of this FAIRResults. :rtype: str """ return self._resolved_url @resolved_url.setter - def resolved_url(self, resolved_url): + def resolved_url(self, resolved_url: str): """Sets the resolved_url of this FAIRResults. - :param resolved_url: The resolved_url of this FAIRResults. # noqa: E501 - :type: str + :param resolved_url: The resolved_url of this FAIRResults. + :type resolved_url: str """ self._resolved_url = resolved_url @property - def start_timestamp(self): - """Gets the start_timestamp of this FAIRResults. # noqa: E501 + def start_timestamp(self) -> datetime: + """Gets the start_timestamp of this FAIRResults. - :return: The start_timestamp of this FAIRResults. # noqa: E501 + :return: The start_timestamp of this FAIRResults. :rtype: datetime """ return self._start_timestamp @start_timestamp.setter - def start_timestamp(self, start_timestamp): + def start_timestamp(self, start_timestamp: datetime): """Sets the start_timestamp of this FAIRResults. - :param start_timestamp: The start_timestamp of this FAIRResults. # noqa: E501 - :type: datetime + :param start_timestamp: The start_timestamp of this FAIRResults. + :type start_timestamp: datetime """ self._start_timestamp = start_timestamp @property - def end_timestamp(self): - """Gets the end_timestamp of this FAIRResults. # noqa: E501 + def end_timestamp(self) -> datetime: + """Gets the end_timestamp of this FAIRResults. - :return: The end_timestamp of this FAIRResults. # noqa: E501 + :return: The end_timestamp of this FAIRResults. :rtype: datetime """ return self._end_timestamp @end_timestamp.setter - def end_timestamp(self, end_timestamp): + def end_timestamp(self, end_timestamp: datetime): """Sets the end_timestamp of this FAIRResults. - :param end_timestamp: The end_timestamp of this FAIRResults. # noqa: E501 - :type: datetime + :param end_timestamp: The end_timestamp of this FAIRResults. + :type end_timestamp: datetime """ self._end_timestamp = end_timestamp @property - def expiry_timestamp(self): - """Gets the expiry_timestamp of this FAIRResults. # noqa: E501 + def expiry_timestamp(self) -> datetime: + """Gets the expiry_timestamp of this FAIRResults. - :return: The expiry_timestamp of this FAIRResults. # noqa: E501 + :return: The expiry_timestamp of this FAIRResults. :rtype: datetime """ return self._expiry_timestamp @expiry_timestamp.setter - def expiry_timestamp(self, expiry_timestamp): + def expiry_timestamp(self, expiry_timestamp: datetime): """Sets the expiry_timestamp of this FAIRResults. - :param expiry_timestamp: The expiry_timestamp of this FAIRResults. # noqa: E501 - :type: datetime + :param expiry_timestamp: The expiry_timestamp of this FAIRResults. + :type expiry_timestamp: datetime """ self._expiry_timestamp = expiry_timestamp @property - def metric_specification(self): - """Gets the metric_specification of this FAIRResults. # noqa: E501 + def metric_specification(self) -> str: + """Gets the metric_specification of this FAIRResults. - :return: The metric_specification of this FAIRResults. # noqa: E501 + :return: The metric_specification of this FAIRResults. :rtype: str """ return self._metric_specification @metric_specification.setter - def metric_specification(self, metric_specification): + def metric_specification(self, metric_specification: str): """Sets the metric_specification of this FAIRResults. - :param metric_specification: The metric_specification of this FAIRResults. # noqa: E501 - :type: str + :param metric_specification: The metric_specification of this FAIRResults. + :type metric_specification: str """ self._metric_specification = metric_specification @property - def metric_version(self): - """Gets the metric_version of this FAIRResults. # noqa: E501 + def metric_version(self) -> str: + """Gets the metric_version of this FAIRResults. - :return: The metric_version of this FAIRResults. # noqa: E501 + :return: The metric_version of this FAIRResults. :rtype: str """ return self._metric_version @metric_version.setter - def metric_version(self, metric_version): + def metric_version(self, metric_version: str): """Sets the metric_version of this FAIRResults. - :param metric_version: The metric_version of this FAIRResults. # noqa: E501 - :type: str + :param metric_version: The metric_version of this FAIRResults. + :type metric_version: str """ self._metric_version = metric_version @property - def software_version(self): - """Gets the software_version of this FAIRResults. # noqa: E501 + def software_version(self) -> str: + """Gets the software_version of this FAIRResults. - :return: The software_version of this FAIRResults. # noqa: E501 + :return: The software_version of this FAIRResults. :rtype: str """ return self._software_version @software_version.setter - def software_version(self, software_version): + def software_version(self, software_version: str): """Sets the software_version of this FAIRResults. - :param software_version: The software_version of this FAIRResults. # noqa: E501 - :type: str + :param software_version: The software_version of this FAIRResults. + :type software_version: str """ self._software_version = software_version @property - def total_metrics(self): - """Gets the total_metrics of this FAIRResults. # noqa: E501 + def total_metrics(self) -> int: + """Gets the total_metrics of this FAIRResults. - :return: The total_metrics of this FAIRResults. # noqa: E501 + :return: The total_metrics of this FAIRResults. :rtype: int """ return self._total_metrics @total_metrics.setter - def total_metrics(self, total_metrics): + def total_metrics(self, total_metrics: int): """Sets the total_metrics of this FAIRResults. - :param total_metrics: The total_metrics of this FAIRResults. # noqa: E501 - :type: int + :param total_metrics: The total_metrics of this FAIRResults. + :type total_metrics: int """ self._total_metrics = total_metrics @property - def summary(self): - """Gets the summary of this FAIRResults. # noqa: E501 + def summary(self) -> dict: + """Gets the summary of this FAIRResults. - :return: The summary of this FAIRResults. # noqa: E501 - :rtype: dict(str, object) + :return: The summary of this FAIRResults. + :rtype: Dict """ return self._summary @summary.setter - def summary(self, summary): + def summary(self, summary: dict): """Sets the summary of this FAIRResults. - :param summary: The summary of this FAIRResults. # noqa: E501 - :type: dict(str, object) + :param summary: The summary of this FAIRResults. + :type summary: Dict """ self._summary = summary @property - def results(self): - """Gets the results of this FAIRResults. # noqa: E501 + def results(self) -> list[AnyOfFAIRResultsResultsItems]: + """Gets the results of this FAIRResults. - :return: The results of this FAIRResults. # noqa: E501 - :rtype: list[AnyOfFAIRResultsResultsItems] + :return: The results of this FAIRResults. + :rtype: List[AnyOfFAIRResultsResultsItems] """ return self._results @results.setter - def results(self, results): + def results(self, results: list[AnyOfFAIRResultsResultsItems]): """Sets the results of this FAIRResults. - :param results: The results of this FAIRResults. # noqa: E501 - :type: list[AnyOfFAIRResultsResultsItems] + :param results: The results of this FAIRResults. + :type results: List[AnyOfFAIRResultsResultsItems] """ self._results = results - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(FAIRResults, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FAIRResults): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/formal_metadata.py b/fuji_server/models/formal_metadata.py index 166bafd7..35d80d2a 100644 --- a/fuji_server/models/formal_metadata.py +++ b/fuji_server/models/formal_metadata.py @@ -1,135 +1,291 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium +from fuji_server.models.formal_metadata_output import FormalMetadataOutput - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" +class FormalMetadata(Model): + """NOTE: This class is auto generated by the swagger code generator program. -import pprint -import re # noqa: F401 + Do not edit the class manually. + """ -import six + def __init__( + self, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, + test_status: str = "fail", + score: FAIRResultCommonScore = None, + maturity: str = "incomplete", + output: FormalMetadataOutput = None, + test_debug: Debug = None, + ): + """FormalMetadata - a model defined in Swagger + + :param id: The id of this FormalMetadata. # noqa: E501 + :type id: int + :param metric_identifier: The metric_identifier of this FormalMetadata. # noqa: E501 + :type metric_identifier: str + :param metric_name: The metric_name of this FormalMetadata. # noqa: E501 + :type metric_name: str + :param metric_tests: The metric_tests of this FormalMetadata. # noqa: E501 + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + :param test_status: The test_status of this FormalMetadata. # noqa: E501 + :type test_status: str + :param score: The score of this FormalMetadata. # noqa: E501 + :type score: FAIRResultCommonScore + :param maturity: The maturity of this FormalMetadata. # noqa: E501 + :type maturity: str + :param output: The output of this FormalMetadata. # noqa: E501 + :type output: FormalMetadataOutput + :param test_debug: The test_debug of this FormalMetadata. # noqa: E501 + :type test_debug: Debug + """ + self.swagger_types = { + "id": int, + "metric_identifier": str, + "metric_name": str, + "metric_tests": dict[str, FAIRResultEvaluationCriterium], + "test_status": str, + "score": FAIRResultCommonScore, + "maturity": str, + "output": FormalMetadataOutput, + "test_debug": Debug, + } + + self.attribute_map = { + "id": "id", + "metric_identifier": "metric_identifier", + "metric_name": "metric_name", + "metric_tests": "metric_tests", + "test_status": "test_status", + "score": "score", + "maturity": "maturity", + "output": "output", + "test_debug": "test_debug", + } + self._id = id + self._metric_identifier = metric_identifier + self._metric_name = metric_name + self._metric_tests = metric_tests + self._test_status = test_status + self._score = score + self._maturity = maturity + self._output = output + self._test_debug = test_debug -from swagger_client.models.fair_result_common import FAIRResultCommon + @classmethod + def from_dict(cls, dikt) -> "FormalMetadata": + """Returns the dict as a model + :param dikt: A dict. + :type: dict + :return: The FormalMetadata of this FormalMetadata. # noqa: E501 + :rtype: FormalMetadata + """ + return util.deserialize_model(dikt, cls) -class FormalMetadata(FAIRResultCommon): - """NOTE: This class is auto generated by the swagger code generator program. + @property + def id(self) -> int: + """Gets the id of this FormalMetadata. - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"output": "FormalMetadataOutput", "test_debug": "Debug"} - if hasattr(FAIRResultCommon, "swagger_types"): - swagger_types.update(FAIRResultCommon.swagger_types) - - attribute_map = {"output": "output", "test_debug": "test_debug"} - if hasattr(FAIRResultCommon, "attribute_map"): - attribute_map.update(FAIRResultCommon.attribute_map) - - def __init__(self, output=None, test_debug=None, *args, **kwargs): - """FormalMetadata - a model defined in Swagger""" - self._output = None - self._test_debug = None - self.discriminator = None - if output is not None: - self.output = output - if test_debug is not None: - self.test_debug = test_debug - FAIRResultCommon.__init__(self, *args, **kwargs) + :return: The id of this FormalMetadata. + :rtype: int + """ + return self._id + + @id.setter + def id(self, id: int): + """Sets the id of this FormalMetadata. + + + :param id: The id of this FormalMetadata. + :type id: int + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") + + self._id = id + + @property + def metric_identifier(self) -> str: + """Gets the metric_identifier of this FormalMetadata. + + + :return: The metric_identifier of this FormalMetadata. + :rtype: str + """ + return self._metric_identifier + + @metric_identifier.setter + def metric_identifier(self, metric_identifier: str): + """Sets the metric_identifier of this FormalMetadata. + + + :param metric_identifier: The metric_identifier of this FormalMetadata. + :type metric_identifier: str + """ + if metric_identifier is None: + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") + + self._metric_identifier = metric_identifier + + @property + def metric_name(self) -> str: + """Gets the metric_name of this FormalMetadata. + + + :return: The metric_name of this FormalMetadata. + :rtype: str + """ + return self._metric_name + + @metric_name.setter + def metric_name(self, metric_name: str): + """Sets the metric_name of this FormalMetadata. + + + :param metric_name: The metric_name of this FormalMetadata. + :type metric_name: str + """ + if metric_name is None: + raise ValueError("Invalid value for `metric_name`, must not be `None`") + + self._metric_name = metric_name + + @property + def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: + """Gets the metric_tests of this FormalMetadata. + + + :return: The metric_tests of this FormalMetadata. + :rtype: Dict[str, FAIRResultEvaluationCriterium] + """ + return self._metric_tests + + @metric_tests.setter + def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): + """Sets the metric_tests of this FormalMetadata. + + + :param metric_tests: The metric_tests of this FormalMetadata. + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + """ + + self._metric_tests = metric_tests + + @property + def test_status(self) -> str: + """Gets the test_status of this FormalMetadata. + + + :return: The test_status of this FormalMetadata. + :rtype: str + """ + return self._test_status + + @test_status.setter + def test_status(self, test_status: str): + """Sets the test_status of this FormalMetadata. + + + :param test_status: The test_status of this FormalMetadata. + :type test_status: str + """ + allowed_values = ["pass", "fail", "indeterminate"] + if test_status not in allowed_values: + raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") + + self._test_status = test_status + + @property + def score(self) -> FAIRResultCommonScore: + """Gets the score of this FormalMetadata. + + + :return: The score of this FormalMetadata. + :rtype: FAIRResultCommonScore + """ + return self._score + + @score.setter + def score(self, score: FAIRResultCommonScore): + """Sets the score of this FormalMetadata. + + + :param score: The score of this FormalMetadata. + :type score: FAIRResultCommonScore + """ + if score is None: + raise ValueError("Invalid value for `score`, must not be `None`") + + self._score = score @property - def output(self): - """Gets the output of this FormalMetadata. # noqa: E501 + def maturity(self) -> str: + """Gets the maturity of this FormalMetadata. + + + :return: The maturity of this FormalMetadata. + :rtype: str + """ + return self._maturity + @maturity.setter + def maturity(self, maturity: int): + """Sets the maturity of this Uniqueness. - :return: The output of this FormalMetadata. # noqa: E501 + + :param maturity: The maturity of this Uniqueness. + :type maturity: int + """ + + self._maturity = maturity + + @property + def output(self) -> FormalMetadataOutput: + """Gets the output of this FormalMetadata. + + + :return: The output of this FormalMetadata. :rtype: FormalMetadataOutput """ return self._output @output.setter - def output(self, output): + def output(self, output: FormalMetadataOutput): """Sets the output of this FormalMetadata. - :param output: The output of this FormalMetadata. # noqa: E501 - :type: FormalMetadataOutput + :param output: The output of this FormalMetadata. + :type output: FormalMetadataOutput """ self._output = output @property - def test_debug(self): - """Gets the test_debug of this FormalMetadata. # noqa: E501 + def test_debug(self) -> Debug: + """Gets the test_debug of this FormalMetadata. - :return: The test_debug of this FormalMetadata. # noqa: E501 + :return: The test_debug of this FormalMetadata. :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug): + def test_debug(self, test_debug: Debug): """Sets the test_debug of this FormalMetadata. - :param test_debug: The test_debug of this FormalMetadata. # noqa: E501 - :type: Debug + :param test_debug: The test_debug of this FormalMetadata. + :type test_debug: Debug """ self._test_debug = test_debug - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(FormalMetadata, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FormalMetadata): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/formal_metadata_output.py b/fuji_server/models/formal_metadata_output.py index c3d6a93d..8511ad3b 100644 --- a/fuji_server/models/formal_metadata_output.py +++ b/fuji_server/models/formal_metadata_output.py @@ -1,80 +1,27 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model +from fuji_server.models.formal_metadata_output_inner import FormalMetadataOutputInner # noqa: F401 - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class FormalMetadataOutput: +class FormalMetadataOutput(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {} - - attribute_map = {} - def __init__(self): """FormalMetadataOutput - a model defined in Swagger""" - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(FormalMetadataOutput, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() + self.swagger_types = {} - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FormalMetadataOutput): - return False + self.attribute_map = {} - return self.__dict__ == other.__dict__ + @classmethod + def from_dict(cls, dikt) -> "FormalMetadataOutput": + """Returns the dict as a model - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other + :param dikt: A dict. + :type: dict + :return: The FormalMetadata_output of this FormalMetadataOutput. # noqa: E501 + :rtype: FormalMetadataOutput + """ + return util.deserialize_model(dikt, cls) diff --git a/fuji_server/models/formal_metadata_output_inner.py b/fuji_server/models/formal_metadata_output_inner.py index 83f43ab4..a23ded48 100644 --- a/fuji_server/models/formal_metadata_output_inner.py +++ b/fuji_server/models/formal_metadata_output_inner.py @@ -1,91 +1,85 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" +class FormalMetadataOutputInner(Model): + """NOTE: This class is auto generated by the swagger code generator program. -import pprint -import re # noqa: F401 + Do not edit the class manually. + """ -import six + def __init__( + self, serialization_format: str | None = None, source: str | None = None, is_metadata_found: bool = False + ): + """FormalMetadataOutputInner - a model defined in Swagger + :param serialization_format: The serialization_format of this FormalMetadataOutputInner. # noqa: E501 + :type serialization_format: str + :param source: The source of this FormalMetadataOutputInner. # noqa: E501 + :type source: str + :param is_metadata_found: The is_metadata_found of this FormalMetadataOutputInner. # noqa: E501 + :type is_metadata_found: bool + """ + self.swagger_types = {"serialization_format": str, "source": str, "is_metadata_found": bool} -class FormalMetadataOutputInner: - """NOTE: This class is auto generated by the swagger code generator program. + self.attribute_map = { + "serialization_format": "serialization_format", + "source": "source", + "is_metadata_found": "is_metadata_found", + } + self._serialization_format = serialization_format + self._source = source + self._is_metadata_found = is_metadata_found - Do not edit the class manually. - """ + @classmethod + def from_dict(cls, dikt) -> "FormalMetadataOutputInner": + """Returns the dict as a model - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"serialization_format": "str", "source": "str", "is_metadata_found": "bool"} - - attribute_map = { - "serialization_format": "serialization_format", - "source": "source", - "is_metadata_found": "is_metadata_found", - } - - def __init__(self, serialization_format=None, source=None, is_metadata_found=False): - """FormalMetadataOutputInner - a model defined in Swagger""" - self._serialization_format = None - self._source = None - self._is_metadata_found = None - self.discriminator = None - if serialization_format is not None: - self.serialization_format = serialization_format - if source is not None: - self.source = source - if is_metadata_found is not None: - self.is_metadata_found = is_metadata_found + :param dikt: A dict. + :type: dict + :return: The FormalMetadata_output_inner of this FormalMetadataOutputInner. # noqa: E501 + :rtype: FormalMetadataOutputInner + """ + return util.deserialize_model(dikt, cls) @property - def serialization_format(self): - """Gets the serialization_format of this FormalMetadataOutputInner. # noqa: E501 + def serialization_format(self) -> str: + """Gets the serialization_format of this FormalMetadataOutputInner. - :return: The serialization_format of this FormalMetadataOutputInner. # noqa: E501 + :return: The serialization_format of this FormalMetadataOutputInner. :rtype: str """ return self._serialization_format @serialization_format.setter - def serialization_format(self, serialization_format): + def serialization_format(self, serialization_format: str): """Sets the serialization_format of this FormalMetadataOutputInner. - :param serialization_format: The serialization_format of this FormalMetadataOutputInner. # noqa: E501 - :type: str + :param serialization_format: The serialization_format of this FormalMetadataOutputInner. + :type serialization_format: str """ self._serialization_format = serialization_format @property - def source(self): - """Gets the source of this FormalMetadataOutputInner. # noqa: E501 + def source(self) -> str: + """Gets the source of this FormalMetadataOutputInner. - :return: The source of this FormalMetadataOutputInner. # noqa: E501 + :return: The source of this FormalMetadataOutputInner. :rtype: str """ return self._source @source.setter - def source(self, source): + def source(self, source: str): """Sets the source of this FormalMetadataOutputInner. - :param source: The source of this FormalMetadataOutputInner. # noqa: E501 - :type: str + :param source: The source of this FormalMetadataOutputInner. + :type source: str """ allowed_values = ["typed_link", "content_negotiate", "structured_data", "sparql_endpoint"] if source not in allowed_values: @@ -94,66 +88,22 @@ def source(self, source): self._source = source @property - def is_metadata_found(self): - """Gets the is_metadata_found of this FormalMetadataOutputInner. # noqa: E501 + def is_metadata_found(self) -> bool: + """Gets the is_metadata_found of this FormalMetadataOutputInner. - :return: The is_metadata_found of this FormalMetadataOutputInner. # noqa: E501 + :return: The is_metadata_found of this FormalMetadataOutputInner. :rtype: bool """ return self._is_metadata_found @is_metadata_found.setter - def is_metadata_found(self, is_metadata_found): + def is_metadata_found(self, is_metadata_found: bool): """Sets the is_metadata_found of this FormalMetadataOutputInner. - :param is_metadata_found: The is_metadata_found of this FormalMetadataOutputInner. # noqa: E501 - :type: bool + :param is_metadata_found: The is_metadata_found of this FormalMetadataOutputInner. + :type is_metadata_found: bool """ self._is_metadata_found = is_metadata_found - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(FormalMetadataOutputInner, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, FormalMetadataOutputInner): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/harvest.py b/fuji_server/models/harvest.py index 15aabd54..c91ab0a4 100644 --- a/fuji_server/models/harvest.py +++ b/fuji_server/models/harvest.py @@ -1,107 +1,119 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class Harvest: +class Harvest(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"object_identifier": "str"} + def __init__( + self, object_identifier: str | None = None, auth_token: str | None = None, auth_token_type: str | None = None + ): + """Harvest - a model defined in Swagger - attribute_map = {"object_identifier": "object_identifier"} + :param object_identifier: The object_identifier of this Harvest. # noqa: E501 + :type object_identifier: str + :param auth_token: The auth_token of this Harvest. # noqa: E501 + :type auth_token: str + :param auth_token_type: The auth_token_type of this Harvest. # noqa: E501 + :type auth_token_type: str + """ + self.swagger_types = {"object_identifier": str, "auth_token": str, "auth_token_type": str} - def __init__(self, object_identifier=None): - """Harvest - a model defined in Swagger""" - self._object_identifier = None - self.discriminator = None - self.object_identifier = object_identifier + self.attribute_map = { + "object_identifier": "object_identifier", + "auth_token": "auth_token", + "auth_token_type": "auth_token_type", + } + self._object_identifier = object_identifier + self._auth_token = auth_token + self._auth_token_type = auth_token_type + + @classmethod + def from_dict(cls, dikt) -> "Harvest": + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The harvest of this Harvest. # noqa: E501 + :rtype: Harvest + """ + return util.deserialize_model(dikt, cls) @property - def object_identifier(self): - """Gets the object_identifier of this Harvest. # noqa: E501 + def object_identifier(self) -> str: + """Gets the object_identifier of this Harvest. The full identifier of data object that needs to be harvested # noqa: E501 - :return: The object_identifier of this Harvest. # noqa: E501 + :return: The object_identifier of this Harvest. :rtype: str """ return self._object_identifier @object_identifier.setter - def object_identifier(self, object_identifier): + def object_identifier(self, object_identifier: str): """Sets the object_identifier of this Harvest. The full identifier of data object that needs to be harvested # noqa: E501 - :param object_identifier: The object_identifier of this Harvest. # noqa: E501 - :type: str + :param object_identifier: The object_identifier of this Harvest. + :type object_identifier: str """ if object_identifier is None: raise ValueError("Invalid value for `object_identifier`, must not be `None`") self._object_identifier = object_identifier - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(Harvest, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Harvest): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other + @property + def auth_token(self) -> str: + """Gets the auth_token of this Harvest. + + The authentication token required to access protected data # noqa: E501 + + :return: The auth_token of this Harvest. + :rtype: str + """ + return self._auth_token + + @auth_token.setter + def auth_token(self, auth_token: str): + """Sets the auth_token of this Harvest. + + The authentication token required to access protected data # noqa: E501 + + :param auth_token: The auth_token of this Harvest. + :type auth_token: str + """ + + self._auth_token = auth_token + + @property + def auth_token_type(self) -> str: + """Gets the auth_token_type of this Harvest. + + The type of authentication (Oauth Bearer or HTTP Basic) needed to use the auth token # noqa: E501 + + :return: The auth_token_type of this Harvest. + :rtype: str + """ + return self._auth_token_type + + @auth_token_type.setter + def auth_token_type(self, auth_token_type: str): + """Sets the auth_token_type of this Harvest. + + The type of authentication (Oauth Bearer or HTTP Basic) needed to use the auth token # noqa: E501 + + :param auth_token_type: The auth_token_type of this Harvest. + :type auth_token_type: str + """ + allowed_values = ["Bearer", "Basic"] + if auth_token_type not in allowed_values: + raise ValueError( + f"Invalid value for `auth_token_type` ({auth_token_type}), must be one of {allowed_values}" + ) + + self._auth_token_type = auth_token_type diff --git a/fuji_server/models/harvest_results.py b/fuji_server/models/harvest_results.py index fd190dc7..86644242 100644 --- a/fuji_server/models/harvest_results.py +++ b/fuji_server/models/harvest_results.py @@ -1,128 +1,77 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model +from fuji_server.models.harvest_results_metadata import HarvestResultsMetadata - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class HarvestResults: +class HarvestResults(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"target_uri": "str", "metadata": "list[HarvestResultsMetadata]"} + def __init__(self, target_uri: str | None = None, metadata: list[HarvestResultsMetadata] | None = None): + """HarvestResults - a model defined in Swagger - attribute_map = {"target_uri": "target_uri", "metadata": "metadata"} + :param target_uri: The target_uri of this HarvestResults. # noqa: E501 + :type target_uri: str + :param metadata: The metadata of this HarvestResults. # noqa: E501 + :type metadata: List[HarvestResultsMetadata] + """ + self.swagger_types = {"target_uri": str, "metadata": list[HarvestResultsMetadata]} - def __init__(self, target_uri=None, metadata=None): - """HarvestResults - a model defined in Swagger""" - self._target_uri = None - self._metadata = None - self.discriminator = None - if target_uri is not None: - self.target_uri = target_uri - if metadata is not None: - self.metadata = metadata + self.attribute_map = {"target_uri": "target_uri", "metadata": "metadata"} + self._target_uri = target_uri + self._metadata = metadata + + @classmethod + def from_dict(cls, dikt) -> "HarvestResults": + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The HarvestResults of this HarvestResults. # noqa: E501 + :rtype: HarvestResults + """ + return util.deserialize_model(dikt, cls) @property - def target_uri(self): - """Gets the target_uri of this HarvestResults. # noqa: E501 + def target_uri(self) -> str: + """Gets the target_uri of this HarvestResults. - :return: The target_uri of this HarvestResults. # noqa: E501 + :return: The target_uri of this HarvestResults. :rtype: str """ return self._target_uri @target_uri.setter - def target_uri(self, target_uri): + def target_uri(self, target_uri: str): """Sets the target_uri of this HarvestResults. - :param target_uri: The target_uri of this HarvestResults. # noqa: E501 - :type: str + :param target_uri: The target_uri of this HarvestResults. + :type target_uri: str """ self._target_uri = target_uri @property - def metadata(self): - """Gets the metadata of this HarvestResults. # noqa: E501 + def metadata(self) -> list[HarvestResultsMetadata]: + """Gets the metadata of this HarvestResults. - :return: The metadata of this HarvestResults. # noqa: E501 - :rtype: list[HarvestResultsMetadata] + :return: The metadata of this HarvestResults. + :rtype: List[HarvestResultsMetadata] """ return self._metadata @metadata.setter - def metadata(self, metadata): + def metadata(self, metadata: list[HarvestResultsMetadata]): """Sets the metadata of this HarvestResults. - :param metadata: The metadata of this HarvestResults. # noqa: E501 - :type: list[HarvestResultsMetadata] + :param metadata: The metadata of this HarvestResults. + :type metadata: List[HarvestResultsMetadata] """ self._metadata = metadata - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(HarvestResults, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, HarvestResults): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/harvest_results_metadata.py b/fuji_server/models/harvest_results_metadata.py index f6bee106..f013ad27 100644 --- a/fuji_server/models/harvest_results_metadata.py +++ b/fuji_server/models/harvest_results_metadata.py @@ -1,238 +1,194 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class HarvestResultsMetadata: +class HarvestResultsMetadata(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - "method": "str", - "url": "str", - "format": "str", - "schema": "str", - "namespaces": "list[str]", - "metadata": "dict(str, object)", - } - - attribute_map = { - "method": "method", - "url": "url", - "format": "format", - "schema": "schema", - "namespaces": "namespaces", - "metadata": "metadata", - } - - def __init__(self, method=None, url=None, format=None, schema=None, namespaces=None, metadata=None): - """HarvestResultsMetadata - a model defined in Swagger""" - self._method = None - self._url = None - self._format = None - self._schema = None - self._namespaces = None - self._metadata = None - self.discriminator = None - if method is not None: - self.method = method - if url is not None: - self.url = url - if format is not None: - self.format = format - if schema is not None: - self.schema = schema - if namespaces is not None: - self.namespaces = namespaces - if metadata is not None: - self.metadata = metadata + def __init__( + self, + method: str | None = None, + url: str | None = None, + format: str | None = None, + schema: str | None = None, + namespaces: list[str] | None = None, + metadata: dict | None = None, + ): + """HarvestResultsMetadata - a model defined in Swagger + + :param method: The method of this HarvestResultsMetadata. # noqa: E501 + :type method: str + :param url: The url of this HarvestResultsMetadata. # noqa: E501 + :type url: str + :param format: The format of this HarvestResultsMetadata. # noqa: E501 + :type format: str + :param schema: The schema of this HarvestResultsMetadata. # noqa: E501 + :type schema: str + :param namespaces: The namespaces of this HarvestResultsMetadata. # noqa: E501 + :type namespaces: List[str] + :param metadata: The metadata of this HarvestResultsMetadata. # noqa: E501 + :type metadata: Dict + """ + self.swagger_types = { + "method": str, + "url": str, + "format": str, + "schema": str, + "namespaces": list[str], + "metadata": dict, + } + + self.attribute_map = { + "method": "method", + "url": "url", + "format": "format", + "schema": "schema", + "namespaces": "namespaces", + "metadata": "metadata", + } + self._method = method + self._url = url + self._format = format + self._schema = schema + self._namespaces = namespaces + self._metadata = metadata + + @classmethod + def from_dict(cls, dikt) -> "HarvestResultsMetadata": + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The HarvestResults_metadata of this HarvestResultsMetadata. # noqa: E501 + :rtype: HarvestResultsMetadata + """ + return util.deserialize_model(dikt, cls) @property - def method(self): - """Gets the method of this HarvestResultsMetadata. # noqa: E501 + def method(self) -> str: + """Gets the method of this HarvestResultsMetadata. - :return: The method of this HarvestResultsMetadata. # noqa: E501 + :return: The method of this HarvestResultsMetadata. :rtype: str """ return self._method @method.setter - def method(self, method): + def method(self, method: str): """Sets the method of this HarvestResultsMetadata. - :param method: The method of this HarvestResultsMetadata. # noqa: E501 - :type: str + :param method: The method of this HarvestResultsMetadata. + :type method: str """ self._method = method @property - def url(self): - """Gets the url of this HarvestResultsMetadata. # noqa: E501 + def url(self) -> str: + """Gets the url of this HarvestResultsMetadata. - :return: The url of this HarvestResultsMetadata. # noqa: E501 + :return: The url of this HarvestResultsMetadata. :rtype: str """ return self._url @url.setter - def url(self, url): + def url(self, url: str): """Sets the url of this HarvestResultsMetadata. - :param url: The url of this HarvestResultsMetadata. # noqa: E501 - :type: str + :param url: The url of this HarvestResultsMetadata. + :type url: str """ self._url = url @property - def format(self): - """Gets the format of this HarvestResultsMetadata. # noqa: E501 + def format(self) -> str: + """Gets the format of this HarvestResultsMetadata. - :return: The format of this HarvestResultsMetadata. # noqa: E501 + :return: The format of this HarvestResultsMetadata. :rtype: str """ return self._format @format.setter - def format(self, format): + def format(self, format: str): """Sets the format of this HarvestResultsMetadata. - :param format: The format of this HarvestResultsMetadata. # noqa: E501 - :type: str + :param format: The format of this HarvestResultsMetadata. + :type format: str """ self._format = format @property - def schema(self): - """Gets the schema of this HarvestResultsMetadata. # noqa: E501 + def schema(self) -> str: + """Gets the schema of this HarvestResultsMetadata. - :return: The schema of this HarvestResultsMetadata. # noqa: E501 + :return: The schema of this HarvestResultsMetadata. :rtype: str """ return self._schema @schema.setter - def schema(self, schema): + def schema(self, schema: str): """Sets the schema of this HarvestResultsMetadata. - :param schema: The schema of this HarvestResultsMetadata. # noqa: E501 - :type: str + :param schema: The schema of this HarvestResultsMetadata. + :type schema: str """ self._schema = schema @property - def namespaces(self): - """Gets the namespaces of this HarvestResultsMetadata. # noqa: E501 + def namespaces(self) -> list[str]: + """Gets the namespaces of this HarvestResultsMetadata. - :return: The namespaces of this HarvestResultsMetadata. # noqa: E501 - :rtype: list[str] + :return: The namespaces of this HarvestResultsMetadata. + :rtype: List[str] """ return self._namespaces @namespaces.setter - def namespaces(self, namespaces): + def namespaces(self, namespaces: list[str]): """Sets the namespaces of this HarvestResultsMetadata. - :param namespaces: The namespaces of this HarvestResultsMetadata. # noqa: E501 - :type: list[str] + :param namespaces: The namespaces of this HarvestResultsMetadata. + :type namespaces: List[str] """ self._namespaces = namespaces @property - def metadata(self): - """Gets the metadata of this HarvestResultsMetadata. # noqa: E501 + def metadata(self) -> dict: + """Gets the metadata of this HarvestResultsMetadata. - :return: The metadata of this HarvestResultsMetadata. # noqa: E501 - :rtype: dict(str, object) + :return: The metadata of this HarvestResultsMetadata. + :rtype: Dict """ return self._metadata @metadata.setter - def metadata(self, metadata): + def metadata(self, metadata: dict): """Sets the metadata of this HarvestResultsMetadata. - :param metadata: The metadata of this HarvestResultsMetadata. # noqa: E501 - :type: dict(str, object) + :param metadata: The metadata of this HarvestResultsMetadata. + :type metadata: Dict """ self._metadata = metadata - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(HarvestResultsMetadata, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, HarvestResultsMetadata): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/identifier_included.py b/fuji_server/models/identifier_included.py index aceff53b..1749d116 100644 --- a/fuji_server/models/identifier_included.py +++ b/fuji_server/models/identifier_included.py @@ -1,135 +1,291 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium +from fuji_server.models.identifier_included_output import IdentifierIncludedOutput - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" +class IdentifierIncluded(Model): + """NOTE: This class is auto generated by the swagger code generator program. -import pprint -import re # noqa: F401 + Do not edit the class manually. + """ -import six + def __init__( + self, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, + test_status: str = "fail", + score: FAIRResultCommonScore = None, + maturity: str = "incomplete", + output: IdentifierIncludedOutput = None, + test_debug: Debug = None, + ): + """IdentifierIncluded - a model defined in Swagger + + :param id: The id of this IdentifierIncluded. # noqa: E501 + :type id: int + :param metric_identifier: The metric_identifier of this IdentifierIncluded. # noqa: E501 + :type metric_identifier: str + :param metric_name: The metric_name of this IdentifierIncluded. # noqa: E501 + :type metric_name: str + :param metric_tests: The metric_tests of this IdentifierIncluded. # noqa: E501 + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + :param test_status: The test_status of this IdentifierIncluded. # noqa: E501 + :type test_status: str + :param score: The score of this IdentifierIncluded. # noqa: E501 + :type score: FAIRResultCommonScore + :param maturity: The maturity of this IdentifierIncluded. # noqa: E501 + :type maturity: str + :param output: The output of this IdentifierIncluded. # noqa: E501 + :type output: IdentifierIncludedOutput + :param test_debug: The test_debug of this IdentifierIncluded. # noqa: E501 + :type test_debug: Debug + """ + self.swagger_types = { + "id": int, + "metric_identifier": str, + "metric_name": str, + "metric_tests": dict[str, FAIRResultEvaluationCriterium], + "test_status": str, + "score": FAIRResultCommonScore, + "maturity": str, + "output": IdentifierIncludedOutput, + "test_debug": Debug, + } + + self.attribute_map = { + "id": "id", + "metric_identifier": "metric_identifier", + "metric_name": "metric_name", + "metric_tests": "metric_tests", + "test_status": "test_status", + "score": "score", + "maturity": "maturity", + "output": "output", + "test_debug": "test_debug", + } + self._id = id + self._metric_identifier = metric_identifier + self._metric_name = metric_name + self._metric_tests = metric_tests + self._test_status = test_status + self._score = score + self._maturity = maturity + self._output = output + self._test_debug = test_debug -from swagger_client.models.fair_result_common import FAIRResultCommon + @classmethod + def from_dict(cls, dikt) -> "IdentifierIncluded": + """Returns the dict as a model + :param dikt: A dict. + :type: dict + :return: The IdentifierIncluded of this IdentifierIncluded. # noqa: E501 + :rtype: IdentifierIncluded + """ + return util.deserialize_model(dikt, cls) -class IdentifierIncluded(FAIRResultCommon): - """NOTE: This class is auto generated by the swagger code generator program. + @property + def id(self) -> int: + """Gets the id of this IdentifierIncluded. - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"output": "IdentifierIncludedOutput", "test_debug": "Debug"} - if hasattr(FAIRResultCommon, "swagger_types"): - swagger_types.update(FAIRResultCommon.swagger_types) - - attribute_map = {"output": "output", "test_debug": "test_debug"} - if hasattr(FAIRResultCommon, "attribute_map"): - attribute_map.update(FAIRResultCommon.attribute_map) - - def __init__(self, output=None, test_debug=None, *args, **kwargs): - """IdentifierIncluded - a model defined in Swagger""" - self._output = None - self._test_debug = None - self.discriminator = None - if output is not None: - self.output = output - if test_debug is not None: - self.test_debug = test_debug - FAIRResultCommon.__init__(self, *args, **kwargs) + :return: The id of this IdentifierIncluded. + :rtype: int + """ + return self._id + + @id.setter + def id(self, id: int): + """Sets the id of this IdentifierIncluded. + + + :param id: The id of this IdentifierIncluded. + :type id: int + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") + + self._id = id + + @property + def metric_identifier(self) -> str: + """Gets the metric_identifier of this IdentifierIncluded. + + + :return: The metric_identifier of this IdentifierIncluded. + :rtype: str + """ + return self._metric_identifier + + @metric_identifier.setter + def metric_identifier(self, metric_identifier: str): + """Sets the metric_identifier of this IdentifierIncluded. + + + :param metric_identifier: The metric_identifier of this IdentifierIncluded. + :type metric_identifier: str + """ + if metric_identifier is None: + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") + + self._metric_identifier = metric_identifier + + @property + def metric_name(self) -> str: + """Gets the metric_name of this IdentifierIncluded. + + + :return: The metric_name of this IdentifierIncluded. + :rtype: str + """ + return self._metric_name + + @metric_name.setter + def metric_name(self, metric_name: str): + """Sets the metric_name of this IdentifierIncluded. + + + :param metric_name: The metric_name of this IdentifierIncluded. + :type metric_name: str + """ + if metric_name is None: + raise ValueError("Invalid value for `metric_name`, must not be `None`") + + self._metric_name = metric_name + + @property + def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: + """Gets the metric_tests of this IdentifierIncluded. + + + :return: The metric_tests of this IdentifierIncluded. + :rtype: Dict[str, FAIRResultEvaluationCriterium] + """ + return self._metric_tests + + @metric_tests.setter + def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): + """Sets the metric_tests of this IdentifierIncluded. + + + :param metric_tests: The metric_tests of this IdentifierIncluded. + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + """ + + self._metric_tests = metric_tests + + @property + def test_status(self) -> str: + """Gets the test_status of this IdentifierIncluded. + + + :return: The test_status of this IdentifierIncluded. + :rtype: str + """ + return self._test_status + + @test_status.setter + def test_status(self, test_status: str): + """Sets the test_status of this IdentifierIncluded. + + + :param test_status: The test_status of this IdentifierIncluded. + :type test_status: str + """ + allowed_values = ["pass", "fail", "indeterminate"] + if test_status not in allowed_values: + raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") + + self._test_status = test_status + + @property + def score(self) -> FAIRResultCommonScore: + """Gets the score of this IdentifierIncluded. + + + :return: The score of this IdentifierIncluded. + :rtype: FAIRResultCommonScore + """ + return self._score + + @score.setter + def score(self, score: FAIRResultCommonScore): + """Sets the score of this IdentifierIncluded. + + + :param score: The score of this IdentifierIncluded. + :type score: FAIRResultCommonScore + """ + if score is None: + raise ValueError("Invalid value for `score`, must not be `None`") + + self._score = score @property - def output(self): - """Gets the output of this IdentifierIncluded. # noqa: E501 + def maturity(self) -> str: + """Gets the maturity of this IdentifierIncluded. + + + :return: The maturity of this IdentifierIncluded. + :rtype: str + """ + return self._maturity + @maturity.setter + def maturity(self, maturity: str): + """Sets the maturity of this IdentifierIncluded. - :return: The output of this IdentifierIncluded. # noqa: E501 + + :param maturity: The maturity of this IdentifierIncluded. + :type maturity: str + """ + + self._maturity = maturity + + @property + def output(self) -> IdentifierIncludedOutput: + """Gets the output of this IdentifierIncluded. + + + :return: The output of this IdentifierIncluded. :rtype: IdentifierIncludedOutput """ return self._output @output.setter - def output(self, output): + def output(self, output: IdentifierIncludedOutput): """Sets the output of this IdentifierIncluded. - :param output: The output of this IdentifierIncluded. # noqa: E501 - :type: IdentifierIncludedOutput + :param output: The output of this IdentifierIncluded. + :type output: IdentifierIncludedOutput """ self._output = output @property - def test_debug(self): - """Gets the test_debug of this IdentifierIncluded. # noqa: E501 + def test_debug(self) -> Debug: + """Gets the test_debug of this IdentifierIncluded. - :return: The test_debug of this IdentifierIncluded. # noqa: E501 + :return: The test_debug of this IdentifierIncluded. :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug): + def test_debug(self, test_debug: Debug): """Sets the test_debug of this IdentifierIncluded. - :param test_debug: The test_debug of this IdentifierIncluded. # noqa: E501 - :type: Debug + :param test_debug: The test_debug of this IdentifierIncluded. + :type test_debug: Debug """ self._test_debug = test_debug - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(IdentifierIncluded, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, IdentifierIncluded): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/identifier_included_output.py b/fuji_server/models/identifier_included_output.py index bb351c91..ee8f8640 100644 --- a/fuji_server/models/identifier_included_output.py +++ b/fuji_server/models/identifier_included_output.py @@ -1,134 +1,55 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model +from fuji_server.models.identifier_included_output_inner import IdentifierIncludedOutputInner - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class IdentifierIncludedOutput: +class IdentifierIncludedOutput(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - "object_identifier_included": "str", - "object_content_identifier_included": "list[IdentifierIncludedOutputInner]", - } - - attribute_map = { - "object_identifier_included": "object_identifier_included", - "object_content_identifier_included": "object_content_identifier_included", - } - - def __init__(self, object_identifier_included=None, object_content_identifier_included=None): - """IdentifierIncludedOutput - a model defined in Swagger""" - self._object_identifier_included = None - self._object_content_identifier_included = None - self.discriminator = None - if object_identifier_included is not None: - self.object_identifier_included = object_identifier_included - if object_content_identifier_included is not None: - self.object_content_identifier_included = object_content_identifier_included - - @property - def object_identifier_included(self): - """Gets the object_identifier_included of this IdentifierIncludedOutput. # noqa: E501 - + def __init__(self, object_content_identifier_included: list[IdentifierIncludedOutputInner] | None = None): + """IdentifierIncludedOutput - a model defined in Swagger - :return: The object_identifier_included of this IdentifierIncludedOutput. # noqa: E501 - :rtype: str + :param object_content_identifier_included: The object_content_identifier_included of this IdentifierIncludedOutput. # noqa: E501 + :type object_content_identifier_included: List[IdentifierIncludedOutputInner] """ - return self._object_identifier_included + self.swagger_types = {"object_content_identifier_included": list[IdentifierIncludedOutputInner]} - @object_identifier_included.setter - def object_identifier_included(self, object_identifier_included): - """Sets the object_identifier_included of this IdentifierIncludedOutput. + self.attribute_map = {"object_content_identifier_included": "object_content_identifier_included"} + self._object_content_identifier_included = object_content_identifier_included + @classmethod + def from_dict(cls, dikt) -> "IdentifierIncludedOutput": + """Returns the dict as a model - :param object_identifier_included: The object_identifier_included of this IdentifierIncludedOutput. # noqa: E501 - :type: str + :param dikt: A dict. + :type: dict + :return: The IdentifierIncluded_output of this IdentifierIncludedOutput. # noqa: E501 + :rtype: IdentifierIncludedOutput """ - - self._object_identifier_included = object_identifier_included + return util.deserialize_model(dikt, cls) @property - def object_content_identifier_included(self): - """Gets the object_content_identifier_included of this IdentifierIncludedOutput. # noqa: E501 + def object_content_identifier_included(self) -> list[IdentifierIncludedOutputInner]: + """Gets the object_content_identifier_included of this IdentifierIncludedOutput. - :return: The object_content_identifier_included of this IdentifierIncludedOutput. # noqa: E501 - :rtype: list[IdentifierIncludedOutputInner] + :return: The object_content_identifier_included of this IdentifierIncludedOutput. + :rtype: List[IdentifierIncludedOutputInner] """ return self._object_content_identifier_included @object_content_identifier_included.setter - def object_content_identifier_included(self, object_content_identifier_included): + def object_content_identifier_included( + self, object_content_identifier_included: list[IdentifierIncludedOutputInner] + ): """Sets the object_content_identifier_included of this IdentifierIncludedOutput. - :param object_content_identifier_included: The object_content_identifier_included of this IdentifierIncludedOutput. # noqa: E501 - :type: list[IdentifierIncludedOutputInner] + :param object_content_identifier_included: The object_content_identifier_included of this IdentifierIncludedOutput. + :type object_content_identifier_included: List[IdentifierIncludedOutputInner] """ self._object_content_identifier_included = object_content_identifier_included - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(IdentifierIncludedOutput, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, IdentifierIncludedOutput): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/identifier_included_output_inner.py b/fuji_server/models/identifier_included_output_inner.py index 89dfb8fb..2cf4e8b0 100644 --- a/fuji_server/models/identifier_included_output_inner.py +++ b/fuji_server/models/identifier_included_output_inner.py @@ -1,104 +1,52 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class IdentifierIncludedOutputInner: +class IdentifierIncludedOutputInner(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"content_identifier_included": "str"} + def __init__(self, content_identifier_included: str | None = None): + """IdentifierIncludedOutputInner - a model defined in Swagger - attribute_map = {"content_identifier_included": "content_identifier_included"} + :param content_identifier_included: The content_identifier_included of this IdentifierIncludedOutputInner. # noqa: E501 + :type content_identifier_included: str + """ + self.swagger_types = {"content_identifier_included": str} - def __init__(self, content_identifier_included=None): - """IdentifierIncludedOutputInner - a model defined in Swagger""" - self._content_identifier_included = None - self.discriminator = None - if content_identifier_included is not None: - self.content_identifier_included = content_identifier_included + self.attribute_map = {"content_identifier_included": "content_identifier_included"} + self._content_identifier_included = content_identifier_included + + @classmethod + def from_dict(cls, dikt) -> "IdentifierIncludedOutputInner": + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The IdentifierIncluded_output_inner of this IdentifierIncludedOutputInner. # noqa: E501 + :rtype: IdentifierIncludedOutputInner + """ + return util.deserialize_model(dikt, cls) @property - def content_identifier_included(self): - """Gets the content_identifier_included of this IdentifierIncludedOutputInner. # noqa: E501 + def content_identifier_included(self) -> str: + """Gets the content_identifier_included of this IdentifierIncludedOutputInner. - :return: The content_identifier_included of this IdentifierIncludedOutputInner. # noqa: E501 + :return: The content_identifier_included of this IdentifierIncludedOutputInner. :rtype: str """ return self._content_identifier_included @content_identifier_included.setter - def content_identifier_included(self, content_identifier_included): + def content_identifier_included(self, content_identifier_included: str): """Sets the content_identifier_included of this IdentifierIncludedOutputInner. - :param content_identifier_included: The content_identifier_included of this IdentifierIncludedOutputInner. # noqa: E501 - :type: str + :param content_identifier_included: The content_identifier_included of this IdentifierIncludedOutputInner. + :type content_identifier_included: str """ self._content_identifier_included = content_identifier_included - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(IdentifierIncludedOutputInner, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, IdentifierIncludedOutputInner): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/license.py b/fuji_server/models/license.py index 391472d6..93b83e6d 100644 --- a/fuji_server/models/license.py +++ b/fuji_server/models/license.py @@ -1,135 +1,291 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium +from fuji_server.models.license_output import LicenseOutput - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" +class License(Model): + """NOTE: This class is auto generated by the swagger code generator program. -import pprint -import re # noqa: F401 + Do not edit the class manually. + """ -import six + def __init__( + self, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, + test_status: str = "fail", + score: FAIRResultCommonScore = None, + maturity: str = "incomplete", + output: LicenseOutput = None, + test_debug: Debug = None, + ): + """License - a model defined in Swagger + + :param id: The id of this License. # noqa: E501 + :type id: int + :param metric_identifier: The metric_identifier of this License. # noqa: E501 + :type metric_identifier: str + :param metric_name: The metric_name of this License. # noqa: E501 + :type metric_name: str + :param metric_tests: The metric_tests of this License. # noqa: E501 + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + :param test_status: The test_status of this License. # noqa: E501 + :type test_status: str + :param score: The score of this License. # noqa: E501 + :type score: FAIRResultCommonScore + :param maturity: The maturity of this License. # noqa: E501 + :type maturity: str + :param output: The output of this License. # noqa: E501 + :type output: LicenseOutput + :param test_debug: The test_debug of this License. # noqa: E501 + :type test_debug: Debug + """ + self.swagger_types = { + "id": int, + "metric_identifier": str, + "metric_name": str, + "metric_tests": dict[str, FAIRResultEvaluationCriterium], + "test_status": str, + "score": FAIRResultCommonScore, + "maturity": str, + "output": LicenseOutput, + "test_debug": Debug, + } + + self.attribute_map = { + "id": "id", + "metric_identifier": "metric_identifier", + "metric_name": "metric_name", + "metric_tests": "metric_tests", + "test_status": "test_status", + "score": "score", + "maturity": "maturity", + "output": "output", + "test_debug": "test_debug", + } + self._id = id + self._metric_identifier = metric_identifier + self._metric_name = metric_name + self._metric_tests = metric_tests + self._test_status = test_status + self._score = score + self._maturity = maturity + self._output = output + self._test_debug = test_debug -from swagger_client.models.fair_result_common import FAIRResultCommon + @classmethod + def from_dict(cls, dikt) -> "License": + """Returns the dict as a model + :param dikt: A dict. + :type: dict + :return: The License of this License. # noqa: E501 + :rtype: License + """ + return util.deserialize_model(dikt, cls) -class License(FAIRResultCommon): - """NOTE: This class is auto generated by the swagger code generator program. + @property + def id(self) -> int: + """Gets the id of this License. - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"output": "LicenseOutput", "test_debug": "Debug"} - if hasattr(FAIRResultCommon, "swagger_types"): - swagger_types.update(FAIRResultCommon.swagger_types) - - attribute_map = {"output": "output", "test_debug": "test_debug"} - if hasattr(FAIRResultCommon, "attribute_map"): - attribute_map.update(FAIRResultCommon.attribute_map) - - def __init__(self, output=None, test_debug=None, *args, **kwargs): - """License - a model defined in Swagger""" - self._output = None - self._test_debug = None - self.discriminator = None - if output is not None: - self.output = output - if test_debug is not None: - self.test_debug = test_debug - FAIRResultCommon.__init__(self, *args, **kwargs) + :return: The id of this License. + :rtype: int + """ + return self._id + + @id.setter + def id(self, id: int): + """Sets the id of this License. + + + :param id: The id of this License. + :type id: int + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") + + self._id = id + + @property + def metric_identifier(self) -> str: + """Gets the metric_identifier of this License. + + + :return: The metric_identifier of this License. + :rtype: str + """ + return self._metric_identifier + + @metric_identifier.setter + def metric_identifier(self, metric_identifier: str): + """Sets the metric_identifier of this License. + + + :param metric_identifier: The metric_identifier of this License. + :type metric_identifier: str + """ + if metric_identifier is None: + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") + + self._metric_identifier = metric_identifier + + @property + def metric_name(self) -> str: + """Gets the metric_name of this License. + + + :return: The metric_name of this License. + :rtype: str + """ + return self._metric_name + + @metric_name.setter + def metric_name(self, metric_name: str): + """Sets the metric_name of this License. + + + :param metric_name: The metric_name of this License. + :type metric_name: str + """ + if metric_name is None: + raise ValueError("Invalid value for `metric_name`, must not be `None`") + + self._metric_name = metric_name + + @property + def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: + """Gets the metric_tests of this License. + + + :return: The metric_tests of this License. + :rtype: Dict[str, FAIRResultEvaluationCriterium] + """ + return self._metric_tests + + @metric_tests.setter + def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): + """Sets the metric_tests of this License. + + + :param metric_tests: The metric_tests of this License. + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + """ + + self._metric_tests = metric_tests + + @property + def test_status(self) -> str: + """Gets the test_status of this License. + + + :return: The test_status of this License. + :rtype: str + """ + return self._test_status + + @test_status.setter + def test_status(self, test_status: str): + """Sets the test_status of this License. + + + :param test_status: The test_status of this License. + :type test_status: str + """ + allowed_values = ["pass", "fail", "indeterminate"] + if test_status not in allowed_values: + raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") + + self._test_status = test_status + + @property + def score(self) -> FAIRResultCommonScore: + """Gets the score of this License. + + + :return: The score of this License. + :rtype: FAIRResultCommonScore + """ + return self._score + + @score.setter + def score(self, score: FAIRResultCommonScore): + """Sets the score of this License. + + + :param score: The score of this License. + :type score: FAIRResultCommonScore + """ + if score is None: + raise ValueError("Invalid value for `score`, must not be `None`") + + self._score = score @property - def output(self): - """Gets the output of this License. # noqa: E501 + def maturity(self) -> str: + """Gets the maturity of this License. + + + :return: The maturity of this License. + :rtype: str + """ + return self._maturity + @maturity.setter + def maturity(self, maturity: int): + """Sets the maturity of this Uniqueness. - :return: The output of this License. # noqa: E501 + + :param maturity: The maturity of this Uniqueness. + :type maturity: int + """ + + self._maturity = maturity + + @property + def output(self) -> LicenseOutput: + """Gets the output of this License. + + + :return: The output of this License. :rtype: LicenseOutput """ return self._output @output.setter - def output(self, output): + def output(self, output: LicenseOutput): """Sets the output of this License. - :param output: The output of this License. # noqa: E501 - :type: LicenseOutput + :param output: The output of this License. + :type output: LicenseOutput """ self._output = output @property - def test_debug(self): - """Gets the test_debug of this License. # noqa: E501 + def test_debug(self) -> Debug: + """Gets the test_debug of this License. - :return: The test_debug of this License. # noqa: E501 + :return: The test_debug of this License. :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug): + def test_debug(self, test_debug: Debug): """Sets the test_debug of this License. - :param test_debug: The test_debug of this License. # noqa: E501 - :type: Debug + :param test_debug: The test_debug of this License. + :type test_debug: Debug """ self._test_debug = test_debug - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(License, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, License): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/license_output.py b/fuji_server/models/license_output.py index b66c713e..bab98134 100644 --- a/fuji_server/models/license_output.py +++ b/fuji_server/models/license_output.py @@ -1,80 +1,27 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model +from fuji_server.models.license_output_inner import LicenseOutputInner # noqa: F401 - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class LicenseOutput: +class LicenseOutput(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {} - - attribute_map = {} - def __init__(self): """LicenseOutput - a model defined in Swagger""" - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(LicenseOutput, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() + self.swagger_types = {} - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, LicenseOutput): - return False + self.attribute_map = {} - return self.__dict__ == other.__dict__ + @classmethod + def from_dict(cls, dikt) -> "LicenseOutput": + """Returns the dict as a model - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other + :param dikt: A dict. + :type: dict + :return: The License_output of this LicenseOutput. # noqa: E501 + :rtype: LicenseOutput + """ + return util.deserialize_model(dikt, cls) diff --git a/fuji_server/models/license_output_inner.py b/fuji_server/models/license_output_inner.py index 297eb116..c92fc759 100644 --- a/fuji_server/models/license_output_inner.py +++ b/fuji_server/models/license_output_inner.py @@ -1,152 +1,100 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" +class LicenseOutputInner(Model): + """NOTE: This class is auto generated by the swagger code generator program. -import pprint -import re # noqa: F401 + Do not edit the class manually. + """ -import six + def __init__(self, license: str | None = None, osi_approved: bool = False, details_url: str | None = None): + """LicenseOutputInner - a model defined in Swagger + :param license: The license of this LicenseOutputInner. # noqa: E501 + :type license: str + :param osi_approved: The osi_approved of this LicenseOutputInner. # noqa: E501 + :type osi_approved: bool + :param details_url: The details_url of this LicenseOutputInner. # noqa: E501 + :type details_url: str + """ + self.swagger_types = {"license": str, "osi_approved": bool, "details_url": str} -class LicenseOutputInner: - """NOTE: This class is auto generated by the swagger code generator program. + self.attribute_map = {"license": "license", "osi_approved": "OSI_approved", "details_url": "details_url"} + self._license = license + self._osi_approved = osi_approved + self._details_url = details_url - Do not edit the class manually. - """ + @classmethod + def from_dict(cls, dikt) -> "LicenseOutputInner": + """Returns the dict as a model - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"license": "str", "osi_approved": "bool", "details_url": "str"} - - attribute_map = {"license": "license", "osi_approved": "OSI_approved", "details_url": "details_url"} - - def __init__(self, license=None, osi_approved=False, details_url=None): - """LicenseOutputInner - a model defined in Swagger""" - self._license = None - self._osi_approved = None - self._details_url = None - self.discriminator = None - if license is not None: - self.license = license - if osi_approved is not None: - self.osi_approved = osi_approved - if details_url is not None: - self.details_url = details_url + :param dikt: A dict. + :type: dict + :return: The License_output_inner of this LicenseOutputInner. # noqa: E501 + :rtype: LicenseOutputInner + """ + return util.deserialize_model(dikt, cls) @property - def license(self): - """Gets the license of this LicenseOutputInner. # noqa: E501 + def license(self) -> str: + """Gets the license of this LicenseOutputInner. - :return: The license of this LicenseOutputInner. # noqa: E501 + :return: The license of this LicenseOutputInner. :rtype: str """ return self._license @license.setter - def license(self, license): + def license(self, license: str): """Sets the license of this LicenseOutputInner. - :param license: The license of this LicenseOutputInner. # noqa: E501 - :type: str + :param license: The license of this LicenseOutputInner. + :type license: str """ self._license = license @property - def osi_approved(self): - """Gets the osi_approved of this LicenseOutputInner. # noqa: E501 + def osi_approved(self) -> bool: + """Gets the osi_approved of this LicenseOutputInner. - :return: The osi_approved of this LicenseOutputInner. # noqa: E501 + :return: The osi_approved of this LicenseOutputInner. :rtype: bool """ return self._osi_approved @osi_approved.setter - def osi_approved(self, osi_approved): + def osi_approved(self, osi_approved: bool): """Sets the osi_approved of this LicenseOutputInner. - :param osi_approved: The osi_approved of this LicenseOutputInner. # noqa: E501 - :type: bool + :param osi_approved: The osi_approved of this LicenseOutputInner. + :type osi_approved: bool """ self._osi_approved = osi_approved @property - def details_url(self): - """Gets the details_url of this LicenseOutputInner. # noqa: E501 + def details_url(self) -> str: + """Gets the details_url of this LicenseOutputInner. - :return: The details_url of this LicenseOutputInner. # noqa: E501 + :return: The details_url of this LicenseOutputInner. :rtype: str """ return self._details_url @details_url.setter - def details_url(self, details_url): + def details_url(self, details_url: str): """Sets the details_url of this LicenseOutputInner. - :param details_url: The details_url of this LicenseOutputInner. # noqa: E501 - :type: str + :param details_url: The details_url of this LicenseOutputInner. + :type details_url: str """ self._details_url = details_url - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(LicenseOutputInner, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, LicenseOutputInner): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/metadata_preserved.py b/fuji_server/models/metadata_preserved.py index b8f71b5f..c2d55e14 100644 --- a/fuji_server/models/metadata_preserved.py +++ b/fuji_server/models/metadata_preserved.py @@ -1,135 +1,291 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium +from fuji_server.models.metadata_preserved_output import MetadataPreservedOutput - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" +class MetadataPreserved(Model): + """NOTE: This class is auto generated by the swagger code generator program. -import pprint -import re # noqa: F401 + Do not edit the class manually. + """ -import six + def __init__( + self, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, + test_status: str = "fail", + score: FAIRResultCommonScore = None, + maturity: str = "incomplete", + output: MetadataPreservedOutput = None, + test_debug: Debug = None, + ): + """MetadataPreserved - a model defined in Swagger + + :param id: The id of this MetadataPreserved. # noqa: E501 + :type id: int + :param metric_identifier: The metric_identifier of this MetadataPreserved. # noqa: E501 + :type metric_identifier: str + :param metric_name: The metric_name of this MetadataPreserved. # noqa: E501 + :type metric_name: str + :param metric_tests: The metric_tests of this MetadataPreserved. # noqa: E501 + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + :param test_status: The test_status of this MetadataPreserved. # noqa: E501 + :type test_status: str + :param score: The score of this MetadataPreserved. # noqa: E501 + :type score: FAIRResultCommonScore + :param maturity: The maturity of this MetadataPreserved. # noqa: E501 + :type maturity: str + :param output: The output of this MetadataPreserved. # noqa: E501 + :type output: MetadataPreservedOutput + :param test_debug: The test_debug of this MetadataPreserved. # noqa: E501 + :type test_debug: Debug + """ + self.swagger_types = { + "id": int, + "metric_identifier": str, + "metric_name": str, + "metric_tests": dict[str, FAIRResultEvaluationCriterium], + "test_status": str, + "score": FAIRResultCommonScore, + "maturity": str, + "output": MetadataPreservedOutput, + "test_debug": Debug, + } + + self.attribute_map = { + "id": "id", + "metric_identifier": "metric_identifier", + "metric_name": "metric_name", + "metric_tests": "metric_tests", + "test_status": "test_status", + "score": "score", + "maturity": "maturity", + "output": "output", + "test_debug": "test_debug", + } + self._id = id + self._metric_identifier = metric_identifier + self._metric_name = metric_name + self._metric_tests = metric_tests + self._test_status = test_status + self._score = score + self._maturity = maturity + self._output = output + self._test_debug = test_debug -from swagger_client.models.fair_result_common import FAIRResultCommon + @classmethod + def from_dict(cls, dikt) -> "MetadataPreserved": + """Returns the dict as a model + :param dikt: A dict. + :type: dict + :return: The MetadataPreserved of this MetadataPreserved. # noqa: E501 + :rtype: MetadataPreserved + """ + return util.deserialize_model(dikt, cls) -class MetadataPreserved(FAIRResultCommon): - """NOTE: This class is auto generated by the swagger code generator program. + @property + def id(self) -> int: + """Gets the id of this MetadataPreserved. - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"output": "MetadataPreservedOutput", "test_debug": "Debug"} - if hasattr(FAIRResultCommon, "swagger_types"): - swagger_types.update(FAIRResultCommon.swagger_types) - - attribute_map = {"output": "output", "test_debug": "test_debug"} - if hasattr(FAIRResultCommon, "attribute_map"): - attribute_map.update(FAIRResultCommon.attribute_map) - - def __init__(self, output=None, test_debug=None, *args, **kwargs): - """MetadataPreserved - a model defined in Swagger""" - self._output = None - self._test_debug = None - self.discriminator = None - if output is not None: - self.output = output - if test_debug is not None: - self.test_debug = test_debug - FAIRResultCommon.__init__(self, *args, **kwargs) + :return: The id of this MetadataPreserved. + :rtype: int + """ + return self._id + + @id.setter + def id(self, id: int): + """Sets the id of this MetadataPreserved. + + + :param id: The id of this MetadataPreserved. + :type id: int + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") + + self._id = id + + @property + def metric_identifier(self) -> str: + """Gets the metric_identifier of this MetadataPreserved. + + + :return: The metric_identifier of this MetadataPreserved. + :rtype: str + """ + return self._metric_identifier + + @metric_identifier.setter + def metric_identifier(self, metric_identifier: str): + """Sets the metric_identifier of this MetadataPreserved. + + + :param metric_identifier: The metric_identifier of this MetadataPreserved. + :type metric_identifier: str + """ + if metric_identifier is None: + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") + + self._metric_identifier = metric_identifier + + @property + def metric_name(self) -> str: + """Gets the metric_name of this MetadataPreserved. + + + :return: The metric_name of this MetadataPreserved. + :rtype: str + """ + return self._metric_name + + @metric_name.setter + def metric_name(self, metric_name: str): + """Sets the metric_name of this MetadataPreserved. + + + :param metric_name: The metric_name of this MetadataPreserved. + :type metric_name: str + """ + if metric_name is None: + raise ValueError("Invalid value for `metric_name`, must not be `None`") + + self._metric_name = metric_name + + @property + def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: + """Gets the metric_tests of this MetadataPreserved. + + + :return: The metric_tests of this MetadataPreserved. + :rtype: Dict[str, FAIRResultEvaluationCriterium] + """ + return self._metric_tests + + @metric_tests.setter + def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): + """Sets the metric_tests of this MetadataPreserved. + + + :param metric_tests: The metric_tests of this MetadataPreserved. + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + """ + + self._metric_tests = metric_tests + + @property + def test_status(self) -> str: + """Gets the test_status of this MetadataPreserved. + + + :return: The test_status of this MetadataPreserved. + :rtype: str + """ + return self._test_status + + @test_status.setter + def test_status(self, test_status: str): + """Sets the test_status of this MetadataPreserved. + + + :param test_status: The test_status of this MetadataPreserved. + :type test_status: str + """ + allowed_values = ["pass", "fail", "indeterminate"] + if test_status not in allowed_values: + raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") + + self._test_status = test_status + + @property + def score(self) -> FAIRResultCommonScore: + """Gets the score of this MetadataPreserved. + + + :return: The score of this MetadataPreserved. + :rtype: FAIRResultCommonScore + """ + return self._score + + @score.setter + def score(self, score: FAIRResultCommonScore): + """Sets the score of this MetadataPreserved. + + + :param score: The score of this MetadataPreserved. + :type score: FAIRResultCommonScore + """ + if score is None: + raise ValueError("Invalid value for `score`, must not be `None`") + + self._score = score @property - def output(self): - """Gets the output of this MetadataPreserved. # noqa: E501 + def maturity(self) -> str: + """Gets the maturity of this MetadataPreserved. + + + :return: The maturity of this MetadataPreserved. + :rtype: str + """ + return self._maturity + @maturity.setter + def maturity(self, maturity: int): + """Sets the maturity of this Uniqueness. - :return: The output of this MetadataPreserved. # noqa: E501 + + :param maturity: The maturity of this Uniqueness. + :type maturity: int + """ + + self._maturity = maturity + + @property + def output(self) -> MetadataPreservedOutput: + """Gets the output of this MetadataPreserved. + + + :return: The output of this MetadataPreserved. :rtype: MetadataPreservedOutput """ return self._output @output.setter - def output(self, output): + def output(self, output: MetadataPreservedOutput): """Sets the output of this MetadataPreserved. - :param output: The output of this MetadataPreserved. # noqa: E501 - :type: MetadataPreservedOutput + :param output: The output of this MetadataPreserved. + :type output: MetadataPreservedOutput """ self._output = output @property - def test_debug(self): - """Gets the test_debug of this MetadataPreserved. # noqa: E501 + def test_debug(self) -> Debug: + """Gets the test_debug of this MetadataPreserved. - :return: The test_debug of this MetadataPreserved. # noqa: E501 + :return: The test_debug of this MetadataPreserved. :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug): + def test_debug(self, test_debug: Debug): """Sets the test_debug of this MetadataPreserved. - :param test_debug: The test_debug of this MetadataPreserved. # noqa: E501 - :type: Debug + :param test_debug: The test_debug of this MetadataPreserved. + :type test_debug: Debug """ self._test_debug = test_debug - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(MetadataPreserved, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MetadataPreserved): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/metadata_preserved_output.py b/fuji_server/models/metadata_preserved_output.py index 30647ca9..4842b195 100644 --- a/fuji_server/models/metadata_preserved_output.py +++ b/fuji_server/models/metadata_preserved_output.py @@ -1,60 +1,52 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class MetadataPreservedOutput: +class MetadataPreservedOutput(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"metadata_preservation_method": "list[str]"} + def __init__(self, metadata_preservation_method: list[str] | None = None): + """MetadataPreservedOutput - a model defined in Swagger + + :param metadata_preservation_method: The metadata_preservation_method of this MetadataPreservedOutput. # noqa: E501 + :type metadata_preservation_method: List[str] + """ + self.swagger_types = {"metadata_preservation_method": list[str]} + + self.attribute_map = {"metadata_preservation_method": "metadata_preservation_method"} + self._metadata_preservation_method = metadata_preservation_method - attribute_map = {"metadata_preservation_method": "metadata_preservation_method"} + @classmethod + def from_dict(cls, dikt) -> "MetadataPreservedOutput": + """Returns the dict as a model - def __init__(self, metadata_preservation_method=None): - """MetadataPreservedOutput - a model defined in Swagger""" - self._metadata_preservation_method = None - self.discriminator = None - if metadata_preservation_method is not None: - self.metadata_preservation_method = metadata_preservation_method + :param dikt: A dict. + :type: dict + :return: The MetadataPreserved_output of this MetadataPreservedOutput. # noqa: E501 + :rtype: MetadataPreservedOutput + """ + return util.deserialize_model(dikt, cls) @property - def metadata_preservation_method(self): - """Gets the metadata_preservation_method of this MetadataPreservedOutput. # noqa: E501 + def metadata_preservation_method(self) -> list[str]: + """Gets the metadata_preservation_method of this MetadataPreservedOutput. - :return: The metadata_preservation_method of this MetadataPreservedOutput. # noqa: E501 - :rtype: list[str] + :return: The metadata_preservation_method of this MetadataPreservedOutput. + :rtype: List[str] """ return self._metadata_preservation_method @metadata_preservation_method.setter - def metadata_preservation_method(self, metadata_preservation_method): + def metadata_preservation_method(self, metadata_preservation_method: list[str]): """Sets the metadata_preservation_method of this MetadataPreservedOutput. - :param metadata_preservation_method: The metadata_preservation_method of this MetadataPreservedOutput. # noqa: E501 - :type: list[str] + :param metadata_preservation_method: The metadata_preservation_method of this MetadataPreservedOutput. + :type metadata_preservation_method: List[str] """ allowed_values = ["datacite", "tombstone"] if not set(metadata_preservation_method).issubset(set(allowed_values)): @@ -66,47 +58,3 @@ def metadata_preservation_method(self, metadata_preservation_method): ) self._metadata_preservation_method = metadata_preservation_method - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(MetadataPreservedOutput, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, MetadataPreservedOutput): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/metric.py b/fuji_server/models/metric.py index ab41d61c..d35ebc0f 100644 --- a/fuji_server/models/metric.py +++ b/fuji_server/models/metric.py @@ -1,354 +1,304 @@ -""" - F-UJI +from datetime import date - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 +from fuji_server import util +from fuji_server.models.base_model_ import Model - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" -import pprint -import re # noqa: F401 - -import six - - -class Metric: +class Metric(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = { - "metric_identifier": "str", - "metric_name": "str", - "description": "str", - "fair_principle": "str", - "evaluation_mechanism": "str", - "date_created": "date", - "date_updated": "date", - "created_by": "str", - "version": "float", - "total_score": "int", - } - - attribute_map = { - "metric_identifier": "metric_identifier", - "metric_name": "metric_name", - "description": "description", - "fair_principle": "fair_principle", - "evaluation_mechanism": "evaluation_mechanism", - "date_created": "date_created", - "date_updated": "date_updated", - "created_by": "created_by", - "version": "version", - "total_score": "total_score", - } - def __init__( self, - metric_identifier=None, - metric_name=None, - description=None, - fair_principle=None, - evaluation_mechanism=None, - date_created=None, - date_updated=None, - created_by=None, - version=None, - total_score=None, + metric_identifier: str | None = None, + metric_name: str | None = None, + description: str | None = None, + fair_principle: str | None = None, + evaluation_mechanism: str | None = None, + date_created: date | None = None, + date_updated: date | None = None, + created_by: str | None = None, + version: float | None = None, + total_score: int | None = None, ): - """Metric - a model defined in Swagger""" - self._metric_identifier = None - self._metric_name = None - self._description = None - self._fair_principle = None - self._evaluation_mechanism = None - self._date_created = None - self._date_updated = None - self._created_by = None - self._version = None - self._total_score = None - self.discriminator = None - if metric_identifier is not None: - self.metric_identifier = metric_identifier - if metric_name is not None: - self.metric_name = metric_name - if description is not None: - self.description = description - if fair_principle is not None: - self.fair_principle = fair_principle - if evaluation_mechanism is not None: - self.evaluation_mechanism = evaluation_mechanism - if date_created is not None: - self.date_created = date_created - if date_updated is not None: - self.date_updated = date_updated - if created_by is not None: - self.created_by = created_by - if version is not None: - self.version = version - if total_score is not None: - self.total_score = total_score + """Metric - a model defined in Swagger + + :param metric_identifier: The metric_identifier of this Metric. # noqa: E501 + :type metric_identifier: str + :param metric_name: The metric_name of this Metric. # noqa: E501 + :type metric_name: str + :param description: The description of this Metric. # noqa: E501 + :type description: str + :param fair_principle: The fair_principle of this Metric. # noqa: E501 + :type fair_principle: str + :param evaluation_mechanism: The evaluation_mechanism of this Metric. # noqa: E501 + :type evaluation_mechanism: str + :param date_created: The date_created of this Metric. # noqa: E501 + :type date_created: date + :param date_updated: The date_updated of this Metric. # noqa: E501 + :type date_updated: date + :param created_by: The created_by of this Metric. # noqa: E501 + :type created_by: str + :param version: The version of this Metric. # noqa: E501 + :type version: float + :param total_score: The total_score of this Metric. # noqa: E501 + :type total_score: int + """ + self.swagger_types = { + "metric_identifier": str, + "metric_name": str, + "description": str, + "fair_principle": str, + "evaluation_mechanism": str, + "date_created": date, + "date_updated": date, + "created_by": str, + "version": float, + "total_score": int, + } + + self.attribute_map = { + "metric_identifier": "metric_identifier", + "metric_name": "metric_name", + "description": "description", + "fair_principle": "fair_principle", + "evaluation_mechanism": "evaluation_mechanism", + "date_created": "date_created", + "date_updated": "date_updated", + "created_by": "created_by", + "version": "version", + "total_score": "total_score", + } + self._metric_identifier = metric_identifier + self._metric_name = metric_name + self._description = description + self._fair_principle = fair_principle + self._evaluation_mechanism = evaluation_mechanism + self._date_created = date_created + self._date_updated = date_updated + self._created_by = created_by + self._version = version + self._total_score = total_score + + @classmethod + def from_dict(cls, dikt) -> "Metric": + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Metric of this Metric. # noqa: E501 + :rtype: Metric + """ + return util.deserialize_model(dikt, cls) @property - def metric_identifier(self): - """Gets the metric_identifier of this Metric. # noqa: E501 + def metric_identifier(self) -> str: + """Gets the metric_identifier of this Metric. - :return: The metric_identifier of this Metric. # noqa: E501 + :return: The metric_identifier of this Metric. :rtype: str """ return self._metric_identifier @metric_identifier.setter - def metric_identifier(self, metric_identifier): + def metric_identifier(self, metric_identifier: str): """Sets the metric_identifier of this Metric. - :param metric_identifier: The metric_identifier of this Metric. # noqa: E501 - :type: str + :param metric_identifier: The metric_identifier of this Metric. + :type metric_identifier: str """ self._metric_identifier = metric_identifier @property - def metric_name(self): - """Gets the metric_name of this Metric. # noqa: E501 + def metric_name(self) -> str: + """Gets the metric_name of this Metric. - :return: The metric_name of this Metric. # noqa: E501 + :return: The metric_name of this Metric. :rtype: str """ return self._metric_name @metric_name.setter - def metric_name(self, metric_name): + def metric_name(self, metric_name: str): """Sets the metric_name of this Metric. - :param metric_name: The metric_name of this Metric. # noqa: E501 - :type: str + :param metric_name: The metric_name of this Metric. + :type metric_name: str """ self._metric_name = metric_name @property - def description(self): - """Gets the description of this Metric. # noqa: E501 + def description(self) -> str: + """Gets the description of this Metric. - :return: The description of this Metric. # noqa: E501 + :return: The description of this Metric. :rtype: str """ return self._description @description.setter - def description(self, description): + def description(self, description: str): """Sets the description of this Metric. - :param description: The description of this Metric. # noqa: E501 - :type: str + :param description: The description of this Metric. + :type description: str """ self._description = description @property - def fair_principle(self): - """Gets the fair_principle of this Metric. # noqa: E501 + def fair_principle(self) -> str: + """Gets the fair_principle of this Metric. - :return: The fair_principle of this Metric. # noqa: E501 + :return: The fair_principle of this Metric. :rtype: str """ return self._fair_principle @fair_principle.setter - def fair_principle(self, fair_principle): + def fair_principle(self, fair_principle: str): """Sets the fair_principle of this Metric. - :param fair_principle: The fair_principle of this Metric. # noqa: E501 - :type: str + :param fair_principle: The fair_principle of this Metric. + :type fair_principle: str """ self._fair_principle = fair_principle @property - def evaluation_mechanism(self): - """Gets the evaluation_mechanism of this Metric. # noqa: E501 + def evaluation_mechanism(self) -> str: + """Gets the evaluation_mechanism of this Metric. - :return: The evaluation_mechanism of this Metric. # noqa: E501 + :return: The evaluation_mechanism of this Metric. :rtype: str """ return self._evaluation_mechanism @evaluation_mechanism.setter - def evaluation_mechanism(self, evaluation_mechanism): + def evaluation_mechanism(self, evaluation_mechanism: str): """Sets the evaluation_mechanism of this Metric. - :param evaluation_mechanism: The evaluation_mechanism of this Metric. # noqa: E501 - :type: str + :param evaluation_mechanism: The evaluation_mechanism of this Metric. + :type evaluation_mechanism: str """ self._evaluation_mechanism = evaluation_mechanism @property - def date_created(self): - """Gets the date_created of this Metric. # noqa: E501 + def date_created(self) -> date: + """Gets the date_created of this Metric. - :return: The date_created of this Metric. # noqa: E501 + :return: The date_created of this Metric. :rtype: date """ return self._date_created @date_created.setter - def date_created(self, date_created): + def date_created(self, date_created: date): """Sets the date_created of this Metric. - :param date_created: The date_created of this Metric. # noqa: E501 - :type: date + :param date_created: The date_created of this Metric. + :type date_created: date """ self._date_created = date_created @property - def date_updated(self): - """Gets the date_updated of this Metric. # noqa: E501 + def date_updated(self) -> date: + """Gets the date_updated of this Metric. - :return: The date_updated of this Metric. # noqa: E501 + :return: The date_updated of this Metric. :rtype: date """ return self._date_updated @date_updated.setter - def date_updated(self, date_updated): + def date_updated(self, date_updated: date): """Sets the date_updated of this Metric. - :param date_updated: The date_updated of this Metric. # noqa: E501 - :type: date + :param date_updated: The date_updated of this Metric. + :type date_updated: date """ self._date_updated = date_updated @property - def created_by(self): - """Gets the created_by of this Metric. # noqa: E501 + def created_by(self) -> str: + """Gets the created_by of this Metric. - :return: The created_by of this Metric. # noqa: E501 + :return: The created_by of this Metric. :rtype: str """ return self._created_by @created_by.setter - def created_by(self, created_by): + def created_by(self, created_by: str): """Sets the created_by of this Metric. - :param created_by: The created_by of this Metric. # noqa: E501 - :type: str + :param created_by: The created_by of this Metric. + :type created_by: str """ self._created_by = created_by @property - def version(self): - """Gets the version of this Metric. # noqa: E501 + def version(self) -> float: + """Gets the version of this Metric. - :return: The version of this Metric. # noqa: E501 + :return: The version of this Metric. :rtype: float """ return self._version @version.setter - def version(self, version): + def version(self, version: float): """Sets the version of this Metric. - :param version: The version of this Metric. # noqa: E501 - :type: float + :param version: The version of this Metric. + :type version: float """ self._version = version @property - def total_score(self): - """Gets the total_score of this Metric. # noqa: E501 + def total_score(self) -> int: + """Gets the total_score of this Metric. - :return: The total_score of this Metric. # noqa: E501 + :return: The total_score of this Metric. :rtype: int """ return self._total_score @total_score.setter - def total_score(self, total_score): + def total_score(self, total_score: int): """Sets the total_score of this Metric. - :param total_score: The total_score of this Metric. # noqa: E501 - :type: int + :param total_score: The total_score of this Metric. + :type total_score: int """ self._total_score = total_score - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(Metric, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Metric): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/metrics.py b/fuji_server/models/metrics.py index 4dea6804..66c5c753 100644 --- a/fuji_server/models/metrics.py +++ b/fuji_server/models/metrics.py @@ -1,128 +1,77 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model +from fuji_server.models.metric import Metric - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class Metrics: +class Metrics(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"total": "int", "metrics": "list[Metric]"} + def __init__(self, total: int | None = None, metrics: list[Metric] | None = None): + """Metrics - a model defined in Swagger - attribute_map = {"total": "total", "metrics": "metrics"} + :param total: The total of this Metrics. # noqa: E501 + :type total: int + :param metrics: The metrics of this Metrics. # noqa: E501 + :type metrics: List[Metric] + """ + self.swagger_types = {"total": int, "metrics": list[Metric]} - def __init__(self, total=None, metrics=None): - """Metrics - a model defined in Swagger""" - self._total = None - self._metrics = None - self.discriminator = None - if total is not None: - self.total = total - if metrics is not None: - self.metrics = metrics + self.attribute_map = {"total": "total", "metrics": "metrics"} + self._total = total + self._metrics = metrics + + @classmethod + def from_dict(cls, dikt) -> "Metrics": + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Metrics of this Metrics. # noqa: E501 + :rtype: Metrics + """ + return util.deserialize_model(dikt, cls) @property - def total(self): - """Gets the total of this Metrics. # noqa: E501 + def total(self) -> int: + """Gets the total of this Metrics. - :return: The total of this Metrics. # noqa: E501 + :return: The total of this Metrics. :rtype: int """ return self._total @total.setter - def total(self, total): + def total(self, total: int): """Sets the total of this Metrics. - :param total: The total of this Metrics. # noqa: E501 - :type: int + :param total: The total of this Metrics. + :type total: int """ self._total = total @property - def metrics(self): - """Gets the metrics of this Metrics. # noqa: E501 + def metrics(self) -> list[Metric]: + """Gets the metrics of this Metrics. - :return: The metrics of this Metrics. # noqa: E501 - :rtype: list[Metric] + :return: The metrics of this Metrics. + :rtype: List[Metric] """ return self._metrics @metrics.setter - def metrics(self, metrics): + def metrics(self, metrics: list[Metric]): """Sets the metrics of this Metrics. - :param metrics: The metrics of this Metrics. # noqa: E501 - :type: list[Metric] + :param metrics: The metrics of this Metrics. + :type metrics: List[Metric] """ self._metrics = metrics - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(Metrics, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Metrics): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/output_core_metadata_found.py b/fuji_server/models/output_core_metadata_found.py index 44a205b8..b674073c 100644 --- a/fuji_server/models/output_core_metadata_found.py +++ b/fuji_server/models/output_core_metadata_found.py @@ -1,85 +1,26 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class OutputCoreMetadataFound(dict): +class OutputCoreMetadataFound(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {} - if hasattr(dict, "swagger_types"): - swagger_types.update(dict.swagger_types) - - attribute_map = {} - if hasattr(dict, "attribute_map"): - attribute_map.update(dict.attribute_map) - - def __init__(self, *args, **kwargs): + def __init__(self): """OutputCoreMetadataFound - a model defined in Swagger""" - self.discriminator = None - dict.__init__(self, *args, **kwargs) - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(OutputCoreMetadataFound, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() + self.swagger_types = {} - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OutputCoreMetadataFound): - return False + self.attribute_map = {} - return self.__dict__ == other.__dict__ + @classmethod + def from_dict(cls, dikt) -> "OutputCoreMetadataFound": + """Returns the dict as a model - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other + :param dikt: A dict. + :type: dict + :return: The output_core_metadata_found of this OutputCoreMetadataFound. # noqa: E501 + :rtype: OutputCoreMetadataFound + """ + return util.deserialize_model(dikt, cls) diff --git a/fuji_server/models/output_search_mechanisms.py b/fuji_server/models/output_search_mechanisms.py index 81fe1506..d130a4f3 100644 --- a/fuji_server/models/output_search_mechanisms.py +++ b/fuji_server/models/output_search_mechanisms.py @@ -1,63 +1,55 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class OutputSearchMechanisms: +class OutputSearchMechanisms(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"mechanism": "str", "mechanism_info": "list[str]"} + def __init__(self, mechanism: str | None = None, mechanism_info: list[str] | None = None): + """OutputSearchMechanisms - a model defined in Swagger - attribute_map = {"mechanism": "mechanism", "mechanism_info": "mechanism_info"} + :param mechanism: The mechanism of this OutputSearchMechanisms. # noqa: E501 + :type mechanism: str + :param mechanism_info: The mechanism_info of this OutputSearchMechanisms. # noqa: E501 + :type mechanism_info: List[str] + """ + self.swagger_types = {"mechanism": str, "mechanism_info": list[str]} - def __init__(self, mechanism=None, mechanism_info=None): - """OutputSearchMechanisms - a model defined in Swagger""" - self._mechanism = None - self._mechanism_info = None - self.discriminator = None - if mechanism is not None: - self.mechanism = mechanism - if mechanism_info is not None: - self.mechanism_info = mechanism_info + self.attribute_map = {"mechanism": "mechanism", "mechanism_info": "mechanism_info"} + self._mechanism = mechanism + self._mechanism_info = mechanism_info + + @classmethod + def from_dict(cls, dikt) -> "OutputSearchMechanisms": + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The output_search_mechanisms of this OutputSearchMechanisms. # noqa: E501 + :rtype: OutputSearchMechanisms + """ + return util.deserialize_model(dikt, cls) @property - def mechanism(self): - """Gets the mechanism of this OutputSearchMechanisms. # noqa: E501 + def mechanism(self) -> str: + """Gets the mechanism of this OutputSearchMechanisms. - :return: The mechanism of this OutputSearchMechanisms. # noqa: E501 + :return: The mechanism of this OutputSearchMechanisms. :rtype: str """ return self._mechanism @mechanism.setter - def mechanism(self, mechanism): + def mechanism(self, mechanism: str): """Sets the mechanism of this OutputSearchMechanisms. - :param mechanism: The mechanism of this OutputSearchMechanisms. # noqa: E501 - :type: str + :param mechanism: The mechanism of this OutputSearchMechanisms. + :type mechanism: str """ allowed_values = ["metadata registry", "structured data"] if mechanism not in allowed_values: @@ -66,66 +58,22 @@ def mechanism(self, mechanism): self._mechanism = mechanism @property - def mechanism_info(self): - """Gets the mechanism_info of this OutputSearchMechanisms. # noqa: E501 + def mechanism_info(self) -> list[str]: + """Gets the mechanism_info of this OutputSearchMechanisms. - :return: The mechanism_info of this OutputSearchMechanisms. # noqa: E501 - :rtype: list[str] + :return: The mechanism_info of this OutputSearchMechanisms. + :rtype: List[str] """ return self._mechanism_info @mechanism_info.setter - def mechanism_info(self, mechanism_info): + def mechanism_info(self, mechanism_info: list[str]): """Sets the mechanism_info of this OutputSearchMechanisms. - :param mechanism_info: The mechanism_info of this OutputSearchMechanisms. # noqa: E501 - :type: list[str] + :param mechanism_info: The mechanism_info of this OutputSearchMechanisms. + :type mechanism_info: List[str] """ self._mechanism_info = mechanism_info - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(OutputSearchMechanisms, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, OutputSearchMechanisms): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/persistence.py b/fuji_server/models/persistence.py index 62188563..648bc336 100644 --- a/fuji_server/models/persistence.py +++ b/fuji_server/models/persistence.py @@ -1,135 +1,291 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium +from fuji_server.models.persistence_output import PersistenceOutput - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" +class Persistence(Model): + """NOTE: This class is auto generated by the swagger code generator program. -import pprint -import re # noqa: F401 + Do not edit the class manually. + """ -import six + def __init__( + self, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, + test_status: str = "fail", + score: FAIRResultCommonScore = None, + maturity: str = "incomplete", + output: PersistenceOutput = None, + test_debug: Debug = None, + ): + """Persistence - a model defined in Swagger + + :param id: The id of this Persistence. # noqa: E501 + :type id: int + :param metric_identifier: The metric_identifier of this Persistence. # noqa: E501 + :type metric_identifier: str + :param metric_name: The metric_name of this Persistence. # noqa: E501 + :type metric_name: str + :param metric_tests: The metric_tests of this Persistence. # noqa: E501 + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + :param test_status: The test_status of this Persistence. # noqa: E501 + :type test_status: str + :param score: The score of this Persistence. # noqa: E501 + :type score: FAIRResultCommonScore + :param maturity: The maturity of this Persistence. # noqa: E501 + :type maturity: str + :param output: The output of this Persistence. # noqa: E501 + :type output: PersistenceOutput + :param test_debug: The test_debug of this Persistence. # noqa: E501 + :type test_debug: Debug + """ + self.swagger_types = { + "id": int, + "metric_identifier": str, + "metric_name": str, + "metric_tests": dict[str, FAIRResultEvaluationCriterium], + "test_status": str, + "score": FAIRResultCommonScore, + "maturity": str, + "output": PersistenceOutput, + "test_debug": Debug, + } + + self.attribute_map = { + "id": "id", + "metric_identifier": "metric_identifier", + "metric_name": "metric_name", + "metric_tests": "metric_tests", + "test_status": "test_status", + "score": "score", + "maturity": "maturity", + "output": "output", + "test_debug": "test_debug", + } + self._id = id + self._metric_identifier = metric_identifier + self._metric_name = metric_name + self._metric_tests = metric_tests + self._test_status = test_status + self._score = score + self._maturity = maturity + self._output = output + self._test_debug = test_debug -from swagger_client.models.fair_result_common import FAIRResultCommon + @classmethod + def from_dict(cls, dikt) -> "Persistence": + """Returns the dict as a model + :param dikt: A dict. + :type: dict + :return: The Persistence of this Persistence. # noqa: E501 + :rtype: Persistence + """ + return util.deserialize_model(dikt, cls) -class Persistence(FAIRResultCommon): - """NOTE: This class is auto generated by the swagger code generator program. + @property + def id(self) -> int: + """Gets the id of this Persistence. - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"output": "PersistenceOutput", "test_debug": "Debug"} - if hasattr(FAIRResultCommon, "swagger_types"): - swagger_types.update(FAIRResultCommon.swagger_types) - - attribute_map = {"output": "output", "test_debug": "test_debug"} - if hasattr(FAIRResultCommon, "attribute_map"): - attribute_map.update(FAIRResultCommon.attribute_map) - - def __init__(self, output=None, test_debug=None, *args, **kwargs): - """Persistence - a model defined in Swagger""" - self._output = None - self._test_debug = None - self.discriminator = None - if output is not None: - self.output = output - if test_debug is not None: - self.test_debug = test_debug - FAIRResultCommon.__init__(self, *args, **kwargs) + :return: The id of this Persistence. + :rtype: int + """ + return self._id + + @id.setter + def id(self, id: int): + """Sets the id of this Persistence. + + + :param id: The id of this Persistence. + :type id: int + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") + + self._id = id + + @property + def metric_identifier(self) -> str: + """Gets the metric_identifier of this Persistence. + + + :return: The metric_identifier of this Persistence. + :rtype: str + """ + return self._metric_identifier + + @metric_identifier.setter + def metric_identifier(self, metric_identifier: str): + """Sets the metric_identifier of this Persistence. + + + :param metric_identifier: The metric_identifier of this Persistence. + :type metric_identifier: str + """ + if metric_identifier is None: + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") + + self._metric_identifier = metric_identifier + + @property + def metric_name(self) -> str: + """Gets the metric_name of this Persistence. + + + :return: The metric_name of this Persistence. + :rtype: str + """ + return self._metric_name + + @metric_name.setter + def metric_name(self, metric_name: str): + """Sets the metric_name of this Persistence. + + + :param metric_name: The metric_name of this Persistence. + :type metric_name: str + """ + if metric_name is None: + raise ValueError("Invalid value for `metric_name`, must not be `None`") + + self._metric_name = metric_name + + @property + def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: + """Gets the metric_tests of this Persistence. + + + :return: The metric_tests of this Persistence. + :rtype: Dict[str, FAIRResultEvaluationCriterium] + """ + return self._metric_tests + + @metric_tests.setter + def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): + """Sets the metric_tests of this Persistence. + + + :param metric_tests: The metric_tests of this Persistence. + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + """ + + self._metric_tests = metric_tests + + @property + def test_status(self) -> str: + """Gets the test_status of this Persistence. + + + :return: The test_status of this Persistence. + :rtype: str + """ + return self._test_status + + @test_status.setter + def test_status(self, test_status: str): + """Sets the test_status of this Persistence. + + + :param test_status: The test_status of this Persistence. + :type test_status: str + """ + allowed_values = ["pass", "fail", "indeterminate"] + if test_status not in allowed_values: + raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") + + self._test_status = test_status + + @property + def score(self) -> FAIRResultCommonScore: + """Gets the score of this Persistence. + + + :return: The score of this Persistence. + :rtype: FAIRResultCommonScore + """ + return self._score + + @score.setter + def score(self, score: FAIRResultCommonScore): + """Sets the score of this Persistence. + + + :param score: The score of this Persistence. + :type score: FAIRResultCommonScore + """ + if score is None: + raise ValueError("Invalid value for `score`, must not be `None`") + + self._score = score @property - def output(self): - """Gets the output of this Persistence. # noqa: E501 + def maturity(self) -> str: + """Gets the maturity of this Persistence. + + + :return: The maturity of this Persistence. + :rtype: str + """ + return self._maturity + @maturity.setter + def maturity(self, maturity: int): + """Sets the maturity of this Uniqueness. - :return: The output of this Persistence. # noqa: E501 + + :param maturity: The maturity of this Uniqueness. + :type maturity: int + """ + + self._maturity = maturity + + @property + def output(self) -> PersistenceOutput: + """Gets the output of this Persistence. + + + :return: The output of this Persistence. :rtype: PersistenceOutput """ return self._output @output.setter - def output(self, output): + def output(self, output: PersistenceOutput): """Sets the output of this Persistence. - :param output: The output of this Persistence. # noqa: E501 - :type: PersistenceOutput + :param output: The output of this Persistence. + :type output: PersistenceOutput """ self._output = output @property - def test_debug(self): - """Gets the test_debug of this Persistence. # noqa: E501 + def test_debug(self) -> Debug: + """Gets the test_debug of this Persistence. - :return: The test_debug of this Persistence. # noqa: E501 + :return: The test_debug of this Persistence. :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug): + def test_debug(self, test_debug: Debug): """Sets the test_debug of this Persistence. - :param test_debug: The test_debug of this Persistence. # noqa: E501 - :type: Debug + :param test_debug: The test_debug of this Persistence. + :type test_debug: Debug """ self._test_debug = test_debug - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(Persistence, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Persistence): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/persistence_output.py b/fuji_server/models/persistence_output.py index fbd2c781..125eb386 100644 --- a/fuji_server/models/persistence_output.py +++ b/fuji_server/models/persistence_output.py @@ -1,104 +1,53 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model +from fuji_server.models.persistence_output_inner import PersistenceOutputInner - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class PersistenceOutput: +class PersistenceOutput(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"persistent_identifiers": "list[PersistenceOutputInner]"} + def __init__(self, persistent_identifiers: list[PersistenceOutputInner] | None = None): + """PersistenceOutput - a model defined in Swagger - attribute_map = {"persistent_identifiers": "persistent_identifiers"} + :param persistent_identifiers: The persistent_identifiers of this PersistenceOutput. # noqa: E501 + :type persistent_identifiers: List[PersistenceOutputInner] + """ + self.swagger_types = {"persistent_identifiers": list[PersistenceOutputInner]} - def __init__(self, persistent_identifiers=None): - """PersistenceOutput - a model defined in Swagger""" - self._persistent_identifiers = None - self.discriminator = None - if persistent_identifiers is not None: - self.persistent_identifiers = persistent_identifiers + self.attribute_map = {"persistent_identifiers": "persistent_identifiers"} + self._persistent_identifiers = persistent_identifiers + + @classmethod + def from_dict(cls, dikt) -> "PersistenceOutput": + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Persistence_output of this PersistenceOutput. # noqa: E501 + :rtype: PersistenceOutput + """ + return util.deserialize_model(dikt, cls) @property - def persistent_identifiers(self): - """Gets the persistent_identifiers of this PersistenceOutput. # noqa: E501 + def persistent_identifiers(self) -> list[PersistenceOutputInner]: + """Gets the persistent_identifiers of this PersistenceOutput. - :return: The persistent_identifiers of this PersistenceOutput. # noqa: E501 - :rtype: list[PersistenceOutputInner] + :return: The persistent_identifiers of this PersistenceOutput. + :rtype: List[PersistenceOutputInner] """ return self._persistent_identifiers @persistent_identifiers.setter - def persistent_identifiers(self, persistent_identifiers): + def persistent_identifiers(self, persistent_identifiers: list[PersistenceOutputInner]): """Sets the persistent_identifiers of this PersistenceOutput. - :param persistent_identifiers: The persistent_identifiers of this PersistenceOutput. # noqa: E501 - :type: list[PersistenceOutputInner] + :param persistent_identifiers: The persistent_identifiers of this PersistenceOutput. + :type persistent_identifiers: List[PersistenceOutputInner] """ self._persistent_identifiers = persistent_identifiers - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(PersistenceOutput, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PersistenceOutput): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/persistence_output_inner.py b/fuji_server/models/persistence_output_inner.py index 0d845bb4..e6132557 100644 --- a/fuji_server/models/persistence_output_inner.py +++ b/fuji_server/models/persistence_output_inner.py @@ -1,181 +1,135 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class PersistenceOutputInner: +class PersistenceOutputInner(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"pid": "str", "pid_scheme": "str", "resolvable_status": "bool", "resolved_url": "str"} - - attribute_map = { - "pid": "pid", - "pid_scheme": "pid_scheme", - "resolvable_status": "resolvable_status", - "resolved_url": "resolved_url", - } - - def __init__(self, pid=None, pid_scheme=None, resolvable_status=False, resolved_url=None): - """PersistenceOutputInner - a model defined in Swagger""" - self._pid = None - self._pid_scheme = None - self._resolvable_status = None - self._resolved_url = None - self.discriminator = None - if pid is not None: - self.pid = pid - if pid_scheme is not None: - self.pid_scheme = pid_scheme - if resolvable_status is not None: - self.resolvable_status = resolvable_status - if resolved_url is not None: - self.resolved_url = resolved_url + def __init__( + self, + pid: str | None = None, + pid_scheme: str | None = None, + resolvable_status: bool = False, + resolved_url: str | None = None, + ): + """PersistenceOutputInner - a model defined in Swagger + + :param pid: The pid of this PersistenceOutputInner. # noqa: E501 + :type pid: str + :param pid_scheme: The pid_scheme of this PersistenceOutputInner. # noqa: E501 + :type pid_scheme: str + :param resolvable_status: The resolvable_status of this PersistenceOutputInner. # noqa: E501 + :type resolvable_status: bool + :param resolved_url: The resolved_url of this PersistenceOutputInner. # noqa: E501 + :type resolved_url: str + """ + self.swagger_types = {"pid": str, "pid_scheme": str, "resolvable_status": bool, "resolved_url": str} + + self.attribute_map = { + "pid": "pid", + "pid_scheme": "pid_scheme", + "resolvable_status": "resolvable_status", + "resolved_url": "resolved_url", + } + self._pid = pid + self._pid_scheme = pid_scheme + self._resolvable_status = resolvable_status + self._resolved_url = resolved_url + + @classmethod + def from_dict(cls, dikt) -> "PersistenceOutputInner": + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Persistence_output_inner of this PersistenceOutputInner. # noqa: E501 + :rtype: PersistenceOutputInner + """ + return util.deserialize_model(dikt, cls) @property - def pid(self): - """Gets the pid of this PersistenceOutputInner. # noqa: E501 + def pid(self) -> str: + """Gets the pid of this PersistenceOutputInner. - :return: The pid of this PersistenceOutputInner. # noqa: E501 + :return: The pid of this PersistenceOutputInner. :rtype: str """ return self._pid @pid.setter - def pid(self, pid): + def pid(self, pid: str): """Sets the pid of this PersistenceOutputInner. - :param pid: The pid of this PersistenceOutputInner. # noqa: E501 - :type: str + :param pid: The pid of this PersistenceOutputInner. + :type pid: str """ self._pid = pid @property - def pid_scheme(self): - """Gets the pid_scheme of this PersistenceOutputInner. # noqa: E501 + def pid_scheme(self) -> str: + """Gets the pid_scheme of this PersistenceOutputInner. - :return: The pid_scheme of this PersistenceOutputInner. # noqa: E501 + :return: The pid_scheme of this PersistenceOutputInner. :rtype: str """ return self._pid_scheme @pid_scheme.setter - def pid_scheme(self, pid_scheme): + def pid_scheme(self, pid_scheme: str): """Sets the pid_scheme of this PersistenceOutputInner. - :param pid_scheme: The pid_scheme of this PersistenceOutputInner. # noqa: E501 - :type: str + :param pid_scheme: The pid_scheme of this PersistenceOutputInner. + :type pid_scheme: str """ self._pid_scheme = pid_scheme @property - def resolvable_status(self): - """Gets the resolvable_status of this PersistenceOutputInner. # noqa: E501 + def resolvable_status(self) -> bool: + """Gets the resolvable_status of this PersistenceOutputInner. - :return: The resolvable_status of this PersistenceOutputInner. # noqa: E501 + :return: The resolvable_status of this PersistenceOutputInner. :rtype: bool """ return self._resolvable_status @resolvable_status.setter - def resolvable_status(self, resolvable_status): + def resolvable_status(self, resolvable_status: bool): """Sets the resolvable_status of this PersistenceOutputInner. - :param resolvable_status: The resolvable_status of this PersistenceOutputInner. # noqa: E501 - :type: bool + :param resolvable_status: The resolvable_status of this PersistenceOutputInner. + :type resolvable_status: bool """ self._resolvable_status = resolvable_status @property - def resolved_url(self): - """Gets the resolved_url of this PersistenceOutputInner. # noqa: E501 + def resolved_url(self) -> str: + """Gets the resolved_url of this PersistenceOutputInner. - :return: The resolved_url of this PersistenceOutputInner. # noqa: E501 + :return: The resolved_url of this PersistenceOutputInner. :rtype: str """ return self._resolved_url @resolved_url.setter - def resolved_url(self, resolved_url): + def resolved_url(self, resolved_url: str): """Sets the resolved_url of this PersistenceOutputInner. - :param resolved_url: The resolved_url of this PersistenceOutputInner. # noqa: E501 - :type: str + :param resolved_url: The resolved_url of this PersistenceOutputInner. + :type resolved_url: str """ self._resolved_url = resolved_url - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(PersistenceOutputInner, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, PersistenceOutputInner): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/related_resource.py b/fuji_server/models/related_resource.py index 6f9036b8..df927133 100644 --- a/fuji_server/models/related_resource.py +++ b/fuji_server/models/related_resource.py @@ -1,135 +1,291 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium +from fuji_server.models.related_resource_output import RelatedResourceOutput - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" +class RelatedResource(Model): + """NOTE: This class is auto generated by the swagger code generator program. -import pprint -import re # noqa: F401 + Do not edit the class manually. + """ -import six + def __init__( + self, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, + test_status: str = "fail", + score: FAIRResultCommonScore = None, + maturity: str = "incomplete", + output: RelatedResourceOutput = None, + test_debug: Debug = None, + ): + """RelatedResource - a model defined in Swagger + + :param id: The id of this RelatedResource. # noqa: E501 + :type id: int + :param metric_identifier: The metric_identifier of this RelatedResource. # noqa: E501 + :type metric_identifier: str + :param metric_name: The metric_name of this RelatedResource. # noqa: E501 + :type metric_name: str + :param metric_tests: The metric_tests of this RelatedResource. # noqa: E501 + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + :param test_status: The test_status of this RelatedResource. # noqa: E501 + :type test_status: str + :param score: The score of this RelatedResource. # noqa: E501 + :type score: FAIRResultCommonScore + :param maturity: The maturity of this RelatedResource. # noqa: E501 + :type maturity: str + :param output: The output of this RelatedResource. # noqa: E501 + :type output: RelatedResourceOutput + :param test_debug: The test_debug of this RelatedResource. # noqa: E501 + :type test_debug: Debug + """ + self.swagger_types = { + "id": int, + "metric_identifier": str, + "metric_name": str, + "metric_tests": dict[str, FAIRResultEvaluationCriterium], + "test_status": str, + "score": FAIRResultCommonScore, + "maturity": str, + "output": RelatedResourceOutput, + "test_debug": Debug, + } + + self.attribute_map = { + "id": "id", + "metric_identifier": "metric_identifier", + "metric_name": "metric_name", + "metric_tests": "metric_tests", + "test_status": "test_status", + "score": "score", + "maturity": "maturity", + "output": "output", + "test_debug": "test_debug", + } + self._id = id + self._metric_identifier = metric_identifier + self._metric_name = metric_name + self._metric_tests = metric_tests + self._test_status = test_status + self._score = score + self._maturity = maturity + self._output = output + self._test_debug = test_debug -from swagger_client.models.fair_result_common import FAIRResultCommon + @classmethod + def from_dict(cls, dikt) -> "RelatedResource": + """Returns the dict as a model + :param dikt: A dict. + :type: dict + :return: The RelatedResource of this RelatedResource. # noqa: E501 + :rtype: RelatedResource + """ + return util.deserialize_model(dikt, cls) -class RelatedResource(FAIRResultCommon): - """NOTE: This class is auto generated by the swagger code generator program. + @property + def id(self) -> int: + """Gets the id of this RelatedResource. - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"output": "RelatedResourceOutput", "test_debug": "Debug"} - if hasattr(FAIRResultCommon, "swagger_types"): - swagger_types.update(FAIRResultCommon.swagger_types) - - attribute_map = {"output": "output", "test_debug": "test_debug"} - if hasattr(FAIRResultCommon, "attribute_map"): - attribute_map.update(FAIRResultCommon.attribute_map) - - def __init__(self, output=None, test_debug=None, *args, **kwargs): - """RelatedResource - a model defined in Swagger""" - self._output = None - self._test_debug = None - self.discriminator = None - if output is not None: - self.output = output - if test_debug is not None: - self.test_debug = test_debug - FAIRResultCommon.__init__(self, *args, **kwargs) + :return: The id of this RelatedResource. + :rtype: int + """ + return self._id + + @id.setter + def id(self, id: int): + """Sets the id of this RelatedResource. + + + :param id: The id of this RelatedResource. + :type id: int + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") + + self._id = id + + @property + def metric_identifier(self) -> str: + """Gets the metric_identifier of this RelatedResource. + + + :return: The metric_identifier of this RelatedResource. + :rtype: str + """ + return self._metric_identifier + + @metric_identifier.setter + def metric_identifier(self, metric_identifier: str): + """Sets the metric_identifier of this RelatedResource. + + + :param metric_identifier: The metric_identifier of this RelatedResource. + :type metric_identifier: str + """ + if metric_identifier is None: + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") + + self._metric_identifier = metric_identifier + + @property + def metric_name(self) -> str: + """Gets the metric_name of this RelatedResource. + + + :return: The metric_name of this RelatedResource. + :rtype: str + """ + return self._metric_name + + @metric_name.setter + def metric_name(self, metric_name: str): + """Sets the metric_name of this RelatedResource. + + + :param metric_name: The metric_name of this RelatedResource. + :type metric_name: str + """ + if metric_name is None: + raise ValueError("Invalid value for `metric_name`, must not be `None`") + + self._metric_name = metric_name + + @property + def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: + """Gets the metric_tests of this RelatedResource. + + + :return: The metric_tests of this RelatedResource. + :rtype: Dict[str, FAIRResultEvaluationCriterium] + """ + return self._metric_tests + + @metric_tests.setter + def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): + """Sets the metric_tests of this RelatedResource. + + + :param metric_tests: The metric_tests of this RelatedResource. + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + """ + + self._metric_tests = metric_tests + + @property + def test_status(self) -> str: + """Gets the test_status of this RelatedResource. + + + :return: The test_status of this RelatedResource. + :rtype: str + """ + return self._test_status + + @test_status.setter + def test_status(self, test_status: str): + """Sets the test_status of this RelatedResource. + + + :param test_status: The test_status of this RelatedResource. + :type test_status: str + """ + allowed_values = ["pass", "fail", "indeterminate"] + if test_status not in allowed_values: + raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") + + self._test_status = test_status + + @property + def score(self) -> FAIRResultCommonScore: + """Gets the score of this RelatedResource. + + + :return: The score of this RelatedResource. + :rtype: FAIRResultCommonScore + """ + return self._score + + @score.setter + def score(self, score: FAIRResultCommonScore): + """Sets the score of this RelatedResource. + + + :param score: The score of this RelatedResource. + :type score: FAIRResultCommonScore + """ + if score is None: + raise ValueError("Invalid value for `score`, must not be `None`") + + self._score = score @property - def output(self): - """Gets the output of this RelatedResource. # noqa: E501 + def maturity(self) -> str: + """Gets the maturity of this RelatedResource. + + + :return: The maturity of this RelatedResource. + :rtype: str + """ + return self._maturity + @maturity.setter + def maturity(self, maturity: int): + """Sets the maturity of this Uniqueness. - :return: The output of this RelatedResource. # noqa: E501 + + :param maturity: The maturity of this Uniqueness. + :type maturity: int + """ + + self._maturity = maturity + + @property + def output(self) -> RelatedResourceOutput: + """Gets the output of this RelatedResource. + + + :return: The output of this RelatedResource. :rtype: RelatedResourceOutput """ return self._output @output.setter - def output(self, output): + def output(self, output: RelatedResourceOutput): """Sets the output of this RelatedResource. - :param output: The output of this RelatedResource. # noqa: E501 - :type: RelatedResourceOutput + :param output: The output of this RelatedResource. + :type output: RelatedResourceOutput """ self._output = output @property - def test_debug(self): - """Gets the test_debug of this RelatedResource. # noqa: E501 + def test_debug(self) -> Debug: + """Gets the test_debug of this RelatedResource. - :return: The test_debug of this RelatedResource. # noqa: E501 + :return: The test_debug of this RelatedResource. :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug): + def test_debug(self, test_debug: Debug): """Sets the test_debug of this RelatedResource. - :param test_debug: The test_debug of this RelatedResource. # noqa: E501 - :type: Debug + :param test_debug: The test_debug of this RelatedResource. + :type test_debug: Debug """ self._test_debug = test_debug - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(RelatedResource, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RelatedResource): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/related_resource_output.py b/fuji_server/models/related_resource_output.py index 3861781b..d24d4a61 100644 --- a/fuji_server/models/related_resource_output.py +++ b/fuji_server/models/related_resource_output.py @@ -1,80 +1,27 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model +from fuji_server.models.related_resource_output_inner import RelatedResourceOutputInner # noqa: F401 - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class RelatedResourceOutput: +class RelatedResourceOutput(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {} - - attribute_map = {} - def __init__(self): """RelatedResourceOutput - a model defined in Swagger""" - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(RelatedResourceOutput, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() + self.swagger_types = {} - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RelatedResourceOutput): - return False + self.attribute_map = {} - return self.__dict__ == other.__dict__ + @classmethod + def from_dict(cls, dikt) -> "RelatedResourceOutput": + """Returns the dict as a model - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other + :param dikt: A dict. + :type: dict + :return: The RelatedResource_output of this RelatedResourceOutput. # noqa: E501 + :rtype: RelatedResourceOutput + """ + return util.deserialize_model(dikt, cls) diff --git a/fuji_server/models/related_resource_output_inner.py b/fuji_server/models/related_resource_output_inner.py index 05743e74..3a869488 100644 --- a/fuji_server/models/related_resource_output_inner.py +++ b/fuji_server/models/related_resource_output_inner.py @@ -1,128 +1,76 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class RelatedResourceOutputInner: +class RelatedResourceOutputInner(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"related_resource": "str", "relation_type": "str"} + def __init__(self, related_resource: str | None = None, relation_type: str | None = None): + """RelatedResourceOutputInner - a model defined in Swagger - attribute_map = {"related_resource": "related_resource", "relation_type": "relation_type"} + :param related_resource: The related_resource of this RelatedResourceOutputInner. # noqa: E501 + :type related_resource: str + :param relation_type: The relation_type of this RelatedResourceOutputInner. # noqa: E501 + :type relation_type: str + """ + self.swagger_types = {"related_resource": str, "relation_type": str} - def __init__(self, related_resource=None, relation_type=None): - """RelatedResourceOutputInner - a model defined in Swagger""" - self._related_resource = None - self._relation_type = None - self.discriminator = None - if related_resource is not None: - self.related_resource = related_resource - if relation_type is not None: - self.relation_type = relation_type + self.attribute_map = {"related_resource": "related_resource", "relation_type": "relation_type"} + self._related_resource = related_resource + self._relation_type = relation_type + + @classmethod + def from_dict(cls, dikt) -> "RelatedResourceOutputInner": + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The RelatedResource_output_inner of this RelatedResourceOutputInner. # noqa: E501 + :rtype: RelatedResourceOutputInner + """ + return util.deserialize_model(dikt, cls) @property - def related_resource(self): - """Gets the related_resource of this RelatedResourceOutputInner. # noqa: E501 + def related_resource(self) -> str: + """Gets the related_resource of this RelatedResourceOutputInner. - :return: The related_resource of this RelatedResourceOutputInner. # noqa: E501 + :return: The related_resource of this RelatedResourceOutputInner. :rtype: str """ return self._related_resource @related_resource.setter - def related_resource(self, related_resource): + def related_resource(self, related_resource: str): """Sets the related_resource of this RelatedResourceOutputInner. - :param related_resource: The related_resource of this RelatedResourceOutputInner. # noqa: E501 - :type: str + :param related_resource: The related_resource of this RelatedResourceOutputInner. + :type related_resource: str """ self._related_resource = related_resource @property - def relation_type(self): - """Gets the relation_type of this RelatedResourceOutputInner. # noqa: E501 + def relation_type(self) -> str: + """Gets the relation_type of this RelatedResourceOutputInner. - :return: The relation_type of this RelatedResourceOutputInner. # noqa: E501 + :return: The relation_type of this RelatedResourceOutputInner. :rtype: str """ return self._relation_type @relation_type.setter - def relation_type(self, relation_type): + def relation_type(self, relation_type: str): """Sets the relation_type of this RelatedResourceOutputInner. - :param relation_type: The relation_type of this RelatedResourceOutputInner. # noqa: E501 - :type: str + :param relation_type: The relation_type of this RelatedResourceOutputInner. + :type relation_type: str """ self._relation_type = relation_type - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(RelatedResourceOutputInner, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RelatedResourceOutputInner): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/searchable.py b/fuji_server/models/searchable.py index cfbafead..7d6b9453 100644 --- a/fuji_server/models/searchable.py +++ b/fuji_server/models/searchable.py @@ -1,135 +1,291 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium +from fuji_server.models.searchable_output import SearchableOutput - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" +class Searchable(Model): + """NOTE: This class is auto generated by the swagger code generator program. -import pprint -import re # noqa: F401 + Do not edit the class manually. + """ -import six + def __init__( + self, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, + test_status: str = "fail", + score: FAIRResultCommonScore = None, + maturity: str = "incomplete", + output: SearchableOutput = None, + test_debug: Debug = None, + ): + """Searchable - a model defined in Swagger + + :param id: The id of this Searchable. # noqa: E501 + :type id: int + :param metric_identifier: The metric_identifier of this Searchable. # noqa: E501 + :type metric_identifier: str + :param metric_name: The metric_name of this Searchable. # noqa: E501 + :type metric_name: str + :param metric_tests: The metric_tests of this Searchable. # noqa: E501 + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + :param test_status: The test_status of this Searchable. # noqa: E501 + :type test_status: str + :param score: The score of this Searchable. # noqa: E501 + :type score: FAIRResultCommonScore + :param maturity: The maturity of this Searchable. # noqa: E501 + :type maturity: str + :param output: The output of this Searchable. # noqa: E501 + :type output: SearchableOutput + :param test_debug: The test_debug of this Searchable. # noqa: E501 + :type test_debug: Debug + """ + self.swagger_types = { + "id": int, + "metric_identifier": str, + "metric_name": str, + "metric_tests": dict[str, FAIRResultEvaluationCriterium], + "test_status": str, + "score": FAIRResultCommonScore, + "maturity": str, + "output": SearchableOutput, + "test_debug": Debug, + } + + self.attribute_map = { + "id": "id", + "metric_identifier": "metric_identifier", + "metric_name": "metric_name", + "metric_tests": "metric_tests", + "test_status": "test_status", + "score": "score", + "maturity": "maturity", + "output": "output", + "test_debug": "test_debug", + } + self._id = id + self._metric_identifier = metric_identifier + self._metric_name = metric_name + self._metric_tests = metric_tests + self._test_status = test_status + self._score = score + self._maturity = maturity + self._output = output + self._test_debug = test_debug -from swagger_client.models.fair_result_common import FAIRResultCommon + @classmethod + def from_dict(cls, dikt) -> "Searchable": + """Returns the dict as a model + :param dikt: A dict. + :type: dict + :return: The Searchable of this Searchable. # noqa: E501 + :rtype: Searchable + """ + return util.deserialize_model(dikt, cls) -class Searchable(FAIRResultCommon): - """NOTE: This class is auto generated by the swagger code generator program. + @property + def id(self) -> int: + """Gets the id of this Searchable. - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"output": "SearchableOutput", "test_debug": "Debug"} - if hasattr(FAIRResultCommon, "swagger_types"): - swagger_types.update(FAIRResultCommon.swagger_types) - - attribute_map = {"output": "output", "test_debug": "test_debug"} - if hasattr(FAIRResultCommon, "attribute_map"): - attribute_map.update(FAIRResultCommon.attribute_map) - - def __init__(self, output=None, test_debug=None, *args, **kwargs): - """Searchable - a model defined in Swagger""" - self._output = None - self._test_debug = None - self.discriminator = None - if output is not None: - self.output = output - if test_debug is not None: - self.test_debug = test_debug - FAIRResultCommon.__init__(self, *args, **kwargs) + :return: The id of this Searchable. + :rtype: int + """ + return self._id + + @id.setter + def id(self, id: int): + """Sets the id of this Searchable. + + + :param id: The id of this Searchable. + :type id: int + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") + + self._id = id + + @property + def metric_identifier(self) -> str: + """Gets the metric_identifier of this Searchable. + + + :return: The metric_identifier of this Searchable. + :rtype: str + """ + return self._metric_identifier + + @metric_identifier.setter + def metric_identifier(self, metric_identifier: str): + """Sets the metric_identifier of this Searchable. + + + :param metric_identifier: The metric_identifier of this Searchable. + :type metric_identifier: str + """ + if metric_identifier is None: + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") + + self._metric_identifier = metric_identifier + + @property + def metric_name(self) -> str: + """Gets the metric_name of this Searchable. + + + :return: The metric_name of this Searchable. + :rtype: str + """ + return self._metric_name + + @metric_name.setter + def metric_name(self, metric_name: str): + """Sets the metric_name of this Searchable. + + + :param metric_name: The metric_name of this Searchable. + :type metric_name: str + """ + if metric_name is None: + raise ValueError("Invalid value for `metric_name`, must not be `None`") + + self._metric_name = metric_name + + @property + def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: + """Gets the metric_tests of this Searchable. + + + :return: The metric_tests of this Searchable. + :rtype: Dict[str, FAIRResultEvaluationCriterium] + """ + return self._metric_tests + + @metric_tests.setter + def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): + """Sets the metric_tests of this Searchable. + + + :param metric_tests: The metric_tests of this Searchable. + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + """ + + self._metric_tests = metric_tests + + @property + def test_status(self) -> str: + """Gets the test_status of this Searchable. + + + :return: The test_status of this Searchable. + :rtype: str + """ + return self._test_status + + @test_status.setter + def test_status(self, test_status: str): + """Sets the test_status of this Searchable. + + + :param test_status: The test_status of this Searchable. + :type test_status: str + """ + allowed_values = ["pass", "fail", "indeterminate"] + if test_status not in allowed_values: + raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") + + self._test_status = test_status + + @property + def score(self) -> FAIRResultCommonScore: + """Gets the score of this Searchable. + + + :return: The score of this Searchable. + :rtype: FAIRResultCommonScore + """ + return self._score + + @score.setter + def score(self, score: FAIRResultCommonScore): + """Sets the score of this Searchable. + + + :param score: The score of this Searchable. + :type score: FAIRResultCommonScore + """ + if score is None: + raise ValueError("Invalid value for `score`, must not be `None`") + + self._score = score @property - def output(self): - """Gets the output of this Searchable. # noqa: E501 + def maturity(self) -> str: + """Gets the maturity of this Searchable. + + + :return: The maturity of this Searchable. + :rtype: str + """ + return self._maturity + @maturity.setter + def maturity(self, maturity: int): + """Sets the maturity of this Uniqueness. - :return: The output of this Searchable. # noqa: E501 + + :param maturity: The maturity of this Uniqueness. + :type maturity: int + """ + + self._maturity = maturity + + @property + def output(self) -> SearchableOutput: + """Gets the output of this Searchable. + + + :return: The output of this Searchable. :rtype: SearchableOutput """ return self._output @output.setter - def output(self, output): + def output(self, output: SearchableOutput): """Sets the output of this Searchable. - :param output: The output of this Searchable. # noqa: E501 - :type: SearchableOutput + :param output: The output of this Searchable. + :type output: SearchableOutput """ self._output = output @property - def test_debug(self): - """Gets the test_debug of this Searchable. # noqa: E501 + def test_debug(self) -> Debug: + """Gets the test_debug of this Searchable. - :return: The test_debug of this Searchable. # noqa: E501 + :return: The test_debug of this Searchable. :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug): + def test_debug(self, test_debug: Debug): """Sets the test_debug of this Searchable. - :param test_debug: The test_debug of this Searchable. # noqa: E501 - :type: Debug + :param test_debug: The test_debug of this Searchable. + :type test_debug: Debug """ self._test_debug = test_debug - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(Searchable, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Searchable): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/searchable_output.py b/fuji_server/models/searchable_output.py index 9ad683b6..08786e29 100644 --- a/fuji_server/models/searchable_output.py +++ b/fuji_server/models/searchable_output.py @@ -1,104 +1,53 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model +from fuji_server.models.output_search_mechanisms import OutputSearchMechanisms - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class SearchableOutput: +class SearchableOutput(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"search_mechanisms": "list[OutputSearchMechanisms]"} + def __init__(self, search_mechanisms: list[OutputSearchMechanisms] | None = None): + """SearchableOutput - a model defined in Swagger - attribute_map = {"search_mechanisms": "search_mechanisms"} + :param search_mechanisms: The search_mechanisms of this SearchableOutput. # noqa: E501 + :type search_mechanisms: List[OutputSearchMechanisms] + """ + self.swagger_types = {"search_mechanisms": list[OutputSearchMechanisms]} - def __init__(self, search_mechanisms=None): - """SearchableOutput - a model defined in Swagger""" - self._search_mechanisms = None - self.discriminator = None - if search_mechanisms is not None: - self.search_mechanisms = search_mechanisms + self.attribute_map = {"search_mechanisms": "search_mechanisms"} + self._search_mechanisms = search_mechanisms + + @classmethod + def from_dict(cls, dikt) -> "SearchableOutput": + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Searchable_output of this SearchableOutput. # noqa: E501 + :rtype: SearchableOutput + """ + return util.deserialize_model(dikt, cls) @property - def search_mechanisms(self): - """Gets the search_mechanisms of this SearchableOutput. # noqa: E501 + def search_mechanisms(self) -> list[OutputSearchMechanisms]: + """Gets the search_mechanisms of this SearchableOutput. - :return: The search_mechanisms of this SearchableOutput. # noqa: E501 - :rtype: list[OutputSearchMechanisms] + :return: The search_mechanisms of this SearchableOutput. + :rtype: List[OutputSearchMechanisms] """ return self._search_mechanisms @search_mechanisms.setter - def search_mechanisms(self, search_mechanisms): + def search_mechanisms(self, search_mechanisms: list[OutputSearchMechanisms]): """Sets the search_mechanisms of this SearchableOutput. - :param search_mechanisms: The search_mechanisms of this SearchableOutput. # noqa: E501 - :type: list[OutputSearchMechanisms] + :param search_mechanisms: The search_mechanisms of this SearchableOutput. + :type search_mechanisms: List[OutputSearchMechanisms] """ self._search_mechanisms = search_mechanisms - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(SearchableOutput, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SearchableOutput): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/semantic_vocabulary.py b/fuji_server/models/semantic_vocabulary.py index 8536ccbf..105dd00c 100644 --- a/fuji_server/models/semantic_vocabulary.py +++ b/fuji_server/models/semantic_vocabulary.py @@ -1,135 +1,291 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium +from fuji_server.models.semantic_vocabulary_output import SemanticVocabularyOutput - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" +class SemanticVocabulary(Model): + """NOTE: This class is auto generated by the swagger code generator program. -import pprint -import re # noqa: F401 + Do not edit the class manually. + """ -import six + def __init__( + self, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, + test_status: str = "fail", + score: FAIRResultCommonScore = None, + maturity: str = "incomplete", + output: SemanticVocabularyOutput = None, + test_debug: Debug = None, + ): + """SemanticVocabulary - a model defined in Swagger + + :param id: The id of this SemanticVocabulary. # noqa: E501 + :type id: int + :param metric_identifier: The metric_identifier of this SemanticVocabulary. # noqa: E501 + :type metric_identifier: str + :param metric_name: The metric_name of this SemanticVocabulary. # noqa: E501 + :type metric_name: str + :param metric_tests: The metric_tests of this SemanticVocabulary. # noqa: E501 + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + :param test_status: The test_status of this SemanticVocabulary. # noqa: E501 + :type test_status: str + :param score: The score of this SemanticVocabulary. # noqa: E501 + :type score: FAIRResultCommonScore + :param maturity: The maturity of this SemanticVocabulary. # noqa: E501 + :type maturity: str + :param output: The output of this SemanticVocabulary. # noqa: E501 + :type output: SemanticVocabularyOutput + :param test_debug: The test_debug of this SemanticVocabulary. # noqa: E501 + :type test_debug: Debug + """ + self.swagger_types = { + "id": int, + "metric_identifier": str, + "metric_name": str, + "metric_tests": dict[str, FAIRResultEvaluationCriterium], + "test_status": str, + "score": FAIRResultCommonScore, + "maturity": str, + "output": SemanticVocabularyOutput, + "test_debug": Debug, + } + + self.attribute_map = { + "id": "id", + "metric_identifier": "metric_identifier", + "metric_name": "metric_name", + "metric_tests": "metric_tests", + "test_status": "test_status", + "score": "score", + "maturity": "maturity", + "output": "output", + "test_debug": "test_debug", + } + self._id = id + self._metric_identifier = metric_identifier + self._metric_name = metric_name + self._metric_tests = metric_tests + self._test_status = test_status + self._score = score + self._maturity = maturity + self._output = output + self._test_debug = test_debug -from swagger_client.models.fair_result_common import FAIRResultCommon + @classmethod + def from_dict(cls, dikt) -> "SemanticVocabulary": + """Returns the dict as a model + :param dikt: A dict. + :type: dict + :return: The SemanticVocabulary of this SemanticVocabulary. # noqa: E501 + :rtype: SemanticVocabulary + """ + return util.deserialize_model(dikt, cls) -class SemanticVocabulary(FAIRResultCommon): - """NOTE: This class is auto generated by the swagger code generator program. + @property + def id(self) -> int: + """Gets the id of this SemanticVocabulary. - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"output": "SemanticVocabularyOutput", "test_debug": "Debug"} - if hasattr(FAIRResultCommon, "swagger_types"): - swagger_types.update(FAIRResultCommon.swagger_types) - - attribute_map = {"output": "output", "test_debug": "test_debug"} - if hasattr(FAIRResultCommon, "attribute_map"): - attribute_map.update(FAIRResultCommon.attribute_map) - - def __init__(self, output=None, test_debug=None, *args, **kwargs): - """SemanticVocabulary - a model defined in Swagger""" - self._output = None - self._test_debug = None - self.discriminator = None - if output is not None: - self.output = output - if test_debug is not None: - self.test_debug = test_debug - FAIRResultCommon.__init__(self, *args, **kwargs) + :return: The id of this SemanticVocabulary. + :rtype: int + """ + return self._id + + @id.setter + def id(self, id: int): + """Sets the id of this SemanticVocabulary. + + + :param id: The id of this SemanticVocabulary. + :type id: int + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") + + self._id = id + + @property + def metric_identifier(self) -> str: + """Gets the metric_identifier of this SemanticVocabulary. + + + :return: The metric_identifier of this SemanticVocabulary. + :rtype: str + """ + return self._metric_identifier + + @metric_identifier.setter + def metric_identifier(self, metric_identifier: str): + """Sets the metric_identifier of this SemanticVocabulary. + + + :param metric_identifier: The metric_identifier of this SemanticVocabulary. + :type metric_identifier: str + """ + if metric_identifier is None: + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") + + self._metric_identifier = metric_identifier + + @property + def metric_name(self) -> str: + """Gets the metric_name of this SemanticVocabulary. + + + :return: The metric_name of this SemanticVocabulary. + :rtype: str + """ + return self._metric_name + + @metric_name.setter + def metric_name(self, metric_name: str): + """Sets the metric_name of this SemanticVocabulary. + + + :param metric_name: The metric_name of this SemanticVocabulary. + :type metric_name: str + """ + if metric_name is None: + raise ValueError("Invalid value for `metric_name`, must not be `None`") + + self._metric_name = metric_name + + @property + def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: + """Gets the metric_tests of this SemanticVocabulary. + + + :return: The metric_tests of this SemanticVocabulary. + :rtype: Dict[str, FAIRResultEvaluationCriterium] + """ + return self._metric_tests + + @metric_tests.setter + def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): + """Sets the metric_tests of this SemanticVocabulary. + + + :param metric_tests: The metric_tests of this SemanticVocabulary. + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + """ + + self._metric_tests = metric_tests + + @property + def test_status(self) -> str: + """Gets the test_status of this SemanticVocabulary. + + + :return: The test_status of this SemanticVocabulary. + :rtype: str + """ + return self._test_status + + @test_status.setter + def test_status(self, test_status: str): + """Sets the test_status of this SemanticVocabulary. + + + :param test_status: The test_status of this SemanticVocabulary. + :type test_status: str + """ + allowed_values = ["pass", "fail", "indeterminate"] + if test_status not in allowed_values: + raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") + + self._test_status = test_status + + @property + def score(self) -> FAIRResultCommonScore: + """Gets the score of this SemanticVocabulary. + + + :return: The score of this SemanticVocabulary. + :rtype: FAIRResultCommonScore + """ + return self._score + + @score.setter + def score(self, score: FAIRResultCommonScore): + """Sets the score of this SemanticVocabulary. + + + :param score: The score of this SemanticVocabulary. + :type score: FAIRResultCommonScore + """ + if score is None: + raise ValueError("Invalid value for `score`, must not be `None`") + + self._score = score @property - def output(self): - """Gets the output of this SemanticVocabulary. # noqa: E501 + def maturity(self) -> str: + """Gets the maturity of this SemanticVocabulary. + + + :return: The maturity of this SemanticVocabulary. + :rtype: str + """ + return self._maturity + @maturity.setter + def maturity(self, maturity: int): + """Sets the maturity of this Uniqueness. - :return: The output of this SemanticVocabulary. # noqa: E501 + + :param maturity: The maturity of this Uniqueness. + :type maturity: int + """ + + self._maturity = maturity + + @property + def output(self) -> SemanticVocabularyOutput: + """Gets the output of this SemanticVocabulary. + + + :return: The output of this SemanticVocabulary. :rtype: SemanticVocabularyOutput """ return self._output @output.setter - def output(self, output): + def output(self, output: SemanticVocabularyOutput): """Sets the output of this SemanticVocabulary. - :param output: The output of this SemanticVocabulary. # noqa: E501 - :type: SemanticVocabularyOutput + :param output: The output of this SemanticVocabulary. + :type output: SemanticVocabularyOutput """ self._output = output @property - def test_debug(self): - """Gets the test_debug of this SemanticVocabulary. # noqa: E501 + def test_debug(self) -> Debug: + """Gets the test_debug of this SemanticVocabulary. - :return: The test_debug of this SemanticVocabulary. # noqa: E501 + :return: The test_debug of this SemanticVocabulary. :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug): + def test_debug(self, test_debug: Debug): """Sets the test_debug of this SemanticVocabulary. - :param test_debug: The test_debug of this SemanticVocabulary. # noqa: E501 - :type: Debug + :param test_debug: The test_debug of this SemanticVocabulary. + :type test_debug: Debug """ self._test_debug = test_debug - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(SemanticVocabulary, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SemanticVocabulary): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/semantic_vocabulary_output.py b/fuji_server/models/semantic_vocabulary_output.py index 855fe5a9..5e7416d0 100644 --- a/fuji_server/models/semantic_vocabulary_output.py +++ b/fuji_server/models/semantic_vocabulary_output.py @@ -1,80 +1,27 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model +from fuji_server.models.semantic_vocabulary_output_inner import SemanticVocabularyOutputInner # noqa: F401 - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class SemanticVocabularyOutput: +class SemanticVocabularyOutput(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {} - - attribute_map = {} - def __init__(self): """SemanticVocabularyOutput - a model defined in Swagger""" - self.discriminator = None - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(SemanticVocabularyOutput, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() + self.swagger_types = {} - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SemanticVocabularyOutput): - return False + self.attribute_map = {} - return self.__dict__ == other.__dict__ + @classmethod + def from_dict(cls, dikt) -> "SemanticVocabularyOutput": + """Returns the dict as a model - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other + :param dikt: A dict. + :type: dict + :return: The SemanticVocabulary_output of this SemanticVocabularyOutput. # noqa: E501 + :rtype: SemanticVocabularyOutput + """ + return util.deserialize_model(dikt, cls) diff --git a/fuji_server/models/semantic_vocabulary_output_inner.py b/fuji_server/models/semantic_vocabulary_output_inner.py index 07ac1b2c..c7d1118b 100644 --- a/fuji_server/models/semantic_vocabulary_output_inner.py +++ b/fuji_server/models/semantic_vocabulary_output_inner.py @@ -1,128 +1,76 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class SemanticVocabularyOutputInner: +class SemanticVocabularyOutputInner(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"namespace": "str", "is_namespace_active": "bool"} + def __init__(self, namespace: str | None = None, is_namespace_active: bool = False): + """SemanticVocabularyOutputInner - a model defined in Swagger - attribute_map = {"namespace": "namespace", "is_namespace_active": "is_namespace_active"} + :param namespace: The namespace of this SemanticVocabularyOutputInner. # noqa: E501 + :type namespace: str + :param is_namespace_active: The is_namespace_active of this SemanticVocabularyOutputInner. # noqa: E501 + :type is_namespace_active: bool + """ + self.swagger_types = {"namespace": str, "is_namespace_active": bool} - def __init__(self, namespace=None, is_namespace_active=False): - """SemanticVocabularyOutputInner - a model defined in Swagger""" - self._namespace = None - self._is_namespace_active = None - self.discriminator = None - if namespace is not None: - self.namespace = namespace - if is_namespace_active is not None: - self.is_namespace_active = is_namespace_active + self.attribute_map = {"namespace": "namespace", "is_namespace_active": "is_namespace_active"} + self._namespace = namespace + self._is_namespace_active = is_namespace_active + + @classmethod + def from_dict(cls, dikt) -> "SemanticVocabularyOutputInner": + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The SemanticVocabulary_output_inner of this SemanticVocabularyOutputInner. # noqa: E501 + :rtype: SemanticVocabularyOutputInner + """ + return util.deserialize_model(dikt, cls) @property - def namespace(self): - """Gets the namespace of this SemanticVocabularyOutputInner. # noqa: E501 + def namespace(self) -> str: + """Gets the namespace of this SemanticVocabularyOutputInner. - :return: The namespace of this SemanticVocabularyOutputInner. # noqa: E501 + :return: The namespace of this SemanticVocabularyOutputInner. :rtype: str """ return self._namespace @namespace.setter - def namespace(self, namespace): + def namespace(self, namespace: str): """Sets the namespace of this SemanticVocabularyOutputInner. - :param namespace: The namespace of this SemanticVocabularyOutputInner. # noqa: E501 - :type: str + :param namespace: The namespace of this SemanticVocabularyOutputInner. + :type namespace: str """ self._namespace = namespace @property - def is_namespace_active(self): - """Gets the is_namespace_active of this SemanticVocabularyOutputInner. # noqa: E501 + def is_namespace_active(self) -> bool: + """Gets the is_namespace_active of this SemanticVocabularyOutputInner. - :return: The is_namespace_active of this SemanticVocabularyOutputInner. # noqa: E501 + :return: The is_namespace_active of this SemanticVocabularyOutputInner. :rtype: bool """ return self._is_namespace_active @is_namespace_active.setter - def is_namespace_active(self, is_namespace_active): + def is_namespace_active(self, is_namespace_active: bool): """Sets the is_namespace_active of this SemanticVocabularyOutputInner. - :param is_namespace_active: The is_namespace_active of this SemanticVocabularyOutputInner. # noqa: E501 - :type: bool + :param is_namespace_active: The is_namespace_active of this SemanticVocabularyOutputInner. + :type is_namespace_active: bool """ self._is_namespace_active = is_namespace_active - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(SemanticVocabularyOutputInner, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, SemanticVocabularyOutputInner): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/standardised_protocol_data.py b/fuji_server/models/standardised_protocol_data.py index 680626d2..89ab52ae 100644 --- a/fuji_server/models/standardised_protocol_data.py +++ b/fuji_server/models/standardised_protocol_data.py @@ -1,135 +1,291 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium +from fuji_server.models.standardised_protocol_data_output import StandardisedProtocolDataOutput - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" +class StandardisedProtocolData(Model): + """NOTE: This class is auto generated by the swagger code generator program. -import pprint -import re # noqa: F401 + Do not edit the class manually. + """ -import six + def __init__( + self, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, + test_status: str = "fail", + score: FAIRResultCommonScore = None, + maturity: str = "incomplete", + output: StandardisedProtocolDataOutput = None, + test_debug: Debug = None, + ): + """StandardisedProtocolData - a model defined in Swagger + + :param id: The id of this StandardisedProtocolData. # noqa: E501 + :type id: int + :param metric_identifier: The metric_identifier of this StandardisedProtocolData. # noqa: E501 + :type metric_identifier: str + :param metric_name: The metric_name of this StandardisedProtocolData. # noqa: E501 + :type metric_name: str + :param metric_tests: The metric_tests of this StandardisedProtocolData. # noqa: E501 + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + :param test_status: The test_status of this StandardisedProtocolData. # noqa: E501 + :type test_status: str + :param score: The score of this StandardisedProtocolData. # noqa: E501 + :type score: FAIRResultCommonScore + :param maturity: The maturity of this StandardisedProtocolData. # noqa: E501 + :type maturity: str + :param output: The output of this StandardisedProtocolData. # noqa: E501 + :type output: StandardisedProtocolDataOutput + :param test_debug: The test_debug of this StandardisedProtocolData. # noqa: E501 + :type test_debug: Debug + """ + self.swagger_types = { + "id": int, + "metric_identifier": str, + "metric_name": str, + "metric_tests": dict[str, FAIRResultEvaluationCriterium], + "test_status": str, + "score": FAIRResultCommonScore, + "maturity": str, + "output": StandardisedProtocolDataOutput, + "test_debug": Debug, + } + + self.attribute_map = { + "id": "id", + "metric_identifier": "metric_identifier", + "metric_name": "metric_name", + "metric_tests": "metric_tests", + "test_status": "test_status", + "score": "score", + "maturity": "maturity", + "output": "output", + "test_debug": "test_debug", + } + self._id = id + self._metric_identifier = metric_identifier + self._metric_name = metric_name + self._metric_tests = metric_tests + self._test_status = test_status + self._score = score + self._maturity = maturity + self._output = output + self._test_debug = test_debug -from swagger_client.models.fair_result_common import FAIRResultCommon + @classmethod + def from_dict(cls, dikt) -> "StandardisedProtocolData": + """Returns the dict as a model + :param dikt: A dict. + :type: dict + :return: The StandardisedProtocolData of this StandardisedProtocolData. # noqa: E501 + :rtype: StandardisedProtocolData + """ + return util.deserialize_model(dikt, cls) -class StandardisedProtocolData(FAIRResultCommon): - """NOTE: This class is auto generated by the swagger code generator program. + @property + def id(self) -> int: + """Gets the id of this StandardisedProtocolData. - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"output": "StandardisedProtocolDataOutput", "test_debug": "Debug"} - if hasattr(FAIRResultCommon, "swagger_types"): - swagger_types.update(FAIRResultCommon.swagger_types) - - attribute_map = {"output": "output", "test_debug": "test_debug"} - if hasattr(FAIRResultCommon, "attribute_map"): - attribute_map.update(FAIRResultCommon.attribute_map) - - def __init__(self, output=None, test_debug=None, *args, **kwargs): - """StandardisedProtocolData - a model defined in Swagger""" - self._output = None - self._test_debug = None - self.discriminator = None - if output is not None: - self.output = output - if test_debug is not None: - self.test_debug = test_debug - FAIRResultCommon.__init__(self, *args, **kwargs) + :return: The id of this StandardisedProtocolData. + :rtype: int + """ + return self._id + + @id.setter + def id(self, id: int): + """Sets the id of this StandardisedProtocolData. + + + :param id: The id of this StandardisedProtocolData. + :type id: int + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") + + self._id = id + + @property + def metric_identifier(self) -> str: + """Gets the metric_identifier of this StandardisedProtocolData. + + + :return: The metric_identifier of this StandardisedProtocolData. + :rtype: str + """ + return self._metric_identifier + + @metric_identifier.setter + def metric_identifier(self, metric_identifier: str): + """Sets the metric_identifier of this StandardisedProtocolData. + + + :param metric_identifier: The metric_identifier of this StandardisedProtocolData. + :type metric_identifier: str + """ + if metric_identifier is None: + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") + + self._metric_identifier = metric_identifier + + @property + def metric_name(self) -> str: + """Gets the metric_name of this StandardisedProtocolData. + + + :return: The metric_name of this StandardisedProtocolData. + :rtype: str + """ + return self._metric_name + + @metric_name.setter + def metric_name(self, metric_name: str): + """Sets the metric_name of this StandardisedProtocolData. + + + :param metric_name: The metric_name of this StandardisedProtocolData. + :type metric_name: str + """ + if metric_name is None: + raise ValueError("Invalid value for `metric_name`, must not be `None`") + + self._metric_name = metric_name + + @property + def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: + """Gets the metric_tests of this StandardisedProtocolData. + + + :return: The metric_tests of this StandardisedProtocolData. + :rtype: Dict[str, FAIRResultEvaluationCriterium] + """ + return self._metric_tests + + @metric_tests.setter + def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): + """Sets the metric_tests of this StandardisedProtocolData. + + + :param metric_tests: The metric_tests of this StandardisedProtocolData. + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + """ + + self._metric_tests = metric_tests + + @property + def test_status(self) -> str: + """Gets the test_status of this StandardisedProtocolData. + + + :return: The test_status of this StandardisedProtocolData. + :rtype: str + """ + return self._test_status + + @test_status.setter + def test_status(self, test_status: str): + """Sets the test_status of this StandardisedProtocolData. + + + :param test_status: The test_status of this StandardisedProtocolData. + :type test_status: str + """ + allowed_values = ["pass", "fail", "indeterminate"] + if test_status not in allowed_values: + raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") + + self._test_status = test_status + + @property + def score(self) -> FAIRResultCommonScore: + """Gets the score of this StandardisedProtocolData. + + + :return: The score of this StandardisedProtocolData. + :rtype: FAIRResultCommonScore + """ + return self._score + + @score.setter + def score(self, score: FAIRResultCommonScore): + """Sets the score of this StandardisedProtocolData. + + + :param score: The score of this StandardisedProtocolData. + :type score: FAIRResultCommonScore + """ + if score is None: + raise ValueError("Invalid value for `score`, must not be `None`") + + self._score = score @property - def output(self): - """Gets the output of this StandardisedProtocolData. # noqa: E501 + def maturity(self) -> str: + """Gets the maturity of this StandardisedProtocolData. + + + :return: The maturity of this StandardisedProtocolData. + :rtype: str + """ + return self._maturity + @maturity.setter + def maturity(self, maturity: int): + """Sets the maturity of this Uniqueness. - :return: The output of this StandardisedProtocolData. # noqa: E501 + + :param maturity: The maturity of this Uniqueness. + :type maturity: int + """ + + self._maturity = maturity + + @property + def output(self) -> StandardisedProtocolDataOutput: + """Gets the output of this StandardisedProtocolData. + + + :return: The output of this StandardisedProtocolData. :rtype: StandardisedProtocolDataOutput """ return self._output @output.setter - def output(self, output): + def output(self, output: StandardisedProtocolDataOutput): """Sets the output of this StandardisedProtocolData. - :param output: The output of this StandardisedProtocolData. # noqa: E501 - :type: StandardisedProtocolDataOutput + :param output: The output of this StandardisedProtocolData. + :type output: StandardisedProtocolDataOutput """ self._output = output @property - def test_debug(self): - """Gets the test_debug of this StandardisedProtocolData. # noqa: E501 + def test_debug(self) -> Debug: + """Gets the test_debug of this StandardisedProtocolData. - :return: The test_debug of this StandardisedProtocolData. # noqa: E501 + :return: The test_debug of this StandardisedProtocolData. :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug): + def test_debug(self, test_debug: Debug): """Sets the test_debug of this StandardisedProtocolData. - :param test_debug: The test_debug of this StandardisedProtocolData. # noqa: E501 - :type: Debug + :param test_debug: The test_debug of this StandardisedProtocolData. + :type test_debug: Debug """ self._test_debug = test_debug - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(StandardisedProtocolData, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, StandardisedProtocolData): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/standardised_protocol_data_output.py b/fuji_server/models/standardised_protocol_data_output.py index b795f097..6fd4ff67 100644 --- a/fuji_server/models/standardised_protocol_data_output.py +++ b/fuji_server/models/standardised_protocol_data_output.py @@ -1,104 +1,52 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class StandardisedProtocolDataOutput: +class StandardisedProtocolDataOutput(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"standard_data_protocol": "str"} + def __init__(self, standard_data_protocol: str | None = None): + """StandardisedProtocolDataOutput - a model defined in Swagger - attribute_map = {"standard_data_protocol": "standard_data_protocol"} + :param standard_data_protocol: The standard_data_protocol of this StandardisedProtocolDataOutput. # noqa: E501 + :type standard_data_protocol: str + """ + self.swagger_types = {"standard_data_protocol": str} - def __init__(self, standard_data_protocol=None): - """StandardisedProtocolDataOutput - a model defined in Swagger""" - self._standard_data_protocol = None - self.discriminator = None - if standard_data_protocol is not None: - self.standard_data_protocol = standard_data_protocol + self.attribute_map = {"standard_data_protocol": "standard_data_protocol"} + self._standard_data_protocol = standard_data_protocol + + @classmethod + def from_dict(cls, dikt) -> "StandardisedProtocolDataOutput": + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The StandardisedProtocolData_output of this StandardisedProtocolDataOutput. # noqa: E501 + :rtype: StandardisedProtocolDataOutput + """ + return util.deserialize_model(dikt, cls) @property - def standard_data_protocol(self): - """Gets the standard_data_protocol of this StandardisedProtocolDataOutput. # noqa: E501 + def standard_data_protocol(self) -> str: + """Gets the standard_data_protocol of this StandardisedProtocolDataOutput. - :return: The standard_data_protocol of this StandardisedProtocolDataOutput. # noqa: E501 + :return: The standard_data_protocol of this StandardisedProtocolDataOutput. :rtype: str """ return self._standard_data_protocol @standard_data_protocol.setter - def standard_data_protocol(self, standard_data_protocol): + def standard_data_protocol(self, standard_data_protocol: str): """Sets the standard_data_protocol of this StandardisedProtocolDataOutput. - :param standard_data_protocol: The standard_data_protocol of this StandardisedProtocolDataOutput. # noqa: E501 - :type: str + :param standard_data_protocol: The standard_data_protocol of this StandardisedProtocolDataOutput. + :type standard_data_protocol: str """ self._standard_data_protocol = standard_data_protocol - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(StandardisedProtocolDataOutput, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, StandardisedProtocolDataOutput): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/standardised_protocol_metadata.py b/fuji_server/models/standardised_protocol_metadata.py index ad76b44d..aeda0370 100644 --- a/fuji_server/models/standardised_protocol_metadata.py +++ b/fuji_server/models/standardised_protocol_metadata.py @@ -1,135 +1,293 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium +from fuji_server.models.standardised_protocol_metadata_output import ( + StandardisedProtocolMetadataOutput, +) + + +class StandardisedProtocolMetadata(Model): + """NOTE: This class is auto generated by the swagger code generator program. - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 + Do not edit the class manually. + """ - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" + def __init__( + self, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, + test_status: str = "fail", + score: FAIRResultCommonScore = None, + maturity: str = "incomplete", + output: StandardisedProtocolMetadataOutput = None, + test_debug: Debug = None, + ): + """StandardisedProtocolMetadata - a model defined in Swagger + + :param id: The id of this StandardisedProtocolMetadata. # noqa: E501 + :type id: int + :param metric_identifier: The metric_identifier of this StandardisedProtocolMetadata. # noqa: E501 + :type metric_identifier: str + :param metric_name: The metric_name of this StandardisedProtocolMetadata. # noqa: E501 + :type metric_name: str + :param metric_tests: The metric_tests of this StandardisedProtocolMetadata. # noqa: E501 + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + :param test_status: The test_status of this StandardisedProtocolMetadata. # noqa: E501 + :type test_status: str + :param score: The score of this StandardisedProtocolMetadata. # noqa: E501 + :type score: FAIRResultCommonScore + :param maturity: The maturity of this StandardisedProtocolMetadata. # noqa: E501 + :type maturity: str + :param output: The output of this StandardisedProtocolMetadata. # noqa: E501 + :type output: StandardisedProtocolMetadataOutput + :param test_debug: The test_debug of this StandardisedProtocolMetadata. # noqa: E501 + :type test_debug: Debug + """ + self.swagger_types = { + "id": int, + "metric_identifier": str, + "metric_name": str, + "metric_tests": dict[str, FAIRResultEvaluationCriterium], + "test_status": str, + "score": FAIRResultCommonScore, + "maturity": str, + "output": StandardisedProtocolMetadataOutput, + "test_debug": Debug, + } + + self.attribute_map = { + "id": "id", + "metric_identifier": "metric_identifier", + "metric_name": "metric_name", + "metric_tests": "metric_tests", + "test_status": "test_status", + "score": "score", + "maturity": "maturity", + "output": "output", + "test_debug": "test_debug", + } + self._id = id + self._metric_identifier = metric_identifier + self._metric_name = metric_name + self._metric_tests = metric_tests + self._test_status = test_status + self._score = score + self._maturity = maturity + self._output = output + self._test_debug = test_debug -import pprint -import re # noqa: F401 + @classmethod + def from_dict(cls, dikt) -> "StandardisedProtocolMetadata": + """Returns the dict as a model -import six + :param dikt: A dict. + :type: dict + :return: The StandardisedProtocolMetadata of this StandardisedProtocolMetadata. # noqa: E501 + :rtype: StandardisedProtocolMetadata + """ + return util.deserialize_model(dikt, cls) -from swagger_client.models.fair_result_common import FAIRResultCommon + @property + def id(self) -> int: + """Gets the id of this StandardisedProtocolMetadata. -class StandardisedProtocolMetadata(FAIRResultCommon): - """NOTE: This class is auto generated by the swagger code generator program. + :return: The id of this StandardisedProtocolMetadata. + :rtype: int + """ + return self._id - Do not edit the class manually. - """ + @id.setter + def id(self, id: int): + """Sets the id of this StandardisedProtocolMetadata. - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"output": "StandardisedProtocolMetadataOutput", "test_debug": "Debug"} - if hasattr(FAIRResultCommon, "swagger_types"): - swagger_types.update(FAIRResultCommon.swagger_types) - - attribute_map = {"output": "output", "test_debug": "test_debug"} - if hasattr(FAIRResultCommon, "attribute_map"): - attribute_map.update(FAIRResultCommon.attribute_map) - - def __init__(self, output=None, test_debug=None, *args, **kwargs): - """StandardisedProtocolMetadata - a model defined in Swagger""" - self._output = None - self._test_debug = None - self.discriminator = None - if output is not None: - self.output = output - if test_debug is not None: - self.test_debug = test_debug - FAIRResultCommon.__init__(self, *args, **kwargs) + + :param id: The id of this StandardisedProtocolMetadata. + :type id: int + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") + + self._id = id + + @property + def metric_identifier(self) -> str: + """Gets the metric_identifier of this StandardisedProtocolMetadata. + + + :return: The metric_identifier of this StandardisedProtocolMetadata. + :rtype: str + """ + return self._metric_identifier + + @metric_identifier.setter + def metric_identifier(self, metric_identifier: str): + """Sets the metric_identifier of this StandardisedProtocolMetadata. + + + :param metric_identifier: The metric_identifier of this StandardisedProtocolMetadata. + :type metric_identifier: str + """ + if metric_identifier is None: + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") + + self._metric_identifier = metric_identifier + + @property + def metric_name(self) -> str: + """Gets the metric_name of this StandardisedProtocolMetadata. + + + :return: The metric_name of this StandardisedProtocolMetadata. + :rtype: str + """ + return self._metric_name + + @metric_name.setter + def metric_name(self, metric_name: str): + """Sets the metric_name of this StandardisedProtocolMetadata. + + + :param metric_name: The metric_name of this StandardisedProtocolMetadata. + :type metric_name: str + """ + if metric_name is None: + raise ValueError("Invalid value for `metric_name`, must not be `None`") + + self._metric_name = metric_name + + @property + def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: + """Gets the metric_tests of this StandardisedProtocolMetadata. + + + :return: The metric_tests of this StandardisedProtocolMetadata. + :rtype: Dict[str, FAIRResultEvaluationCriterium] + """ + return self._metric_tests + + @metric_tests.setter + def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): + """Sets the metric_tests of this StandardisedProtocolMetadata. + + + :param metric_tests: The metric_tests of this StandardisedProtocolMetadata. + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + """ + + self._metric_tests = metric_tests @property - def output(self): - """Gets the output of this StandardisedProtocolMetadata. # noqa: E501 + def test_status(self) -> str: + """Gets the test_status of this StandardisedProtocolMetadata. + + + :return: The test_status of this StandardisedProtocolMetadata. + :rtype: str + """ + return self._test_status + + @test_status.setter + def test_status(self, test_status: str): + """Sets the test_status of this StandardisedProtocolMetadata. + + + :param test_status: The test_status of this StandardisedProtocolMetadata. + :type test_status: str + """ + allowed_values = ["pass", "fail", "indeterminate"] + if test_status not in allowed_values: + raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") + + self._test_status = test_status + + @property + def score(self) -> FAIRResultCommonScore: + """Gets the score of this StandardisedProtocolMetadata. + + + :return: The score of this StandardisedProtocolMetadata. + :rtype: FAIRResultCommonScore + """ + return self._score + @score.setter + def score(self, score: FAIRResultCommonScore): + """Sets the score of this StandardisedProtocolMetadata. - :return: The output of this StandardisedProtocolMetadata. # noqa: E501 + + :param score: The score of this StandardisedProtocolMetadata. + :type score: FAIRResultCommonScore + """ + if score is None: + raise ValueError("Invalid value for `score`, must not be `None`") + + self._score = score + + @property + def maturity(self) -> str: + """Gets the maturity of this StandardisedProtocolMetadata. + + + :return: The maturity of this StandardisedProtocolMetadata. + :rtype: str + """ + return self._maturity + + @maturity.setter + def maturity(self, maturity: int): + """Sets the maturity of this Uniqueness. + + + :param maturity: The maturity of this Uniqueness. + :type maturity: int + """ + + self._maturity = maturity + + @property + def output(self) -> StandardisedProtocolMetadataOutput: + """Gets the output of this StandardisedProtocolMetadata. + + + :return: The output of this StandardisedProtocolMetadata. :rtype: StandardisedProtocolMetadataOutput """ return self._output @output.setter - def output(self, output): + def output(self, output: StandardisedProtocolMetadataOutput): """Sets the output of this StandardisedProtocolMetadata. - :param output: The output of this StandardisedProtocolMetadata. # noqa: E501 - :type: StandardisedProtocolMetadataOutput + :param output: The output of this StandardisedProtocolMetadata. + :type output: StandardisedProtocolMetadataOutput """ self._output = output @property - def test_debug(self): - """Gets the test_debug of this StandardisedProtocolMetadata. # noqa: E501 + def test_debug(self) -> Debug: + """Gets the test_debug of this StandardisedProtocolMetadata. - :return: The test_debug of this StandardisedProtocolMetadata. # noqa: E501 + :return: The test_debug of this StandardisedProtocolMetadata. :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug): + def test_debug(self, test_debug: Debug): """Sets the test_debug of this StandardisedProtocolMetadata. - :param test_debug: The test_debug of this StandardisedProtocolMetadata. # noqa: E501 - :type: Debug + :param test_debug: The test_debug of this StandardisedProtocolMetadata. + :type test_debug: Debug """ self._test_debug = test_debug - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(StandardisedProtocolMetadata, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, StandardisedProtocolMetadata): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/standardised_protocol_metadata_output.py b/fuji_server/models/standardised_protocol_metadata_output.py index 9fe709a6..e1b5e1d8 100644 --- a/fuji_server/models/standardised_protocol_metadata_output.py +++ b/fuji_server/models/standardised_protocol_metadata_output.py @@ -1,104 +1,52 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class StandardisedProtocolMetadataOutput: +class StandardisedProtocolMetadataOutput(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"standard_metadata_protocol": "str"} + def __init__(self, standard_metadata_protocol: str | None = None): + """StandardisedProtocolMetadataOutput - a model defined in Swagger - attribute_map = {"standard_metadata_protocol": "standard_metadata_protocol"} + :param standard_metadata_protocol: The standard_metadata_protocol of this StandardisedProtocolMetadataOutput. # noqa: E501 + :type standard_metadata_protocol: str + """ + self.swagger_types = {"standard_metadata_protocol": str} - def __init__(self, standard_metadata_protocol=None): - """StandardisedProtocolMetadataOutput - a model defined in Swagger""" - self._standard_metadata_protocol = None - self.discriminator = None - if standard_metadata_protocol is not None: - self.standard_metadata_protocol = standard_metadata_protocol + self.attribute_map = {"standard_metadata_protocol": "standard_metadata_protocol"} + self._standard_metadata_protocol = standard_metadata_protocol + + @classmethod + def from_dict(cls, dikt) -> "StandardisedProtocolMetadataOutput": + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The StandardisedProtocolMetadata_output of this StandardisedProtocolMetadataOutput. # noqa: E501 + :rtype: StandardisedProtocolMetadataOutput + """ + return util.deserialize_model(dikt, cls) @property - def standard_metadata_protocol(self): - """Gets the standard_metadata_protocol of this StandardisedProtocolMetadataOutput. # noqa: E501 + def standard_metadata_protocol(self) -> str: + """Gets the standard_metadata_protocol of this StandardisedProtocolMetadataOutput. - :return: The standard_metadata_protocol of this StandardisedProtocolMetadataOutput. # noqa: E501 + :return: The standard_metadata_protocol of this StandardisedProtocolMetadataOutput. :rtype: str """ return self._standard_metadata_protocol @standard_metadata_protocol.setter - def standard_metadata_protocol(self, standard_metadata_protocol): + def standard_metadata_protocol(self, standard_metadata_protocol: str): """Sets the standard_metadata_protocol of this StandardisedProtocolMetadataOutput. - :param standard_metadata_protocol: The standard_metadata_protocol of this StandardisedProtocolMetadataOutput. # noqa: E501 - :type: str + :param standard_metadata_protocol: The standard_metadata_protocol of this StandardisedProtocolMetadataOutput. + :type standard_metadata_protocol: str """ self._standard_metadata_protocol = standard_metadata_protocol - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(StandardisedProtocolMetadataOutput, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, StandardisedProtocolMetadataOutput): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/uniqueness.py b/fuji_server/models/uniqueness.py index 9a55f7b9..8cf73eeb 100644 --- a/fuji_server/models/uniqueness.py +++ b/fuji_server/models/uniqueness.py @@ -1,135 +1,291 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model +from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 +from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium +from fuji_server.models.uniqueness_output import UniquenessOutput - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" +class Uniqueness(Model): + """NOTE: This class is auto generated by the swagger code generator program. -import pprint -import re # noqa: F401 + Do not edit the class manually. + """ -import six + def __init__( + self, + id: int | None = None, + metric_identifier: str | None = None, + metric_name: str | None = None, + metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, + test_status: str = "fail", + score: FAIRResultCommonScore = None, + maturity: str = "incomplete", + output: UniquenessOutput = None, + test_debug: Debug = None, + ): + """Uniqueness - a model defined in Swagger + + :param id: The id of this Uniqueness. # noqa: E501 + :type id: int + :param metric_identifier: The metric_identifier of this Uniqueness. # noqa: E501 + :type metric_identifier: str + :param metric_name: The metric_name of this Uniqueness. # noqa: E501 + :type metric_name: str + :param metric_tests: The metric_tests of this Uniqueness. # noqa: E501 + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + :param test_status: The test_status of this Uniqueness. # noqa: E501 + :type test_status: str + :param score: The score of this Uniqueness. # noqa: E501 + :type score: FAIRResultCommonScore + :param maturity: The maturity of this Uniqueness. # noqa: E501 + :type maturity: str + :param output: The output of this Uniqueness. # noqa: E501 + :type output: UniquenessOutput + :param test_debug: The test_debug of this Uniqueness. # noqa: E501 + :type test_debug: Debug + """ + self.swagger_types = { + "id": int, + "metric_identifier": str, + "metric_name": str, + "metric_tests": dict[str, FAIRResultEvaluationCriterium], + "test_status": str, + "score": FAIRResultCommonScore, + "maturity": str, + "output": UniquenessOutput, + "test_debug": Debug, + } + + self.attribute_map = { + "id": "id", + "metric_identifier": "metric_identifier", + "metric_name": "metric_name", + "metric_tests": "metric_tests", + "test_status": "test_status", + "score": "score", + "maturity": "maturity", + "output": "output", + "test_debug": "test_debug", + } + self._id = id + self._metric_identifier = metric_identifier + self._metric_name = metric_name + self._metric_tests = metric_tests + self._test_status = test_status + self._score = score + self._maturity = maturity + self._output = output + self._test_debug = test_debug -from swagger_client.models.fair_result_common import FAIRResultCommon + @classmethod + def from_dict(cls, dikt) -> "Uniqueness": + """Returns the dict as a model + :param dikt: A dict. + :type: dict + :return: The Uniqueness of this Uniqueness. # noqa: E501 + :rtype: Uniqueness + """ + return util.deserialize_model(dikt, cls) -class Uniqueness(FAIRResultCommon): - """NOTE: This class is auto generated by the swagger code generator program. + @property + def id(self) -> int: + """Gets the id of this Uniqueness. - Do not edit the class manually. - """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"output": "UniquenessOutput", "test_debug": "Debug"} - if hasattr(FAIRResultCommon, "swagger_types"): - swagger_types.update(FAIRResultCommon.swagger_types) - - attribute_map = {"output": "output", "test_debug": "test_debug"} - if hasattr(FAIRResultCommon, "attribute_map"): - attribute_map.update(FAIRResultCommon.attribute_map) - - def __init__(self, output=None, test_debug=None, *args, **kwargs): - """Uniqueness - a model defined in Swagger""" - self._output = None - self._test_debug = None - self.discriminator = None - if output is not None: - self.output = output - if test_debug is not None: - self.test_debug = test_debug - FAIRResultCommon.__init__(self, *args, **kwargs) + :return: The id of this Uniqueness. + :rtype: int + """ + return self._id + + @id.setter + def id(self, id: int): + """Sets the id of this Uniqueness. + + + :param id: The id of this Uniqueness. + :type id: int + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") + + self._id = id + + @property + def metric_identifier(self) -> str: + """Gets the metric_identifier of this Uniqueness. + + + :return: The metric_identifier of this Uniqueness. + :rtype: str + """ + return self._metric_identifier + + @metric_identifier.setter + def metric_identifier(self, metric_identifier: str): + """Sets the metric_identifier of this Uniqueness. + + + :param metric_identifier: The metric_identifier of this Uniqueness. + :type metric_identifier: str + """ + if metric_identifier is None: + raise ValueError("Invalid value for `metric_identifier`, must not be `None`") + + self._metric_identifier = metric_identifier + + @property + def metric_name(self) -> str: + """Gets the metric_name of this Uniqueness. + + + :return: The metric_name of this Uniqueness. + :rtype: str + """ + return self._metric_name + + @metric_name.setter + def metric_name(self, metric_name: str): + """Sets the metric_name of this Uniqueness. + + + :param metric_name: The metric_name of this Uniqueness. + :type metric_name: str + """ + if metric_name is None: + raise ValueError("Invalid value for `metric_name`, must not be `None`") + + self._metric_name = metric_name + + @property + def metric_tests(self) -> dict[str, FAIRResultEvaluationCriterium]: + """Gets the metric_tests of this Uniqueness. + + + :return: The metric_tests of this Uniqueness. + :rtype: Dict[str, FAIRResultEvaluationCriterium] + """ + return self._metric_tests + + @metric_tests.setter + def metric_tests(self, metric_tests: dict[str, FAIRResultEvaluationCriterium]): + """Sets the metric_tests of this Uniqueness. + + + :param metric_tests: The metric_tests of this Uniqueness. + :type metric_tests: Dict[str, FAIRResultEvaluationCriterium] + """ + + self._metric_tests = metric_tests + + @property + def test_status(self) -> str: + """Gets the test_status of this Uniqueness. + + + :return: The test_status of this Uniqueness. + :rtype: str + """ + return self._test_status + + @test_status.setter + def test_status(self, test_status: str): + """Sets the test_status of this Uniqueness. + + + :param test_status: The test_status of this Uniqueness. + :type test_status: str + """ + allowed_values = ["pass", "fail", "indeterminate"] + if test_status not in allowed_values: + raise ValueError(f"Invalid value for `test_status` ({test_status}), must be one of {allowed_values}") + + self._test_status = test_status + + @property + def score(self) -> FAIRResultCommonScore: + """Gets the score of this Uniqueness. + + + :return: The score of this Uniqueness. + :rtype: FAIRResultCommonScore + """ + return self._score + + @score.setter + def score(self, score: FAIRResultCommonScore): + """Sets the score of this Uniqueness. + + + :param score: The score of this Uniqueness. + :type score: FAIRResultCommonScore + """ + if score is None: + raise ValueError("Invalid value for `score`, must not be `None`") + + self._score = score @property - def output(self): - """Gets the output of this Uniqueness. # noqa: E501 + def maturity(self) -> str: + """Gets the maturity of this Uniqueness. + + + :return: The maturity of this Uniqueness. + :rtype: str + """ + return self._maturity + @maturity.setter + def maturity(self, maturity: int): + """Sets the maturity of this Uniqueness. - :return: The output of this Uniqueness. # noqa: E501 + + :param maturity: The maturity of this Uniqueness. + :type maturity: int + """ + + self._maturity = maturity + + @property + def output(self) -> UniquenessOutput: + """Gets the output of this Uniqueness. + + + :return: The output of this Uniqueness. :rtype: UniquenessOutput """ return self._output @output.setter - def output(self, output): + def output(self, output: UniquenessOutput): """Sets the output of this Uniqueness. - :param output: The output of this Uniqueness. # noqa: E501 - :type: UniquenessOutput + :param output: The output of this Uniqueness. + :type output: UniquenessOutput """ self._output = output @property - def test_debug(self): - """Gets the test_debug of this Uniqueness. # noqa: E501 + def test_debug(self) -> Debug: + """Gets the test_debug of this Uniqueness. - :return: The test_debug of this Uniqueness. # noqa: E501 + :return: The test_debug of this Uniqueness. :rtype: Debug """ return self._test_debug @test_debug.setter - def test_debug(self, test_debug): + def test_debug(self, test_debug: Debug): """Sets the test_debug of this Uniqueness. - :param test_debug: The test_debug of this Uniqueness. # noqa: E501 - :type: Debug + :param test_debug: The test_debug of this Uniqueness. + :type test_debug: Debug """ self._test_debug = test_debug - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(Uniqueness, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, Uniqueness): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/fuji_server/models/uniqueness_output.py b/fuji_server/models/uniqueness_output.py index 3cf4167a..b477973e 100644 --- a/fuji_server/models/uniqueness_output.py +++ b/fuji_server/models/uniqueness_output.py @@ -1,128 +1,76 @@ -""" - F-UJI +from fuji_server import util +from fuji_server.models.base_model_ import Model - A Service for Evaluating Research Data Objects Based on FAIRsFAIR Metrics.

This work was supported by the FAIRsFAIR project (H2020-INFRAEOSC-2018-2020 Grant Agreement 831558). # noqa: E501 - OpenAPI spec version: 3.0.1 - Contact: anusuriya.devaraju@googlemail.com - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - - -class UniquenessOutput: +class UniquenessOutput(Model): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ - """ - Attributes: - swagger_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - swagger_types = {"guid": "str", "guid_scheme": "str"} + def __init__(self, guid: str | None = None, guid_scheme: str | None = None): + """UniquenessOutput - a model defined in Swagger - attribute_map = {"guid": "guid", "guid_scheme": "guid_scheme"} + :param guid: The guid of this UniquenessOutput. # noqa: E501 + :type guid: str + :param guid_scheme: The guid_scheme of this UniquenessOutput. # noqa: E501 + :type guid_scheme: str + """ + self.swagger_types = {"guid": str, "guid_scheme": str} - def __init__(self, guid=None, guid_scheme=None): - """UniquenessOutput - a model defined in Swagger""" - self._guid = None - self._guid_scheme = None - self.discriminator = None - if guid is not None: - self.guid = guid - if guid_scheme is not None: - self.guid_scheme = guid_scheme + self.attribute_map = {"guid": "guid", "guid_scheme": "guid_scheme"} + self._guid = guid + self._guid_scheme = guid_scheme + + @classmethod + def from_dict(cls, dikt) -> "UniquenessOutput": + """Returns the dict as a model + + :param dikt: A dict. + :type: dict + :return: The Uniqueness_output of this UniquenessOutput. # noqa: E501 + :rtype: UniquenessOutput + """ + return util.deserialize_model(dikt, cls) @property - def guid(self): - """Gets the guid of this UniquenessOutput. # noqa: E501 + def guid(self) -> str: + """Gets the guid of this UniquenessOutput. - :return: The guid of this UniquenessOutput. # noqa: E501 + :return: The guid of this UniquenessOutput. :rtype: str """ return self._guid @guid.setter - def guid(self, guid): + def guid(self, guid: str): """Sets the guid of this UniquenessOutput. - :param guid: The guid of this UniquenessOutput. # noqa: E501 - :type: str + :param guid: The guid of this UniquenessOutput. + :type guid: str """ self._guid = guid @property - def guid_scheme(self): - """Gets the guid_scheme of this UniquenessOutput. # noqa: E501 + def guid_scheme(self) -> str: + """Gets the guid_scheme of this UniquenessOutput. - :return: The guid_scheme of this UniquenessOutput. # noqa: E501 + :return: The guid_scheme of this UniquenessOutput. :rtype: str """ return self._guid_scheme @guid_scheme.setter - def guid_scheme(self, guid_scheme): + def guid_scheme(self, guid_scheme: str): """Sets the guid_scheme of this UniquenessOutput. - :param guid_scheme: The guid_scheme of this UniquenessOutput. # noqa: E501 - :type: str + :param guid_scheme: The guid_scheme of this UniquenessOutput. + :type guid_scheme: str """ self._guid_scheme = guid_scheme - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.swagger_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict( - map( - lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, - value.items(), - ) - ) - else: - result[attr] = value - if issubclass(UniquenessOutput, dict): - for key, value in self.items(): - result[key] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, UniquenessOutput): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other From 41aba40b05daeddfbc4b75ea56ae2f626b075c2a Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Fri, 12 Jan 2024 14:38:37 +0000 Subject: [PATCH 37/45] Update github.cfg --- fuji_server/config/github.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fuji_server/config/github.cfg b/fuji_server/config/github.cfg index ecf08d00..8705f3b8 100644 --- a/fuji_server/config/github.cfg +++ b/fuji_server/config/github.cfg @@ -1,2 +1,2 @@ [ACCESS] -token = \ No newline at end of file +token = None # your access token, usually starts with 'ghp_' From c57216dccd931449ef3a78c4b6b3aa9f5345cbca Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Fri, 12 Jan 2024 14:09:15 +0000 Subject: [PATCH 38/45] allow un-authenticated connection to GitHub --- fuji_server/config/github.cfg | 2 -- fuji_server/config/github.ini | 3 +++ fuji_server/harvester/github_harvester.py | 16 ++++++++++++---- 3 files changed, 15 insertions(+), 6 deletions(-) delete mode 100644 fuji_server/config/github.cfg create mode 100644 fuji_server/config/github.ini diff --git a/fuji_server/config/github.cfg b/fuji_server/config/github.cfg deleted file mode 100644 index 8705f3b8..00000000 --- a/fuji_server/config/github.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[ACCESS] -token = None # your access token, usually starts with 'ghp_' diff --git a/fuji_server/config/github.ini b/fuji_server/config/github.ini new file mode 100644 index 00000000..fb32936a --- /dev/null +++ b/fuji_server/config/github.ini @@ -0,0 +1,3 @@ +[ACCESS] +# set equal to access token if available to increase rate limit (usually starts with 'ghp_') +token = diff --git a/fuji_server/harvester/github_harvester.py b/fuji_server/harvester/github_harvester.py index 449e09f9..776bb2ae 100644 --- a/fuji_server/harvester/github_harvester.py +++ b/fuji_server/harvester/github_harvester.py @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2020 PANGAEA (https://www.pangaea.de/) +# +# SPDX-License-Identifier: MIT + import os from configparser import ConfigParser @@ -9,15 +13,19 @@ class GithubHarvester: def __init__(self, id, host="https://github.com"): # Read Github API access token from config file. config = ConfigParser() - config.read(os.path.join(os.path.abspath(os.path.dirname(__file__)), "../config/github.cfg")) - auth_token = Auth.Token(config["ACCESS"]["token"]) + config.read(os.path.join(os.path.abspath(os.path.dirname(__file__)), "../config/github.ini")) + token = config["ACCESS"]["token"] + if token == "": + auth = Auth.Token(token) + else: # empty token, so no authentication possible (rate limit will be much lower) + auth = None self.id = id self.host = host if host != "https://github.com": base_url = f"{self.host}/api/v3" - self.handle = Github(auth=auth_token, base_url=base_url) + self.handle = Github(auth=auth, base_url=base_url) else: - self.handle = Github(auth=auth_token) + self.handle = Github(auth=auth) self.data = {} # dictionary with all info def harvest(self): From 7612a98fd10d8fc1bae65a51a0e6ff76758ef01f Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Fri, 12 Jan 2024 14:52:07 +0000 Subject: [PATCH 39/45] added functional software eval test --- fuji_server/harvester/github_harvester.py | 3 +- .../test_evaluation_software.yaml | 946 ++++++++++++++++++ tests/functional/test_evaluation.py | 36 + 3 files changed, 984 insertions(+), 1 deletion(-) create mode 100644 tests/functional/cassettes/test_evaluation/test_evaluation_software.yaml diff --git a/fuji_server/harvester/github_harvester.py b/fuji_server/harvester/github_harvester.py index 776bb2ae..63153b33 100644 --- a/fuji_server/harvester/github_harvester.py +++ b/fuji_server/harvester/github_harvester.py @@ -15,10 +15,11 @@ def __init__(self, id, host="https://github.com"): config = ConfigParser() config.read(os.path.join(os.path.abspath(os.path.dirname(__file__)), "../config/github.ini")) token = config["ACCESS"]["token"] - if token == "": + if token != "": auth = Auth.Token(token) else: # empty token, so no authentication possible (rate limit will be much lower) auth = None + print("Running in unauthenticated mode. Capabilities are limited.") # TODO: this should be a log message self.id = id self.host = host if host != "https://github.com": diff --git a/tests/functional/cassettes/test_evaluation/test_evaluation_software.yaml b/tests/functional/cassettes/test_evaluation/test_evaluation_software.yaml new file mode 100644 index 00000000..afe91d07 --- /dev/null +++ b/tests/functional/cassettes/test_evaluation/test_evaluation_software.yaml @@ -0,0 +1,946 @@ +interactions: +- request: + body: + headers: + Accept: + - text/html, */* + Connection: + - close + Host: + - github.com + User-Agent: + - F-UJI + method: GET + uri: https://github.com/pangaea-data-publisher/fuji + response: + body: + string: "\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n \n \n \n \n \n \n\n \n\n \n \n \n \n \n \n\n\n \n \n\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n\n GitHub - pangaea-data-publisher/fuji: FAIRsFAIR Research Data Object Assessment Service\n\n\n\n \n\n \n \n\n\n \n\n\n \n\n\n \n \n\n \n \n\n \n \n \n \n \n\n\n\n \n\n \n\n\n\n\n \n\n \n\n \n\n \n \n \n \n \n \n \n \n \n \n\n\n\n \n\n\n\n \n\n\n \n \n \n \n\n \n\n \n\n \n\n \n\n\n\n \n \n\n\n \n\n \n\n \n\n \n \n \n\n\n\n\n\n \n\n \n\n \n

\n \n\n\n
\n Skip to content\n \n \n \n \n \n\n\n\n\n\n\n\n\n\n \n \n
\n\n\n\n\n \n\n \n\n \n\n\n\n
\n \n\n
\n
\n \n \n \n\n \n\n \n\n
\n \n
\n
\n\n\n
\n
\n \n\n
\n \n\n\n\">\n \n \n
\n \n \n\n
\n Search or jump to...\n
\n \n\n
\n \n\n \n\n \n
\n \n

Search code, repositories, users, issues, pull requests...

\n
\n \n
\n
\n \n
\n \n \n \n \n \n\n \n
\n
\n
\n
\n \n
\n
\n Clear\n \n\n
\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\n \n
\n
\n
\n\n \n
\n
\n\n
\n
\n
\n \n
\n \n
\n \n
\n
\n
\n

\n Provide feedback\n

\n
\n
\n \n
\n
\n
\n \n
\n

We read every piece of feedback, and take your input very seriously.

\n \n \n \n
\n
\n \n
\n\n \n \n
\n \n
\n
\n
\n

\n Saved searches\n

\n

Use saved searches to filter your results more quickly

\n
\n
\n \n
\n
\n
\n \n
\n\n \n\n
\n
\n
\n\n
\n
\n \n
\n
\n
\n\n\n\n \n\n \n Sign up\n \n
\n
\n
\n \n\n\n \n \n\n
\n\n\n\n\n\n\n\n\n
\n\n\n \n\n\n\n \n
\n\n\n \n \n\n\n\n\n\n\n \n
\n
\n \n \n\n\n\n\n\n \n \n\n \n\n\n\n\n\n\n \n
\n\n
\n\n
\n \n
\n \n \n\n \n \n \n pangaea-data-publisher\n \n /\n \n fuji\n \n\n Public\n
\n\n\n
\n\n
\n \n\n
\n
\n\n
\n
\n

\n FAIRsFAIR Research Data Object Assessment Service\n

\n\n

License

\n \n\n\n \n\n
\n
\n \n
\n \n \n \n\n \n
\n
\n\n
\n\n\n \n\n
\n\n \n\n\n\n\n
\n \n\n\n \n \n

pangaea-data-publisher/fuji

\n
\n
\n\n \n\n \n\n
\n
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n
\n\n\n \n
\n
\n\n
\n
\n
\n
\n

About

\n\n

\n FAIRsFAIR Research Data Object Assessment Service\n

\n\n

Topics

\n \n\n

Resources

\n \n\n

License

\n \n\n\n\n\n \n \n\n \n\n \n\n

Stars

\n \n\n

Watchers

\n \n\n

Forks

\n \n\n \n
\n\n
\n
\n\n \n \n\n \n \n
\n
\n

\n \n Packages\n 1\n

\n\n\n \n
\n
\n
 
\n
\n
\n\n\n
\n
\n\n \n \n\n \n
\n
\n

\n \n Contributors\n 18\n

\n\n\n \n \n\n\n\n\n \n
\n
\n\n \n \n
\n
\n

Languages

\n
\n \n \n \n \n
\n\n\n
\n
\n\n
\n
\n \n
\n\n
\n\n\n
\n\n
\n\n\n
\n
\n\n \n\n
\n

Footer

\n\n\n
\n
\n \n \n \n\n\n \n © 2024 GitHub, Inc.\n \n
\n\n \n
\n\n
\n\n\n\n\n \n\n\n \n\n \n\n
\n
\n
\n
\n\n \n\n\n\n\n\n \n\n
\n
\n \n\n\n" + headers: + Accept-Ranges: + - bytes + Cache-Control: + - max-age=0, private, must-revalidate + Content-Security-Policy: + - "default-src 'none'; base-uri 'self'; child-src github.com/assets-cdn/worker/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com cdn.optimizely.com logx.optimizely.com/v1/events api.githubcopilot.com objects-origin.githubusercontent.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com support.github.com; img-src 'self' data: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.com/assets-cdn/worker/ gist.github.com/assets-cdn/worker/" + Content-Type: + - text/html; charset=utf-8 + Date: + - Fri, 12 Jan 2024 16:17:02 GMT + ETag: + - W/"ec8232511583f0787fcee0d84fecb54b" + Referrer-Policy: + - no-referrer-when-downgrade + Server: + - GitHub.com + Set-Cookie: + - _gh_sess=ttPzke%2BjC1HoiZOxKtmh0meOAugTyG4Otj46YXzogjCPWbt703%2BBrhHDeGk5zpAS6afxbBCXqWqazUsMXCW5w%2FHLHCo1JPaD3iZ7bF%2Bh86ttBYLACcT6jg30JofeMM74dM6Lzq%2BQkNrtH8LCMyTcMjGvIX37nD11SAciGB4cb%2BGSaqaahk%2BuyFnz0KL43WaCEKtubupheC4YnlilM4wyC6Jhqw9IIWIxeuDohezIJslywtdCvDSJ9Pho1GlnTzlJktim1c76Ypd7P4%2FXoP1%2F4w%3D%3D--LXClk8D8PH9JOc6z--haflpnPHMMYyYd%2BnD73RvQ%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax + - _octo=GH1.1.1427196577.1705076221; Path=/; Domain=github.com; Expires=Sun, 12 Jan 2025 16:17:01 GMT; Secure; SameSite=Lax + - logged_in=no; Path=/; Domain=github.com; Expires=Sun, 12 Jan 2025 16:17:01 GMT; HttpOnly; Secure; SameSite=Lax + Strict-Transport-Security: + - max-age=31536000; includeSubdomains; preload + Transfer-Encoding: + - chunked + Vary: + - X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, Accept-Encoding, Accept, X-Requested-With + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + X-GitHub-Request-Id: + - C714:19136:9D6CD0E:9F1DC59:65A165FD + X-XSS-Protection: + - '0' + connection: + - close + status: + code: 200 + message: OK +- request: + body: + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Authorization: + - token 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 + Connection: + - keep-alive + User-Agent: + - PyGithub/Python + method: GET + uri: https://api.github.com/repos/pangaea-data-publisher/fuji + response: + body: + string: '{"id":259678183,"node_id":"MDEwOlJlcG9zaXRvcnkyNTk2NzgxODM=","name":"fuji","full_name":"pangaea-data-publisher/fuji","private":false,"owner":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pangaea-data-publisher/fuji","description":"FAIRsFAIR Research Data Object Assessment Service","fork":false,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji","forks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/forks","keys_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/teams","hooks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/hooks","issue_events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/events{/number}","events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/events","assignees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/assignees{/user}","branches_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/branches{/branch}","tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/tags","blobs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/statuses/{sha}","languages_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/languages","stargazers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/stargazers","contributors_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contributors","subscribers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscribers","subscription_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscription","commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/{+path}","compare_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/merges","archive_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/downloads","issues_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues{/number}","pulls_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/pulls{/number}","milestones_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/milestones{/number}","notifications_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/labels{/name}","releases_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/releases{/id}","deployments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/deployments","created_at":"2020-04-28T15:33:40Z","updated_at":"2024-01-07T16:29:43Z","pushed_at":"2024-01-12T15:38:52Z","git_url":"git://github.com/pangaea-data-publisher/fuji.git","ssh_url":"git@github.com:pangaea-data-publisher/fuji.git","clone_url":"https://github.com/pangaea-data-publisher/fuji.git","svn_url":"https://github.com/pangaea-data-publisher/fuji","homepage":"","size":5637,"stargazers_count":43,"watchers_count":43,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"has_discussions":false,"forks_count":31,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":25,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"allow_forking":true,"is_template":false,"web_commit_signoff_required":false,"topics":["fairdata","hacktoberfest"],"visibility":"public","forks":31,"open_issues":25,"watchers":43,"default_branch":"master","permissions":{"admin":false,"maintain":false,"push":false,"triage":false,"pull":true},"temp_clone_token":"","custom_properties":{},"organization":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"network_count":31,"subscribers_count":9}' + headers: + Access-Control-Allow-Origin: + - '*' + Access-Control-Expose-Headers: + - ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset + Cache-Control: + - private, max-age=60, s-maxage=60 + Content-Encoding: + - gzip + Content-Security-Policy: + - default-src 'none' + Content-Type: + - application/json; charset=utf-8 + Date: + - Fri, 12 Jan 2024 16:17:03 GMT + ETag: + - W/"a7a569b8824b8fb08d10a84bb3425daa8756ee7323992e00c2fc62a844488526" + Last-Modified: + - Sun, 07 Jan 2024 16:29:43 GMT + Referrer-Policy: + - origin-when-cross-origin, strict-origin-when-cross-origin + Server: + - GitHub.com + Strict-Transport-Security: + - max-age=31536000; includeSubdomains; preload + Transfer-Encoding: + - chunked + Vary: + - Accept, Authorization, Cookie, X-GitHub-OTP + - Accept-Encoding, Accept, X-Requested-With + X-Accepted-OAuth-Scopes: + - repo + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + X-GitHub-Media-Type: + - github.v3; format=json + X-GitHub-Request-Id: + - 514B:8B570:F3D99F9:F68B93A:65A165FE + X-OAuth-Scopes: + - repo + X-RateLimit-Limit: + - '5000' + X-RateLimit-Remaining: + - '4966' + X-RateLimit-Reset: + - '1705078320' + X-RateLimit-Resource: + - core + X-RateLimit-Used: + - '34' + X-XSS-Protection: + - '0' + github-authentication-token-expiration: + - 2024-03-04 14:01:51 UTC + x-github-api-version-selected: + - '2022-11-28' + status: + code: 200 + message: OK +- request: + body: + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Authorization: + - token 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 + Connection: + - keep-alive + User-Agent: + - PyGithub/Python + method: GET + uri: https://api.github.com/repos/pangaea-data-publisher/fuji/license + response: + body: + string: '{"name":"LICENSE","path":"LICENSE","sha":"40f22c50b59b959d5e855961998d88dfa13c6279","size":1090,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/LICENSE?ref=master","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/master/LICENSE","git_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs/40f22c50b59b959d5e855961998d88dfa13c6279","download_url":"https://raw.githubusercontent.com/pangaea-data-publisher/fuji/master/LICENSE","type":"file","content":"TUlUIExpY2Vuc2UKCkNvcHlyaWdodCAoYykgMjAyMCBQQU5HQUVBIChodHRw\nczovL3d3dy5wYW5nYWVhLmRlLykKClBlcm1pc3Npb24gaXMgaGVyZWJ5IGdy\nYW50ZWQsIGZyZWUgb2YgY2hhcmdlLCB0byBhbnkgcGVyc29uIG9idGFpbmlu\nZyBhIGNvcHkKb2YgdGhpcyBzb2Z0d2FyZSBhbmQgYXNzb2NpYXRlZCBkb2N1\nbWVudGF0aW9uIGZpbGVzICh0aGUgIlNvZnR3YXJlIiksIHRvIGRlYWwKaW4g\ndGhlIFNvZnR3YXJlIHdpdGhvdXQgcmVzdHJpY3Rpb24sIGluY2x1ZGluZyB3\naXRob3V0IGxpbWl0YXRpb24gdGhlIHJpZ2h0cwp0byB1c2UsIGNvcHksIG1v\nZGlmeSwgbWVyZ2UsIHB1Ymxpc2gsIGRpc3RyaWJ1dGUsIHN1YmxpY2Vuc2Us\nIGFuZC9vciBzZWxsCmNvcGllcyBvZiB0aGUgU29mdHdhcmUsIGFuZCB0byBw\nZXJtaXQgcGVyc29ucyB0byB3aG9tIHRoZSBTb2Z0d2FyZSBpcwpmdXJuaXNo\nZWQgdG8gZG8gc28sIHN1YmplY3QgdG8gdGhlIGZvbGxvd2luZyBjb25kaXRp\nb25zOgoKVGhlIGFib3ZlIGNvcHlyaWdodCBub3RpY2UgYW5kIHRoaXMgcGVy\nbWlzc2lvbiBub3RpY2Ugc2hhbGwgYmUgaW5jbHVkZWQgaW4gYWxsCmNvcGll\ncyBvciBzdWJzdGFudGlhbCBwb3J0aW9ucyBvZiB0aGUgU29mdHdhcmUuCgpU\nSEUgU09GVFdBUkUgSVMgUFJPVklERUQgIkFTIElTIiwgV0lUSE9VVCBXQVJS\nQU5UWSBPRiBBTlkgS0lORCwgRVhQUkVTUyBPUgpJTVBMSUVELCBJTkNMVURJ\nTkcgQlVUIE5PVCBMSU1JVEVEIFRPIFRIRSBXQVJSQU5USUVTIE9GIE1FUkNI\nQU5UQUJJTElUWSwKRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0Ug\nQU5EIE5PTklORlJJTkdFTUVOVC4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFCkFV\nVEhPUlMgT1IgQ09QWVJJR0hUIEhPTERFUlMgQkUgTElBQkxFIEZPUiBBTlkg\nQ0xBSU0sIERBTUFHRVMgT1IgT1RIRVIKTElBQklMSVRZLCBXSEVUSEVSIElO\nIEFOIEFDVElPTiBPRiBDT05UUkFDVCwgVE9SVCBPUiBPVEhFUldJU0UsIEFS\nSVNJTkcgRlJPTSwKT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUg\nU09GVFdBUkUgT1IgVEhFIFVTRSBPUiBPVEhFUiBERUFMSU5HUyBJTiBUSEUK\nU09GVFdBUkUuCg==\n","encoding":"base64","_links":{"self":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/LICENSE?ref=master","git":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs/40f22c50b59b959d5e855961998d88dfa13c6279","html":"https://github.com/pangaea-data-publisher/fuji/blob/master/LICENSE"},"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"}}' + headers: + Access-Control-Allow-Origin: + - '*' + Access-Control-Expose-Headers: + - ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset + Cache-Control: + - private, max-age=60, s-maxage=60 + Content-Encoding: + - gzip + Content-Security-Policy: + - default-src 'none' + Content-Type: + - application/json; charset=utf-8 + Date: + - Fri, 12 Jan 2024 16:17:03 GMT + ETag: + - W/"6f1b58112abe01ea84b4f0e30c4d9e40494c12da502d286fc6434e4ec783e526" + Last-Modified: + - Fri, 12 Jan 2024 09:49:41 GMT + Referrer-Policy: + - origin-when-cross-origin, strict-origin-when-cross-origin + Server: + - GitHub.com + Strict-Transport-Security: + - max-age=31536000; includeSubdomains; preload + Transfer-Encoding: + - chunked + Vary: + - Accept, Authorization, Cookie, X-GitHub-OTP + - Accept-Encoding, Accept, X-Requested-With + X-Accepted-OAuth-Scopes: + - '' + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + X-GitHub-Media-Type: + - github.v3; format=json + X-GitHub-Request-Id: + - 5151:168E2F:A2CDB3B:A4979EE:65A165FF + X-OAuth-Scopes: + - repo + X-RateLimit-Limit: + - '5000' + X-RateLimit-Remaining: + - '4965' + X-RateLimit-Reset: + - '1705078320' + X-RateLimit-Resource: + - core + X-RateLimit-Used: + - '35' + X-XSS-Protection: + - '0' + github-authentication-token-expiration: + - 2024-03-04 14:01:51 UTC + x-github-api-version-selected: + - '2022-11-28' + status: + code: 200 + message: OK +- request: + body: + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Authorization: + - token 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 + Connection: + - keep-alive + User-Agent: + - PyGithub/Python + method: GET + uri: https://api.github.com/repos/pangaea-data-publisher/fuji/contents/pom.xml + response: + body: + string: '{"message":"Not Found","documentation_url":"https://docs.github.com/rest/repos/contents#get-repository-content"}' + headers: + Access-Control-Allow-Origin: + - '*' + Access-Control-Expose-Headers: + - ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset + Content-Encoding: + - gzip + Content-Security-Policy: + - default-src 'none' + Content-Type: + - application/json; charset=utf-8 + Date: + - Fri, 12 Jan 2024 16:17:04 GMT + Referrer-Policy: + - origin-when-cross-origin, strict-origin-when-cross-origin + Server: + - GitHub.com + Strict-Transport-Security: + - max-age=31536000; includeSubdomains; preload + Transfer-Encoding: + - chunked + Vary: + - Accept-Encoding, Accept, X-Requested-With + X-Accepted-OAuth-Scopes: + - '' + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + X-GitHub-Media-Type: + - github.v3; format=json + X-GitHub-Request-Id: + - 2A04:F3888:DE223AE:E0AF5AF:65A16600 + X-OAuth-Scopes: + - repo + X-RateLimit-Limit: + - '5000' + X-RateLimit-Remaining: + - '4964' + X-RateLimit-Reset: + - '1705078320' + X-RateLimit-Resource: + - core + X-RateLimit-Used: + - '36' + X-XSS-Protection: + - '0' + github-authentication-token-expiration: + - 2024-03-04 14:01:51 UTC + x-github-api-version-selected: + - '2022-11-28' + status: + code: 404 + message: Not Found +- request: + body: + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Authorization: + - token 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 + Connection: + - keep-alive + User-Agent: + - PyGithub/Python + method: GET + uri: https://api.github.com/repos/pangaea-data-publisher/fuji/languages + response: + body: + string: '{"Python":897213,"PHP":24895,"Dockerfile":996,"HTML":130}' + headers: + Access-Control-Allow-Origin: + - '*' + Access-Control-Expose-Headers: + - ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset + Cache-Control: + - private, max-age=60, s-maxage=60 + Content-Encoding: + - gzip + Content-Security-Policy: + - default-src 'none' + Content-Type: + - application/json; charset=utf-8 + Date: + - Fri, 12 Jan 2024 16:17:04 GMT + ETag: + - W/"ca668d6a62cdacea0b4a9a378e7884dd9d7cfca05390e1184afaadf92ee4b1ec" + Last-Modified: + - Sun, 07 Jan 2024 16:29:43 GMT + Referrer-Policy: + - origin-when-cross-origin, strict-origin-when-cross-origin + Server: + - GitHub.com + Strict-Transport-Security: + - max-age=31536000; includeSubdomains; preload + Transfer-Encoding: + - chunked + Vary: + - Accept, Authorization, Cookie, X-GitHub-OTP + - Accept-Encoding, Accept, X-Requested-With + X-Accepted-OAuth-Scopes: + - '' + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + X-GitHub-Media-Type: + - github.v3; format=json + X-GitHub-Request-Id: + - C75A:89B15:EA894E5:ED3B506:65A16600 + X-OAuth-Scopes: + - repo + X-RateLimit-Limit: + - '5000' + X-RateLimit-Remaining: + - '4963' + X-RateLimit-Reset: + - '1705078320' + X-RateLimit-Resource: + - core + X-RateLimit-Used: + - '37' + X-XSS-Protection: + - '0' + github-authentication-token-expiration: + - 2024-03-04 14:01:51 UTC + x-github-api-version-selected: + - '2022-11-28' + status: + code: 200 + message: OK +- request: + body: + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Authorization: + - token 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 + Connection: + - keep-alive + User-Agent: + - PyGithub/Python + method: GET + uri: https://api.github.com/search/code?q=+repo%3Apangaea-data-publisher%2Ffuji+language%3APython&per_page=1 + response: + body: + string: '{"total_count":122,"incomplete_results":false,"items":[{"name":"app.py","path":"fuji_server/app.py","sha":"26a77ee3946819fff0bccaf22df1265ea32bc7dc","url":"https://api.github.com/repositories/259678183/contents/fuji_server/app.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git_url":"https://api.github.com/repositories/259678183/git/blobs/26a77ee3946819fff0bccaf22df1265ea32bc7dc","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/app.py","repository":{"id":259678183,"node_id":"MDEwOlJlcG9zaXRvcnkyNTk2NzgxODM=","name":"fuji","full_name":"pangaea-data-publisher/fuji","private":false,"owner":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pangaea-data-publisher/fuji","description":"FAIRsFAIR Research Data Object Assessment Service","fork":false,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji","forks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/forks","keys_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/teams","hooks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/hooks","issue_events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/events{/number}","events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/events","assignees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/assignees{/user}","branches_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/branches{/branch}","tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/tags","blobs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/statuses/{sha}","languages_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/languages","stargazers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/stargazers","contributors_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contributors","subscribers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscribers","subscription_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscription","commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/{+path}","compare_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/merges","archive_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/downloads","issues_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues{/number}","pulls_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/pulls{/number}","milestones_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/milestones{/number}","notifications_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/labels{/name}","releases_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/releases{/id}","deployments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/deployments"},"score":1.0}]}' + headers: + Access-Control-Allow-Origin: + - '*' + Access-Control-Expose-Headers: + - ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset + Cache-Control: + - no-cache + Content-Encoding: + - gzip + Content-Security-Policy: + - default-src 'none' + Content-Type: + - application/json; charset=utf-8 + Date: + - Fri, 12 Jan 2024 16:17:05 GMT + Link: + - ; rel="next", ; rel="last" + Referrer-Policy: + - origin-when-cross-origin, strict-origin-when-cross-origin + Server: + - GitHub.com + Strict-Transport-Security: + - max-age=31536000; includeSubdomains; preload + Transfer-Encoding: + - chunked + Vary: + - Accept, Authorization, Cookie, X-GitHub-OTP + - Accept-Encoding, Accept, X-Requested-With + X-Accepted-OAuth-Scopes: + - '' + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + X-GitHub-Media-Type: + - github.v3; format=json + X-GitHub-Request-Id: + - 50FD:8F432:F6CC887:F97E823:65A16601 + X-OAuth-Scopes: + - repo + X-RateLimit-Limit: + - '10' + X-RateLimit-Remaining: + - '9' + X-RateLimit-Reset: + - '1705076285' + X-RateLimit-Resource: + - code_search + X-RateLimit-Used: + - '1' + X-XSS-Protection: + - '0' + github-authentication-token-expiration: + - 2024-03-04 14:01:51 UTC + x-github-api-version-selected: + - '2022-11-28' + status: + code: 200 + message: OK +- request: + body: + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Authorization: + - token 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 + Connection: + - keep-alive + User-Agent: + - PyGithub/Python + method: GET + uri: https://api.github.com/search/code?q=+repo%3Apangaea-data-publisher%2Ffuji+language%3APython + response: + body: + string: '{"total_count":122,"incomplete_results":false,"items":[{"name":"app.py","path":"fuji_server/app.py","sha":"26a77ee3946819fff0bccaf22df1265ea32bc7dc","url":"https://api.github.com/repositories/259678183/contents/fuji_server/app.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git_url":"https://api.github.com/repositories/259678183/git/blobs/26a77ee3946819fff0bccaf22df1265ea32bc7dc","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/app.py","repository":{"id":259678183,"node_id":"MDEwOlJlcG9zaXRvcnkyNTk2NzgxODM=","name":"fuji","full_name":"pangaea-data-publisher/fuji","private":false,"owner":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pangaea-data-publisher/fuji","description":"FAIRsFAIR Research Data Object Assessment Service","fork":false,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji","forks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/forks","keys_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/teams","hooks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/hooks","issue_events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/events{/number}","events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/events","assignees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/assignees{/user}","branches_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/branches{/branch}","tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/tags","blobs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/statuses/{sha}","languages_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/languages","stargazers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/stargazers","contributors_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contributors","subscribers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscribers","subscription_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscription","commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/{+path}","compare_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/merges","archive_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/downloads","issues_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues{/number}","pulls_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/pulls{/number}","milestones_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/milestones{/number}","notifications_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/labels{/name}","releases_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/releases{/id}","deployments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/deployments"},"score":1.0},{"name":"conf.py","path":"docs/source/conf.py","sha":"95e0e43e9ff99c7f1ddc5dc7f4445bbe994ee2b2","url":"https://api.github.com/repositories/259678183/contents/docs/source/conf.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git_url":"https://api.github.com/repositories/259678183/git/blobs/95e0e43e9ff99c7f1ddc5dc7f4445bbe994ee2b2","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/docs/source/conf.py","repository":{"id":259678183,"node_id":"MDEwOlJlcG9zaXRvcnkyNTk2NzgxODM=","name":"fuji","full_name":"pangaea-data-publisher/fuji","private":false,"owner":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pangaea-data-publisher/fuji","description":"FAIRsFAIR Research Data Object Assessment Service","fork":false,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji","forks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/forks","keys_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/teams","hooks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/hooks","issue_events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/events{/number}","events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/events","assignees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/assignees{/user}","branches_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/branches{/branch}","tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/tags","blobs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/statuses/{sha}","languages_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/languages","stargazers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/stargazers","contributors_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contributors","subscribers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscribers","subscription_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscription","commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/{+path}","compare_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/merges","archive_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/downloads","issues_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues{/number}","pulls_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/pulls{/number}","milestones_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/milestones{/number}","notifications_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/labels{/name}","releases_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/releases{/id}","deployments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/deployments"},"score":1.0},{"name":"encoder.py","path":"fuji_server/encoder.py","sha":"0536ef3fbc331bfc0a83b769dacb0df405d48e9a","url":"https://api.github.com/repositories/259678183/contents/fuji_server/encoder.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git_url":"https://api.github.com/repositories/259678183/git/blobs/0536ef3fbc331bfc0a83b769dacb0df405d48e9a","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/encoder.py","repository":{"id":259678183,"node_id":"MDEwOlJlcG9zaXRvcnkyNTk2NzgxODM=","name":"fuji","full_name":"pangaea-data-publisher/fuji","private":false,"owner":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pangaea-data-publisher/fuji","description":"FAIRsFAIR Research Data Object Assessment Service","fork":false,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji","forks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/forks","keys_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/teams","hooks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/hooks","issue_events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/events{/number}","events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/events","assignees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/assignees{/user}","branches_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/branches{/branch}","tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/tags","blobs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/statuses/{sha}","languages_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/languages","stargazers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/stargazers","contributors_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contributors","subscribers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscribers","subscription_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscription","commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/{+path}","compare_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/merges","archive_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/downloads","issues_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues{/number}","pulls_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/pulls{/number}","milestones_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/milestones{/number}","notifications_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/labels{/name}","releases_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/releases{/id}","deployments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/deployments"},"score":1.0},{"name":"__init__.py","path":"fuji_server/__init__.py","sha":"bfec0e01e89e507a05c789a9b4c9758f8cb57fb1","url":"https://api.github.com/repositories/259678183/contents/fuji_server/__init__.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git_url":"https://api.github.com/repositories/259678183/git/blobs/bfec0e01e89e507a05c789a9b4c9758f8cb57fb1","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/__init__.py","repository":{"id":259678183,"node_id":"MDEwOlJlcG9zaXRvcnkyNTk2NzgxODM=","name":"fuji","full_name":"pangaea-data-publisher/fuji","private":false,"owner":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pangaea-data-publisher/fuji","description":"FAIRsFAIR Research Data Object Assessment Service","fork":false,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji","forks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/forks","keys_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/teams","hooks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/hooks","issue_events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/events{/number}","events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/events","assignees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/assignees{/user}","branches_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/branches{/branch}","tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/tags","blobs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/statuses/{sha}","languages_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/languages","stargazers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/stargazers","contributors_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contributors","subscribers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscribers","subscription_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscription","commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/{+path}","compare_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/merges","archive_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/downloads","issues_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues{/number}","pulls_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/pulls{/number}","milestones_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/milestones{/number}","notifications_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/labels{/name}","releases_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/releases{/id}","deployments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/deployments"},"score":1.0},{"name":"__main__.py","path":"fuji_server/__main__.py","sha":"b6393d59b041fd80dd5679447a14e4de3185a0a1","url":"https://api.github.com/repositories/259678183/contents/fuji_server/__main__.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git_url":"https://api.github.com/repositories/259678183/git/blobs/b6393d59b041fd80dd5679447a14e4de3185a0a1","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/__main__.py","repository":{"id":259678183,"node_id":"MDEwOlJlcG9zaXRvcnkyNTk2NzgxODM=","name":"fuji","full_name":"pangaea-data-publisher/fuji","private":false,"owner":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pangaea-data-publisher/fuji","description":"FAIRsFAIR Research Data Object Assessment Service","fork":false,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji","forks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/forks","keys_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/teams","hooks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/hooks","issue_events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/events{/number}","events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/events","assignees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/assignees{/user}","branches_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/branches{/branch}","tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/tags","blobs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/statuses/{sha}","languages_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/languages","stargazers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/stargazers","contributors_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contributors","subscribers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscribers","subscription_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscription","commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/{+path}","compare_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/merges","archive_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/downloads","issues_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues{/number}","pulls_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/pulls{/number}","milestones_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/milestones{/number}","notifications_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/labels{/name}","releases_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/releases{/id}","deployments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/deployments"},"score":1.0},{"name":"body.py","path":"fuji_server/models/body.py","sha":"8ddd15a63b4fed4cd814a9780a394245842e04c2","url":"https://api.github.com/repositories/259678183/contents/fuji_server/models/body.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git_url":"https://api.github.com/repositories/259678183/git/blobs/8ddd15a63b4fed4cd814a9780a394245842e04c2","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/models/body.py","repository":{"id":259678183,"node_id":"MDEwOlJlcG9zaXRvcnkyNTk2NzgxODM=","name":"fuji","full_name":"pangaea-data-publisher/fuji","private":false,"owner":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pangaea-data-publisher/fuji","description":"FAIRsFAIR Research Data Object Assessment Service","fork":false,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji","forks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/forks","keys_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/teams","hooks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/hooks","issue_events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/events{/number}","events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/events","assignees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/assignees{/user}","branches_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/branches{/branch}","tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/tags","blobs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/statuses/{sha}","languages_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/languages","stargazers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/stargazers","contributors_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contributors","subscribers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscribers","subscription_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscription","commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/{+path}","compare_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/merges","archive_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/downloads","issues_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues{/number}","pulls_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/pulls{/number}","milestones_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/milestones{/number}","notifications_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/labels{/name}","releases_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/releases{/id}","deployments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/deployments"},"score":1.0},{"name":"metric.py","path":"fuji_server/models/metric.py","sha":"b2ad559486c252b340d723776dcfcf9814e26b60","url":"https://api.github.com/repositories/259678183/contents/fuji_server/models/metric.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git_url":"https://api.github.com/repositories/259678183/git/blobs/b2ad559486c252b340d723776dcfcf9814e26b60","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/models/metric.py","repository":{"id":259678183,"node_id":"MDEwOlJlcG9zaXRvcnkyNTk2NzgxODM=","name":"fuji","full_name":"pangaea-data-publisher/fuji","private":false,"owner":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pangaea-data-publisher/fuji","description":"FAIRsFAIR Research Data Object Assessment Service","fork":false,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji","forks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/forks","keys_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/teams","hooks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/hooks","issue_events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/events{/number}","events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/events","assignees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/assignees{/user}","branches_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/branches{/branch}","tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/tags","blobs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/statuses/{sha}","languages_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/languages","stargazers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/stargazers","contributors_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contributors","subscribers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscribers","subscription_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscription","commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/{+path}","compare_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/merges","archive_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/downloads","issues_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues{/number}","pulls_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/pulls{/number}","milestones_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/milestones{/number}","notifications_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/labels{/name}","releases_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/releases{/id}","deployments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/deployments"},"score":1.0},{"name":"core_metadata.py","path":"fuji_server/models/core_metadata.py","sha":"d580710a733376212981063006e1daf22574eaba","url":"https://api.github.com/repositories/259678183/contents/fuji_server/models/core_metadata.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git_url":"https://api.github.com/repositories/259678183/git/blobs/d580710a733376212981063006e1daf22574eaba","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/models/core_metadata.py","repository":{"id":259678183,"node_id":"MDEwOlJlcG9zaXRvcnkyNTk2NzgxODM=","name":"fuji","full_name":"pangaea-data-publisher/fuji","private":false,"owner":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pangaea-data-publisher/fuji","description":"FAIRsFAIR Research Data Object Assessment Service","fork":false,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji","forks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/forks","keys_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/teams","hooks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/hooks","issue_events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/events{/number}","events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/events","assignees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/assignees{/user}","branches_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/branches{/branch}","tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/tags","blobs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/statuses/{sha}","languages_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/languages","stargazers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/stargazers","contributors_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contributors","subscribers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscribers","subscription_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscription","commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/{+path}","compare_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/merges","archive_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/downloads","issues_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues{/number}","pulls_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/pulls{/number}","milestones_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/milestones{/number}","notifications_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/labels{/name}","releases_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/releases{/id}","deployments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/deployments"},"score":1.0},{"name":"formal_metadata_output.py","path":"fuji_server/models/formal_metadata_output.py","sha":"ea571eb5839f4cf917b1706d93b5e8b0856d5884","url":"https://api.github.com/repositories/259678183/contents/fuji_server/models/formal_metadata_output.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git_url":"https://api.github.com/repositories/259678183/git/blobs/ea571eb5839f4cf917b1706d93b5e8b0856d5884","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/models/formal_metadata_output.py","repository":{"id":259678183,"node_id":"MDEwOlJlcG9zaXRvcnkyNTk2NzgxODM=","name":"fuji","full_name":"pangaea-data-publisher/fuji","private":false,"owner":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pangaea-data-publisher/fuji","description":"FAIRsFAIR Research Data Object Assessment Service","fork":false,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji","forks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/forks","keys_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/teams","hooks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/hooks","issue_events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/events{/number}","events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/events","assignees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/assignees{/user}","branches_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/branches{/branch}","tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/tags","blobs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/statuses/{sha}","languages_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/languages","stargazers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/stargazers","contributors_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contributors","subscribers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscribers","subscription_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscription","commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/{+path}","compare_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/merges","archive_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/downloads","issues_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues{/number}","pulls_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/pulls{/number}","milestones_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/milestones{/number}","notifications_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/labels{/name}","releases_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/releases{/id}","deployments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/deployments"},"score":1.0},{"name":"catalogue_helper_datacite.py","path":"fuji_server/helper/catalogue_helper_datacite.py","sha":"317253d1233d3f2eede2843c746fb7f06803b370","url":"https://api.github.com/repositories/259678183/contents/fuji_server/helper/catalogue_helper_datacite.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git_url":"https://api.github.com/repositories/259678183/git/blobs/317253d1233d3f2eede2843c746fb7f06803b370","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/helper/catalogue_helper_datacite.py","repository":{"id":259678183,"node_id":"MDEwOlJlcG9zaXRvcnkyNTk2NzgxODM=","name":"fuji","full_name":"pangaea-data-publisher/fuji","private":false,"owner":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pangaea-data-publisher/fuji","description":"FAIRsFAIR Research Data Object Assessment Service","fork":false,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji","forks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/forks","keys_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/teams","hooks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/hooks","issue_events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/events{/number}","events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/events","assignees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/assignees{/user}","branches_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/branches{/branch}","tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/tags","blobs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/statuses/{sha}","languages_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/languages","stargazers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/stargazers","contributors_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contributors","subscribers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscribers","subscription_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscription","commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/{+path}","compare_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/merges","archive_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/downloads","issues_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues{/number}","pulls_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/pulls{/number}","milestones_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/milestones{/number}","notifications_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/labels{/name}","releases_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/releases{/id}","deployments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/deployments"},"score":1.0},{"name":"metadata_provider_sparql.py","path":"fuji_server/helper/metadata_provider_sparql.py","sha":"dc2dde370223a2902b2c4d5bd866efde745df4d8","url":"https://api.github.com/repositories/259678183/contents/fuji_server/helper/metadata_provider_sparql.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git_url":"https://api.github.com/repositories/259678183/git/blobs/dc2dde370223a2902b2c4d5bd866efde745df4d8","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/helper/metadata_provider_sparql.py","repository":{"id":259678183,"node_id":"MDEwOlJlcG9zaXRvcnkyNTk2NzgxODM=","name":"fuji","full_name":"pangaea-data-publisher/fuji","private":false,"owner":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pangaea-data-publisher/fuji","description":"FAIRsFAIR Research Data Object Assessment Service","fork":false,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji","forks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/forks","keys_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/teams","hooks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/hooks","issue_events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/events{/number}","events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/events","assignees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/assignees{/user}","branches_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/branches{/branch}","tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/tags","blobs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/statuses/{sha}","languages_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/languages","stargazers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/stargazers","contributors_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contributors","subscribers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscribers","subscription_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscription","commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/{+path}","compare_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/merges","archive_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/downloads","issues_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues{/number}","pulls_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/pulls{/number}","milestones_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/milestones{/number}","notifications_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/labels{/name}","releases_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/releases{/id}","deployments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/deployments"},"score":1.0},{"name":"community_endorsed_standard_output.py","path":"fuji_server/models/community_endorsed_standard_output.py","sha":"bdc441ba9773b913dc2a8c2031cbf651bcd25635","url":"https://api.github.com/repositories/259678183/contents/fuji_server/models/community_endorsed_standard_output.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git_url":"https://api.github.com/repositories/259678183/git/blobs/bdc441ba9773b913dc2a8c2031cbf651bcd25635","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/models/community_endorsed_standard_output.py","repository":{"id":259678183,"node_id":"MDEwOlJlcG9zaXRvcnkyNTk2NzgxODM=","name":"fuji","full_name":"pangaea-data-publisher/fuji","private":false,"owner":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pangaea-data-publisher/fuji","description":"FAIRsFAIR Research Data Object Assessment Service","fork":false,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji","forks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/forks","keys_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/teams","hooks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/hooks","issue_events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/events{/number}","events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/events","assignees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/assignees{/user}","branches_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/branches{/branch}","tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/tags","blobs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/statuses/{sha}","languages_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/languages","stargazers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/stargazers","contributors_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contributors","subscribers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscribers","subscription_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscription","commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/{+path}","compare_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/merges","archive_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/downloads","issues_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues{/number}","pulls_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/pulls{/number}","milestones_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/milestones{/number}","notifications_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/labels{/name}","releases_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/releases{/id}","deployments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/deployments"},"score":1.0},{"name":"fair_metric_controller.py","path":"fuji_server/controllers/fair_metric_controller.py","sha":"ebda59b1725bc31861adff9bc3bd61b6fdbd9b44","url":"https://api.github.com/repositories/259678183/contents/fuji_server/controllers/fair_metric_controller.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git_url":"https://api.github.com/repositories/259678183/git/blobs/ebda59b1725bc31861adff9bc3bd61b6fdbd9b44","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/controllers/fair_metric_controller.py","repository":{"id":259678183,"node_id":"MDEwOlJlcG9zaXRvcnkyNTk2NzgxODM=","name":"fuji","full_name":"pangaea-data-publisher/fuji","private":false,"owner":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pangaea-data-publisher/fuji","description":"FAIRsFAIR Research Data Object Assessment Service","fork":false,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji","forks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/forks","keys_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/teams","hooks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/hooks","issue_events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/events{/number}","events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/events","assignees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/assignees{/user}","branches_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/branches{/branch}","tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/tags","blobs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/statuses/{sha}","languages_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/languages","stargazers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/stargazers","contributors_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contributors","subscribers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscribers","subscription_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscription","commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/{+path}","compare_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/merges","archive_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/downloads","issues_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues{/number}","pulls_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/pulls{/number}","milestones_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/milestones{/number}","notifications_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/labels{/name}","releases_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/releases{/id}","deployments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/deployments"},"score":1.0},{"name":"metadata_provider_csw.py","path":"fuji_server/helper/metadata_provider_csw.py","sha":"2488e100ec2779accefb17fe0259a195b78d157b","url":"https://api.github.com/repositories/259678183/contents/fuji_server/helper/metadata_provider_csw.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git_url":"https://api.github.com/repositories/259678183/git/blobs/2488e100ec2779accefb17fe0259a195b78d157b","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/helper/metadata_provider_csw.py","repository":{"id":259678183,"node_id":"MDEwOlJlcG9zaXRvcnkyNTk2NzgxODM=","name":"fuji","full_name":"pangaea-data-publisher/fuji","private":false,"owner":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pangaea-data-publisher/fuji","description":"FAIRsFAIR Research Data Object Assessment Service","fork":false,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji","forks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/forks","keys_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/teams","hooks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/hooks","issue_events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/events{/number}","events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/events","assignees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/assignees{/user}","branches_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/branches{/branch}","tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/tags","blobs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/statuses/{sha}","languages_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/languages","stargazers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/stargazers","contributors_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contributors","subscribers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscribers","subscription_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscription","commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/{+path}","compare_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/merges","archive_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/downloads","issues_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues{/number}","pulls_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/pulls{/number}","milestones_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/milestones{/number}","notifications_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/labels{/name}","releases_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/releases{/id}","deployments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/deployments"},"score":1.0},{"name":"related_resource_output.py","path":"fuji_server/models/related_resource_output.py","sha":"d0a714d122896f7c92a1f4ae143dadd7d2caa117","url":"https://api.github.com/repositories/259678183/contents/fuji_server/models/related_resource_output.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git_url":"https://api.github.com/repositories/259678183/git/blobs/d0a714d122896f7c92a1f4ae143dadd7d2caa117","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/models/related_resource_output.py","repository":{"id":259678183,"node_id":"MDEwOlJlcG9zaXRvcnkyNTk2NzgxODM=","name":"fuji","full_name":"pangaea-data-publisher/fuji","private":false,"owner":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pangaea-data-publisher/fuji","description":"FAIRsFAIR Research Data Object Assessment Service","fork":false,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji","forks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/forks","keys_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/teams","hooks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/hooks","issue_events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/events{/number}","events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/events","assignees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/assignees{/user}","branches_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/branches{/branch}","tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/tags","blobs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/statuses/{sha}","languages_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/languages","stargazers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/stargazers","contributors_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contributors","subscribers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscribers","subscription_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscription","commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/{+path}","compare_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/merges","archive_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/downloads","issues_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues{/number}","pulls_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/pulls{/number}","milestones_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/milestones{/number}","notifications_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/labels{/name}","releases_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/releases{/id}","deployments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/deployments"},"score":1.0},{"name":"identifier_included.py","path":"fuji_server/models/identifier_included.py","sha":"8bc5c7618096853f937c3386d3df1df584958303","url":"https://api.github.com/repositories/259678183/contents/fuji_server/models/identifier_included.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git_url":"https://api.github.com/repositories/259678183/git/blobs/8bc5c7618096853f937c3386d3df1df584958303","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/models/identifier_included.py","repository":{"id":259678183,"node_id":"MDEwOlJlcG9zaXRvcnkyNTk2NzgxODM=","name":"fuji","full_name":"pangaea-data-publisher/fuji","private":false,"owner":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pangaea-data-publisher/fuji","description":"FAIRsFAIR Research Data Object Assessment Service","fork":false,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji","forks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/forks","keys_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/teams","hooks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/hooks","issue_events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/events{/number}","events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/events","assignees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/assignees{/user}","branches_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/branches{/branch}","tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/tags","blobs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/statuses/{sha}","languages_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/languages","stargazers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/stargazers","contributors_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contributors","subscribers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscribers","subscription_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscription","commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/{+path}","compare_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/merges","archive_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/downloads","issues_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues{/number}","pulls_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/pulls{/number}","milestones_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/milestones{/number}","notifications_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/labels{/name}","releases_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/releases{/id}","deployments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/deployments"},"score":1.0},{"name":"data_file_format_output_inner.py","path":"fuji_server/models/data_file_format_output_inner.py","sha":"1f585cf895b11a39a829e2f547726d620c843a31","url":"https://api.github.com/repositories/259678183/contents/fuji_server/models/data_file_format_output_inner.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git_url":"https://api.github.com/repositories/259678183/git/blobs/1f585cf895b11a39a829e2f547726d620c843a31","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/models/data_file_format_output_inner.py","repository":{"id":259678183,"node_id":"MDEwOlJlcG9zaXRvcnkyNTk2NzgxODM=","name":"fuji","full_name":"pangaea-data-publisher/fuji","private":false,"owner":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pangaea-data-publisher/fuji","description":"FAIRsFAIR Research Data Object Assessment Service","fork":false,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji","forks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/forks","keys_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/teams","hooks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/hooks","issue_events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/events{/number}","events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/events","assignees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/assignees{/user}","branches_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/branches{/branch}","tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/tags","blobs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/statuses/{sha}","languages_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/languages","stargazers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/stargazers","contributors_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contributors","subscribers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscribers","subscription_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscription","commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/{+path}","compare_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/merges","archive_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/downloads","issues_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues{/number}","pulls_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/pulls{/number}","milestones_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/milestones{/number}","notifications_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/labels{/name}","releases_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/releases{/id}","deployments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/deployments"},"score":1.0},{"name":"data_provenance_output.py","path":"fuji_server/models/data_provenance_output.py","sha":"1514d4a4485371be7f75ebf4280dbb4b5838fcd6","url":"https://api.github.com/repositories/259678183/contents/fuji_server/models/data_provenance_output.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git_url":"https://api.github.com/repositories/259678183/git/blobs/1514d4a4485371be7f75ebf4280dbb4b5838fcd6","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/models/data_provenance_output.py","repository":{"id":259678183,"node_id":"MDEwOlJlcG9zaXRvcnkyNTk2NzgxODM=","name":"fuji","full_name":"pangaea-data-publisher/fuji","private":false,"owner":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pangaea-data-publisher/fuji","description":"FAIRsFAIR Research Data Object Assessment Service","fork":false,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji","forks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/forks","keys_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/teams","hooks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/hooks","issue_events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/events{/number}","events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/events","assignees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/assignees{/user}","branches_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/branches{/branch}","tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/tags","blobs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/statuses/{sha}","languages_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/languages","stargazers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/stargazers","contributors_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contributors","subscribers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscribers","subscription_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscription","commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/{+path}","compare_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/merges","archive_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/downloads","issues_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues{/number}","pulls_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/pulls{/number}","milestones_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/milestones{/number}","notifications_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/labels{/name}","releases_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/releases{/id}","deployments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/deployments"},"score":1.0},{"name":"harvest_results.py","path":"fuji_server/models/harvest_results.py","sha":"5892b5b7ee31715b37dcd79da21478c494261768","url":"https://api.github.com/repositories/259678183/contents/fuji_server/models/harvest_results.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git_url":"https://api.github.com/repositories/259678183/git/blobs/5892b5b7ee31715b37dcd79da21478c494261768","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/models/harvest_results.py","repository":{"id":259678183,"node_id":"MDEwOlJlcG9zaXRvcnkyNTk2NzgxODM=","name":"fuji","full_name":"pangaea-data-publisher/fuji","private":false,"owner":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pangaea-data-publisher/fuji","description":"FAIRsFAIR Research Data Object Assessment Service","fork":false,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji","forks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/forks","keys_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/teams","hooks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/hooks","issue_events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/events{/number}","events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/events","assignees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/assignees{/user}","branches_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/branches{/branch}","tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/tags","blobs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/statuses/{sha}","languages_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/languages","stargazers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/stargazers","contributors_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contributors","subscribers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscribers","subscription_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscription","commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/{+path}","compare_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/merges","archive_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/downloads","issues_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues{/number}","pulls_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/pulls{/number}","milestones_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/milestones{/number}","notifications_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/labels{/name}","releases_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/releases{/id}","deployments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/deployments"},"score":1.0},{"name":"fair_result_common.py","path":"fuji_server/models/fair_result_common.py","sha":"93e51326e014ce78fed728c4ae0afa1cc258e360","url":"https://api.github.com/repositories/259678183/contents/fuji_server/models/fair_result_common.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git_url":"https://api.github.com/repositories/259678183/git/blobs/93e51326e014ce78fed728c4ae0afa1cc258e360","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/models/fair_result_common.py","repository":{"id":259678183,"node_id":"MDEwOlJlcG9zaXRvcnkyNTk2NzgxODM=","name":"fuji","full_name":"pangaea-data-publisher/fuji","private":false,"owner":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pangaea-data-publisher/fuji","description":"FAIRsFAIR Research Data Object Assessment Service","fork":false,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji","forks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/forks","keys_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/teams","hooks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/hooks","issue_events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/events{/number}","events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/events","assignees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/assignees{/user}","branches_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/branches{/branch}","tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/tags","blobs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/statuses/{sha}","languages_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/languages","stargazers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/stargazers","contributors_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contributors","subscribers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscribers","subscription_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscription","commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/{+path}","compare_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/merges","archive_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/downloads","issues_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues{/number}","pulls_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/pulls{/number}","milestones_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/milestones{/number}","notifications_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/labels{/name}","releases_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/releases{/id}","deployments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/deployments"},"score":1.0},{"name":"fair_evaluator_data_provenance.py","path":"fuji_server/evaluators/fair_evaluator_data_provenance.py","sha":"1f2c3d7211a42874549c372209b5bd763822a1c2","url":"https://api.github.com/repositories/259678183/contents/fuji_server/evaluators/fair_evaluator_data_provenance.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git_url":"https://api.github.com/repositories/259678183/git/blobs/1f2c3d7211a42874549c372209b5bd763822a1c2","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/evaluators/fair_evaluator_data_provenance.py","repository":{"id":259678183,"node_id":"MDEwOlJlcG9zaXRvcnkyNTk2NzgxODM=","name":"fuji","full_name":"pangaea-data-publisher/fuji","private":false,"owner":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pangaea-data-publisher/fuji","description":"FAIRsFAIR Research Data Object Assessment Service","fork":false,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji","forks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/forks","keys_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/teams","hooks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/hooks","issue_events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/events{/number}","events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/events","assignees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/assignees{/user}","branches_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/branches{/branch}","tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/tags","blobs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/statuses/{sha}","languages_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/languages","stargazers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/stargazers","contributors_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contributors","subscribers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscribers","subscription_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscription","commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/{+path}","compare_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/merges","archive_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/downloads","issues_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues{/number}","pulls_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/pulls{/number}","milestones_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/milestones{/number}","notifications_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/labels{/name}","releases_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/releases{/id}","deployments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/deployments"},"score":1.0},{"name":"fair_evaluator_unique_identifier_metadata.py","path":"fuji_server/evaluators/fair_evaluator_unique_identifier_metadata.py","sha":"1a379099dee718beb3a443484488eed590726dd3","url":"https://api.github.com/repositories/259678183/contents/fuji_server/evaluators/fair_evaluator_unique_identifier_metadata.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git_url":"https://api.github.com/repositories/259678183/git/blobs/1a379099dee718beb3a443484488eed590726dd3","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/evaluators/fair_evaluator_unique_identifier_metadata.py","repository":{"id":259678183,"node_id":"MDEwOlJlcG9zaXRvcnkyNTk2NzgxODM=","name":"fuji","full_name":"pangaea-data-publisher/fuji","private":false,"owner":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pangaea-data-publisher/fuji","description":"FAIRsFAIR Research Data Object Assessment Service","fork":false,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji","forks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/forks","keys_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/teams","hooks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/hooks","issue_events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/events{/number}","events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/events","assignees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/assignees{/user}","branches_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/branches{/branch}","tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/tags","blobs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/statuses/{sha}","languages_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/languages","stargazers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/stargazers","contributors_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contributors","subscribers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscribers","subscription_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscription","commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/{+path}","compare_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/merges","archive_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/downloads","issues_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues{/number}","pulls_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/pulls{/number}","milestones_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/milestones{/number}","notifications_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/labels{/name}","releases_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/releases{/id}","deployments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/deployments"},"score":1.0},{"name":"fair_evaluator_semantic_vocabulary.py","path":"fuji_server/evaluators/fair_evaluator_semantic_vocabulary.py","sha":"324dc36ba45ad6cf28215408dfeaf03eec62a175","url":"https://api.github.com/repositories/259678183/contents/fuji_server/evaluators/fair_evaluator_semantic_vocabulary.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git_url":"https://api.github.com/repositories/259678183/git/blobs/324dc36ba45ad6cf28215408dfeaf03eec62a175","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/evaluators/fair_evaluator_semantic_vocabulary.py","repository":{"id":259678183,"node_id":"MDEwOlJlcG9zaXRvcnkyNTk2NzgxODM=","name":"fuji","full_name":"pangaea-data-publisher/fuji","private":false,"owner":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pangaea-data-publisher/fuji","description":"FAIRsFAIR Research Data Object Assessment Service","fork":false,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji","forks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/forks","keys_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/teams","hooks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/hooks","issue_events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/events{/number}","events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/events","assignees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/assignees{/user}","branches_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/branches{/branch}","tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/tags","blobs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/statuses/{sha}","languages_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/languages","stargazers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/stargazers","contributors_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contributors","subscribers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscribers","subscription_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscription","commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/{+path}","compare_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/merges","archive_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/downloads","issues_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues{/number}","pulls_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/pulls{/number}","milestones_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/milestones{/number}","notifications_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/labels{/name}","releases_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/releases{/id}","deployments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/deployments"},"score":1.0},{"name":"related_resource.py","path":"fuji_server/models/related_resource.py","sha":"e0333d31d21ee0cbfe09e4e42263bb5c0cb5e24d","url":"https://api.github.com/repositories/259678183/contents/fuji_server/models/related_resource.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git_url":"https://api.github.com/repositories/259678183/git/blobs/e0333d31d21ee0cbfe09e4e42263bb5c0cb5e24d","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/models/related_resource.py","repository":{"id":259678183,"node_id":"MDEwOlJlcG9zaXRvcnkyNTk2NzgxODM=","name":"fuji","full_name":"pangaea-data-publisher/fuji","private":false,"owner":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pangaea-data-publisher/fuji","description":"FAIRsFAIR Research Data Object Assessment Service","fork":false,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji","forks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/forks","keys_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/teams","hooks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/hooks","issue_events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/events{/number}","events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/events","assignees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/assignees{/user}","branches_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/branches{/branch}","tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/tags","blobs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/statuses/{sha}","languages_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/languages","stargazers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/stargazers","contributors_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contributors","subscribers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscribers","subscription_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscription","commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/{+path}","compare_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/merges","archive_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/downloads","issues_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues{/number}","pulls_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/pulls{/number}","milestones_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/milestones{/number}","notifications_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/labels{/name}","releases_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/releases{/id}","deployments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/deployments"},"score":1.0},{"name":"metadata_mapper.py","path":"fuji_server/helper/metadata_mapper.py","sha":"448eb7864b91d8a428d23fb85bfb0398afe37c46","url":"https://api.github.com/repositories/259678183/contents/fuji_server/helper/metadata_mapper.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git_url":"https://api.github.com/repositories/259678183/git/blobs/448eb7864b91d8a428d23fb85bfb0398afe37c46","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/helper/metadata_mapper.py","repository":{"id":259678183,"node_id":"MDEwOlJlcG9zaXRvcnkyNTk2NzgxODM=","name":"fuji","full_name":"pangaea-data-publisher/fuji","private":false,"owner":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pangaea-data-publisher/fuji","description":"FAIRsFAIR Research Data Object Assessment Service","fork":false,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji","forks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/forks","keys_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/teams","hooks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/hooks","issue_events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/events{/number}","events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/events","assignees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/assignees{/user}","branches_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/branches{/branch}","tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/tags","blobs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/statuses/{sha}","languages_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/languages","stargazers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/stargazers","contributors_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contributors","subscribers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscribers","subscription_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscription","commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/{+path}","compare_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/merges","archive_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/downloads","issues_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues{/number}","pulls_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/pulls{/number}","milestones_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/milestones{/number}","notifications_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/labels{/name}","releases_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/releases{/id}","deployments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/deployments"},"score":1.0},{"name":"harvest.py","path":"fuji_server/models/harvest.py","sha":"8bfa244b78b42722d8932d38c238cfdfff3c0d2f","url":"https://api.github.com/repositories/259678183/contents/fuji_server/models/harvest.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git_url":"https://api.github.com/repositories/259678183/git/blobs/8bfa244b78b42722d8932d38c238cfdfff3c0d2f","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/models/harvest.py","repository":{"id":259678183,"node_id":"MDEwOlJlcG9zaXRvcnkyNTk2NzgxODM=","name":"fuji","full_name":"pangaea-data-publisher/fuji","private":false,"owner":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pangaea-data-publisher/fuji","description":"FAIRsFAIR Research Data Object Assessment Service","fork":false,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji","forks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/forks","keys_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/teams","hooks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/hooks","issue_events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/events{/number}","events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/events","assignees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/assignees{/user}","branches_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/branches{/branch}","tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/tags","blobs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/statuses/{sha}","languages_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/languages","stargazers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/stargazers","contributors_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contributors","subscribers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscribers","subscription_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscription","commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/{+path}","compare_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/merges","archive_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/downloads","issues_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues{/number}","pulls_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/pulls{/number}","milestones_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/milestones{/number}","notifications_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/labels{/name}","releases_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/releases{/id}","deployments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/deployments"},"score":1.0},{"name":"fair_evaluator_metadata_identifier_included.py","path":"fuji_server/evaluators/fair_evaluator_metadata_identifier_included.py","sha":"b062d8e07611f9fa69d244de4d561069fd220efb","url":"https://api.github.com/repositories/259678183/contents/fuji_server/evaluators/fair_evaluator_metadata_identifier_included.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git_url":"https://api.github.com/repositories/259678183/git/blobs/b062d8e07611f9fa69d244de4d561069fd220efb","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/evaluators/fair_evaluator_metadata_identifier_included.py","repository":{"id":259678183,"node_id":"MDEwOlJlcG9zaXRvcnkyNTk2NzgxODM=","name":"fuji","full_name":"pangaea-data-publisher/fuji","private":false,"owner":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pangaea-data-publisher/fuji","description":"FAIRsFAIR Research Data Object Assessment Service","fork":false,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji","forks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/forks","keys_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/teams","hooks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/hooks","issue_events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/events{/number}","events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/events","assignees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/assignees{/user}","branches_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/branches{/branch}","tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/tags","blobs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/statuses/{sha}","languages_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/languages","stargazers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/stargazers","contributors_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contributors","subscribers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscribers","subscription_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscription","commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/{+path}","compare_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/merges","archive_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/downloads","issues_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues{/number}","pulls_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/pulls{/number}","milestones_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/milestones{/number}","notifications_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/labels{/name}","releases_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/releases{/id}","deployments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/deployments"},"score":1.0},{"name":"fair_evaluator_minimal_metadata.py","path":"fuji_server/evaluators/fair_evaluator_minimal_metadata.py","sha":"c81d1b76bc44c9a04f3787ca71a7cb40ff1a697a","url":"https://api.github.com/repositories/259678183/contents/fuji_server/evaluators/fair_evaluator_minimal_metadata.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git_url":"https://api.github.com/repositories/259678183/git/blobs/c81d1b76bc44c9a04f3787ca71a7cb40ff1a697a","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/evaluators/fair_evaluator_minimal_metadata.py","repository":{"id":259678183,"node_id":"MDEwOlJlcG9zaXRvcnkyNTk2NzgxODM=","name":"fuji","full_name":"pangaea-data-publisher/fuji","private":false,"owner":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pangaea-data-publisher/fuji","description":"FAIRsFAIR Research Data Object Assessment Service","fork":false,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji","forks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/forks","keys_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/teams","hooks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/hooks","issue_events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/events{/number}","events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/events","assignees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/assignees{/user}","branches_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/branches{/branch}","tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/tags","blobs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/statuses/{sha}","languages_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/languages","stargazers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/stargazers","contributors_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contributors","subscribers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscribers","subscription_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscription","commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/{+path}","compare_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/merges","archive_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/downloads","issues_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues{/number}","pulls_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/pulls{/number}","milestones_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/milestones{/number}","notifications_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/labels{/name}","releases_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/releases{/id}","deployments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/deployments"},"score":1.0},{"name":"output_search_mechanisms.py","path":"fuji_server/models/output_search_mechanisms.py","sha":"e97c9350ffa17330bb35628810a7afed5d06eb6f","url":"https://api.github.com/repositories/259678183/contents/fuji_server/models/output_search_mechanisms.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git_url":"https://api.github.com/repositories/259678183/git/blobs/e97c9350ffa17330bb35628810a7afed5d06eb6f","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/models/output_search_mechanisms.py","repository":{"id":259678183,"node_id":"MDEwOlJlcG9zaXRvcnkyNTk2NzgxODM=","name":"fuji","full_name":"pangaea-data-publisher/fuji","private":false,"owner":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pangaea-data-publisher/fuji","description":"FAIRsFAIR Research Data Object Assessment Service","fork":false,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji","forks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/forks","keys_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/teams","hooks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/hooks","issue_events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/events{/number}","events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/events","assignees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/assignees{/user}","branches_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/branches{/branch}","tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/tags","blobs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/statuses/{sha}","languages_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/languages","stargazers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/stargazers","contributors_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contributors","subscribers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscribers","subscription_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscription","commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/{+path}","compare_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/merges","archive_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/downloads","issues_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues{/number}","pulls_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/pulls{/number}","milestones_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/milestones{/number}","notifications_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/labels{/name}","releases_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/releases{/id}","deployments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/deployments"},"score":1.0},{"name":"searchable.py","path":"fuji_server/models/searchable.py","sha":"7512ab21f18510c8451b2716525ad393d498259b","url":"https://api.github.com/repositories/259678183/contents/fuji_server/models/searchable.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git_url":"https://api.github.com/repositories/259678183/git/blobs/7512ab21f18510c8451b2716525ad393d498259b","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/models/searchable.py","repository":{"id":259678183,"node_id":"MDEwOlJlcG9zaXRvcnkyNTk2NzgxODM=","name":"fuji","full_name":"pangaea-data-publisher/fuji","private":false,"owner":{"login":"pangaea-data-publisher","id":47568830,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NTY4ODMw","avatar_url":"https://avatars.githubusercontent.com/u/47568830?v=4","gravatar_id":"","url":"https://api.github.com/users/pangaea-data-publisher","html_url":"https://github.com/pangaea-data-publisher","followers_url":"https://api.github.com/users/pangaea-data-publisher/followers","following_url":"https://api.github.com/users/pangaea-data-publisher/following{/other_user}","gists_url":"https://api.github.com/users/pangaea-data-publisher/gists{/gist_id}","starred_url":"https://api.github.com/users/pangaea-data-publisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangaea-data-publisher/subscriptions","organizations_url":"https://api.github.com/users/pangaea-data-publisher/orgs","repos_url":"https://api.github.com/users/pangaea-data-publisher/repos","events_url":"https://api.github.com/users/pangaea-data-publisher/events{/privacy}","received_events_url":"https://api.github.com/users/pangaea-data-publisher/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pangaea-data-publisher/fuji","description":"FAIRsFAIR Research Data Object Assessment Service","fork":false,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji","forks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/forks","keys_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/teams","hooks_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/hooks","issue_events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/events{/number}","events_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/events","assignees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/assignees{/user}","branches_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/branches{/branch}","tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/tags","blobs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/statuses/{sha}","languages_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/languages","stargazers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/stargazers","contributors_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contributors","subscribers_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscribers","subscription_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/subscription","commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/{+path}","compare_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/merges","archive_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/downloads","issues_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/issues{/number}","pulls_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/pulls{/number}","milestones_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/milestones{/number}","notifications_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/labels{/name}","releases_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/releases{/id}","deployments_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/deployments"},"score":1.0}]}' + headers: + Access-Control-Allow-Origin: + - '*' + Access-Control-Expose-Headers: + - ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset + Cache-Control: + - no-cache + Content-Encoding: + - gzip + Content-Security-Policy: + - default-src 'none' + Content-Type: + - application/json; charset=utf-8 + Date: + - Fri, 12 Jan 2024 16:17:06 GMT + Link: + - ; rel="next", ; rel="last" + Referrer-Policy: + - origin-when-cross-origin, strict-origin-when-cross-origin + Server: + - GitHub.com + Strict-Transport-Security: + - max-age=31536000; includeSubdomains; preload + Transfer-Encoding: + - chunked + Vary: + - Accept, Authorization, Cookie, X-GitHub-OTP + - Accept-Encoding, Accept, X-Requested-With + X-Accepted-OAuth-Scopes: + - '' + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + X-GitHub-Media-Type: + - github.v3; format=json + X-GitHub-Request-Id: + - 7858:8B570:F3DA815:F68C780:65A16601 + X-OAuth-Scopes: + - repo + X-RateLimit-Limit: + - '10' + X-RateLimit-Remaining: + - '8' + X-RateLimit-Reset: + - '1705076285' + X-RateLimit-Resource: + - code_search + X-RateLimit-Used: + - '2' + X-XSS-Protection: + - '0' + github-authentication-token-expiration: + - 2024-03-04 14:01:51 UTC + x-github-api-version-selected: + - '2022-11-28' + status: + code: 200 + message: OK +- request: + body: + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Authorization: + - token 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 + Connection: + - keep-alive + User-Agent: + - PyGithub/Python + method: GET + uri: https://api.github.com/repositories/259678183/contents/fuji_server/app.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9 + response: + body: + string: '{"name":"app.py","path":"fuji_server/app.py","sha":"26a77ee3946819fff0bccaf22df1265ea32bc7dc","size":1201,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/fuji_server/app.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/app.py","git_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs/26a77ee3946819fff0bccaf22df1265ea32bc7dc","download_url":"https://raw.githubusercontent.com/pangaea-data-publisher/fuji/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/app.py","type":"file","content":"IyBTUERYLUZpbGVDb3B5cmlnaHRUZXh0OiAyMDIwIFBBTkdBRUEgKGh0dHBz\nOi8vd3d3LnBhbmdhZWEuZGUvKQojCiMgU1BEWC1MaWNlbnNlLUlkZW50aWZp\nZXI6IE1JVAoKaW1wb3J0IGpzb24KaW1wb3J0IG9zCmZyb20gcGF0aGxpYiBp\nbXBvcnQgUGF0aAoKaW1wb3J0IGNvbm5leGlvbgpmcm9tIGNvbm5leGlvbi5q\nc29uaWZpZXIgaW1wb3J0IEpzb25pZmllcgpmcm9tIGZsYXNrX2NvcnMgaW1w\nb3J0IENPUlMKZnJvbSB3ZXJremV1Zy5taWRkbGV3YXJlLnByb3h5X2ZpeCBp\nbXBvcnQgUHJveHlGaXgKCmZyb20gZnVqaV9zZXJ2ZXIgaW1wb3J0IGVuY29k\nZXIKCgpkZWYgY3JlYXRlX2FwcChjb25maWcpOgogICAgIiIiCiAgICBGdW5j\ndGlvbiB3aGljaCBpbml0aWFsaXplcyB0aGUgRlVKSSBjb25uZXhpb24gZmxh\nc2sgYXBwIGFuZCByZXR1cm5zIGl0CiAgICAiIiIKICAgICMgeW91IGNhbiBh\nbHNvIHVzZSBUb3JuYWRvIG9yIGdldmVudCBhcyB0aGUgSFRUUCBzZXJ2ZXIs\nIHRvIGRvIHNvIHNldCBzZXJ2ZXIgdG8gdG9ybmFkbyBvciBnZXZlbnQKICAg\nIFJPT1RfRElSID0gUGF0aChfX2ZpbGVfXykucGFyZW50CiAgICBZQU1MX0RJ\nUiA9IGNvbmZpZ1siU0VSVklDRSJdWyJ5YW1sX2RpcmVjdG9yeSJdCiAgICBt\neWpzb25pZmllciA9IEpzb25pZmllcihqc29uLCBjbHM9ZW5jb2Rlci5DdXN0\nb21KU09ORW5jb2RlcikKICAgICMgYXBwID0gY29ubmV4aW9uLkZsYXNrQXBw\nKF9fbmFtZV9fLCBzcGVjaWZpY2F0aW9uX2Rpcj1ZQU1MX0RJUiwganNvbmlm\naWVyPWVuY29kZXIuQ3VzdG9tSnNvbmlmaWVyKQogICAgYXBwID0gY29ubmV4\naW9uLkFwcChfX25hbWVfXywgc3BlY2lmaWNhdGlvbl9kaXI9WUFNTF9ESVIs\nIGpzb25pZmllcj1teWpzb25pZmllcikKCiAgICBBUElfWUFNTCA9IFJPT1Rf\nRElSLmpvaW5wYXRoKFlBTUxfRElSLCBjb25maWdbIlNFUlZJQ0UiXVsib3Bl\nbmFwaV95YW1sIl0pCgogICAgYXBwLmFkZF9hcGkoQVBJX1lBTUwsIHZhbGlk\nYXRlX3Jlc3BvbnNlcz1UcnVlLCBqc29uaWZpZXI9bXlqc29uaWZpZXIpCgog\nICAgYXBwLmFwcC53c2dpX2FwcCA9IFByb3h5Rml4KGFwcC5hcHAud3NnaV9h\ncHAsIHhfZm9yPTEsIHhfaG9zdD0xKQogICAgaWYgb3MuZ2V0ZW52KCJFTkFC\nTEVfQ09SUyIsICJGYWxzZSIpLmxvd2VyKCkgPT0gInRydWUiOgogICAgICAg\nIENPUlMoYXBwLmFwcCkKCiAgICByZXR1cm4gYXBwCg==\n","encoding":"base64","_links":{"self":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/fuji_server/app.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs/26a77ee3946819fff0bccaf22df1265ea32bc7dc","html":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/app.py"}}' + headers: + Access-Control-Allow-Origin: + - '*' + Access-Control-Expose-Headers: + - ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset + Cache-Control: + - private, max-age=60, s-maxage=60 + Content-Encoding: + - gzip + Content-Security-Policy: + - default-src 'none' + Content-Type: + - application/json; charset=utf-8 + Date: + - Fri, 12 Jan 2024 16:17:06 GMT + ETag: + - W/"26a77ee3946819fff0bccaf22df1265ea32bc7dc" + Last-Modified: + - Fri, 12 Jan 2024 09:49:41 GMT + Referrer-Policy: + - origin-when-cross-origin, strict-origin-when-cross-origin + Server: + - GitHub.com + Strict-Transport-Security: + - max-age=31536000; includeSubdomains; preload + Transfer-Encoding: + - chunked + Vary: + - Accept, Authorization, Cookie, X-GitHub-OTP + - Accept-Encoding, Accept, X-Requested-With + X-Accepted-OAuth-Scopes: + - '' + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + X-GitHub-Media-Type: + - github.v3; format=json + X-GitHub-Request-Id: + - C704:30375F:FD7900D:1002B081:65A16602 + X-OAuth-Scopes: + - repo + X-RateLimit-Limit: + - '5000' + X-RateLimit-Remaining: + - '4962' + X-RateLimit-Reset: + - '1705078320' + X-RateLimit-Resource: + - core + X-RateLimit-Used: + - '38' + X-XSS-Protection: + - '0' + github-authentication-token-expiration: + - 2024-03-04 14:01:51 UTC + x-github-api-version-selected: + - '2022-11-28' + status: + code: 200 + message: OK +- request: + body: + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Authorization: + - token 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 + Connection: + - keep-alive + User-Agent: + - PyGithub/Python + method: GET + uri: https://api.github.com/repositories/259678183/contents/docs/source/conf.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9 + response: + body: + string: '{"name":"conf.py","path":"docs/source/conf.py","sha":"95e0e43e9ff99c7f1ddc5dc7f4445bbe994ee2b2","size":12443,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/docs/source/conf.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/docs/source/conf.py","git_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs/95e0e43e9ff99c7f1ddc5dc7f4445bbe994ee2b2","download_url":"https://raw.githubusercontent.com/pangaea-data-publisher/fuji/708fe43a1ee5f4557368dcd66622ec869fe854f9/docs/source/conf.py","type":"file","content":"IwojIEZsZXVyIHBsdWdpbiBkb2N1bWVudGF0aW9uIGJ1aWxkIGNvbmZpZ3Vy\nYXRpb24gZmlsZSwgY3JlYXRlZCBieQojIHNwaGlueC1xdWlja3N0YXJ0IG9u\nIFdlZCBEZWMgIDcgMTY6Mzk6MTIgMjAxNi4KIwojIFRoaXMgZmlsZSBpcyBl\neGVjZmlsZSgpZCB3aXRoIHRoZSBjdXJyZW50IGRpcmVjdG9yeSBzZXQgdG8g\naXRzCiMgY29udGFpbmluZyBkaXIuCiMKIyBOb3RlIHRoYXQgbm90IGFsbCBw\nb3NzaWJsZSBjb25maWd1cmF0aW9uIHZhbHVlcyBhcmUgcHJlc2VudCBpbiB0\naGlzCiMgYXV0b2dlbmVyYXRlZCBmaWxlLgojCiMgQWxsIGNvbmZpZ3VyYXRp\nb24gdmFsdWVzIGhhdmUgYSBkZWZhdWx0OyB2YWx1ZXMgdGhhdCBhcmUgY29t\nbWVudGVkIG91dAojIHNlcnZlIHRvIHNob3cgdGhlIGRlZmF1bHQuCgojIGlt\ncG9ydCBmdWppX3NlcnZlcgppbXBvcnQgb3MKCmZyb20gZnVqaV9zZXJ2ZXIg\naW1wb3J0IF9fdmVyc2lvbl9fCgpQUk9KRUNUTkFNRSA9ICJGdWppIiAgIyB1\nJ0YtdWppIFNlcnZlcicKIyBJZiBleHRlbnNpb25zIChvciBtb2R1bGVzIHRv\nIGRvY3VtZW50IHdpdGggYXV0b2RvYykgYXJlIGluIGFub3RoZXIgZGlyZWN0\nb3J5LAojIGFkZCB0aGVzZSBkaXJlY3RvcmllcyB0byBzeXMucGF0aCBoZXJl\nLiBJZiB0aGUgZGlyZWN0b3J5IGlzIHJlbGF0aXZlIHRvIHRoZQojIGRvY3Vt\nZW50YXRpb24gcm9vdCwgdXNlIG9zLnBhdGguYWJzcGF0aCB0byBtYWtlIGl0\nIGFic29sdXRlLCBsaWtlIHNob3duIGhlcmUuCiMgc3lzLnBhdGguaW5zZXJ0\nKDAsIG9zLnBhdGguYWJzcGF0aCgnLi4vYWlpZGFfZmxldXInKSkKCiMgLS0g\nR2VuZXJhbCBjb25maWd1cmF0aW9uIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t\nLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQoKIyBJZiB5b3VyIGRvY3VtZW50\nYXRpb24gbmVlZHMgYSBtaW5pbWFsIFNwaGlueCB2ZXJzaW9uLCBzdGF0ZSBp\ndCBoZXJlLgojIG5lZWRzX3NwaGlueCA9ICcxLjAnCgojIEFkZCBhbnkgU3Bo\naW54IGV4dGVuc2lvbiBtb2R1bGUgbmFtZXMgaGVyZSwgYXMgc3RyaW5ncy4g\nVGhleSBjYW4gYmUKIyBleHRlbnNpb25zIGNvbWluZyB3aXRoIFNwaGlueCAo\nbmFtZWQgJ3NwaGlueC5leHQuKicpIG9yIHlvdXIgY3VzdG9tCiMgb25lcy4K\nZXh0ZW5zaW9ucyA9IFsKICAgICJzcGhpbnguZXh0LmF1dG9kb2MiLAogICAg\nInNwaGlueC5leHQubmFwb2xlb24iLAogICAgIydzcGhpbnguZXh0LmRvY3Rl\nc3QnLAogICAgIydzcGhpbnguZXh0LnRvZG8nLAogICAgIydzcGhpbnguZXh0\nLmNvdmVyYWdlJywKICAgICMnc3BoaW54LmV4dC5pbWdtYXRoJywKICAgICMn\nc3BoaW54LmV4dC5pZmNvbmZpZycsCiAgICAic3BoaW54LmV4dC52aWV3Y29k\nZSIsCiAgICAibXlzdF9wYXJzZXIiLAogICAgIydzcGhpbnguZXh0LmludGVy\nc3BoaW54JwpdCgppbnRlcnNwaGlueF9tYXBwaW5nID0geyJudW1weSI6ICgi\naHR0cHM6Ly9udW1weS5vcmcvZG9jL3N0YWJsZS8iLCBOb25lKX0KCnRvZG9f\naW5jbHVkZV90b2RvcyA9IFRydWUKCiMgQWRkIGFueSBwYXRocyB0aGF0IGNv\nbnRhaW4gdGVtcGxhdGVzIGhlcmUsIHJlbGF0aXZlIHRvIHRoaXMgZGlyZWN0\nb3J5Lgp0ZW1wbGF0ZXNfcGF0aCA9IFsiX3RlbXBsYXRlcyJdCgojIFRoZSBz\ndWZmaXggb2Ygc291cmNlIGZpbGVuYW1lcy4Kc291cmNlX3N1ZmZpeCA9ICIu\ncnN0IgoKIyBUaGUgZW5jb2Rpbmcgb2Ygc291cmNlIGZpbGVzLgojIHNvdXJj\nZV9lbmNvZGluZyA9ICd1dGYtOC1zaWcnCgojIFRoZSBtYXN0ZXIgdG9jdHJl\nZSBkb2N1bWVudC4KbWFzdGVyX2RvYyA9ICJpbmRleCIKCiMgR2VuZXJhbCBp\nbmZvcm1hdGlvbiBhYm91dCB0aGUgcHJvamVjdC4KcHJvamVjdCA9IFBST0pF\nQ1ROQU1FCmNvcHlyaWdodCA9ICIyMDIwLXRvZGF5IFBBTkdBRUEiCgojIFRo\nZSB2ZXJzaW9uIGluZm8gZm9yIHRoZSBwcm9qZWN0IHlvdSdyZSBkb2N1bWVu\ndGluZywgYWN0cyBhcyByZXBsYWNlbWVudCBmb3IKIyB8dmVyc2lvbnwgYW5k\nIHxyZWxlYXNlfCwgYWxzbyB1c2VkIGluIHZhcmlvdXMgb3RoZXIgcGxhY2Vz\nIHRocm91Z2hvdXQgdGhlCiMgYnVpbHQgZG9jdW1lbnRzLgp2ZXJzaW9uID0g\nX192ZXJzaW9uX18KcmVsZWFzZSA9IF9fdmVyc2lvbl9fCmF1dGhvciA9ICJU\naGUgRi11amkgYXV0aG9ycyIKCgojIFRoZSBsYW5ndWFnZSBmb3IgY29udGVu\ndCBhdXRvZ2VuZXJhdGVkIGJ5IFNwaGlueC4gUmVmZXIgdG8gZG9jdW1lbnRh\ndGlvbgojIGZvciBhIGxpc3Qgb2Ygc3VwcG9ydGVkIGxhbmd1YWdlcy4KIyBs\nYW5ndWFnZSA9IE5vbmUKCiMgVGhlcmUgYXJlIHR3byBvcHRpb25zIGZvciBy\nZXBsYWNpbmcgfHRvZGF5fDogZWl0aGVyLCB5b3Ugc2V0IHRvZGF5IHRvIHNv\nbWUKIyBub24tZmFsc2UgdmFsdWUsIHRoZW4gaXQgaXMgdXNlZDoKIyB0b2Rh\neSA9ICcnCiMgRWxzZSwgdG9kYXlfZm10IGlzIHVzZWQgYXMgdGhlIGZvcm1h\ndCBmb3IgYSBzdHJmdGltZSBjYWxsLgojIHRvZGF5X2ZtdCA9ICclQiAlZCwg\nJVknCgojIExpc3Qgb2YgcGF0dGVybnMsIHJlbGF0aXZlIHRvIHNvdXJjZSBk\naXJlY3RvcnksIHRoYXQgbWF0Y2ggZmlsZXMgYW5kCiMgZGlyZWN0b3JpZXMg\ndG8gaWdub3JlIHdoZW4gbG9va2luZyBmb3Igc291cmNlIGZpbGVzLgpleGNs\ndWRlX3BhdHRlcm5zID0gWyJfYnVpbGQiXQoKIyBUaGUgcmVTVCBkZWZhdWx0\nIHJvbGUgKHVzZWQgZm9yIHRoaXMgbWFya3VwOiBgdGV4dGApIHRvIHVzZSBm\nb3IgYWxsCiMgZG9jdW1lbnRzLgojIGRlZmF1bHRfcm9sZSA9IE5vbmUKCiMg\nSWYgdHJ1ZSwgJygpJyB3aWxsIGJlIGFwcGVuZGVkIHRvIDpmdW5jOiBldGMu\nIGNyb3NzLXJlZmVyZW5jZSB0ZXh0LgojIGFkZF9mdW5jdGlvbl9wYXJlbnRo\nZXNlcyA9IFRydWUKCiMgSWYgdHJ1ZSwgdGhlIGN1cnJlbnQgbW9kdWxlIG5h\nbWUgd2lsbCBiZSBwcmVwZW5kZWQgdG8gYWxsIGRlc2NyaXB0aW9uCiMgdW5p\ndCB0aXRsZXMgKHN1Y2ggYXMgLi4gZnVuY3Rpb246OikuCiMgYWRkX21vZHVs\nZV9uYW1lcyA9IFRydWUKCiMgSWYgdHJ1ZSwgc2VjdGlvbmF1dGhvciBhbmQg\nbW9kdWxlYXV0aG9yIGRpcmVjdGl2ZXMgd2lsbCBiZSBzaG93biBpbiB0aGUK\nIyBvdXRwdXQuIFRoZXkgYXJlIGlnbm9yZWQgYnkgZGVmYXVsdC4KIyBzaG93\nX2F1dGhvcnMgPSBGYWxzZQoKIyBUaGUgbmFtZSBvZiB0aGUgUHlnbWVudHMg\nKHN5bnRheCBoaWdobGlnaHRpbmcpIHN0eWxlIHRvIHVzZS4KcHlnbWVudHNf\nc3R5bGUgPSAic3BoaW54IgoKIyBBIGxpc3Qgb2YgaWdub3JlZCBwcmVmaXhl\ncyBmb3IgbW9kdWxlIGluZGV4IHNvcnRpbmcuCiMgbW9kaW5kZXhfY29tbW9u\nX3ByZWZpeCA9IFtdCgojIElmIHRydWUsIGtlZXAgd2FybmluZ3MgYXMgInN5\nc3RlbSBtZXNzYWdlIiBwYXJhZ3JhcGhzIGluIHRoZSBidWlsdCBkb2N1bWVu\ndHMuCiMga2VlcF93YXJuaW5ncyA9IEZhbHNlCgoKIyAtLSBPcHRpb25zIGZv\nciBIVE1MIG91dHB1dCAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t\nLS0tLS0tLS0tLS0tLS0tCgojIFRoZSB0aGVtZSB0byB1c2UgZm9yIEhUTUwg\nYW5kIEhUTWZMIEhlbHAgcGFnZXMuICBTZWUgdGhlIGRvY3VtZW50YXRpb24g\nZm9yCiMgYSBsaXN0IG9mIGJ1aWx0aW4gdGhlbWVzLgpodG1sX3RoZW1lID0g\nImRlZmF1bHQiCgojIFRoZW1lIG9wdGlvbnMgYXJlIHRoZW1lLXNwZWNpZmlj\nIGFuZCBjdXN0b21pemUgdGhlIGxvb2sgYW5kIGZlZWwgb2YgYSB0aGVtZQoj\nIGZ1cnRoZXIuICBGb3IgYSBsaXN0IG9mIG9wdGlvbnMgYXZhaWxhYmxlIGZv\nciBlYWNoIHRoZW1lLCBzZWUgdGhlCiMgZG9jdW1lbnRhdGlvbi4KIyBodG1s\nX3RoZW1lX29wdGlvbnMgPSB7fQoKIyBBZGQgYW55IHBhdGhzIHRoYXQgY29u\ndGFpbiBjdXN0b20gdGhlbWVzIGhlcmUsIHJlbGF0aXZlIHRvIHRoaXMgZGly\nZWN0b3J5LgojIGh0bWxfdGhlbWVfcGF0aCA9IFtdCgojIFRoZSBuYW1lIGZv\nciB0aGlzIHNldCBvZiBTcGhpbnggZG9jdW1lbnRzLiAgSWYgTm9uZSwgaXQg\nZGVmYXVsdHMgdG8KIyAiPHByb2plY3Q+IHY8cmVsZWFzZT4gZG9jdW1lbnRh\ndGlvbiIuCiMgaHRtbF90aXRsZSA9IE5vbmUKCiMgQSBzaG9ydGVyIHRpdGxl\nIGZvciB0aGUgbmF2aWdhdGlvbiBiYXIuICBEZWZhdWx0IGlzIHRoZSBzYW1l\nIGFzIGh0bWxfdGl0bGUuCiMgaHRtbF9zaG9ydF90aXRsZSA9IE5vbmUKCiMg\nVGhlIG5hbWUgb2YgYW4gaW1hZ2UgZmlsZSAocmVsYXRpdmUgdG8gdGhpcyBk\naXJlY3RvcnkpIHRvIHBsYWNlIGF0IHRoZSB0b3AKIyBvZiB0aGUgc2lkZWJh\nci4KIyBodG1sX2xvZ28gPSBOb25lCgojIFRoZSBuYW1lIG9mIGFuIGltYWdl\nIGZpbGUgKHdpdGhpbiB0aGUgc3RhdGljIHBhdGgpIHRvIHVzZSBhcyBmYXZp\nY29uIG9mIHRoZQojIGRvY3MuICBUaGlzIGZpbGUgc2hvdWxkIGJlIGEgV2lu\nZG93cyBpY29uIGZpbGUgKC5pY28pIGJlaW5nIDE2eDE2IG9yIDMyeDMyCiMg\ncGl4ZWxzIGxhcmdlLgojIGh0bWxfZmF2aWNvbiA9IE5vbmUKCiMgQWRkIGFu\neSBwYXRocyB0aGF0IGNvbnRhaW4gY3VzdG9tIHN0YXRpYyBmaWxlcyAoc3Vj\naCBhcyBzdHlsZSBzaGVldHMpIGhlcmUsCiMgcmVsYXRpdmUgdG8gdGhpcyBk\naXJlY3RvcnkuIFRoZXkgYXJlIGNvcGllZCBhZnRlciB0aGUgYnVpbHRpbiBz\ndGF0aWMgZmlsZXMsCiMgc28gYSBmaWxlIG5hbWVkICJkZWZhdWx0LmNzcyIg\nd2lsbCBvdmVyd3JpdGUgdGhlIGJ1aWx0aW4gImRlZmF1bHQuY3NzIi4KIyBo\ndG1sX3N0YXRpY19wYXRoID0gWydfc3RhdGljJ10KCiMgQWRkIGFueSBleHRy\nYSBwYXRocyB0aGF0IGNvbnRhaW4gY3VzdG9tIGZpbGVzIChzdWNoIGFzIHJv\nYm90cy50eHQgb3IKIyAuaHRhY2Nlc3MpIGhlcmUsIHJlbGF0aXZlIHRvIHRo\naXMgZGlyZWN0b3J5LiBUaGVzZSBmaWxlcyBhcmUgY29waWVkCiMgZGlyZWN0\nbHkgdG8gdGhlIHJvb3Qgb2YgdGhlIGRvY3VtZW50YXRpb24uCiMgaHRtbF9l\neHRyYV9wYXRoID0gW10KCiMgSWYgbm90ICcnLCBhICdMYXN0IHVwZGF0ZWQg\nb246JyB0aW1lc3RhbXAgaXMgaW5zZXJ0ZWQgYXQgZXZlcnkgcGFnZSBib3R0\nb20sCiMgdXNpbmcgdGhlIGdpdmVuIHN0cmZ0aW1lIGZvcm1hdC4KIyBodG1s\nX2xhc3RfdXBkYXRlZF9mbXQgPSAnJWIgJWQsICVZJwoKIyBJZiB0cnVlLCBT\nbWFydHlQYW50cyB3aWxsIGJlIHVzZWQgdG8gY29udmVydCBxdW90ZXMgYW5k\nIGRhc2hlcyB0bwojIHR5cG9ncmFwaGljYWxseSBjb3JyZWN0IGVudGl0aWVz\nLgojIGh0bWxfdXNlX3NtYXJ0eXBhbnRzID0gVHJ1ZQoKIyBDdXN0b20gc2lk\nZWJhciB0ZW1wbGF0ZXMsIG1hcHMgZG9jdW1lbnQgbmFtZXMgdG8gdGVtcGxh\ndGUgbmFtZXMuCiMgaHRtbF9zaWRlYmFycyA9IHt9CgojIEFkZGl0aW9uYWwg\ndGVtcGxhdGVzIHRoYXQgc2hvdWxkIGJlIHJlbmRlcmVkIHRvIHBhZ2VzLCBt\nYXBzIHBhZ2UgbmFtZXMgdG8KIyB0ZW1wbGF0ZSBuYW1lcy4KIyBodG1sX2Fk\nZGl0aW9uYWxfcGFnZXMgPSB7fQoKIyBJZiBmYWxzZSwgbm8gbW9kdWxlIGlu\nZGV4IGlzIGdlbmVyYXRlZC4KIyBodG1sX2RvbWFpbl9pbmRpY2VzID0gVHJ1\nZQoKIyBJZiBmYWxzZSwgbm8gaW5kZXggaXMgZ2VuZXJhdGVkLgojIGh0bWxf\ndXNlX2luZGV4ID0gVHJ1ZQoKIyBJZiB0cnVlLCB0aGUgaW5kZXggaXMgc3Bs\naXQgaW50byBpbmRpdmlkdWFsIHBhZ2VzIGZvciBlYWNoIGxldHRlci4KIyBo\ndG1sX3NwbGl0X2luZGV4ID0gRmFsc2UKCiMgSWYgdHJ1ZSwgbGlua3MgdG8g\ndGhlIHJlU1Qgc291cmNlcyBhcmUgYWRkZWQgdG8gdGhlIHBhZ2VzLgojIGh0\nbWxfc2hvd19zb3VyY2VsaW5rID0gVHJ1ZQoKIyBJZiB0cnVlLCAiQ3JlYXRl\nZCB1c2luZyBTcGhpbngiIGlzIHNob3duIGluIHRoZSBIVE1MIGZvb3Rlci4g\nRGVmYXVsdCBpcyBUcnVlLgojIGh0bWxfc2hvd19zcGhpbnggPSBUcnVlCgoj\nIElmIHRydWUsICIoQykgQ29weXJpZ2h0IC4uLiIgaXMgc2hvd24gaW4gdGhl\nIEhUTUwgZm9vdGVyLiBEZWZhdWx0IGlzIFRydWUuCiMgaHRtbF9zaG93X2Nv\ncHlyaWdodCA9IFRydWUKCiMgSWYgdHJ1ZSwgYW4gT3BlblNlYXJjaCBkZXNj\ncmlwdGlvbiBmaWxlIHdpbGwgYmUgb3V0cHV0LCBhbmQgYWxsIHBhZ2VzIHdp\nbGwKIyBjb250YWluIGEgPGxpbms+IHRhZyByZWZlcnJpbmcgdG8gaXQuICBU\naGUgdmFsdWUgb2YgdGhpcyBvcHRpb24gbXVzdCBiZSB0aGUKIyBiYXNlIFVS\nTCBmcm9tIHdoaWNoIHRoZSBmaW5pc2hlZCBIVE1MIGlzIHNlcnZlZC4KIyBo\ndG1sX3VzZV9vcGVuc2VhcmNoID0gJycKCiMgVGhpcyBpcyB0aGUgZmlsZSBu\nYW1lIHN1ZmZpeCBmb3IgSFRNTCBmaWxlcyAoZS5nLiAiLnhodG1sIikuCiMg\naHRtbF9maWxlX3N1ZmZpeCA9IE5vbmUKCiMgT3V0cHV0IGZpbGUgYmFzZSBu\nYW1lIGZvciBIVE1MIGhlbHAgYnVpbGRlci4KaHRtbGhlbHBfYmFzZW5hbWUg\nPSAiZnVqaS10b29sc2RvYyIKCgojIC0tIE9wdGlvbnMgZm9yIExhVGVYIG91\ndHB1dCAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t\nLS0tLS0KCmxhdGV4X2VsZW1lbnRzID0gewogICAgIyBUaGUgcGFwZXIgc2l6\nZSAoJ2xldHRlcnBhcGVyJyBvciAnYTRwYXBlcicpLgogICAgIydwYXBlcnNp\nemUnOiAnbGV0dGVycGFwZXInLAogICAgIyBUaGUgZm9udCBzaXplICgnMTBw\ndCcsICcxMXB0JyBvciAnMTJwdCcpLgogICAgIydwb2ludHNpemUnOiAnMTBw\ndCcsCiAgICAjIEFkZGl0aW9uYWwgc3R1ZmYgZm9yIHRoZSBMYVRlWCBwcmVh\nbWJsZS4KICAgICMncHJlYW1ibGUnOiAnJywKfQoKIyBHcm91cGluZyB0aGUg\nZG9jdW1lbnQgdHJlZSBpbnRvIExhVGVYIGZpbGVzLiBMaXN0IG9mIHR1cGxl\ncwojIChzb3VyY2Ugc3RhcnQgZmlsZSwgdGFyZ2V0IG5hbWUsIHRpdGxlLAoj\nICBhdXRob3IsIGRvY3VtZW50Y2xhc3MgW2hvd3RvLCBtYW51YWwsIG9yIG93\nbiBjbGFzc10pLgpsYXRleF9kb2N1bWVudHMgPSBbCiAgICAoImluZGV4Iiwg\nImZ1amkudGV4IiwgIkZ1amkgRG9jdW1lbnRhdGlvbiIsICJUaGUgRi11amkg\nYXV0aG9ycyIsICJmdWppX21hbnVhbCIpLApdCgojIFRoZSBuYW1lIG9mIGFu\nIGltYWdlIGZpbGUgKHJlbGF0aXZlIHRvIHRoaXMgZGlyZWN0b3J5KSB0byBw\nbGFjZSBhdCB0aGUgdG9wIG9mCiMgdGhlIHRpdGxlIHBhZ2UuCiMgbGF0ZXhf\nbG9nbyA9IE5vbmUKCiMgRm9yICJtYW51YWwiIGRvY3VtZW50cywgaWYgdGhp\ncyBpcyB0cnVlLCB0aGVuIHRvcGxldmVsIGhlYWRpbmdzIGFyZSBwYXJ0cywK\nIyBub3QgY2hhcHRlcnMuCiMgbGF0ZXhfdXNlX3BhcnRzID0gRmFsc2UKCiMg\nSWYgdHJ1ZSwgc2hvdyBwYWdlIHJlZmVyZW5jZXMgYWZ0ZXIgaW50ZXJuYWwg\nbGlua3MuCiMgbGF0ZXhfc2hvd19wYWdlcmVmcyA9IEZhbHNlCgojIElmIHRy\ndWUsIHNob3cgVVJMIGFkZHJlc3NlcyBhZnRlciBleHRlcm5hbCBsaW5rcy4K\nIyBsYXRleF9zaG93X3VybHMgPSBGYWxzZQoKIyBEb2N1bWVudHMgdG8gYXBw\nZW5kIGFzIGFuIGFwcGVuZGl4IHRvIGFsbCBtYW51YWxzLgojIGxhdGV4X2Fw\ncGVuZGljZXMgPSBbXQoKIyBJZiBmYWxzZSwgbm8gbW9kdWxlIGluZGV4IGlz\nIGdlbmVyYXRlZC4KIyBsYXRleF9kb21haW5faW5kaWNlcyA9IFRydWUKCgoj\nIG9uX3J0ZCBpcyB3aGV0aGVyIHdlIGFyZSBvbiByZWFkdGhlZG9jcy5vcmcs\nIHRoaXMgbGluZSBvZiBjb2RlIGdyYWJiZWQKIyBmcm9tIGRvY3MucmVhZHRo\nZWRvY3Mub3JnCm9uX3J0ZCA9IG9zLmVudmlyb24uZ2V0KCJSRUFEVEhFRE9D\nUyIsIE5vbmUpID09ICJUcnVlIiAgIyBweXRob24gMwoKCmlmIG5vdCBvbl9y\ndGQ6ICAjIG9ubHkgaW1wb3J0IGFuZCBzZXQgdGhlIHRoZW1lIGlmIHdlJ3Jl\nIGJ1aWxkaW5nIGRvY3MgbG9jYWxseQogICAgdHJ5OgogICAgICAgIGltcG9y\ndCBzcGhpbnhfcnRkX3RoZW1lCgogICAgICAgIGh0bWxfdGhlbWUgPSAic3Bo\naW54X3J0ZF90aGVtZSIKICAgICAgICBodG1sX3RoZW1lX3BhdGggPSBbc3Bo\naW54X3J0ZF90aGVtZS5nZXRfaHRtbF90aGVtZV9wYXRoKCldCiAgICBleGNl\ncHQgSW1wb3J0RXJyb3I6CiAgICAgICAgIyBObyBzcGhpbnhfcnRkX3RoZW1l\nIGluc3RhbGxlZAogICAgICAgIHBhc3MKCmF1dG9kb2NfbW9ja19pbXBvcnRz\nID0gWyJib2tlaCJdCgojIC0tIE9wdGlvbnMgZm9yIG1hbnVhbCBwYWdlIG91\ndHB1dCAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0K\nCiMgT25lIGVudHJ5IHBlciBtYW51YWwgcGFnZS4gTGlzdCBvZiB0dXBsZXMK\nIyAoc291cmNlIHN0YXJ0IGZpbGUsIG5hbWUsIGRlc2NyaXB0aW9uLCBhdXRo\nb3JzLCBtYW51YWwgc2VjdGlvbikuCm1hbl9wYWdlcyA9IFsKICAgICgiaW5k\nZXgiLCAiZnVqaS50ZXgiLCAiRnVqaSBEb2N1bWVudGF0aW9uIiwgWyJUaGUg\nRi11amkgYXV0aG9ycyJdLCAxKSwKXQoKIyBJZiB0cnVlLCBzaG93IFVSTCBh\nZGRyZXNzZXMgYWZ0ZXIgZXh0ZXJuYWwgbGlua3MuCiMgbWFuX3Nob3dfdXJs\ncyA9IEZhbHNlCgoKIyAtLSBPcHRpb25zIGZvciBUZXhpbmZvIG91dHB1dCAt\nLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCgoj\nIEdyb3VwaW5nIHRoZSBkb2N1bWVudCB0cmVlIGludG8gVGV4aW5mbyBmaWxl\ncy4gTGlzdCBvZiB0dXBsZXMKIyAoc291cmNlIHN0YXJ0IGZpbGUsIHRhcmdl\ndCBuYW1lLCB0aXRsZSwgYXV0aG9yLAojICBkaXIgbWVudSBlbnRyeSwgZGVz\nY3JpcHRpb24sIGNhdGVnb3J5KQp0ZXhpbmZvX2RvY3VtZW50cyA9IFsKICAg\nICgKICAgICAgICAiaW5kZXgiLAogICAgICAgICJmdWppIiwKICAgICAgICAi\nRnVqaSBEb2N1bWVudGF0aW9uIiwKICAgICAgICAiVGhlIEZ1amkgYXV0aG9y\ncyIsCiAgICAgICAgImZ1amkiLAogICAgICAgICJGVUpJLCBhIHNlcnZpY2Ug\ndG8gZXZhbHVhdGUgRkFJUiBkYXRhIG9iamVjdHMgYmFzZWQgb24gRkFJUnNG\nQUlSIE1ldHJpY3MiLAogICAgICAgICJNaXNjZWxsYW5lb3VzIiwKICAgICks\nCl0KCiMgRG9jdW1lbnRzIHRvIGFwcGVuZCBhcyBhbiBhcHBlbmRpeCB0byBh\nbGwgbWFudWFscy4KIyB0ZXhpbmZvX2FwcGVuZGljZXMgPSBbXQoKIyBJZiBm\nYWxzZSwgbm8gbW9kdWxlIGluZGV4IGlzIGdlbmVyYXRlZC4KIyB0ZXhpbmZv\nX2RvbWFpbl9pbmRpY2VzID0gVHJ1ZQoKIyBIb3cgdG8gZGlzcGxheSBVUkwg\nYWRkcmVzc2VzOiAnZm9vdG5vdGUnLCAnbm8nLCBvciAnaW5saW5lJy4KIyB0\nZXhpbmZvX3Nob3dfdXJscyA9ICdmb290bm90ZScKCiMgSWYgdHJ1ZSwgZG8g\nbm90IGdlbmVyYXRlIGEgQGRldGFpbG1lbnUgaW4gdGhlICJUb3AiIG5vZGUn\ncyBtZW51LgojIHRleGluZm9fbm9fZGV0YWlsbWVudSA9IEZhbHNlCgojIC0t\nIE9wdGlvbnMgZm9yIEVwdWIgb3V0cHV0IC0tLS0tLS0tLS0tLS0tLS0tLS0t\nLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQoKIyBCaWJsaW9ncmFw\naGljIER1YmxpbiBDb3JlIGluZm8uCmVwdWJfdGl0bGUgPSBQUk9KRUNUTkFN\nRQplcHViX2F1dGhvciA9IGF1dGhvcgplcHViX3B1Ymxpc2hlciA9IGF1dGhv\ncgplcHViX2NvcHlyaWdodCA9IGNvcHlyaWdodAoKIyBUaGUgbGFuZ3VhZ2Ug\nb2YgdGhlIHRleHQuIEl0IGRlZmF1bHRzIHRvIHRoZSBsYW5ndWFnZSBvcHRp\nb24KIyBvciBlbiBpZiB0aGUgbGFuZ3VhZ2UgaXMgbm90IHNldC4KIyBlcHVi\nX2xhbmd1YWdlID0gJycKCiMgVGhlIHNjaGVtZSBvZiB0aGUgaWRlbnRpZmll\nci4gVHlwaWNhbCBzY2hlbWVzIGFyZSBJU0JOIG9yIFVSTC4KIyBlcHViX3Nj\naGVtZSA9ICcnCgojIFRoZSB1bmlxdWUgaWRlbnRpZmllciBvZiB0aGUgdGV4\ndC4gVGhpcyBjYW4gYmUgYSBJU0JOIG51bWJlcgojIG9yIHRoZSBwcm9qZWN0\nIGhvbWVwYWdlLgojIGVwdWJfaWRlbnRpZmllciA9ICcnCgojIEEgdW5pcXVl\nIGlkZW50aWZpY2F0aW9uIGZvciB0aGUgdGV4dC4KIyBlcHViX3VpZCA9ICcn\nCgojIEEgdHVwbGUgY29udGFpbmluZyB0aGUgY292ZXIgaW1hZ2UgYW5kIGNv\ndmVyIHBhZ2UgaHRtbCB0ZW1wbGF0ZSBmaWxlbmFtZXMuCiMgZXB1Yl9jb3Zl\nciA9ICgpCgojIEhUTUwgZmlsZXMgdGhhdCBzaG91bGQgYmUgaW5zZXJ0ZWQg\nYmVmb3JlIHRoZSBwYWdlcyBjcmVhdGVkIGJ5IHNwaGlueC4KIyBUaGUgZm9y\nbWF0IGlzIGEgbGlzdCBvZiB0dXBsZXMgY29udGFpbmluZyB0aGUgcGF0aCBh\nbmQgdGl0bGUuCiMgZXB1Yl9wcmVfZmlsZXMgPSBbXQoKIyBIVE1MIGZpbGVz\nIHNoYXQgc2hvdWxkIGJlIGluc2VydGVkIGFmdGVyIHRoZSBwYWdlcyBjcmVh\ndGVkIGJ5IHNwaGlueC4KIyBUaGUgZm9ybWF0IGlzIGEgbGlzdCBvZiB0dXBs\nZXMgY29udGFpbmluZyB0aGUgcGF0aCBhbmQgdGl0bGUuCiMgZXB1Yl9wb3N0\nX2ZpbGVzID0gW10KCiMgQSBsaXN0IG9mIGZpbGVzIHRoYXQgc2hvdWxkIG5v\ndCBiZSBwYWNrZWQgaW50byB0aGUgZXB1YiBmaWxlLgojIGVwdWJfZXhjbHVk\nZV9maWxlcyA9IFtdCgojIFRoZSBkZXB0aCBvZiB0aGUgdGFibGUgb2YgY29u\ndGVudHMgaW4gdG9jLm5jeC4KIyBlcHViX3RvY2RlcHRoID0gMwoKCiMgV2Fy\nbmluZ3MgdG8gaWdub3JlIHdoZW4gdXNpbmcgdGhlIC1uIChuaXRwaWNreSkg\nb3B0aW9uCiMgV2Ugc2hvdWxkIGlnbm9yZSBhbnkgcHl0aG9uIGJ1aWx0LWlu\nIGV4Y2VwdGlvbiwgZm9yIGluc3RhbmNlCm5pdHBpY2tfaWdub3JlID0gWwog\nICAgKCJweTpleGMiLCAiQXJpdGhtZXRpY0Vycm9yIiksCiAgICAoInB5OmV4\nYyIsICJBc3NlcnRpb25FcnJvciIpLAogICAgKCJweTpleGMiLCAiQXR0cmli\ndXRlRXJyb3IiKSwKICAgICgicHk6ZXhjIiwgIkJhc2VFeGNlcHRpb24iKSwK\nICAgICgicHk6ZXhjIiwgIkJ1ZmZlckVycm9yIiksCiAgICAoInB5OmV4YyIs\nICJEZXByZWNhdGlvbldhcm5pbmciKSwKICAgICgicHk6ZXhjIiwgIkVPRkVy\ncm9yIiksCiAgICAoInB5OmV4YyIsICJFbnZpcm9ubWVudEVycm9yIiksCiAg\nICAoInB5OmV4YyIsICJFeGNlcHRpb24iKSwKICAgICgicHk6ZXhjIiwgIkZs\nb2F0aW5nUG9pbnRFcnJvciIpLAogICAgKCJweTpleGMiLCAiRnV0dXJlV2Fy\nbmluZyIpLAogICAgKCJweTpleGMiLCAiR2VuZXJhdG9yRXhpdCIpLAogICAg\nKCJweTpleGMiLCAiSU9FcnJvciIpLAogICAgKCJweTpleGMiLCAiSW1wb3J0\nRXJyb3IiKSwKICAgICgicHk6ZXhjIiwgIkltcG9ydFdhcm5pbmciKSwKICAg\nICgicHk6ZXhjIiwgIkluZGVudGF0aW9uRXJyb3IiKSwKICAgICgicHk6ZXhj\nIiwgIkluZGV4RXJyb3IiKSwKICAgICgicHk6ZXhjIiwgIktleUVycm9yIiks\nCiAgICAoInB5OmV4YyIsICJLZXlib2FyZEludGVycnVwdCIpLAogICAgKCJw\neTpleGMiLCAiTG9va3VwRXJyb3IiKSwKICAgICgicHk6ZXhjIiwgIk1lbW9y\neUVycm9yIiksCiAgICAoInB5OmV4YyIsICJOYW1lRXJyb3IiKSwKICAgICgi\ncHk6ZXhjIiwgIk5vdEltcGxlbWVudGVkRXJyb3IiKSwKICAgICgicHk6ZXhj\nIiwgIk9TRXJyb3IiKSwKICAgICgicHk6ZXhjIiwgIk92ZXJmbG93RXJyb3Ii\nKSwKICAgICgicHk6ZXhjIiwgIlBlbmRpbmdEZXByZWNhdGlvbldhcm5pbmci\nKSwKICAgICgicHk6ZXhjIiwgIlJlZmVyZW5jZUVycm9yIiksCiAgICAoInB5\nOmV4YyIsICJSdW50aW1lRXJyb3IiKSwKICAgICgicHk6ZXhjIiwgIlJ1bnRp\nbWVXYXJuaW5nIiksCiAgICAoInB5OmV4YyIsICJTdGFuZGFyZEVycm9yIiks\nCiAgICAoInB5OmV4YyIsICJTdG9wSXRlcmF0aW9uIiksCiAgICAoInB5OmV4\nYyIsICJTeW50YXhFcnJvciIpLAogICAgKCJweTpleGMiLCAiU3ludGF4V2Fy\nbmluZyIpLAogICAgKCJweTpleGMiLCAiU3lzdGVtRXJyb3IiKSwKICAgICgi\ncHk6ZXhjIiwgIlN5c3RlbUV4aXQiKSwKICAgICgicHk6ZXhjIiwgIlRhYkVy\ncm9yIiksCiAgICAoInB5OmV4YyIsICJUeXBlRXJyb3IiKSwKICAgICgicHk6\nZXhjIiwgIlVuYm91bmRMb2NhbEVycm9yIiksCiAgICAoInB5OmV4YyIsICJV\nbmljb2RlRGVjb2RlRXJyb3IiKSwKICAgICgicHk6ZXhjIiwgIlVuaWNvZGVF\nbmNvZGVFcnJvciIpLAogICAgKCJweTpleGMiLCAiVW5pY29kZUVycm9yIiks\nCiAgICAoInB5OmV4YyIsICJVbmljb2RlVHJhbnNsYXRlRXJyb3IiKSwKICAg\nICgicHk6ZXhjIiwgIlVuaWNvZGVXYXJuaW5nIiksCiAgICAoInB5OmV4YyIs\nICJVc2VyV2FybmluZyIpLAogICAgKCJweTpleGMiLCAiVk1TRXJyb3IiKSwK\nICAgICgicHk6ZXhjIiwgIlZhbHVlRXJyb3IiKSwKICAgICgicHk6ZXhjIiwg\nIldhcm5pbmciKSwKICAgICgicHk6ZXhjIiwgIldpbmRvd3NFcnJvciIpLAog\nICAgKCJweTpleGMiLCAiWmVyb0RpdmlzaW9uRXJyb3IiKSwKICAgICgicHk6\nb2JqIiwgInN0ciIpLAogICAgKCJweTpvYmoiLCAibGlzdCIpLAogICAgKCJw\neTpvYmoiLCAidHVwbGUiKSwKICAgICgicHk6b2JqIiwgImludCIpLAogICAg\nKCJweTpvYmoiLCAiZmxvYXQiKSwKICAgICgicHk6b2JqIiwgImJvb2wiKSwK\nICAgICgicHk6b2JqIiwgIk1hcHBpbmciKSwKXQoKIyBodG1sX2NvbnRleHQg\nPSB7CiMgICAgJ2Nzc19maWxlcyc6IFsKIyAgICAgICAgJ19zdGF0aWMvdGhl\nbWVfb3ZlcnJpZGVzLmNzcycsICAjIG92ZXJyaWRlIHdpZGUgdGFibGVzIGlu\nIFJURCB0aGVtZQojICAgIF0sCiMgfQo=\n","encoding":"base64","_links":{"self":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/docs/source/conf.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs/95e0e43e9ff99c7f1ddc5dc7f4445bbe994ee2b2","html":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/docs/source/conf.py"}}' + headers: + Access-Control-Allow-Origin: + - '*' + Access-Control-Expose-Headers: + - ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset + Cache-Control: + - private, max-age=60, s-maxage=60 + Content-Encoding: + - gzip + Content-Security-Policy: + - default-src 'none' + Content-Type: + - application/json; charset=utf-8 + Date: + - Fri, 12 Jan 2024 16:17:07 GMT + ETag: + - W/"95e0e43e9ff99c7f1ddc5dc7f4445bbe994ee2b2" + Last-Modified: + - Fri, 12 Jan 2024 09:49:41 GMT + Referrer-Policy: + - origin-when-cross-origin, strict-origin-when-cross-origin + Server: + - GitHub.com + Strict-Transport-Security: + - max-age=31536000; includeSubdomains; preload + Transfer-Encoding: + - chunked + Vary: + - Accept, Authorization, Cookie, X-GitHub-OTP + - Accept-Encoding, Accept, X-Requested-With + X-Accepted-OAuth-Scopes: + - '' + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + X-GitHub-Media-Type: + - github.v3; format=json + X-GitHub-Request-Id: + - 785C:25BE01:4FC72B0:50B5467:65A16602 + X-OAuth-Scopes: + - repo + X-RateLimit-Limit: + - '5000' + X-RateLimit-Remaining: + - '4961' + X-RateLimit-Reset: + - '1705078320' + X-RateLimit-Resource: + - core + X-RateLimit-Used: + - '39' + X-XSS-Protection: + - '0' + github-authentication-token-expiration: + - 2024-03-04 14:01:51 UTC + x-github-api-version-selected: + - '2022-11-28' + status: + code: 200 + message: OK +- request: + body: + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Authorization: + - token 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 + Connection: + - keep-alive + User-Agent: + - PyGithub/Python + method: GET + uri: https://api.github.com/repositories/259678183/contents/fuji_server/encoder.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9 + response: + body: + string: '{"name":"encoder.py","path":"fuji_server/encoder.py","sha":"0536ef3fbc331bfc0a83b769dacb0df405d48e9a","size":672,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/fuji_server/encoder.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/encoder.py","git_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs/0536ef3fbc331bfc0a83b769dacb0df405d48e9a","download_url":"https://raw.githubusercontent.com/pangaea-data-publisher/fuji/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/encoder.py","type":"file","content":"IyBTUERYLUZpbGVDb3B5cmlnaHRUZXh0OiAyMDIwIFBBTkdBRUEgKGh0dHBz\nOi8vd3d3LnBhbmdhZWEuZGUvKQojCiMgU1BEWC1MaWNlbnNlLUlkZW50aWZp\nZXI6IE1JVAoKZnJvbSBjb25uZXhpb24uanNvbmlmaWVyIGltcG9ydCBKU09O\nRW5jb2RlcgoKZnJvbSBmdWppX3NlcnZlci5tb2RlbHMuYmFzZV9tb2RlbF8g\naW1wb3J0IE1vZGVsCgoKY2xhc3MgQ3VzdG9tSlNPTkVuY29kZXIoSlNPTkVu\nY29kZXIpOgogICAgaW5jbHVkZV9udWxscyA9IEZhbHNlCgogICAgZGVmIGRl\nZmF1bHQoc2VsZiwgbyk6CiAgICAgICAgaWYgaXNpbnN0YW5jZShvLCBNb2Rl\nbCk6CiAgICAgICAgICAgIGRpa3QgPSB7fQogICAgICAgICAgICBmb3IgYXR0\nciwgXyBpbiBvLnN3YWdnZXJfdHlwZXMuaXRlbXMoKToKICAgICAgICAgICAg\nICAgIHZhbHVlID0gZ2V0YXR0cihvLCBhdHRyKQogICAgICAgICAgICAgICAg\naWYgdmFsdWUgaXMgTm9uZSBhbmQgbm90IHNlbGYuaW5jbHVkZV9udWxsczoK\nICAgICAgICAgICAgICAgICAgICBjb250aW51ZQogICAgICAgICAgICAgICAg\nYXR0ciA9IG8uYXR0cmlidXRlX21hcFthdHRyXQogICAgICAgICAgICAgICAg\nZGlrdFthdHRyXSA9IHZhbHVlCiAgICAgICAgICAgIHJldHVybiBkaWt0CiAg\nICAgICAgcmV0dXJuIEpTT05FbmNvZGVyLmRlZmF1bHQoc2VsZiwgbykK\n","encoding":"base64","_links":{"self":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/fuji_server/encoder.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs/0536ef3fbc331bfc0a83b769dacb0df405d48e9a","html":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/encoder.py"}}' + headers: + Access-Control-Allow-Origin: + - '*' + Access-Control-Expose-Headers: + - ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset + Cache-Control: + - private, max-age=60, s-maxage=60 + Content-Encoding: + - gzip + Content-Security-Policy: + - default-src 'none' + Content-Type: + - application/json; charset=utf-8 + Date: + - Fri, 12 Jan 2024 16:17:07 GMT + ETag: + - W/"0536ef3fbc331bfc0a83b769dacb0df405d48e9a" + Last-Modified: + - Fri, 12 Jan 2024 09:49:41 GMT + Referrer-Policy: + - origin-when-cross-origin, strict-origin-when-cross-origin + Server: + - GitHub.com + Strict-Transport-Security: + - max-age=31536000; includeSubdomains; preload + Transfer-Encoding: + - chunked + Vary: + - Accept, Authorization, Cookie, X-GitHub-OTP + - Accept-Encoding, Accept, X-Requested-With + X-Accepted-OAuth-Scopes: + - '' + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + X-GitHub-Media-Type: + - github.v3; format=json + X-GitHub-Request-Id: + - 9FB5:8F432:F6CD435:F97F3C0:65A16603 + X-OAuth-Scopes: + - repo + X-RateLimit-Limit: + - '5000' + X-RateLimit-Remaining: + - '4960' + X-RateLimit-Reset: + - '1705078320' + X-RateLimit-Resource: + - core + X-RateLimit-Used: + - '40' + X-XSS-Protection: + - '0' + github-authentication-token-expiration: + - 2024-03-04 14:01:51 UTC + x-github-api-version-selected: + - '2022-11-28' + status: + code: 200 + message: OK +- request: + body: + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Authorization: + - token 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 + Connection: + - keep-alive + User-Agent: + - PyGithub/Python + method: GET + uri: https://api.github.com/repositories/259678183/contents/fuji_server/__init__.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9 + response: + body: + string: '{"name":"__init__.py","path":"fuji_server/__init__.py","sha":"bfec0e01e89e507a05c789a9b4c9758f8cb57fb1","size":2053,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/fuji_server/__init__.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/__init__.py","git_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs/bfec0e01e89e507a05c789a9b4c9758f8cb57fb1","download_url":"https://raw.githubusercontent.com/pangaea-data-publisher/fuji/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/__init__.py","type":"file","content":"IyAtKi0gY29kaW5nOiB1dGYtOCAtKi0KCiMgU1BEWC1GaWxlQ29weXJpZ2h0\nVGV4dDogMjAyMCBQQU5HQUVBIChodHRwczovL3d3dy5wYW5nYWVhLmRlLykK\nIwojIFNQRFgtTGljZW5zZS1JZGVudGlmaWVyOiBNSVQKCiMgZmxha2U4OiBu\nb3FhCmZyb20gX19mdXR1cmVfXyBpbXBvcnQgYWJzb2x1dGVfaW1wb3J0Cgoj\nIGltcG9ydCBtb2RlbHMgaW50byBtb2RlbCBwYWNrYWdlCmZyb20gZnVqaV9z\nZXJ2ZXIubW9kZWxzLmFueV9vZl9mYWlyX3Jlc3VsdHNfaXRlbXMgaW1wb3J0\nIEFueU9mRkFJUlJlc3VsdHNSZXN1bHRzSXRlbXMKZnJvbSBmdWppX3NlcnZl\nci5tb2RlbHMuYm9keSBpbXBvcnQgQm9keQpmcm9tIGZ1amlfc2VydmVyLm1v\nZGVscy5jb3JlX21ldGFkYXRhIGltcG9ydCBDb3JlTWV0YWRhdGEKZnJvbSBm\ndWppX3NlcnZlci5tb2RlbHMuY29yZV9tZXRhZGF0YV9vdXRwdXQgaW1wb3J0\nIENvcmVNZXRhZGF0YU91dHB1dApmcm9tIGZ1amlfc2VydmVyLm1vZGVscy5k\nZWJ1ZyBpbXBvcnQgRGVidWcKZnJvbSBmdWppX3NlcnZlci5tb2RlbHMuZmFp\ncl9yZXN1bHRfY29tbW9uIGltcG9ydCBGQUlSUmVzdWx0Q29tbW9uCmZyb20g\nZnVqaV9zZXJ2ZXIubW9kZWxzLmZhaXJfcmVzdWx0X2NvbW1vbl9zY29yZSBp\nbXBvcnQgRkFJUlJlc3VsdENvbW1vblNjb3JlCmZyb20gZnVqaV9zZXJ2ZXIu\nbW9kZWxzLmZhaXJfcmVzdWx0cyBpbXBvcnQgRkFJUlJlc3VsdHMKZnJvbSBm\ndWppX3NlcnZlci5tb2RlbHMuaWRlbnRpZmllcl9pbmNsdWRlZCBpbXBvcnQg\nSWRlbnRpZmllckluY2x1ZGVkCmZyb20gZnVqaV9zZXJ2ZXIubW9kZWxzLmlk\nZW50aWZpZXJfaW5jbHVkZWRfb3V0cHV0IGltcG9ydCBJZGVudGlmaWVySW5j\nbHVkZWRPdXRwdXQKZnJvbSBmdWppX3NlcnZlci5tb2RlbHMuaWRlbnRpZmll\ncl9pbmNsdWRlZF9vdXRwdXRfaW5uZXIgaW1wb3J0IElkZW50aWZpZXJJbmNs\ndWRlZE91dHB1dElubmVyCmZyb20gZnVqaV9zZXJ2ZXIubW9kZWxzLmxpY2Vu\nc2UgaW1wb3J0IExpY2Vuc2UKZnJvbSBmdWppX3NlcnZlci5tb2RlbHMubGlj\nZW5zZV9vdXRwdXQgaW1wb3J0IExpY2Vuc2VPdXRwdXQKZnJvbSBmdWppX3Nl\ncnZlci5tb2RlbHMubGljZW5zZV9vdXRwdXRfaW5uZXIgaW1wb3J0IExpY2Vu\nc2VPdXRwdXRJbm5lcgpmcm9tIGZ1amlfc2VydmVyLm1vZGVscy5tZXRyaWMg\naW1wb3J0IE1ldHJpYwpmcm9tIGZ1amlfc2VydmVyLm1vZGVscy5tZXRyaWNz\nIGltcG9ydCBNZXRyaWNzCmZyb20gZnVqaV9zZXJ2ZXIubW9kZWxzLm91dHB1\ndF9jb3JlX21ldGFkYXRhX2ZvdW5kIGltcG9ydCBPdXRwdXRDb3JlTWV0YWRh\ndGFGb3VuZApmcm9tIGZ1amlfc2VydmVyLm1vZGVscy5vdXRwdXRfc2VhcmNo\nX21lY2hhbmlzbXMgaW1wb3J0IE91dHB1dFNlYXJjaE1lY2hhbmlzbXMKZnJv\nbSBmdWppX3NlcnZlci5tb2RlbHMucGVyc2lzdGVuY2UgaW1wb3J0IFBlcnNp\nc3RlbmNlCmZyb20gZnVqaV9zZXJ2ZXIubW9kZWxzLnBlcnNpc3RlbmNlX291\ndHB1dCBpbXBvcnQgUGVyc2lzdGVuY2VPdXRwdXQKZnJvbSBmdWppX3NlcnZl\nci5tb2RlbHMucmVsYXRlZF9yZXNvdXJjZSBpbXBvcnQgUmVsYXRlZFJlc291\ncmNlCmZyb20gZnVqaV9zZXJ2ZXIubW9kZWxzLnJlbGF0ZWRfcmVzb3VyY2Vf\nb3V0cHV0IGltcG9ydCBSZWxhdGVkUmVzb3VyY2VPdXRwdXQKZnJvbSBmdWpp\nX3NlcnZlci5tb2RlbHMucmVsYXRlZF9yZXNvdXJjZV9vdXRwdXRfaW5uZXIg\naW1wb3J0IFJlbGF0ZWRSZXNvdXJjZU91dHB1dElubmVyCmZyb20gZnVqaV9z\nZXJ2ZXIubW9kZWxzLnNlYXJjaGFibGUgaW1wb3J0IFNlYXJjaGFibGUKZnJv\nbSBmdWppX3NlcnZlci5tb2RlbHMuc2VhcmNoYWJsZV9vdXRwdXQgaW1wb3J0\nIFNlYXJjaGFibGVPdXRwdXQKZnJvbSBmdWppX3NlcnZlci5tb2RlbHMudW5p\ncXVlbmVzcyBpbXBvcnQgVW5pcXVlbmVzcwpmcm9tIGZ1amlfc2VydmVyLm1v\nZGVscy51bmlxdWVuZXNzX291dHB1dCBpbXBvcnQgVW5pcXVlbmVzc091dHB1\ndAoKZnJvbSBpbXBvcnRsaWIubWV0YWRhdGEgaW1wb3J0IHZlcnNpb24KCl9f\ndmVyc2lvbl9fID0gdmVyc2lvbigiZnVqaSIpCg==\n","encoding":"base64","_links":{"self":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/fuji_server/__init__.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs/bfec0e01e89e507a05c789a9b4c9758f8cb57fb1","html":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/__init__.py"}}' + headers: + Access-Control-Allow-Origin: + - '*' + Access-Control-Expose-Headers: + - ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset + Cache-Control: + - private, max-age=60, s-maxage=60 + Content-Encoding: + - gzip + Content-Security-Policy: + - default-src 'none' + Content-Type: + - application/json; charset=utf-8 + Date: + - Fri, 12 Jan 2024 16:17:08 GMT + ETag: + - W/"bfec0e01e89e507a05c789a9b4c9758f8cb57fb1" + Last-Modified: + - Fri, 12 Jan 2024 09:49:41 GMT + Referrer-Policy: + - origin-when-cross-origin, strict-origin-when-cross-origin + Server: + - GitHub.com + Strict-Transport-Security: + - max-age=31536000; includeSubdomains; preload + Transfer-Encoding: + - chunked + Vary: + - Accept, Authorization, Cookie, X-GitHub-OTP + - Accept-Encoding, Accept, X-Requested-With + X-Accepted-OAuth-Scopes: + - '' + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + X-GitHub-Media-Type: + - github.v3; format=json + X-GitHub-Request-Id: + - 510F:2E0C86:C5A8BD8:C7DB477:65A16604 + X-OAuth-Scopes: + - repo + X-RateLimit-Limit: + - '5000' + X-RateLimit-Remaining: + - '4959' + X-RateLimit-Reset: + - '1705078320' + X-RateLimit-Resource: + - core + X-RateLimit-Used: + - '41' + X-XSS-Protection: + - '0' + github-authentication-token-expiration: + - 2024-03-04 14:01:51 UTC + x-github-api-version-selected: + - '2022-11-28' + status: + code: 200 + message: OK +- request: + body: + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Authorization: + - token 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 + Connection: + - keep-alive + User-Agent: + - PyGithub/Python + method: GET + uri: https://api.github.com/repositories/259678183/contents/fuji_server/__main__.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9 + response: + body: + string: '{"name":"__main__.py","path":"fuji_server/__main__.py","sha":"b6393d59b041fd80dd5679447a14e4de3185a0a1","size":3879,"url":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/fuji_server/__main__.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","html_url":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/__main__.py","git_url":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs/b6393d59b041fd80dd5679447a14e4de3185a0a1","download_url":"https://raw.githubusercontent.com/pangaea-data-publisher/fuji/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/__main__.py","type":"file","content":"IyEvdXNyL2Jpbi9lbnYgcHl0aG9uMwoKIyBTUERYLUZpbGVDb3B5cmlnaHRU\nZXh0OiAyMDIwIFBBTkdBRUEgKGh0dHBzOi8vd3d3LnBhbmdhZWEuZGUvKQoj\nCiMgU1BEWC1MaWNlbnNlLUlkZW50aWZpZXI6IE1JVAoKaW1wb3J0IGFyZ3Bh\ncnNlCmltcG9ydCBjb25maWdwYXJzZXIKaW1wb3J0IGxvZ2dpbmcKaW1wb3J0\nIG9zCgpmcm9tIGZsYXNrX2xpbWl0ZXIgaW1wb3J0IExpbWl0ZXIKZnJvbSBm\nbGFza19saW1pdGVyLnV0aWwgaW1wb3J0IGdldF9yZW1vdGVfYWRkcmVzcwoK\nZnJvbSBmdWppX3NlcnZlci5hcHAgaW1wb3J0IGNyZWF0ZV9hcHAKZnJvbSBm\ndWppX3NlcnZlci5oZWxwZXIucHJlcHJvY2Vzc29yIGltcG9ydCBQcmVwcm9j\nZXNzb3IKCgpkZWYgbWFpbigpOgogICAgbG9nZ2luZy5nZXRMb2dnZXIoImNv\nbm5leGlvbi5vcGVyYXRpb24iKS5zZXRMZXZlbCgiSU5GTyIpCiAgICBST09U\nX0RJUiA9IG9zLnBhdGguZGlybmFtZShvcy5wYXRoLmFic3BhdGgoX19maWxl\nX18pKQogICAgWUFNTF9ESVIgPSBjb25maWdbIlNFUlZJQ0UiXVsieWFtbF9k\naXJlY3RvcnkiXQogICAgIyBNRVRSSUNfWUFNTCA9IGNvbmZpZ1snU0VSVklD\nRSddWydtZXRyaWNzX3lhbWwnXQogICAgIyBZQU1MX0RJUiA9IG9zLnBhdGgu\nam9pbihteV9wYXRoLCBjb25maWdbJ1NFUlZJQ0UnXVsneWFtbF9kaXJlY3Rv\ncnknXSkKICAgIE1FVFJJQ19ZTUxfUEFUSCA9IG9zLnBhdGguam9pbihST09U\nX0RJUiwgWUFNTF9ESVIpCiAgICBwcmludCgiWUFNTCBQQVRIIiwgTUVUUklD\nX1lNTF9QQVRIKQogICAgIiIiU1BEWF9VUkwgPSBjb25maWdbJ0VYVEVSTkFM\nJ11bJ3NwZHhfbGljZW5zZV9naXRodWInXQogICAgREFUQUNJVEVfQVBJX1JF\nUE8gPSBjb25maWdbJ0VYVEVSTkFMJ11bJ2RhdGFjaXRlX2FwaV9yZXBvJ10K\nICAgIFJFM0RBVEFfQVBJID0gY29uZmlnWydFWFRFUk5BTCddWydyZTNkYXRh\nX2FwaSddCiAgICBNRVRBREFUQUNBVEFMT0dfQVBJID0gY29uZmlnWydFWFRF\nUk5BTCddWydtZXRhZGF0YV9jYXRhbG9nJ10iIiIKICAgIExPVl9BUEkgPSBj\nb25maWdbIkVYVEVSTkFMIl1bImxvdl9hcGkiXQogICAgTE9EX0NMT1VETkVU\nID0gY29uZmlnWyJFWFRFUk5BTCJdWyJsb2RfY2xvdWRuZXQiXQogICAgIyBC\nSU9QT1JUQUxfUkVTVCA9IGNvbmZpZ1snRVhURVJOQUwnXVsnYmlvcG9ydGFs\nX3Jlc3QnXQogICAgIyBCSU9QT1JUQUxfQVBJS0VZID0gY29uZmlnWydFWFRF\nUk5BTCddWydiaW9wb3J0YWxfYXBpa2V5J10KICAgIGRhdGFfZmlsZXNfbGlt\naXQgPSBpbnQoY29uZmlnWyJTRVJWSUNFIl1bImRhdGFfZmlsZXNfbGltaXQi\nXSkKCiAgICBwcmVwcm9jID0gUHJlcHJvY2Vzc29yKCkKICAgICMgcHJlcHJv\nYy5yZXRyaWV2ZV9tZXRyaWNzX3lhbWwoTUVUUklDX1lNTF9QQVRILCAgbWV0\ncmljX3NwZWNpZmljYXRpb24pCiAgICBwcmVwcm9jLnNldF9kYXRhX2ZpbGVz\nX2xpbWl0KGRhdGFfZmlsZXNfbGltaXQpCiAgICBwcmVwcm9jLnNldF9tZXRy\naWNfeWFtbF9wYXRoKE1FVFJJQ19ZTUxfUEFUSCkKICAgICMgbG9nZ2VyLmlu\nZm8oJ1RvdGFsIG1ldHJpY3MgZGVmaW5lZDoge30nLmZvcm1hdChwcmVwcm9j\nLmdldF90b3RhbF9tZXRyaWNzKCkpKQoKICAgIGlzRGVidWcgPSBjb25maWcu\nZ2V0Ym9vbGVhbigiU0VSVklDRSIsICJkZWJ1Z19tb2RlIikKICAgIHByZXBy\nb2MucmV0cmlldmVfbGljZW5zZXMoaXNEZWJ1ZykKICAgIHByZXByb2MucmV0\ncmlldmVfZGF0YWNpdGVfcmUzcmVwb3MoKQoKICAgIHByZXByb2MucmV0cmll\ndmVfbWV0YWRhdGFfc3RhbmRhcmRzKCkKICAgICMgcHJlcHJvYy5yZXRyaWV2\nZV9saW5rZWR2b2NhYnMobG92X2FwaT1MT1ZfQVBJLCBsb2RjbG91ZF9hcGk9\nTE9EX0NMT1VETkVULCBiaW9wb3J0YWxfYXBpPUJJT1BPUlRBTF9SRVNULCBi\naW9wb3J0YWxfa2V5PUJJT1BPUlRBTF9BUElLRVksIGlzRGVidWdNb2RlPUZh\nbHNlKQogICAgcHJlcHJvYy5yZXRyaWV2ZV9saW5rZWR2b2NhYnMobG92X2Fw\naT1MT1ZfQVBJLCBsb2RjbG91ZF9hcGk9TE9EX0NMT1VETkVULCBpc0RlYnVn\nTW9kZT1pc0RlYnVnKQogICAgcHJlcHJvYy5zZXRfcmVtb3RlX2xvZ19pbmZv\nKGNvbmZpZ1siU0VSVklDRSJdLmdldCgicmVtb3RlX2xvZ19ob3N0IiksIGNv\nbmZpZ1siU0VSVklDRSJdLmdldCgicmVtb3RlX2xvZ19wYXRoIikpCiAgICBw\ncmVwcm9jLnNldF9tYXhfY29udGVudF9zaXplKGNvbmZpZ1siU0VSVklDRSJd\nWyJtYXhfY29udGVudF9zaXplIl0pCgogICAgbG9nZ2VyLmluZm8oZiJUb3Rh\nbCBTUERYIGxpY2Vuc2VzIDoge3ByZXByb2MuZ2V0X3RvdGFsX2xpY2Vuc2Vz\nKCl9IikKICAgIGxvZ2dlci5pbmZvKGYiVG90YWwgcmUzcmVwb3NpdG9yaWVz\nIGZvdW5kIGZyb20gZGF0YWNpdGUgYXBpIDoge2xlbihwcmVwcm9jLmdldFJF\nM3JlcG9zaXRvcmllcygpKX0iKQogICAgbG9nZ2VyLmluZm8oZiJUb3RhbCBz\ndWJqZWN0cyBhcmVhIG9mIGltcG9ydGVkIG1ldGFkYXRhIHN0YW5kYXJkcyA6\nIHtsZW4ocHJlcHJvYy5tZXRhZGF0YV9zdGFuZGFyZHMpfSIpCiAgICBsb2dn\nZXIuaW5mbyhmIlRvdGFsIExEIHZvY2FicyBpbXBvcnRlZCA6IHtsZW4ocHJl\ncHJvYy5nZXRMaW5rZWRWb2NhYnMoKSl9IikKICAgIGxvZ2dlci5pbmZvKGYi\nVG90YWwgZGVmYXVsdCBuYW1lc3BhY2VzIHNwZWNpZmllZCA6IHtsZW4ocHJl\ncHJvYy5nZXREZWZhdWx0TmFtZXNwYWNlcygpKX0iKQoKICAgIGFwcCA9IGNy\nZWF0ZV9hcHAoY29uZmlnKQogICAgTGltaXRlcihnZXRfcmVtb3RlX2FkZHJl\nc3MsIGFwcD1hcHAuYXBwLCBkZWZhdWx0X2xpbWl0cz1bc3RyKGNvbmZpZ1si\nU0VSVklDRSJdWyJyYXRlX2xpbWl0Il0pXSkKICAgICMgYnVpbHQgaW4gdXZp\nY29ybiBBU0dJCiAgICBhcHAucnVuKGhvc3Q9Y29uZmlnWyJTRVJWSUNFIl1b\nInNlcnZpY2VfaG9zdCJdLCBwb3J0PWludChjb25maWdbIlNFUlZJQ0UiXVsi\nc2VydmljZV9wb3J0Il0pKQoKCmlmIF9fbmFtZV9fID09ICJfX21haW5fXyI6\nCiAgICBnbG9iYWwgY29uZmlnCiAgICBteV9wYXRoID0gb3MucGF0aC5hYnNw\nYXRoKG9zLnBhdGguZGlybmFtZShfX2ZpbGVfXykpCiAgICBwYXJzZXIgPSBh\ncmdwYXJzZS5Bcmd1bWVudFBhcnNlcigpCiAgICAjIGFkZCBhIG5ldyBjb21t\nYW5kIGxpbmUgb3B0aW9uLCBjYWxsIGl0ICctYycgYW5kIHNldCBpdHMgZGVz\ndGluYXRpb24gdG8gJ2NvbmZpZ19maWxlJwogICAgcGFyc2VyLmFkZF9hcmd1\nbWVudCgiLWMiLCAiLS1jb25maWciLCByZXF1aXJlZD1UcnVlLCBoZWxwPSJQ\nYXRoIHRvIHNlcnZlci5pbmkgY29uZmlnIGZpbGUiKQogICAgYXJncyA9IHBh\ncnNlci5wYXJzZV9hcmdzKCkKICAgIGNvbmZpZyA9IGNvbmZpZ3BhcnNlci5D\nb25maWdQYXJzZXIoKQogICAgY29uZmlnLnJlYWQoYXJncy5jb25maWcpCiAg\nICBsb2dfY29uZmlnZmlsZSA9IG9zLnBhdGguam9pbihteV9wYXRoLCBjb25m\naWdbIlNFUlZJQ0UiXVsibG9nX2NvbmZpZyJdKQogICAgbG9nX2RpciA9IGNv\nbmZpZ1siU0VSVklDRSJdWyJsb2dkaXIiXQogICAgbG9nX2RpcmVjdG9yeSA9\nIG9zLnBhdGguam9pbihteV9wYXRoLCBsb2dfZGlyKQogICAgbG9nX2ZpbGVf\ncGF0aCA9IG9zLnBhdGguam9pbihsb2dfZGlyZWN0b3J5LCAiZnVqaS5sb2ci\nKQoKICAgIGlmIG5vdCBvcy5wYXRoLmV4aXN0cyhsb2dfZGlyZWN0b3J5KToK\nICAgICAgICBvcy5tYWtlZGlycyhsb2dfZGlyZWN0b3J5LCBleGlzdF9vaz1U\ncnVlKQogICAgIyBmaWxlQ29uZmlnKGxvZ19jb25maWdmaWxlLCBkZWZhdWx0\ncz17J2xvZ2ZpbGVuYW1lJzogbG9nX2ZpbGVfcGF0aC5yZXBsYWNlKCJcXCIs\nICIvIil9KQogICAgbG9nZ2VyID0gbG9nZ2luZy5nZXRMb2dnZXIoKSAgIyB1\nc2UgdGhpcyBmb3JtIHRvIGluaXRpYWxpemUgdGhlIHJvb3QgbG9nZ2VyCiAg\nICBtYWluKCkK\n","encoding":"base64","_links":{"self":"https://api.github.com/repos/pangaea-data-publisher/fuji/contents/fuji_server/__main__.py?ref=708fe43a1ee5f4557368dcd66622ec869fe854f9","git":"https://api.github.com/repos/pangaea-data-publisher/fuji/git/blobs/b6393d59b041fd80dd5679447a14e4de3185a0a1","html":"https://github.com/pangaea-data-publisher/fuji/blob/708fe43a1ee5f4557368dcd66622ec869fe854f9/fuji_server/__main__.py"}}' + headers: + Access-Control-Allow-Origin: + - '*' + Access-Control-Expose-Headers: + - ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset + Cache-Control: + - private, max-age=60, s-maxage=60 + Content-Encoding: + - gzip + Content-Security-Policy: + - default-src 'none' + Content-Type: + - application/json; charset=utf-8 + Date: + - Fri, 12 Jan 2024 16:17:08 GMT + ETag: + - W/"b6393d59b041fd80dd5679447a14e4de3185a0a1" + Last-Modified: + - Fri, 12 Jan 2024 09:49:41 GMT + Referrer-Policy: + - origin-when-cross-origin, strict-origin-when-cross-origin + Server: + - GitHub.com + Strict-Transport-Security: + - max-age=31536000; includeSubdomains; preload + Transfer-Encoding: + - chunked + Vary: + - Accept, Authorization, Cookie, X-GitHub-OTP + - Accept-Encoding, Accept, X-Requested-With + X-Accepted-OAuth-Scopes: + - '' + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + X-GitHub-Media-Type: + - github.v3; format=json + X-GitHub-Request-Id: + - 7874:2E0C86:C5A8EA8:C7DB762:65A16604 + X-OAuth-Scopes: + - repo + X-RateLimit-Limit: + - '5000' + X-RateLimit-Remaining: + - '4958' + X-RateLimit-Reset: + - '1705078320' + X-RateLimit-Resource: + - core + X-RateLimit-Used: + - '42' + X-XSS-Protection: + - '0' + github-authentication-token-expiration: + - 2024-03-04 14:01:51 UTC + x-github-api-version-selected: + - '2022-11-28' + status: + code: 200 + message: OK +- request: + body: '{"object_identifier": "https://github.com/pangaea-data-publisher/fuji", "test_debug": true, "use_datacite": true, "use_github": true, "metric_version": "metrics_v0.7_software"}' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + authorization: + - Basic bWFydmVsOndvbmRlcndvbWFu + connection: + - keep-alive + content-length: + - '176' + content-type: + - application/json + host: + - localhost:1071 + user-agent: + - testclient + method: POST + uri: http://localhost:1071/fuji/api/v1/evaluate + response: + content: "{\"test_id\": \"62b0753c8f4aa9c7c6dc7c433cdcbfb330edbd92\", \"request\": {\"object_identifier\": \"https://github.com/pangaea-data-publisher/fuji\", \"test_debug\": true, \"use_datacite\": true, \"use_github\": true, \"metric_version\": \"metrics_v0.7_software\"}, \"resolved_url\": \"https://github.com/pangaea-data-publisher/fuji\", \"start_timestamp\": \"2024-01-12T14:50:47Z\", \"end_timestamp\": \"2024-01-12T14:50:55Z\", \"metric_specification\": \"https://doi.org/10.5281/zenodo.6461229\", \"metric_version\": \"metrics_v0.7_software\", \"software_version\": \"3.1.1\", \"total_metrics\": 1, \"summary\": {\"score_earned\": {\"R\": 2, \"R1.1\": 2, \"FAIR\": 2.0}, \"score_total\": {\"R\": 3, \"R1.1\": 3, \"FAIR\": 3.0}, \"score_percent\": {\"R\": 66.67, \"R1.1\": 66.67, \"FAIR\": 66.67}, \"status_total\": {\"R1.1\": 1, \"R\": 1, \"FAIR\": 1}, \"status_passed\": {\"R1.1\": 1, \"R\": 1, \"FAIR\": 1}, \"maturity\": {\"R\": 3, \"R1.1\": 3, \"FAIR\": 1.0}}, \"results\": [{\"id\": 15, \"metric_identifier\": \"FRSM-15-R1.1\", \"metric_name\": \"The software source code includes licensing information for the software and any bundled external software.\", \"metric_tests\": {\"FRSM-15-R1.1-1\": {\"metric_test_name\": \"License file is included.\", \"metric_test_requirements\": [], \"metric_test_score\": {\"earned\": 1, \"total\": 1}, \"metric_test_maturity\": 1, \"metric_test_status\": \"pass\"}, \"FRSM-15-R1.1-2\": {\"metric_test_name\": \"The source code includes licensing information for all components bundled with that software.\", \"metric_test_requirements\": [], \"metric_test_score\": {\"earned\": 0, \"total\": 1}, \"metric_test_maturity\": 0, \"metric_test_status\": \"fail\"}, \"FRSM-15-R1.1-3\": {\"metric_test_name\": \"Recognized licence is in SPDX format.\", \"metric_test_requirements\": [], \"metric_test_score\": {\"earned\": 1, \"total\": 1}, \"metric_test_maturity\": 3, \"metric_test_status\": \"pass\"}}, \"test_status\": \"pass\", \"score\": {\"earned\": 2, \"total\": 3}, \"maturity\": 3, \"output\": [{\"license\": \"MIT License\", \"osi_approved\": true, \"details_url\": \"http://spdx.org/licenses/MIT.html\"}], \"test_debug\": [\"INFO: License verification name through SPDX registry -: MIT License\", \"INFO: Found SPDX license representation -: http://spdx.org/licenses/MIT.json\", \"SUCCESS: Found SPDX license representation (spdx url, osi_approved)\", \"INFO: This test is not defined in the metric YAML and therefore not performed -: FsF-R1.1-01M-1\", \"SUCCESS: Found licence information in metadata\", \"INFO: This test is not defined in the metric YAML and therefore not performed -: FsF-R1.1-01M-2\", \"INFO: Will consider all SPDX licenses as community specific licenses for FRSM-15-R1.1\", \"INFO: This test is not defined in the metric YAML and therefore not performed -: FRSM-15-R1.1-CESSDA-1\", \"WARNING: Test for license information of bundled components is not implemented.\", \"INFO: This test is not defined in the metric YAML and therefore not performed -: FRSM-15-R1.1-CESSDA-3\", \"INFO: This test is not defined in the metric YAML and therefore not performed -: FRSM-15-R1.1-CESSDA-2\"]}]}\n" + headers: + content-length: + - '2938' + content-type: + - application/json + http_version: HTTP/1.1 + status_code: 200 +version: 1 diff --git a/tests/functional/test_evaluation.py b/tests/functional/test_evaluation.py index 2a0cb6ad..57a36c91 100644 --- a/tests/functional/test_evaluation.py +++ b/tests/functional/test_evaluation.py @@ -6,6 +6,7 @@ from typing import TYPE_CHECKING +import pytest from requests.auth import _basic_auth_str if TYPE_CHECKING: @@ -13,6 +14,7 @@ DEBUG = True UID = "https://doi.org/10.5281/zenodo.8347772" +UID_SOFTWARE = "https://github.com/pangaea-data-publisher/fuji" HTTP_200_OK = 200 @@ -151,3 +153,37 @@ def test_evaluation(client: FlaskClient) -> None: } response_json = response.json() assert response_json["summary"].keys() == expected.keys() + + +@pytest.mark.vcr() +def test_evaluation_software(client: FlaskClient) -> None: + """Functional test of the /evaluate endpoint. + + This test uses canned http responses from Github and other web services (2024-01-12). + It compares a stored summary of a live test run on 2024-01-12. + """ + payload = { + "object_identifier": UID_SOFTWARE, + "test_debug": True, + "use_datacite": True, + "use_github": True, + "metric_version": "metrics_v0.7_software", + } + headers = { + "Authorization": _basic_auth_str("marvel", "wonderwoman"), + } + valid_url = "http://localhost:1071/fuji/api/v1/evaluate" + response = client.post(valid_url, json=payload, headers=headers) + assert response.status_code == HTTP_200_OK + + # these are the results from 2024-01-12 + expected = { + "score_earned": {"R": 2, "R1.1": 2, "FAIR": 2}, + "score_total": {"R": 3, "R1.1": 3, "FAIR": 3}, + "score_percent": {"R": 66.67, "R1.1": 66.67, "FAIR": 66.67}, + "status_total": {"R1.1": 1, "R": 1, "FAIR": 1}, + "status_passed": {"R1.1": 1, "R": 1, "FAIR": 1}, + "maturity": {"R": 3, "R1.1": 3, "FAIR": 1}, + } + response_json = response.json() + assert response_json["summary"] == expected From 1a932c0f60951727a3eac08a20ea5d85416e45b2 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Fri, 12 Jan 2024 15:10:21 +0000 Subject: [PATCH 40/45] display use_github in simpleclient --- fuji_server/controllers/fair_check.py | 2 +- simpleclient/index.php | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/fuji_server/controllers/fair_check.py b/fuji_server/controllers/fair_check.py index f08a561b..04b819d9 100644 --- a/fuji_server/controllers/fair_check.py +++ b/fuji_server/controllers/fair_check.py @@ -81,7 +81,7 @@ def __init__( metadata_service_url=None, metadata_service_type=None, use_datacite=True, - use_github=True, + use_github=False, verify_pids=True, oaipmh_endpoint=None, metric_version=None, diff --git a/simpleclient/index.php b/simpleclient/index.php index 5a7c0a94..d2a5668d 100644 --- a/simpleclient/index.php +++ b/simpleclient/index.php @@ -48,7 +48,7 @@ $fuji_username = 'marvel'; $fuji_password = 'wonderwoman'; $metric_version = "metrics_v0.7_software"; #"metrics_v0.7_software_cessda"; #"metrics_v0.5"; #"metrics_v0.7_software"; -$usegithub = False; +$usegithub = true; ################################################################ $fair_basic_terms=['F'=>'Findable','A'=>'Accessible','I'=>'Interoperable','R'=>'Reusable']; @@ -260,6 +260,9 @@ DataCite support: + GitHub support: + + Metric Version: From b2066d6f953c46a9ec7419613a76bd3f07308045 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Tue, 16 Jan 2024 10:31:47 +0000 Subject: [PATCH 41/45] regenerate swagger code --- fuji_server/__init__.py | 37 +++++++++- ...y => any_of_fair_results_results_items.py} | 4 + fuji_server/models/base_model_.py | 4 +- fuji_server/models/body.py | 33 +++++++++ .../models/community_endorsed_standard.py | 18 +++-- .../community_endorsed_standard_output.py | 7 ++ ...ommunity_endorsed_standard_output_inner.py | 4 + fuji_server/models/core_metadata.py | 4 + fuji_server/models/core_metadata_output.py | 4 + fuji_server/models/data_access_level.py | 18 +++-- fuji_server/models/data_access_output.py | 4 + fuji_server/models/data_content_metadata.py | 19 +++-- .../models/data_content_metadata_output.py | 4 + .../data_content_metadata_output_inner.py | 4 + fuji_server/models/data_file_format.py | 18 +++-- fuji_server/models/data_file_format_output.py | 4 + .../models/data_file_format_output_inner.py | 4 + fuji_server/models/data_provenance.py | 18 +++-- fuji_server/models/data_provenance_output.py | 4 + .../models/data_provenance_output_inner.py | 4 + fuji_server/models/debug.py | 4 + fuji_server/models/fair_result_common.py | 4 + .../models/fair_result_common_score.py | 4 + .../fair_result_evaluation_criterium.py | 4 + fuji_server/models/fair_results.py | 7 +- fuji_server/models/formal_metadata.py | 18 +++-- fuji_server/models/formal_metadata_output.py | 4 + .../models/formal_metadata_output_inner.py | 4 + fuji_server/models/harvest.py | 73 ++----------------- fuji_server/models/harvest_results.py | 4 + .../models/harvest_results_metadata.py | 4 + fuji_server/models/identifier_included.py | 18 +++-- .../models/identifier_included_output.py | 46 +++++++++++- .../identifier_included_output_inner.py | 4 + fuji_server/models/license.py | 18 +++-- fuji_server/models/license_output.py | 4 + fuji_server/models/license_output_inner.py | 4 + fuji_server/models/metadata_preserved.py | 18 +++-- .../models/metadata_preserved_output.py | 4 + fuji_server/models/metric.py | 4 +- fuji_server/models/metrics.py | 4 + .../models/output_core_metadata_found.py | 4 + .../models/output_search_mechanisms.py | 4 + fuji_server/models/persistence.py | 18 +++-- fuji_server/models/persistence_output.py | 4 + .../models/persistence_output_inner.py | 4 + fuji_server/models/related_resource.py | 18 +++-- fuji_server/models/related_resource_output.py | 4 + .../models/related_resource_output_inner.py | 4 + fuji_server/models/searchable.py | 18 +++-- fuji_server/models/searchable_output.py | 4 + fuji_server/models/semantic_vocabulary.py | 18 +++-- .../models/semantic_vocabulary_output.py | 4 + .../semantic_vocabulary_output_inner.py | 4 + .../models/standardised_protocol_data.py | 18 +++-- .../standardised_protocol_data_output.py | 4 + .../models/standardised_protocol_metadata.py | 22 +++--- .../standardised_protocol_metadata_output.py | 4 + fuji_server/models/uniqueness.py | 14 ++-- fuji_server/models/uniqueness_output.py | 4 + simpleclient/index.php | 2 +- 61 files changed, 454 insertions(+), 192 deletions(-) rename fuji_server/models/{any_of_fair_results_items.py => any_of_fair_results_results_items.py} (92%) mode change 100644 => 100755 diff --git a/fuji_server/__init__.py b/fuji_server/__init__.py index bfec0e01..a69f396f 100644 --- a/fuji_server/__init__.py +++ b/fuji_server/__init__.py @@ -1,38 +1,69 @@ -# -*- coding: utf-8 -*- - # SPDX-FileCopyrightText: 2020 PANGAEA (https://www.pangaea.de/) # # SPDX-License-Identifier: MIT +# coding: utf-8 + # flake8: noqa from __future__ import absolute_import # import models into model package -from fuji_server.models.any_of_fair_results_items import AnyOfFAIRResultsResultsItems +from fuji_server.models.any_of_fair_results_results_items import AnyOfFAIRResultsResultsItems from fuji_server.models.body import Body +from fuji_server.models.community_endorsed_standard import CommunityEndorsedStandard +from fuji_server.models.community_endorsed_standard_output import CommunityEndorsedStandardOutput +from fuji_server.models.community_endorsed_standard_output_inner import CommunityEndorsedStandardOutputInner from fuji_server.models.core_metadata import CoreMetadata from fuji_server.models.core_metadata_output import CoreMetadataOutput +from fuji_server.models.data_access_level import DataAccessLevel +from fuji_server.models.data_access_output import DataAccessOutput +from fuji_server.models.data_content_metadata import DataContentMetadata +from fuji_server.models.data_content_metadata_output import DataContentMetadataOutput +from fuji_server.models.data_content_metadata_output_inner import DataContentMetadataOutputInner +from fuji_server.models.data_file_format import DataFileFormat +from fuji_server.models.data_file_format_output import DataFileFormatOutput +from fuji_server.models.data_file_format_output_inner import DataFileFormatOutputInner +from fuji_server.models.data_provenance import DataProvenance +from fuji_server.models.data_provenance_output import DataProvenanceOutput +from fuji_server.models.data_provenance_output_inner import DataProvenanceOutputInner from fuji_server.models.debug import Debug from fuji_server.models.fair_result_common import FAIRResultCommon from fuji_server.models.fair_result_common_score import FAIRResultCommonScore +from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium from fuji_server.models.fair_results import FAIRResults +from fuji_server.models.formal_metadata import FormalMetadata +from fuji_server.models.formal_metadata_output import FormalMetadataOutput +from fuji_server.models.formal_metadata_output_inner import FormalMetadataOutputInner +from fuji_server.models.harvest import Harvest +from fuji_server.models.harvest_results import HarvestResults +from fuji_server.models.harvest_results_metadata import HarvestResultsMetadata from fuji_server.models.identifier_included import IdentifierIncluded from fuji_server.models.identifier_included_output import IdentifierIncludedOutput from fuji_server.models.identifier_included_output_inner import IdentifierIncludedOutputInner from fuji_server.models.license import License from fuji_server.models.license_output import LicenseOutput from fuji_server.models.license_output_inner import LicenseOutputInner +from fuji_server.models.metadata_preserved import MetadataPreserved +from fuji_server.models.metadata_preserved_output import MetadataPreservedOutput from fuji_server.models.metric import Metric from fuji_server.models.metrics import Metrics from fuji_server.models.output_core_metadata_found import OutputCoreMetadataFound from fuji_server.models.output_search_mechanisms import OutputSearchMechanisms from fuji_server.models.persistence import Persistence from fuji_server.models.persistence_output import PersistenceOutput +from fuji_server.models.persistence_output_inner import PersistenceOutputInner from fuji_server.models.related_resource import RelatedResource from fuji_server.models.related_resource_output import RelatedResourceOutput from fuji_server.models.related_resource_output_inner import RelatedResourceOutputInner from fuji_server.models.searchable import Searchable from fuji_server.models.searchable_output import SearchableOutput +from fuji_server.models.semantic_vocabulary import SemanticVocabulary +from fuji_server.models.semantic_vocabulary_output import SemanticVocabularyOutput +from fuji_server.models.semantic_vocabulary_output_inner import SemanticVocabularyOutputInner +from fuji_server.models.standardised_protocol_data import StandardisedProtocolData +from fuji_server.models.standardised_protocol_data_output import StandardisedProtocolDataOutput +from fuji_server.models.standardised_protocol_metadata import StandardisedProtocolMetadata +from fuji_server.models.standardised_protocol_metadata_output import StandardisedProtocolMetadataOutput from fuji_server.models.uniqueness import Uniqueness from fuji_server.models.uniqueness_output import UniquenessOutput diff --git a/fuji_server/models/any_of_fair_results_items.py b/fuji_server/models/any_of_fair_results_results_items.py old mode 100644 new mode 100755 similarity index 92% rename from fuji_server/models/any_of_fair_results_items.py rename to fuji_server/models/any_of_fair_results_results_items.py index dc9bf620..f10c9862 --- a/fuji_server/models/any_of_fair_results_items.py +++ b/fuji_server/models/any_of_fair_results_results_items.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model diff --git a/fuji_server/models/base_model_.py b/fuji_server/models/base_model_.py index e2f3a6fa..ecffcc28 100644 --- a/fuji_server/models/base_model_.py +++ b/fuji_server/models/base_model_.py @@ -5,6 +5,8 @@ import pprint import typing +import six + from fuji_server import util T = typing.TypeVar("T") @@ -31,7 +33,7 @@ def to_dict(self): """ result = {} - for attr, _ in self.swagger_types.items(): + for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value)) diff --git a/fuji_server/models/body.py b/fuji_server/models/body.py index 8ddd15a6..96582174 100644 --- a/fuji_server/models/body.py +++ b/fuji_server/models/body.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model @@ -19,6 +23,7 @@ def __init__( metadata_service_endpoint: str | None = None, metadata_service_type: str | None = None, use_datacite: bool | None = None, + use_github: bool | None = None, metric_version: str | None = None, auth_token: str | None = None, auth_token_type: str | None = None, @@ -36,6 +41,8 @@ def __init__( :type metadata_service_type: str :param use_datacite: The use_datacite of this Body. # noqa: E501 :type use_datacite: bool + :param use_github: The use_github of this Body. # noqa: E501 + :type use_github: bool :param metric_version: The metric_version of this Body. # noqa: E501 :type metric_version: str :param auth_token: The auth_token of this Body. # noqa: E501 @@ -51,6 +58,7 @@ def __init__( "metadata_service_endpoint": str, "metadata_service_type": str, "use_datacite": bool, + "use_github": bool, "metric_version": str, "auth_token": str, "auth_token_type": str, @@ -63,6 +71,7 @@ def __init__( "metadata_service_endpoint": "metadata_service_endpoint", "metadata_service_type": "metadata_service_type", "use_datacite": "use_datacite", + "use_github": "use_github", "metric_version": "metric_version", "auth_token": "auth_token", "auth_token_type": "auth_token_type", @@ -73,6 +82,7 @@ def __init__( self._metadata_service_endpoint = metadata_service_endpoint self._metadata_service_type = metadata_service_type self._use_datacite = use_datacite + self._use_github = use_github self._metric_version = metric_version self._auth_token = auth_token self._auth_token_type = auth_token_type @@ -204,6 +214,29 @@ def use_datacite(self, use_datacite: bool): self._use_datacite = use_datacite + @property + def use_github(self) -> bool: + """Gets the use_github of this Body. + + Indicates if the GitHub REST API shall be used to collect (meta)data # noqa: E501 + + :return: The use_github of this Body. + :rtype: bool + """ + return self._use_github + + @use_github.setter + def use_github(self, use_github: bool): + """Sets the use_github of this Body. + + Indicates if the GitHub REST API shall be used to collect (meta)data # noqa: E501 + + :param use_github: The use_github of this Body. + :type use_github: bool + """ + + self._use_github = use_github + @property def metric_version(self) -> str: """Gets the metric_version of this Body. diff --git a/fuji_server/models/community_endorsed_standard.py b/fuji_server/models/community_endorsed_standard.py index 534993ff..20149ff4 100644 --- a/fuji_server/models/community_endorsed_standard.py +++ b/fuji_server/models/community_endorsed_standard.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model from fuji_server.models.community_endorsed_standard_output import CommunityEndorsedStandardOutput @@ -25,7 +29,7 @@ def __init__( metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, - maturity: str = "incomplete", + maturity: int = 0, output: CommunityEndorsedStandardOutput = None, test_debug: Debug = None, ): @@ -44,7 +48,7 @@ def __init__( :param score: The score of this CommunityEndorsedStandard. # noqa: E501 :type score: FAIRResultCommonScore :param maturity: The maturity of this CommunityEndorsedStandard. # noqa: E501 - :type maturity: str + :type maturity: int :param output: The output of this CommunityEndorsedStandard. # noqa: E501 :type output: CommunityEndorsedStandardOutput :param test_debug: The test_debug of this CommunityEndorsedStandard. # noqa: E501 @@ -57,7 +61,7 @@ def __init__( "metric_tests": dict[str, FAIRResultEvaluationCriterium], "test_status": str, "score": FAIRResultCommonScore, - "maturity": str, + "maturity": int, "output": CommunityEndorsedStandardOutput, "test_debug": Debug, } @@ -232,21 +236,21 @@ def score(self, score: FAIRResultCommonScore): self._score = score @property - def maturity(self) -> str: + def maturity(self) -> int: """Gets the maturity of this CommunityEndorsedStandard. :return: The maturity of this CommunityEndorsedStandard. - :rtype: str + :rtype: int """ return self._maturity @maturity.setter def maturity(self, maturity: int): - """Sets the maturity of this Uniqueness. + """Sets the maturity of this CommunityEndorsedStandard. - :param maturity: The maturity of this Uniqueness. + :param maturity: The maturity of this CommunityEndorsedStandard. :type maturity: int """ diff --git a/fuji_server/models/community_endorsed_standard_output.py b/fuji_server/models/community_endorsed_standard_output.py index bdc441ba..d62f0424 100644 --- a/fuji_server/models/community_endorsed_standard_output.py +++ b/fuji_server/models/community_endorsed_standard_output.py @@ -2,8 +2,15 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model +from fuji_server.models.community_endorsed_standard_output_inner import ( + CommunityEndorsedStandardOutputInner, # noqa: F401 +) class CommunityEndorsedStandardOutput(Model): diff --git a/fuji_server/models/community_endorsed_standard_output_inner.py b/fuji_server/models/community_endorsed_standard_output_inner.py index f1f42b33..4ca8167b 100644 --- a/fuji_server/models/community_endorsed_standard_output_inner.py +++ b/fuji_server/models/community_endorsed_standard_output_inner.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model diff --git a/fuji_server/models/core_metadata.py b/fuji_server/models/core_metadata.py index d580710a..404abbbb 100644 --- a/fuji_server/models/core_metadata.py +++ b/fuji_server/models/core_metadata.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model from fuji_server.models.core_metadata_output import CoreMetadataOutput diff --git a/fuji_server/models/core_metadata_output.py b/fuji_server/models/core_metadata_output.py index f2fee40d..41ca5047 100644 --- a/fuji_server/models/core_metadata_output.py +++ b/fuji_server/models/core_metadata_output.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model from fuji_server.models.output_core_metadata_found import OutputCoreMetadataFound diff --git a/fuji_server/models/data_access_level.py b/fuji_server/models/data_access_level.py index 50ef52fe..92ceaffe 100644 --- a/fuji_server/models/data_access_level.py +++ b/fuji_server/models/data_access_level.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model from fuji_server.models.data_access_output import DataAccessOutput @@ -25,7 +29,7 @@ def __init__( metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, - maturity: str = "incomplete", + maturity: int = 0, output: DataAccessOutput = None, test_debug: Debug = None, ): @@ -44,7 +48,7 @@ def __init__( :param score: The score of this DataAccessLevel. # noqa: E501 :type score: FAIRResultCommonScore :param maturity: The maturity of this DataAccessLevel. # noqa: E501 - :type maturity: str + :type maturity: int :param output: The output of this DataAccessLevel. # noqa: E501 :type output: DataAccessOutput :param test_debug: The test_debug of this DataAccessLevel. # noqa: E501 @@ -57,7 +61,7 @@ def __init__( "metric_tests": dict[str, FAIRResultEvaluationCriterium], "test_status": str, "score": FAIRResultCommonScore, - "maturity": str, + "maturity": int, "output": DataAccessOutput, "test_debug": Debug, } @@ -232,21 +236,21 @@ def score(self, score: FAIRResultCommonScore): self._score = score @property - def maturity(self) -> str: + def maturity(self) -> int: """Gets the maturity of this DataAccessLevel. :return: The maturity of this DataAccessLevel. - :rtype: str + :rtype: int """ return self._maturity @maturity.setter def maturity(self, maturity: int): - """Sets the maturity of this Uniqueness. + """Sets the maturity of this DataAccessLevel. - :param maturity: The maturity of this Uniqueness. + :param maturity: The maturity of this DataAccessLevel. :type maturity: int """ diff --git a/fuji_server/models/data_access_output.py b/fuji_server/models/data_access_output.py index b1892896..30280453 100644 --- a/fuji_server/models/data_access_output.py +++ b/fuji_server/models/data_access_output.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model diff --git a/fuji_server/models/data_content_metadata.py b/fuji_server/models/data_content_metadata.py index a29e5cac..e7ba6de9 100644 --- a/fuji_server/models/data_content_metadata.py +++ b/fuji_server/models/data_content_metadata.py @@ -2,10 +2,15 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model from fuji_server.models.data_content_metadata_output import DataContentMetadataOutput from fuji_server.models.debug import Debug +from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 from fuji_server.models.fair_result_common_score import FAIRResultCommonScore from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium @@ -24,7 +29,7 @@ def __init__( metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, - maturity: str = "incomplete", + maturity: int = 0, output: DataContentMetadataOutput = None, test_debug: Debug = None, ): @@ -43,7 +48,7 @@ def __init__( :param score: The score of this DataContentMetadata. # noqa: E501 :type score: FAIRResultCommonScore :param maturity: The maturity of this DataContentMetadata. # noqa: E501 - :type maturity: str + :type maturity: int :param output: The output of this DataContentMetadata. # noqa: E501 :type output: DataContentMetadataOutput :param test_debug: The test_debug of this DataContentMetadata. # noqa: E501 @@ -56,7 +61,7 @@ def __init__( "metric_tests": dict[str, FAIRResultEvaluationCriterium], "test_status": str, "score": FAIRResultCommonScore, - "maturity": str, + "maturity": int, "output": DataContentMetadataOutput, "test_debug": Debug, } @@ -231,21 +236,21 @@ def score(self, score: FAIRResultCommonScore): self._score = score @property - def maturity(self) -> str: + def maturity(self) -> int: """Gets the maturity of this DataContentMetadata. :return: The maturity of this DataContentMetadata. - :rtype: str + :rtype: int """ return self._maturity @maturity.setter def maturity(self, maturity: int): - """Sets the maturity of this Uniqueness. + """Sets the maturity of this DataContentMetadata. - :param maturity: The maturity of this Uniqueness. + :param maturity: The maturity of this DataContentMetadata. :type maturity: int """ diff --git a/fuji_server/models/data_content_metadata_output.py b/fuji_server/models/data_content_metadata_output.py index eadfb43a..fbd2d0b8 100644 --- a/fuji_server/models/data_content_metadata_output.py +++ b/fuji_server/models/data_content_metadata_output.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model from fuji_server.models.data_content_metadata_output_inner import DataContentMetadataOutputInner diff --git a/fuji_server/models/data_content_metadata_output_inner.py b/fuji_server/models/data_content_metadata_output_inner.py index 2d68d64a..cb4f972b 100644 --- a/fuji_server/models/data_content_metadata_output_inner.py +++ b/fuji_server/models/data_content_metadata_output_inner.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model diff --git a/fuji_server/models/data_file_format.py b/fuji_server/models/data_file_format.py index 8e7cb8cc..ef565d56 100644 --- a/fuji_server/models/data_file_format.py +++ b/fuji_server/models/data_file_format.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model from fuji_server.models.data_file_format_output import DataFileFormatOutput @@ -25,7 +29,7 @@ def __init__( metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, - maturity: str = "incomplete", + maturity: int = 0, output: DataFileFormatOutput = None, test_debug: Debug = None, ): @@ -44,7 +48,7 @@ def __init__( :param score: The score of this DataFileFormat. # noqa: E501 :type score: FAIRResultCommonScore :param maturity: The maturity of this DataFileFormat. # noqa: E501 - :type maturity: str + :type maturity: int :param output: The output of this DataFileFormat. # noqa: E501 :type output: DataFileFormatOutput :param test_debug: The test_debug of this DataFileFormat. # noqa: E501 @@ -57,7 +61,7 @@ def __init__( "metric_tests": dict[str, FAIRResultEvaluationCriterium], "test_status": str, "score": FAIRResultCommonScore, - "maturity": str, + "maturity": int, "output": DataFileFormatOutput, "test_debug": Debug, } @@ -232,21 +236,21 @@ def score(self, score: FAIRResultCommonScore): self._score = score @property - def maturity(self) -> str: + def maturity(self) -> int: """Gets the maturity of this DataFileFormat. :return: The maturity of this DataFileFormat. - :rtype: str + :rtype: int """ return self._maturity @maturity.setter def maturity(self, maturity: int): - """Sets the maturity of this Uniqueness. + """Sets the maturity of this DataFileFormat. - :param maturity: The maturity of this Uniqueness. + :param maturity: The maturity of this DataFileFormat. :type maturity: int """ diff --git a/fuji_server/models/data_file_format_output.py b/fuji_server/models/data_file_format_output.py index 1098985b..c2e42b6e 100644 --- a/fuji_server/models/data_file_format_output.py +++ b/fuji_server/models/data_file_format_output.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model from fuji_server.models.data_file_format_output_inner import DataFileFormatOutputInner # noqa: F401 diff --git a/fuji_server/models/data_file_format_output_inner.py b/fuji_server/models/data_file_format_output_inner.py index 1f585cf8..59adaa3a 100644 --- a/fuji_server/models/data_file_format_output_inner.py +++ b/fuji_server/models/data_file_format_output_inner.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model diff --git a/fuji_server/models/data_provenance.py b/fuji_server/models/data_provenance.py index fd7b990c..25040c54 100644 --- a/fuji_server/models/data_provenance.py +++ b/fuji_server/models/data_provenance.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model from fuji_server.models.data_provenance_output import DataProvenanceOutput @@ -25,7 +29,7 @@ def __init__( metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, - maturity: str = "incomplete", + maturity: int = 0, output: DataProvenanceOutput = None, test_debug: Debug = None, ): @@ -44,7 +48,7 @@ def __init__( :param score: The score of this DataProvenance. # noqa: E501 :type score: FAIRResultCommonScore :param maturity: The maturity of this DataProvenance. # noqa: E501 - :type maturity: str + :type maturity: int :param output: The output of this DataProvenance. # noqa: E501 :type output: DataProvenanceOutput :param test_debug: The test_debug of this DataProvenance. # noqa: E501 @@ -57,7 +61,7 @@ def __init__( "metric_tests": dict[str, FAIRResultEvaluationCriterium], "test_status": str, "score": FAIRResultCommonScore, - "maturity": str, + "maturity": int, "output": DataProvenanceOutput, "test_debug": Debug, } @@ -232,21 +236,21 @@ def score(self, score: FAIRResultCommonScore): self._score = score @property - def maturity(self) -> str: + def maturity(self) -> int: """Gets the maturity of this DataProvenance. :return: The maturity of this DataProvenance. - :rtype: str + :rtype: int """ return self._maturity @maturity.setter def maturity(self, maturity: int): - """Sets the maturity of this Uniqueness. + """Sets the maturity of this DataProvenance. - :param maturity: The maturity of this Uniqueness. + :param maturity: The maturity of this DataProvenance. :type maturity: int """ diff --git a/fuji_server/models/data_provenance_output.py b/fuji_server/models/data_provenance_output.py index 1514d4a4..9fc62858 100644 --- a/fuji_server/models/data_provenance_output.py +++ b/fuji_server/models/data_provenance_output.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model from fuji_server.models.data_provenance_output_inner import DataProvenanceOutputInner diff --git a/fuji_server/models/data_provenance_output_inner.py b/fuji_server/models/data_provenance_output_inner.py index 797a1e50..cc20ce95 100644 --- a/fuji_server/models/data_provenance_output_inner.py +++ b/fuji_server/models/data_provenance_output_inner.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model diff --git a/fuji_server/models/debug.py b/fuji_server/models/debug.py index f163bd5e..8e9007c7 100644 --- a/fuji_server/models/debug.py +++ b/fuji_server/models/debug.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model diff --git a/fuji_server/models/fair_result_common.py b/fuji_server/models/fair_result_common.py index 93e51326..3ae12723 100644 --- a/fuji_server/models/fair_result_common.py +++ b/fuji_server/models/fair_result_common.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model from fuji_server.models.fair_result_common_score import FAIRResultCommonScore diff --git a/fuji_server/models/fair_result_common_score.py b/fuji_server/models/fair_result_common_score.py index 5c81e042..3e145d29 100644 --- a/fuji_server/models/fair_result_common_score.py +++ b/fuji_server/models/fair_result_common_score.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model diff --git a/fuji_server/models/fair_result_evaluation_criterium.py b/fuji_server/models/fair_result_evaluation_criterium.py index 6e8273f6..a1e9228e 100644 --- a/fuji_server/models/fair_result_evaluation_criterium.py +++ b/fuji_server/models/fair_result_evaluation_criterium.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model from fuji_server.models.fair_result_common_score import FAIRResultCommonScore diff --git a/fuji_server/models/fair_results.py b/fuji_server/models/fair_results.py index 210d9326..a7744473 100644 --- a/fuji_server/models/fair_results.py +++ b/fuji_server/models/fair_results.py @@ -2,11 +2,12 @@ # # SPDX-License-Identifier: MIT -from datetime import datetime +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 -# from fuji_server.models.any_of_fair_results_results_items import AnyOfFAIRResultsResultsItems from fuji_server import util -from fuji_server.models.any_of_fair_results_items import AnyOfFAIRResultsResultsItems +from fuji_server.models.any_of_fair_results_results_items import AnyOfFAIRResultsResultsItems from fuji_server.models.base_model_ import Model diff --git a/fuji_server/models/formal_metadata.py b/fuji_server/models/formal_metadata.py index 2f72b3de..f4cb128f 100644 --- a/fuji_server/models/formal_metadata.py +++ b/fuji_server/models/formal_metadata.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model from fuji_server.models.debug import Debug @@ -25,7 +29,7 @@ def __init__( metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, - maturity: str = "incomplete", + maturity: int = 0, output: FormalMetadataOutput = None, test_debug: Debug = None, ): @@ -44,7 +48,7 @@ def __init__( :param score: The score of this FormalMetadata. # noqa: E501 :type score: FAIRResultCommonScore :param maturity: The maturity of this FormalMetadata. # noqa: E501 - :type maturity: str + :type maturity: int :param output: The output of this FormalMetadata. # noqa: E501 :type output: FormalMetadataOutput :param test_debug: The test_debug of this FormalMetadata. # noqa: E501 @@ -57,7 +61,7 @@ def __init__( "metric_tests": dict[str, FAIRResultEvaluationCriterium], "test_status": str, "score": FAIRResultCommonScore, - "maturity": str, + "maturity": int, "output": FormalMetadataOutput, "test_debug": Debug, } @@ -232,21 +236,21 @@ def score(self, score: FAIRResultCommonScore): self._score = score @property - def maturity(self) -> str: + def maturity(self) -> int: """Gets the maturity of this FormalMetadata. :return: The maturity of this FormalMetadata. - :rtype: str + :rtype: int """ return self._maturity @maturity.setter def maturity(self, maturity: int): - """Sets the maturity of this Uniqueness. + """Sets the maturity of this FormalMetadata. - :param maturity: The maturity of this Uniqueness. + :param maturity: The maturity of this FormalMetadata. :type maturity: int """ diff --git a/fuji_server/models/formal_metadata_output.py b/fuji_server/models/formal_metadata_output.py index ea571eb5..e23d6837 100644 --- a/fuji_server/models/formal_metadata_output.py +++ b/fuji_server/models/formal_metadata_output.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model from fuji_server.models.formal_metadata_output_inner import FormalMetadataOutputInner # noqa: F401 diff --git a/fuji_server/models/formal_metadata_output_inner.py b/fuji_server/models/formal_metadata_output_inner.py index 9fb02d34..b44f5a10 100644 --- a/fuji_server/models/formal_metadata_output_inner.py +++ b/fuji_server/models/formal_metadata_output_inner.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model diff --git a/fuji_server/models/harvest.py b/fuji_server/models/harvest.py index 8bfa244b..c16a1c8f 100644 --- a/fuji_server/models/harvest.py +++ b/fuji_server/models/harvest.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model @@ -12,28 +16,16 @@ class Harvest(Model): Do not edit the class manually. """ - def __init__( - self, object_identifier: str | None = None, auth_token: str | None = None, auth_token_type: str | None = None - ): + def __init__(self, object_identifier: str | None = None): """Harvest - a model defined in Swagger :param object_identifier: The object_identifier of this Harvest. # noqa: E501 :type object_identifier: str - :param auth_token: The auth_token of this Harvest. # noqa: E501 - :type auth_token: str - :param auth_token_type: The auth_token_type of this Harvest. # noqa: E501 - :type auth_token_type: str """ - self.swagger_types = {"object_identifier": str, "auth_token": str, "auth_token_type": str} + self.swagger_types = {"object_identifier": str} - self.attribute_map = { - "object_identifier": "object_identifier", - "auth_token": "auth_token", - "auth_token_type": "auth_token_type", - } + self.attribute_map = {"object_identifier": "object_identifier"} self._object_identifier = object_identifier - self._auth_token = auth_token - self._auth_token_type = auth_token_type @classmethod def from_dict(cls, dikt) -> "Harvest": @@ -70,54 +62,3 @@ def object_identifier(self, object_identifier: str): raise ValueError("Invalid value for `object_identifier`, must not be `None`") self._object_identifier = object_identifier - - @property - def auth_token(self) -> str: - """Gets the auth_token of this Harvest. - - The authentication token required to access protected data # noqa: E501 - - :return: The auth_token of this Harvest. - :rtype: str - """ - return self._auth_token - - @auth_token.setter - def auth_token(self, auth_token: str): - """Sets the auth_token of this Harvest. - - The authentication token required to access protected data # noqa: E501 - - :param auth_token: The auth_token of this Harvest. - :type auth_token: str - """ - - self._auth_token = auth_token - - @property - def auth_token_type(self) -> str: - """Gets the auth_token_type of this Harvest. - - The type of authentication (Oauth Bearer or HTTP Basic) needed to use the auth token # noqa: E501 - - :return: The auth_token_type of this Harvest. - :rtype: str - """ - return self._auth_token_type - - @auth_token_type.setter - def auth_token_type(self, auth_token_type: str): - """Sets the auth_token_type of this Harvest. - - The type of authentication (Oauth Bearer or HTTP Basic) needed to use the auth token # noqa: E501 - - :param auth_token_type: The auth_token_type of this Harvest. - :type auth_token_type: str - """ - allowed_values = ["Bearer", "Basic"] - if auth_token_type not in allowed_values: - raise ValueError( - f"Invalid value for `auth_token_type` ({auth_token_type}), must be one of {allowed_values}" - ) - - self._auth_token_type = auth_token_type diff --git a/fuji_server/models/harvest_results.py b/fuji_server/models/harvest_results.py index 5892b5b7..02e5742d 100644 --- a/fuji_server/models/harvest_results.py +++ b/fuji_server/models/harvest_results.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model from fuji_server.models.harvest_results_metadata import HarvestResultsMetadata diff --git a/fuji_server/models/harvest_results_metadata.py b/fuji_server/models/harvest_results_metadata.py index 9eee833e..e8fa7736 100644 --- a/fuji_server/models/harvest_results_metadata.py +++ b/fuji_server/models/harvest_results_metadata.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model diff --git a/fuji_server/models/identifier_included.py b/fuji_server/models/identifier_included.py index 8bc5c761..04810b52 100644 --- a/fuji_server/models/identifier_included.py +++ b/fuji_server/models/identifier_included.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model from fuji_server.models.debug import Debug @@ -25,7 +29,7 @@ def __init__( metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, - maturity: str = "incomplete", + maturity: int = 0, output: IdentifierIncludedOutput = None, test_debug: Debug = None, ): @@ -44,7 +48,7 @@ def __init__( :param score: The score of this IdentifierIncluded. # noqa: E501 :type score: FAIRResultCommonScore :param maturity: The maturity of this IdentifierIncluded. # noqa: E501 - :type maturity: str + :type maturity: int :param output: The output of this IdentifierIncluded. # noqa: E501 :type output: IdentifierIncludedOutput :param test_debug: The test_debug of this IdentifierIncluded. # noqa: E501 @@ -57,7 +61,7 @@ def __init__( "metric_tests": dict[str, FAIRResultEvaluationCriterium], "test_status": str, "score": FAIRResultCommonScore, - "maturity": str, + "maturity": int, "output": IdentifierIncludedOutput, "test_debug": Debug, } @@ -232,22 +236,22 @@ def score(self, score: FAIRResultCommonScore): self._score = score @property - def maturity(self) -> str: + def maturity(self) -> int: """Gets the maturity of this IdentifierIncluded. :return: The maturity of this IdentifierIncluded. - :rtype: str + :rtype: int """ return self._maturity @maturity.setter - def maturity(self, maturity: str): + def maturity(self, maturity: int): """Sets the maturity of this IdentifierIncluded. :param maturity: The maturity of this IdentifierIncluded. - :type maturity: str + :type maturity: int """ self._maturity = maturity diff --git a/fuji_server/models/identifier_included_output.py b/fuji_server/models/identifier_included_output.py index bf305f0a..d4838356 100644 --- a/fuji_server/models/identifier_included_output.py +++ b/fuji_server/models/identifier_included_output.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model from fuji_server.models.identifier_included_output_inner import IdentifierIncludedOutputInner @@ -13,15 +17,28 @@ class IdentifierIncludedOutput(Model): Do not edit the class manually. """ - def __init__(self, object_content_identifier_included: list[IdentifierIncludedOutputInner] | None = None): + def __init__( + self, + object_identifier_included: str | None = None, + object_content_identifier_included: list[IdentifierIncludedOutputInner] | None = None, + ): """IdentifierIncludedOutput - a model defined in Swagger + :param object_identifier_included: The object_identifier_included of this IdentifierIncludedOutput. # noqa: E501 + :type object_identifier_included: str :param object_content_identifier_included: The object_content_identifier_included of this IdentifierIncludedOutput. # noqa: E501 :type object_content_identifier_included: List[IdentifierIncludedOutputInner] """ - self.swagger_types = {"object_content_identifier_included": list[IdentifierIncludedOutputInner]} - - self.attribute_map = {"object_content_identifier_included": "object_content_identifier_included"} + self.swagger_types = { + "object_identifier_included": str, + "object_content_identifier_included": list[IdentifierIncludedOutputInner], + } + + self.attribute_map = { + "object_identifier_included": "object_identifier_included", + "object_content_identifier_included": "object_content_identifier_included", + } + self._object_identifier_included = object_identifier_included self._object_content_identifier_included = object_content_identifier_included @classmethod @@ -35,6 +52,27 @@ def from_dict(cls, dikt) -> "IdentifierIncludedOutput": """ return util.deserialize_model(dikt, cls) + @property + def object_identifier_included(self) -> str: + """Gets the object_identifier_included of this IdentifierIncludedOutput. + + + :return: The object_identifier_included of this IdentifierIncludedOutput. + :rtype: str + """ + return self._object_identifier_included + + @object_identifier_included.setter + def object_identifier_included(self, object_identifier_included: str): + """Sets the object_identifier_included of this IdentifierIncludedOutput. + + + :param object_identifier_included: The object_identifier_included of this IdentifierIncludedOutput. + :type object_identifier_included: str + """ + + self._object_identifier_included = object_identifier_included + @property def object_content_identifier_included(self) -> list[IdentifierIncludedOutputInner]: """Gets the object_content_identifier_included of this IdentifierIncludedOutput. diff --git a/fuji_server/models/identifier_included_output_inner.py b/fuji_server/models/identifier_included_output_inner.py index 061657b2..367a2768 100644 --- a/fuji_server/models/identifier_included_output_inner.py +++ b/fuji_server/models/identifier_included_output_inner.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model diff --git a/fuji_server/models/license.py b/fuji_server/models/license.py index dc61ab81..66b839e7 100644 --- a/fuji_server/models/license.py +++ b/fuji_server/models/license.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model from fuji_server.models.debug import Debug @@ -25,7 +29,7 @@ def __init__( metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, - maturity: str = "incomplete", + maturity: int = 0, output: LicenseOutput = None, test_debug: Debug = None, ): @@ -44,7 +48,7 @@ def __init__( :param score: The score of this License. # noqa: E501 :type score: FAIRResultCommonScore :param maturity: The maturity of this License. # noqa: E501 - :type maturity: str + :type maturity: int :param output: The output of this License. # noqa: E501 :type output: LicenseOutput :param test_debug: The test_debug of this License. # noqa: E501 @@ -57,7 +61,7 @@ def __init__( "metric_tests": dict[str, FAIRResultEvaluationCriterium], "test_status": str, "score": FAIRResultCommonScore, - "maturity": str, + "maturity": int, "output": LicenseOutput, "test_debug": Debug, } @@ -232,21 +236,21 @@ def score(self, score: FAIRResultCommonScore): self._score = score @property - def maturity(self) -> str: + def maturity(self) -> int: """Gets the maturity of this License. :return: The maturity of this License. - :rtype: str + :rtype: int """ return self._maturity @maturity.setter def maturity(self, maturity: int): - """Sets the maturity of this Uniqueness. + """Sets the maturity of this License. - :param maturity: The maturity of this Uniqueness. + :param maturity: The maturity of this License. :type maturity: int """ diff --git a/fuji_server/models/license_output.py b/fuji_server/models/license_output.py index 60242a36..cfb94589 100644 --- a/fuji_server/models/license_output.py +++ b/fuji_server/models/license_output.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model from fuji_server.models.license_output_inner import LicenseOutputInner # noqa: F401 diff --git a/fuji_server/models/license_output_inner.py b/fuji_server/models/license_output_inner.py index d96bf330..81e6bd3d 100644 --- a/fuji_server/models/license_output_inner.py +++ b/fuji_server/models/license_output_inner.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model diff --git a/fuji_server/models/metadata_preserved.py b/fuji_server/models/metadata_preserved.py index 5cd93890..f47ef95c 100644 --- a/fuji_server/models/metadata_preserved.py +++ b/fuji_server/models/metadata_preserved.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model from fuji_server.models.debug import Debug @@ -25,7 +29,7 @@ def __init__( metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, - maturity: str = "incomplete", + maturity: int = 0, output: MetadataPreservedOutput = None, test_debug: Debug = None, ): @@ -44,7 +48,7 @@ def __init__( :param score: The score of this MetadataPreserved. # noqa: E501 :type score: FAIRResultCommonScore :param maturity: The maturity of this MetadataPreserved. # noqa: E501 - :type maturity: str + :type maturity: int :param output: The output of this MetadataPreserved. # noqa: E501 :type output: MetadataPreservedOutput :param test_debug: The test_debug of this MetadataPreserved. # noqa: E501 @@ -57,7 +61,7 @@ def __init__( "metric_tests": dict[str, FAIRResultEvaluationCriterium], "test_status": str, "score": FAIRResultCommonScore, - "maturity": str, + "maturity": int, "output": MetadataPreservedOutput, "test_debug": Debug, } @@ -232,21 +236,21 @@ def score(self, score: FAIRResultCommonScore): self._score = score @property - def maturity(self) -> str: + def maturity(self) -> int: """Gets the maturity of this MetadataPreserved. :return: The maturity of this MetadataPreserved. - :rtype: str + :rtype: int """ return self._maturity @maturity.setter def maturity(self, maturity: int): - """Sets the maturity of this Uniqueness. + """Sets the maturity of this MetadataPreserved. - :param maturity: The maturity of this Uniqueness. + :param maturity: The maturity of this MetadataPreserved. :type maturity: int """ diff --git a/fuji_server/models/metadata_preserved_output.py b/fuji_server/models/metadata_preserved_output.py index 758355d4..64e1b25e 100644 --- a/fuji_server/models/metadata_preserved_output.py +++ b/fuji_server/models/metadata_preserved_output.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model diff --git a/fuji_server/models/metric.py b/fuji_server/models/metric.py index b2ad5594..5739663f 100644 --- a/fuji_server/models/metric.py +++ b/fuji_server/models/metric.py @@ -2,7 +2,9 @@ # # SPDX-License-Identifier: MIT -from datetime import date +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 from fuji_server import util from fuji_server.models.base_model_ import Model diff --git a/fuji_server/models/metrics.py b/fuji_server/models/metrics.py index 24d3e8da..d0628c05 100644 --- a/fuji_server/models/metrics.py +++ b/fuji_server/models/metrics.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model from fuji_server.models.metric import Metric diff --git a/fuji_server/models/output_core_metadata_found.py b/fuji_server/models/output_core_metadata_found.py index c6dbd583..9c895c64 100644 --- a/fuji_server/models/output_core_metadata_found.py +++ b/fuji_server/models/output_core_metadata_found.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model diff --git a/fuji_server/models/output_search_mechanisms.py b/fuji_server/models/output_search_mechanisms.py index e97c9350..225ce838 100644 --- a/fuji_server/models/output_search_mechanisms.py +++ b/fuji_server/models/output_search_mechanisms.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model diff --git a/fuji_server/models/persistence.py b/fuji_server/models/persistence.py index 43da4999..a3061d20 100644 --- a/fuji_server/models/persistence.py +++ b/fuji_server/models/persistence.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model from fuji_server.models.debug import Debug @@ -25,7 +29,7 @@ def __init__( metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, - maturity: str = "incomplete", + maturity: int = 0, output: PersistenceOutput = None, test_debug: Debug = None, ): @@ -44,7 +48,7 @@ def __init__( :param score: The score of this Persistence. # noqa: E501 :type score: FAIRResultCommonScore :param maturity: The maturity of this Persistence. # noqa: E501 - :type maturity: str + :type maturity: int :param output: The output of this Persistence. # noqa: E501 :type output: PersistenceOutput :param test_debug: The test_debug of this Persistence. # noqa: E501 @@ -57,7 +61,7 @@ def __init__( "metric_tests": dict[str, FAIRResultEvaluationCriterium], "test_status": str, "score": FAIRResultCommonScore, - "maturity": str, + "maturity": int, "output": PersistenceOutput, "test_debug": Debug, } @@ -232,21 +236,21 @@ def score(self, score: FAIRResultCommonScore): self._score = score @property - def maturity(self) -> str: + def maturity(self) -> int: """Gets the maturity of this Persistence. :return: The maturity of this Persistence. - :rtype: str + :rtype: int """ return self._maturity @maturity.setter def maturity(self, maturity: int): - """Sets the maturity of this Uniqueness. + """Sets the maturity of this Persistence. - :param maturity: The maturity of this Uniqueness. + :param maturity: The maturity of this Persistence. :type maturity: int """ diff --git a/fuji_server/models/persistence_output.py b/fuji_server/models/persistence_output.py index 715e4796..2f9ca030 100644 --- a/fuji_server/models/persistence_output.py +++ b/fuji_server/models/persistence_output.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model from fuji_server.models.persistence_output_inner import PersistenceOutputInner diff --git a/fuji_server/models/persistence_output_inner.py b/fuji_server/models/persistence_output_inner.py index e03150ca..ee0503cb 100644 --- a/fuji_server/models/persistence_output_inner.py +++ b/fuji_server/models/persistence_output_inner.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model diff --git a/fuji_server/models/related_resource.py b/fuji_server/models/related_resource.py index e0333d31..ef32315d 100644 --- a/fuji_server/models/related_resource.py +++ b/fuji_server/models/related_resource.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model from fuji_server.models.debug import Debug @@ -25,7 +29,7 @@ def __init__( metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, - maturity: str = "incomplete", + maturity: int = 0, output: RelatedResourceOutput = None, test_debug: Debug = None, ): @@ -44,7 +48,7 @@ def __init__( :param score: The score of this RelatedResource. # noqa: E501 :type score: FAIRResultCommonScore :param maturity: The maturity of this RelatedResource. # noqa: E501 - :type maturity: str + :type maturity: int :param output: The output of this RelatedResource. # noqa: E501 :type output: RelatedResourceOutput :param test_debug: The test_debug of this RelatedResource. # noqa: E501 @@ -57,7 +61,7 @@ def __init__( "metric_tests": dict[str, FAIRResultEvaluationCriterium], "test_status": str, "score": FAIRResultCommonScore, - "maturity": str, + "maturity": int, "output": RelatedResourceOutput, "test_debug": Debug, } @@ -232,21 +236,21 @@ def score(self, score: FAIRResultCommonScore): self._score = score @property - def maturity(self) -> str: + def maturity(self) -> int: """Gets the maturity of this RelatedResource. :return: The maturity of this RelatedResource. - :rtype: str + :rtype: int """ return self._maturity @maturity.setter def maturity(self, maturity: int): - """Sets the maturity of this Uniqueness. + """Sets the maturity of this RelatedResource. - :param maturity: The maturity of this Uniqueness. + :param maturity: The maturity of this RelatedResource. :type maturity: int """ diff --git a/fuji_server/models/related_resource_output.py b/fuji_server/models/related_resource_output.py index d0a714d1..004c7fc9 100644 --- a/fuji_server/models/related_resource_output.py +++ b/fuji_server/models/related_resource_output.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model from fuji_server.models.related_resource_output_inner import RelatedResourceOutputInner # noqa: F401 diff --git a/fuji_server/models/related_resource_output_inner.py b/fuji_server/models/related_resource_output_inner.py index 06c00f04..c9e4ed76 100644 --- a/fuji_server/models/related_resource_output_inner.py +++ b/fuji_server/models/related_resource_output_inner.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model diff --git a/fuji_server/models/searchable.py b/fuji_server/models/searchable.py index 7512ab21..8beb479f 100644 --- a/fuji_server/models/searchable.py +++ b/fuji_server/models/searchable.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model from fuji_server.models.debug import Debug @@ -25,7 +29,7 @@ def __init__( metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, - maturity: str = "incomplete", + maturity: int = 0, output: SearchableOutput = None, test_debug: Debug = None, ): @@ -44,7 +48,7 @@ def __init__( :param score: The score of this Searchable. # noqa: E501 :type score: FAIRResultCommonScore :param maturity: The maturity of this Searchable. # noqa: E501 - :type maturity: str + :type maturity: int :param output: The output of this Searchable. # noqa: E501 :type output: SearchableOutput :param test_debug: The test_debug of this Searchable. # noqa: E501 @@ -57,7 +61,7 @@ def __init__( "metric_tests": dict[str, FAIRResultEvaluationCriterium], "test_status": str, "score": FAIRResultCommonScore, - "maturity": str, + "maturity": int, "output": SearchableOutput, "test_debug": Debug, } @@ -232,21 +236,21 @@ def score(self, score: FAIRResultCommonScore): self._score = score @property - def maturity(self) -> str: + def maturity(self) -> int: """Gets the maturity of this Searchable. :return: The maturity of this Searchable. - :rtype: str + :rtype: int """ return self._maturity @maturity.setter def maturity(self, maturity: int): - """Sets the maturity of this Uniqueness. + """Sets the maturity of this Searchable. - :param maturity: The maturity of this Uniqueness. + :param maturity: The maturity of this Searchable. :type maturity: int """ diff --git a/fuji_server/models/searchable_output.py b/fuji_server/models/searchable_output.py index 196fee90..c7162cc8 100644 --- a/fuji_server/models/searchable_output.py +++ b/fuji_server/models/searchable_output.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model from fuji_server.models.output_search_mechanisms import OutputSearchMechanisms diff --git a/fuji_server/models/semantic_vocabulary.py b/fuji_server/models/semantic_vocabulary.py index f34c6622..a0c9f004 100644 --- a/fuji_server/models/semantic_vocabulary.py +++ b/fuji_server/models/semantic_vocabulary.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model from fuji_server.models.debug import Debug @@ -25,7 +29,7 @@ def __init__( metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, - maturity: str = "incomplete", + maturity: int = 0, output: SemanticVocabularyOutput = None, test_debug: Debug = None, ): @@ -44,7 +48,7 @@ def __init__( :param score: The score of this SemanticVocabulary. # noqa: E501 :type score: FAIRResultCommonScore :param maturity: The maturity of this SemanticVocabulary. # noqa: E501 - :type maturity: str + :type maturity: int :param output: The output of this SemanticVocabulary. # noqa: E501 :type output: SemanticVocabularyOutput :param test_debug: The test_debug of this SemanticVocabulary. # noqa: E501 @@ -57,7 +61,7 @@ def __init__( "metric_tests": dict[str, FAIRResultEvaluationCriterium], "test_status": str, "score": FAIRResultCommonScore, - "maturity": str, + "maturity": int, "output": SemanticVocabularyOutput, "test_debug": Debug, } @@ -232,21 +236,21 @@ def score(self, score: FAIRResultCommonScore): self._score = score @property - def maturity(self) -> str: + def maturity(self) -> int: """Gets the maturity of this SemanticVocabulary. :return: The maturity of this SemanticVocabulary. - :rtype: str + :rtype: int """ return self._maturity @maturity.setter def maturity(self, maturity: int): - """Sets the maturity of this Uniqueness. + """Sets the maturity of this SemanticVocabulary. - :param maturity: The maturity of this Uniqueness. + :param maturity: The maturity of this SemanticVocabulary. :type maturity: int """ diff --git a/fuji_server/models/semantic_vocabulary_output.py b/fuji_server/models/semantic_vocabulary_output.py index 87b1cbc1..43101a36 100644 --- a/fuji_server/models/semantic_vocabulary_output.py +++ b/fuji_server/models/semantic_vocabulary_output.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model from fuji_server.models.semantic_vocabulary_output_inner import SemanticVocabularyOutputInner # noqa: F401 diff --git a/fuji_server/models/semantic_vocabulary_output_inner.py b/fuji_server/models/semantic_vocabulary_output_inner.py index 4b62301d..d892aeb2 100644 --- a/fuji_server/models/semantic_vocabulary_output_inner.py +++ b/fuji_server/models/semantic_vocabulary_output_inner.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model diff --git a/fuji_server/models/standardised_protocol_data.py b/fuji_server/models/standardised_protocol_data.py index 5eb99cba..c3ef3aab 100644 --- a/fuji_server/models/standardised_protocol_data.py +++ b/fuji_server/models/standardised_protocol_data.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model from fuji_server.models.debug import Debug @@ -25,7 +29,7 @@ def __init__( metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, - maturity: str = "incomplete", + maturity: int = 0, output: StandardisedProtocolDataOutput = None, test_debug: Debug = None, ): @@ -44,7 +48,7 @@ def __init__( :param score: The score of this StandardisedProtocolData. # noqa: E501 :type score: FAIRResultCommonScore :param maturity: The maturity of this StandardisedProtocolData. # noqa: E501 - :type maturity: str + :type maturity: int :param output: The output of this StandardisedProtocolData. # noqa: E501 :type output: StandardisedProtocolDataOutput :param test_debug: The test_debug of this StandardisedProtocolData. # noqa: E501 @@ -57,7 +61,7 @@ def __init__( "metric_tests": dict[str, FAIRResultEvaluationCriterium], "test_status": str, "score": FAIRResultCommonScore, - "maturity": str, + "maturity": int, "output": StandardisedProtocolDataOutput, "test_debug": Debug, } @@ -232,21 +236,21 @@ def score(self, score: FAIRResultCommonScore): self._score = score @property - def maturity(self) -> str: + def maturity(self) -> int: """Gets the maturity of this StandardisedProtocolData. :return: The maturity of this StandardisedProtocolData. - :rtype: str + :rtype: int """ return self._maturity @maturity.setter def maturity(self, maturity: int): - """Sets the maturity of this Uniqueness. + """Sets the maturity of this StandardisedProtocolData. - :param maturity: The maturity of this Uniqueness. + :param maturity: The maturity of this StandardisedProtocolData. :type maturity: int """ diff --git a/fuji_server/models/standardised_protocol_data_output.py b/fuji_server/models/standardised_protocol_data_output.py index 0edd378b..cc8f69e3 100644 --- a/fuji_server/models/standardised_protocol_data_output.py +++ b/fuji_server/models/standardised_protocol_data_output.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model diff --git a/fuji_server/models/standardised_protocol_metadata.py b/fuji_server/models/standardised_protocol_metadata.py index 4bbc9ab1..968449fe 100644 --- a/fuji_server/models/standardised_protocol_metadata.py +++ b/fuji_server/models/standardised_protocol_metadata.py @@ -2,15 +2,17 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model from fuji_server.models.debug import Debug from fuji_server.models.fair_result_common import FAIRResultCommon # noqa: F401 from fuji_server.models.fair_result_common_score import FAIRResultCommonScore from fuji_server.models.fair_result_evaluation_criterium import FAIRResultEvaluationCriterium -from fuji_server.models.standardised_protocol_metadata_output import ( - StandardisedProtocolMetadataOutput, -) +from fuji_server.models.standardised_protocol_metadata_output import StandardisedProtocolMetadataOutput class StandardisedProtocolMetadata(Model): @@ -27,7 +29,7 @@ def __init__( metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, - maturity: str = "incomplete", + maturity: int = 0, output: StandardisedProtocolMetadataOutput = None, test_debug: Debug = None, ): @@ -46,7 +48,7 @@ def __init__( :param score: The score of this StandardisedProtocolMetadata. # noqa: E501 :type score: FAIRResultCommonScore :param maturity: The maturity of this StandardisedProtocolMetadata. # noqa: E501 - :type maturity: str + :type maturity: int :param output: The output of this StandardisedProtocolMetadata. # noqa: E501 :type output: StandardisedProtocolMetadataOutput :param test_debug: The test_debug of this StandardisedProtocolMetadata. # noqa: E501 @@ -59,7 +61,7 @@ def __init__( "metric_tests": dict[str, FAIRResultEvaluationCriterium], "test_status": str, "score": FAIRResultCommonScore, - "maturity": str, + "maturity": int, "output": StandardisedProtocolMetadataOutput, "test_debug": Debug, } @@ -234,21 +236,21 @@ def score(self, score: FAIRResultCommonScore): self._score = score @property - def maturity(self) -> str: + def maturity(self) -> int: """Gets the maturity of this StandardisedProtocolMetadata. :return: The maturity of this StandardisedProtocolMetadata. - :rtype: str + :rtype: int """ return self._maturity @maturity.setter def maturity(self, maturity: int): - """Sets the maturity of this Uniqueness. + """Sets the maturity of this StandardisedProtocolMetadata. - :param maturity: The maturity of this Uniqueness. + :param maturity: The maturity of this StandardisedProtocolMetadata. :type maturity: int """ diff --git a/fuji_server/models/standardised_protocol_metadata_output.py b/fuji_server/models/standardised_protocol_metadata_output.py index 9cb0ec28..bbd98742 100644 --- a/fuji_server/models/standardised_protocol_metadata_output.py +++ b/fuji_server/models/standardised_protocol_metadata_output.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model diff --git a/fuji_server/models/uniqueness.py b/fuji_server/models/uniqueness.py index 388dd5c4..dcf93ac9 100644 --- a/fuji_server/models/uniqueness.py +++ b/fuji_server/models/uniqueness.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model from fuji_server.models.debug import Debug @@ -25,7 +29,7 @@ def __init__( metric_tests: dict[str, FAIRResultEvaluationCriterium] | None = None, test_status: str = "fail", score: FAIRResultCommonScore = None, - maturity: str = "incomplete", + maturity: int = 0, output: UniquenessOutput = None, test_debug: Debug = None, ): @@ -44,7 +48,7 @@ def __init__( :param score: The score of this Uniqueness. # noqa: E501 :type score: FAIRResultCommonScore :param maturity: The maturity of this Uniqueness. # noqa: E501 - :type maturity: str + :type maturity: int :param output: The output of this Uniqueness. # noqa: E501 :type output: UniquenessOutput :param test_debug: The test_debug of this Uniqueness. # noqa: E501 @@ -57,7 +61,7 @@ def __init__( "metric_tests": dict[str, FAIRResultEvaluationCriterium], "test_status": str, "score": FAIRResultCommonScore, - "maturity": str, + "maturity": int, "output": UniquenessOutput, "test_debug": Debug, } @@ -232,12 +236,12 @@ def score(self, score: FAIRResultCommonScore): self._score = score @property - def maturity(self) -> str: + def maturity(self) -> int: """Gets the maturity of this Uniqueness. :return: The maturity of this Uniqueness. - :rtype: str + :rtype: int """ return self._maturity diff --git a/fuji_server/models/uniqueness_output.py b/fuji_server/models/uniqueness_output.py index fe0bbcd5..994e00e9 100644 --- a/fuji_server/models/uniqueness_output.py +++ b/fuji_server/models/uniqueness_output.py @@ -2,6 +2,10 @@ # # SPDX-License-Identifier: MIT +# coding: utf-8 + +from datetime import date, datetime # noqa: F401 + from fuji_server import util from fuji_server.models.base_model_ import Model diff --git a/simpleclient/index.php b/simpleclient/index.php index d2a5668d..2a1d555f 100644 --- a/simpleclient/index.php +++ b/simpleclient/index.php @@ -48,7 +48,7 @@ $fuji_username = 'marvel'; $fuji_password = 'wonderwoman'; $metric_version = "metrics_v0.7_software"; #"metrics_v0.7_software_cessda"; #"metrics_v0.5"; #"metrics_v0.7_software"; -$usegithub = true; +$usegithub = false; ################################################################ $fair_basic_terms=['F'=>'Findable','A'=>'Accessible','I'=>'Interoperable','R'=>'Reusable']; From a893267337c496b82f14c42272586ce37c4f51a3 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Tue, 16 Jan 2024 10:36:56 +0000 Subject: [PATCH 42/45] roll back changes to models/harvest.py --- fuji_server/models/harvest.py | 69 +++++++++++++++++++++++++++++++++-- 1 file changed, 66 insertions(+), 3 deletions(-) diff --git a/fuji_server/models/harvest.py b/fuji_server/models/harvest.py index c16a1c8f..afc03a2f 100644 --- a/fuji_server/models/harvest.py +++ b/fuji_server/models/harvest.py @@ -16,16 +16,28 @@ class Harvest(Model): Do not edit the class manually. """ - def __init__(self, object_identifier: str | None = None): + def __init__( + self, object_identifier: str | None = None, auth_token: str | None = None, auth_token_type: str | None = None + ): """Harvest - a model defined in Swagger :param object_identifier: The object_identifier of this Harvest. # noqa: E501 :type object_identifier: str + :param auth_token: The auth_token of this Harvest. # noqa: E501 + :type auth_token: str + :param auth_token_type: The auth_token_type of this Harvest. # noqa: E501 + :type auth_token_type: str """ - self.swagger_types = {"object_identifier": str} + self.swagger_types = {"object_identifier": str, "auth_token": str, "auth_token_type": str} - self.attribute_map = {"object_identifier": "object_identifier"} + self.attribute_map = { + "object_identifier": "object_identifier", + "auth_token": "auth_token", + "auth_token_type": "auth_token_type", + } self._object_identifier = object_identifier + self._auth_token = auth_token + self._auth_token_type = auth_token_type @classmethod def from_dict(cls, dikt) -> "Harvest": @@ -62,3 +74,54 @@ def object_identifier(self, object_identifier: str): raise ValueError("Invalid value for `object_identifier`, must not be `None`") self._object_identifier = object_identifier + + @property + def auth_token(self) -> str: + """Gets the auth_token of this Harvest. + + The authentication token required to access protected data # noqa: E501 + + :return: The auth_token of this Harvest. + :rtype: str + """ + return self._auth_token + + @auth_token.setter + def auth_token(self, auth_token: str): + """Sets the auth_token of this Harvest. + + The authentication token required to access protected data # noqa: E501 + + :param auth_token: The auth_token of this Harvest. + :type auth_token: str + """ + + self._auth_token = auth_token + + @property + def auth_token_type(self) -> str: + """Gets the auth_token_type of this Harvest. + + The type of authentication (Oauth Bearer or HTTP Basic) needed to use the auth token # noqa: E501 + + :return: The auth_token_type of this Harvest. + :rtype: str + """ + return self._auth_token_type + + @auth_token_type.setter + def auth_token_type(self, auth_token_type: str): + """Sets the auth_token_type of this Harvest. + + The type of authentication (Oauth Bearer or HTTP Basic) needed to use the auth token # noqa: E501 + + :param auth_token_type: The auth_token_type of this Harvest. + :type auth_token_type: str + """ + allowed_values = ["Bearer", "Basic"] + if auth_token_type not in allowed_values: + raise ValueError( + f"Invalid value for `auth_token_type` ({auth_token_type}), must be one of {allowed_values}" + ) + + self._auth_token_type = auth_token_type From 3218f05df877c0e21c01ab9faca7952d8750754e Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Tue, 16 Jan 2024 11:07:58 +0000 Subject: [PATCH 43/45] update docs on swagger --- README.md | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index e9b8c541..56893546 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,9 @@ F-UJI is using [basic authentication](https://en.wikipedia.org/wiki/Basic_access ## Development +First, make sure to read the [contribution guidelines](./CONTRIBUTING.md). +They include instructions on how to set up your environment with `pre-commit` and how to run the tests. + The repository includes a [simple web client](./simpleclient/) suitable for interacting with the API during development. One way to run it would be with a LEMP stack (Linux, Nginx, MySQL, PHP), which is described in the following. @@ -208,18 +211,19 @@ This means that if a test indicating maturity 3 is passed and one indicating mat ### Updates to the API -F-UJI makes use of Swagger Codegen. If making changes to the API, make sure to [install Swagger Codegen](https://github.com/swagger-api/swagger-codegen#prerequisites): +Making changes to the API requires re-generating parts of the code using Swagger. +First, edit [`fuji_server/yaml/openapi.yaml`](fuji_server/yaml/openapi.yaml). +Then, use the [Swagger Editor](https://editor.swagger.io/) to generate a python-flask server. +The zipped files should be automatically downloaded. +Unzip it. -```bash -wget https://repo1.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/3.0.51/swagger-codegen-cli-3.0.51.jar -O swagger-codegen-cli.jar -java -jar swagger-codegen-cli.jar --help -``` -Update the API definition in [`fuji_server/yaml/openapi.yaml`](./fuji_server/yaml/openapi.yaml). Then, run Swagger Codegen: +Next: +1. Place the files in `swagger_server/models` into `fuji_server/models`, except `swagger_server/models/__init__.py`. +2. Rename all occurrences of `swagger_server` to `fuji_server`. +3. Add the content of `swagger_server/models/__init__.py` into `fuji_server/__init__.py`. -```bash -# TODO -... -``` +Unfortunately, the Swagger Editor doesn't always produce code that is compliant with PEP standards. +Run `pre-commit run` (or try to commit) and fix any errors that cannot be automatically fixed. ## License This project is licensed under the MIT License; for more details, see the [LICENSE](https://github.com/pangaea-data-publisher/fuji/blob/master/LICENSE) file. From 732e4d0ed218b7e8b145f1bcff44433a17263ceb Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Tue, 16 Jan 2024 11:31:26 +0000 Subject: [PATCH 44/45] index.php back to starting configuration --- simpleclient/index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/simpleclient/index.php b/simpleclient/index.php index 2a1d555f..e3d5a1e3 100644 --- a/simpleclient/index.php +++ b/simpleclient/index.php @@ -45,9 +45,9 @@ set_time_limit(0); ######################## local config ########################## $fuji_server = 'http://localhost:1071/fuji/api/v1/evaluate'; -$fuji_username = 'marvel'; -$fuji_password = 'wonderwoman'; -$metric_version = "metrics_v0.7_software"; #"metrics_v0.7_software_cessda"; #"metrics_v0.5"; #"metrics_v0.7_software"; +$fuji_username = 'yourusername'; +$fuji_password = 'yourpassword'; +$metric_version = "metrics_v0.5"; #"metrics_v0.7_software_cessda"; #"metrics_v0.5"; #"metrics_v0.7_software"; $usegithub = false; ################################################################ From 732b48e80007c99ebc43e1767cf7900584823062 Mon Sep 17 00:00:00 2001 From: Kara Moraw Date: Wed, 28 Feb 2024 09:53:29 +0000 Subject: [PATCH 45/45] check if FRSM metric used before accessing github_data --- fuji_server/evaluators/fair_evaluator_license.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fuji_server/evaluators/fair_evaluator_license.py b/fuji_server/evaluators/fair_evaluator_license.py index f14f5f3d..f4b63b5d 100644 --- a/fuji_server/evaluators/fair_evaluator_license.py +++ b/fuji_server/evaluators/fair_evaluator_license.py @@ -49,7 +49,7 @@ def __init__(self, fuji_instance): def setLicenseDataAndOutput(self): self.license_info = [] specified_licenses = self.fuji.metadata_merged.get("license") - if specified_licenses is None: # try GitHub data + if specified_licenses is None and self.metric_identifier.startswith("FRSM"): # try GitHub data specified_licenses = self.fuji.github_data.get("license") if isinstance(specified_licenses, str): # licenses maybe string or list depending on metadata schemas specified_licenses = [specified_licenses]