
    h
              	           S SK Jr  S SKJr  SSKJrJr  SSKJrJ	r	  SSK
JrJrJr  \	R                  " S5      \" S	S
S9\" \R                  " 5       SSSS94S\S\4S jj5       rS\S\4S jrS\4S jrg)    )Path)msg   )load_project_configlogger   )Argapp)RemoteStorageget_command_hashget_content_hashpushdefaultzName or path of remote storage)helpzELocation of project directory. Defaults to current working directory.TF)r   exists	file_okayremoteproject_dirc                     [        X5       H?  u  p#Uc  [        R                  " SU 35        M#  [        R                  " SU SU 35        MA     g)aA  Persist outputs to a remote storage. You can alias remotes in your
project.yml by mapping them to storage paths. A storage can be anything that
the smart_open library can upload to, e.g. AWS, Google Cloud Storage, SSH,
local directories etc.

DOCS: https://github.com/explosion/weasel/tree/main/docs/cli.md#arrow_up-push
Nz	Skipping zPushed z to )project_pushr   infogood)r   r   output_pathurls       I/home/james-whalen/.local/lib/python3.13/site-packages/weasel/cli/push.pyproject_push_clir   
   sG     )=;HHy./HHw{m4u56	 >    c           
   #   .  #    [        U 5      nXR                  S0 5      ;   a  US   U   n[        X5      nUR                  S/ 5       GH=  n[        R                  " SUS   5        UR                  S/ 5       Vs/ s H  oPU-  PM	     nn[        S U 5       5      (       a  [        R                  " SUS   5        Mu  [        SSUR                  S/ 5       Vs/ s H  oPU-  PM	     snUS	   5      n[        R                  " S
U5        UR                  S/ 5       Hg  nX-  n	U	R                  5       (       d  M  [        U	5      (       d  M0  UR                  UU[        U	5      S9n
[        R                  " SXU5        X4v   Mi     GM@     gs  snf s  snf 7f)zPersist outputs to a remote storage. You can alias remotes in your project.yml
by mapping them to storage paths. A storage can be anything that the smart_open
library can upload to, e.g. gcs, aws, ssh, local directories etc
remotescommandszCMD: %snamedepsc              3   J   #    U  H  oR                  5       (       + v   M     g 7fN)r   ).0deps     r   	<genexpr>project_push.<locals>.<genexpr>+   s     04C::<4s   !#z'Dependency missing. Skipping %s outputs scriptzCMD_HASH: %soutputs)command_hashcontent_hashz&URL: %s for output %s with cmd_hash %sN)r   getr   r   debuganyr   r   _is_not_empty_dirr   r   )r   r   configstoragecmdr&   r"   cmd_hashr   
output_locr   s              r   r   r      su    
 !-FIr**	"6*K0Gzz*b)YF,-0WWVR-@A-@cc!-@A04000LLBCKP##''&"2EF2E33&2EFH
 	^X.779b1K$2J  ""'8'D'Dll!)!1*!= # 
 <cPX "&& 2 *A
 Gs-   A8F:FAFF&AF8F
AFlocc                 |    U R                  5       (       d  g[        S U R                  5        5       5      (       a  gg)NTc              3   8   #    U  H  n[        U5      v   M     g 7fr$   )r1   )r%   childs     r   r'   $_is_not_empty_dir.<locals>.<genexpr>C   s     A=%u%%=s   F)is_dirr0   iterdir)r7   s    r   r1   r1   @   s-    ::<<	A3;;=A	A	Ar   N)pathlibr   wasabir   utilr   r   mainr	   r
   remote_storager   r   r   commandcwdstrr   r   r1    r   r   <module>rG      s      .  M M V i&FGDHHJ-t  ~B  NS  T77 7 7('d 'C 'B4 r   