
    h                     (   S SK Jr  S SKJrJrJrJrJrJr   S SK	J
r
JrJrJrJr  S SKJr  S\\
   S\\\4   S\\   4S jr " S	 S
\
5      r " S S\
5      r " S S\
5      r " S S\
5      r " S S\
5      rg! \ a    S SKJ
r
JrJrJrJr   Njf = f)    )defaultdict)AnyDictListOptionalTypeUnion)	BaseModelField	StrictStrValidationErrorroot_validator)msgschemaobjreturnc                     U " S0 UD6  / $ ! [          a  nUR                  5       n[        [        5      nU Hf  nSR	                  UR                  S/ 5       Vs/ s H  n[        U5      PM     Os  snf sn5      nXG   R                  UR                  S5      5        Mh     UR                  5        VV	s/ s H  u  pSU SSR	                  U	5       3PM     Os  sn	nf sn	ns SnA$ SnAff = f)	zValidate data against a given pydantic schema.

obj (Dict[str, Any]): JSON-serializable data to validate.
schema (pydantic.BaseModel): The schema to validate against.
RETURNS (List[str]): A list of error messages, if available.
z -> locr   [z] z, N )	r   errorsr   listjoingetstrappenditems)
r   r   er   dataerrorperr_locr   r   s
             H/home/james-whalen/.local/lib/python3.13/site-packages/weasel/schemas.pyvalidater$      s    	J	 J4 Ekk599UB3G"H3Ga3q63G"HIGM  5!12  =AJJLIL!C5499S>*+LIIJs4   	 
C,AC'A/.AC'4#C
C'!C,'C,c                   ^    \ rS rSr% \" SSS9r\\S'   \" SSS9r\\S'   \" SS	S9r	\\S
'   Sr
g)ProjectConfigAssetGitItem"   .z URL of Git repo to download fromtitlerepozAFile path or sub-directory to download (used for sparse checkout)pathmasterzBranch to clone frombranchr   N)__name__
__module____qualname____firstlineno__r   r*   r   __annotations__r+   r-   __static_attributes__r       r#   r&   r&   "   s8    C'IJD)JC'jkD)kh.DEFIEr4   r&   c                       \ rS rSr% \" SSS9r\\S'   \" SSS9r\	\   \S'   \" SS	S
S9r
\	\   \S'   \" SSS9r\\S'   Srg)ProjectConfigAssetURL*   .zDestination of downloaded assetr(   destNzURL of asseturlMD5 hash of file([a-fA-F\d]{32})r)   regexchecksum Description of assetdescriptionr   )r.   r/   r0   r1   r   r8   r   r2   r9   r   r>   r   rA   r3   r   r4   r#   r6   r6   *   sU    C'HID)I$T@C)	@#D0BJ]^Hhsm^"2-CDKDr4   r6   c                   l    \ rS rSr% \" SSS9r\\S'   \" SSSS	9r\	\
   \S
'   \" SSS9r\	\   \S'   Srg)ProjectConfigAssetGit3   .zGit repo informationr(   gitNr:   r;   r<   r>   r@   rA   r   )r.   r/   r0   r1   r   rE   r&   r2   r>   r   r   rA   r   r3   r   r4   r#   rC   rC   3   sE    %*36L%MC	"M#D0BJ]^Hhsm^',T9O'PK)$Pr4   rC   c                       \ rS rSr% \" SSS9r\\S'   \" SSS9r\	\   \S'   \" / S	S9r
\\   \S
'   \" / SS9r\\   \S'   \" / SS9r\\   \S'   \" / SS9r\\   \S'   \" SSS9r\\S'    " S S5      rSrg)ProjectConfigCommand;   .zName of commandr(   nameNzCommand descriptionhelpz%List of CLI commands to run, in orderscriptz*File dependencies required by this commanddepsz Outputs produced by this commandoutputsz%Outputs not tracked by DVC (DVC only)outputs_no_cacheFz0Never skip this command, even if nothing changedno_skipc                       \ rS rSrSrSrSrg)ProjectConfigCommand.ConfigF   z4A single named command specified in a project configforbidr   N)r.   r/   r0   r1   r)   extrar3   r   r4   r#   ConfigrQ   F   s    Fr4   rU   r   )r.   r/   r0   r1   r   rI   r   r2   rJ   r   rK   r   rL   rM   rN   rO   boolrU   r3   r   r4   r#   rG   rG   ;   s    C'89D)9 %d2G HD(9
H#B.UVFDOV!",XYD$y/Y$R/QRGT)_R(-b8_(`d9o`%'YZGTZ r4   rG   c                   2   \ rS rSr% \" 0 SS9r\\\4   \	S'   \" 0 SS9r
\\\4   \	S'   \" / SS9r\\\\4      \	S'   \" 0 S	S9r\\\\   4   \	S
'   \" / SS9r\\   \	S'   \" SSS9r\\   \	S'    " S S5      r\" SS9S\\\4   S\\\4   4S j5       rSrg)ProjectConfigSchemaK   z,Optional variables to substitute in commandsr(   varszWOptional variable names to substitute in commands, mapped to environment variable namesenvzData assetsassetszCNamed workflows, mapped to list of project commands to run in order	workflowszProject command shortuctscommandsNzProject titler)   c                       \ rS rSrSrSrg)ProjectConfigSchema.ConfigU   z%Schema for project configuration filer   N)r.   r/   r0   r1   r)   r3   r   r4   r#   rU   r`   U   s    7r4   rU   T)prer   r   c                 v    SU;   a  [         R                  " S5        SU;   a  [         R                  " S5        U$ )Nspacy_versionzYour project configuration file includes a `spacy_version` key, which is now deprecated. Weasel will not validate your version of spaCy.check_requirementszYour project configuration file includes a `check_requirements` key, which is now deprecated. Weasel will not validate your requirements.)r   warn)clsr   s     r#   check_legacy_keys%ProjectConfigSchema.check_legacy_keysX   s?    c!HH[  3&HHW 
r4   r   )r.   r/   r0   r1   r   rZ   r   r   r   r2   r[   r\   r   r	   r6   rC   r]   r^   rG   r)   r   r   rU   r   rh   r3   r   r4   r#   rX   rX   K   s    !&r1_!`D$y#~
` %b  1J  !KCin	  KHMbXeHfFD,.CCDEf27  CH  3IItItI./  I+0;V+WHd'(W _=E8C==8 8 DcN tCH~  r4   rX   N)collectionsr   typingr   r   r   r   r   r	   pydantic.v1r
   r   r   r   r   ImportErrorpydanticwasabir   r   r$   r&   r6   rC   rG   rX   r   r4   r#   <module>rp      s    # 9 9VXX JT)_ J4S> Jd3i J,F	 FEI EQI Q9  ) K  VUUVs   A: :BB