omdev 0.0.0.dev210__py3-none-any.whl → 0.0.0.dev212__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- omdev/.manifests.json +15 -1
 - omdev/__about__.py +0 -4
 - omdev/amalg/gen.py +2 -3
 - omdev/amalg/imports.py +4 -5
 - omdev/amalg/manifests.py +7 -10
 - omdev/amalg/resources.py +24 -27
 - omdev/amalg/srcfiles.py +7 -10
 - omdev/amalg/strip.py +4 -5
 - omdev/amalg/types.py +1 -1
 - omdev/amalg/typing.py +9 -8
 - omdev/ci/cache.py +137 -10
 - omdev/ci/ci.py +110 -75
 - omdev/ci/cli.py +51 -11
 - omdev/ci/compose.py +34 -15
 - omdev/ci/{dockertars.py → docker.py} +43 -30
 - omdev/ci/github/__init__.py +0 -0
 - omdev/ci/github/bootstrap.py +11 -0
 - omdev/ci/github/cache.py +355 -0
 - omdev/ci/github/cacheapi.py +207 -0
 - omdev/ci/github/cli.py +39 -0
 - omdev/ci/requirements.py +3 -2
 - omdev/ci/shell.py +42 -0
 - omdev/ci/utils.py +49 -0
 - omdev/scripts/ci.py +1734 -473
 - omdev/scripts/interp.py +22 -22
 - omdev/scripts/pyproject.py +22 -22
 - omdev/tokens/__init__.py +0 -0
 - omdev/tokens/all.py +35 -0
 - omdev/tokens/tokenizert.py +217 -0
 - omdev/{tokens.py → tokens/utils.py} +6 -12
 - omdev/tools/mkenv.py +131 -0
 - omdev/tools/mkrelimp.py +4 -6
 - {omdev-0.0.0.dev210.dist-info → omdev-0.0.0.dev212.dist-info}/METADATA +2 -5
 - {omdev-0.0.0.dev210.dist-info → omdev-0.0.0.dev212.dist-info}/RECORD +38 -28
 - {omdev-0.0.0.dev210.dist-info → omdev-0.0.0.dev212.dist-info}/LICENSE +0 -0
 - {omdev-0.0.0.dev210.dist-info → omdev-0.0.0.dev212.dist-info}/WHEEL +0 -0
 - {omdev-0.0.0.dev210.dist-info → omdev-0.0.0.dev212.dist-info}/entry_points.txt +0 -0
 - {omdev-0.0.0.dev210.dist-info → omdev-0.0.0.dev212.dist-info}/top_level.txt +0 -0
 
    
        omdev/ci/utils.py
    CHANGED
    
    | 
         @@ -1,10 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # ruff: noqa: UP006 UP007
         
     | 
| 
       2 
2 
     | 
    
         
             
            # @omlish-lite
         
     | 
| 
       3 
3 
     | 
    
         
             
            import hashlib
         
     | 
| 
      
 4 
     | 
    
         
            +
            import logging
         
     | 
| 
       4 
5 
     | 
    
         
             
            import os.path
         
     | 
| 
       5 
6 
     | 
    
         
             
            import tempfile
         
     | 
| 
      
 7 
     | 
    
         
            +
            import time
         
     | 
| 
       6 
8 
     | 
    
         
             
            import typing as ta
         
     | 
| 
       7 
9 
     | 
    
         | 
| 
      
 10 
     | 
    
         
            +
            from omlish.lite.logs import log
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
       8 
12 
     | 
    
         | 
| 
       9 
13 
     | 
    
         
             
            ##
         
     | 
| 
       10 
14 
     | 
    
         | 
| 
         @@ -30,3 +34,48 @@ def read_yaml_file(yaml_file: str) -> ta.Any: 
     | 
|
| 
       30 
34 
     | 
    
         | 
| 
       31 
35 
     | 
    
         
             
            def sha256_str(s: str) -> str:
         
     | 
| 
       32 
36 
     | 
    
         
             
                return hashlib.sha256(s.encode('utf-8')).hexdigest()
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
            ##
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
             
     | 
| 
      
 42 
     | 
    
         
            +
            class LogTimingContext:
         
     | 
| 
      
 43 
     | 
    
         
            +
                DEFAULT_LOG: ta.ClassVar[logging.Logger] = log
         
     | 
| 
      
 44 
     | 
    
         
            +
             
     | 
| 
      
 45 
     | 
    
         
            +
                def __init__(
         
     | 
| 
      
 46 
     | 
    
         
            +
                        self,
         
     | 
| 
      
 47 
     | 
    
         
            +
                        description: str,
         
     | 
| 
      
 48 
     | 
    
         
            +
                        *,
         
     | 
| 
      
 49 
     | 
    
         
            +
                        log: ta.Optional[logging.Logger] = None,  # noqa
         
     | 
| 
      
 50 
     | 
    
         
            +
                        level: int = logging.DEBUG,
         
     | 
| 
      
 51 
     | 
    
         
            +
                ) -> None:
         
     | 
| 
      
 52 
     | 
    
         
            +
                    super().__init__()
         
     | 
| 
      
 53 
     | 
    
         
            +
             
     | 
| 
      
 54 
     | 
    
         
            +
                    self._description = description
         
     | 
| 
      
 55 
     | 
    
         
            +
                    self._log = log if log is not None else self.DEFAULT_LOG
         
     | 
| 
      
 56 
     | 
    
         
            +
                    self._level = level
         
     | 
| 
      
 57 
     | 
    
         
            +
             
     | 
| 
      
 58 
     | 
    
         
            +
                def set_description(self, description: str) -> 'LogTimingContext':
         
     | 
| 
      
 59 
     | 
    
         
            +
                    self._description = description
         
     | 
| 
      
 60 
     | 
    
         
            +
                    return self
         
     | 
| 
      
 61 
     | 
    
         
            +
             
     | 
| 
      
 62 
     | 
    
         
            +
                _begin_time: float
         
     | 
| 
      
 63 
     | 
    
         
            +
                _end_time: float
         
     | 
| 
      
 64 
     | 
    
         
            +
             
     | 
| 
      
 65 
     | 
    
         
            +
                def __enter__(self) -> 'LogTimingContext':
         
     | 
| 
      
 66 
     | 
    
         
            +
                    self._begin_time = time.time()
         
     | 
| 
      
 67 
     | 
    
         
            +
             
     | 
| 
      
 68 
     | 
    
         
            +
                    self._log.log(self._level, f'Begin {self._description}')  # noqa
         
     | 
| 
      
 69 
     | 
    
         
            +
             
     | 
| 
      
 70 
     | 
    
         
            +
                    return self
         
     | 
| 
      
 71 
     | 
    
         
            +
             
     | 
| 
      
 72 
     | 
    
         
            +
                def __exit__(self, exc_type, exc_val, exc_tb):
         
     | 
| 
      
 73 
     | 
    
         
            +
                    self._end_time = time.time()
         
     | 
| 
      
 74 
     | 
    
         
            +
             
     | 
| 
      
 75 
     | 
    
         
            +
                    self._log.log(
         
     | 
| 
      
 76 
     | 
    
         
            +
                        self._level,
         
     | 
| 
      
 77 
     | 
    
         
            +
                        f'End {self._description} - {self._end_time - self._begin_time:0.2f} s elapsed',
         
     | 
| 
      
 78 
     | 
    
         
            +
                    )
         
     | 
| 
      
 79 
     | 
    
         
            +
             
     | 
| 
      
 80 
     | 
    
         
            +
             
     | 
| 
      
 81 
     | 
    
         
            +
            log_timing_context = LogTimingContext
         
     |