Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 2 additions & 14 deletions .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -48,26 +48,15 @@ source ./.venv/bin/activate
python -m pip install -U pip
python -m pip install -U uv

# --- Install the project in editable mode (prefer uv pip; fallback to pip)
if python -m uv --help >/dev/null 2>&1; then
python -m uv pip install -e .
# Install dev dependencies
[ -f requirements.in ] && python -m uv pip install -r requirements.in
else
pip install -e .
[ -f requirements.in ] && pip install -r requirements.in
fi
# --- Install the project + dev deps from the lockfile (uv.lock)
python -m uv sync --locked --group dev

# --- Load environment variables from .env (create from example if missing)
if [ ! -f .env ]; then
cp .env.example .env
fi
dotenv

# --- Install pre-commit hooks (same as before)
pre-commit install

# --- Python / Locale (same as before)
# --- Install pre-commit hooks
pre-commit install

Expand All @@ -77,6 +66,5 @@ export LC_ALL='en_US.UTF-8'
export LANG='en_US.UTF-8'
export LANGUAGE='en_US.UTF-8'

# --- PATH (same as before)
# --- PATH
path_add PATH "$(expand_path bin)"
123 changes: 10 additions & 113 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,129 +11,26 @@ on:
permissions:
contents: read

jobs:
isort:
name: Check import sorting (isort)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: requirements.txt

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Run isort
run: pre-commit run -a isort

black:
name: Check code formatting (black)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: requirements.txt

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Run black
run: pre-commit run -a black

flake8:
name: Check code style (flake8)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: requirements.txt

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
concurrency:
group: lint-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

- name: Run flake8
run: pre-commit run -a flake8

pyupgrade:
name: Check for Python upgrades (pyupgrade)
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: requirements.txt

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Run pyupgrade
run: pre-commit run -a pyupgrade

pylint:
name: Run comprehensive linting (pylint)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: requirements.txt

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
enable-cache: true

- name: Run pylint
run: pylint --rcfile=.pylintrc cloudsmith_cli

typos:
name: Check for typos (typos)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- run: uv sync --locked --group dev

- name: Run typos
uses: crate-ci/typos@37bb98842b0d8c4ffebdb75301a13db0267cef89 # v1.47.2
- run: uv run pre-commit run --all-files
Loading
Loading