refactor: Make target spec a discriminated union #171
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | name: Run Lint and Packaging Checks | |
| on: | |
| pull_request: | |
| branches: [ main, master ] | |
| paths: | |
| - '**.py' | |
| - 'pyproject.toml' | |
| - 'setup.py' | |
| - 'setup.cfg' | |
| - 'requirements*.txt' | |
| - '.github/workflows/lint.yml' | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - '**.py' | |
| - 'pyproject.toml' | |
| - 'setup.py' | |
| - 'setup.cfg' | |
| - 'requirements*.txt' | |
| - '.github/workflows/lint.yml' | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python3 -m pip install --upgrade pip | |
| pip install .[dev] | |
| pip install build twine | |
| - name: Ruff lint | |
| run: ruff check . | |
| - name: Ruff format | |
| run: ruff format --check . | |
| - name: Build sdist and wheel | |
| run: python3 -m build | |
| - name: Check distribution metadata | |
| run: twine check dist/* |