Skip to content

Commit

Permalink
Merge pull request #30 from ManoManoTech/chore/update-deps
Browse files Browse the repository at this point in the history
chore(deps): bump Python dependencies, move to Ruff formatter
  • Loading branch information
GabDug authored Mar 25, 2024
2 parents cbcc7fe + 21dd76c commit cc7f89f
Show file tree
Hide file tree
Showing 80 changed files with 704 additions and 630 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:
cancel-in-progress: true

env:
PYTHON_VERSION: "3.11"
PYTHON_VERSION: "3.12"

jobs:
python_build:
Expand All @@ -29,7 +29,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
python-version: ["3.11", "3.12"]
os: ["ubuntu-latest"]
services:
# Label used to access the service container
Expand Down Expand Up @@ -100,6 +100,7 @@ jobs:
- name: Publish Python artifacts on Github artifacts
uses: actions/upload-artifact@v4
if: ${{ matrix.python-version == env.PYTHON_VERSION }}
with:
name: python-artifacts
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ concurrency:
cancel-in-progress: true

env:
PYTHON_VERSION: "3.11"
PYTHON_VERSION: "3.12"

jobs:
docs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:
cancel-in-progress: true

env:
PYTHON_VERSION: "3.11"
PYTHON_VERSION: "3.12"

jobs:
sdist_wheels:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync_python_deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Update Python dependencies with PDM

on:
schedule:
- cron: "0 12 * * *"
- cron: "0 10 * * MON"
workflow_dispatch:

permissions:
Expand Down
11 changes: 4 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# See https://pre-commit.com/hooks.html for more hooks

default_language_version:
python: python3.11
python: python3.12
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
Expand All @@ -19,15 +19,12 @@ repos:
- id: fix-byte-order-marker
# Versions must be kept in sync with lockfile
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.1.15'
rev: 'v0.3.4'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.1.1
hooks:
- id: black

- repo: https://github.com/adrienverge/yamllint
rev: v1.33.0
rev: v1.35.1
hooks:
- id: yamllint
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
python 3.11.6
python 3.12
direnv 2.32.1
nodejs lts-hydrogen
pdm 2.12.1
pdm 2.12.4
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"charliermarsh.ruff",
"davidanson.vscode-markdownlint",
"mikestead.dotenv",
"ms-python.black-formatter",
"charliermarsh.ruff",
"ms-python.python",
"ms-python.vscode-pylance",
"tamasfe.even-better-toml",
Expand Down
11 changes: 5 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,16 @@
"--rootdir=."
],
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true,
"source.organizeImports.ruff": true,
"source.organizeImports.isort": false,
"source.organizeImports.isort.check": false
"source.organizeImports": "explicit",
"source.organizeImports.ruff": "explicit",
"source.organizeImports.isort": "never",
"source.organizeImports.isort.check": "never"
},
},
"python.analysis.stubPath": "stubs",
"python.analysis.inlayHints.variableTypes": false,
"python.analysis.autoImportCompletions": true,
"black-formatter.importStrategy": "fromEnvironment",
}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11-slim-bullseye
FROM python:3.12-slim-bullseye

LABEL maintainer="[email protected]"
LABEL org.opencontainers.image.title="ManoManoTech"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# FireFighter

[![PyPI - Version](https://img.shields.io/pypi/v/firefighter-incident)](https://pypi.org/project/firefighter-incident/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/firefighter-incident)](https://pypi.org/project/firefighter-incident/) [![PyPI - License](https://img.shields.io/pypi/l/firefighter-incident)](https://manomanotech.github.io/firefighter-incident/latest/license/) [![OpenSSF Best Practices](https://www.bestpractices.dev/projects/8170/badge)](https://www.bestpractices.dev/projects/8170) [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![PyPI - Version](https://img.shields.io/pypi/v/firefighter-incident)](https://pypi.org/project/firefighter-incident/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/firefighter-incident)](https://pypi.org/project/firefighter-incident/) [![PyPI - License](https://img.shields.io/pypi/l/firefighter-incident)](https://manomanotech.github.io/firefighter-incident/latest/license/) [![OpenSSF Best Practices](https://www.bestpractices.dev/projects/8170/badge)](https://www.bestpractices.dev/projects/8170) [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)

FireFighter is ManoMano's in-house Incident Management Tool.

Expand Down
4 changes: 2 additions & 2 deletions docs/contributing/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ Check all available commands using `pdm run --list`.

### Formatting

We use `black`. You can run `pdm run fmt` or `black .` in the project root to format every file.
We use `ruff`. You can run `pdm run fmt` or `ruff format .` in the project root to format every file.

```shell
pdm run fmt
```

> This is the equivalent of running `black .` in the project root.
> This is the equivalent of running `ruff format .` in the project root.

Import sorting managed by `ruff`.

Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ plugins:
- "os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'firefighter.firefighter.settings')"
- "django.setup()"
import:
- https://docs.python.org/3.11/objects.inv
- https://docs.python.org/3.12/objects.inv
- https://docs.celeryq.dev/en/stable/objects.inv
# - https://slack.dev/python-slack-sdk/objects.inv
- url: https://docs.djangoproject.com/en/4.2/_objects/
Expand Down
Loading

0 comments on commit cc7f89f

Please sign in to comment.