diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b21d114..3da305d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,34 +2,28 @@ # Please run `pre-commit run --all-files` when adding or changing entries. repos: - - repo: https://github.com/psf/black - rev: 23.3.0 - hooks: - - id: black - repo: https://github.com/codespell-project/codespell - rev: v2.2.4 + rev: v2.3.0 hooks: - id: codespell args: [--ignore-words=.codespellignore] types_or: [jupyter, markdown, python, shell] - - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.5.6 hooks: - - id: flake8 + - id: ruff + - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.2.0 + rev: v1.11.1 hooks: - id: mypy additional_dependencies: - - click != 8.1.0 + - click - stactools + - pytest - types-requests - types-python-dateutil - - repo: https://github.com/pycqa/isort - rev: 5.12.0 - hooks: - - id: isort - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.33.0 + rev: v0.41.0 hooks: - id: markdownlint diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 171ec16..eaf5f71 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -6,7 +6,7 @@ In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, -level of experience, education, socio-economic status, nationality, personal +level of experience, education, socioeconomic status, nationality, personal appearance, race, religion, or sexual identity and orientation. ## Our Standards diff --git a/docker/Dockerfile b/docker/Dockerfile index 5dae677..d03a4a4 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -3,7 +3,7 @@ FROM ghcr.io/stac-utils/stactools:$STACTOOLS_VERSION ARG DOCKER_NAMESPACE_PACKAGE_DIR ARG DOCKER_WORKDIR -ENV PYTHON_VERSION=3.10 +ENV PYTHON_VERSION=3.11 WORKDIR $DOCKER_WORKDIR # For caching purposes, install dependencies but remove the actual package diff --git a/docker/Dockerfile-dev b/docker/Dockerfile-dev index 79e8906..5b9b613 100644 --- a/docker/Dockerfile-dev +++ b/docker/Dockerfile-dev @@ -3,7 +3,7 @@ FROM ghcr.io/stac-utils/stactools:${STACTOOLS_VERSION}-dev ARG DOCKER_NAMESPACE_PACKAGE_DIR ARG DOCKER_WORKDIR -ENV PYTHON_VERSION=3.10 +ENV PYTHON_VERSION=3.11 WORKDIR $DOCKER_WORKDIR RUN apt-get -y -q update \ diff --git a/requirements-dev.txt b/requirements-dev.txt index d115243..3cfac75 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,10 +1,8 @@ -black codespell -flake8 -isort mypy pre-commit pytest pytest-cov +ruff types-python-dateutil types-requests diff --git a/scripts/format b/scripts/format index baf9730..7aa3782 100755 --- a/scripts/format +++ b/scripts/format @@ -17,9 +17,7 @@ if [ "${BASH_SOURCE[0]}" = "${0}" ]; then if [ "${1:-}" = "--help" ]; then usage else - # Sort imports - pre-commit run isort --all-files # Code formatting - pre-commit run black --all-files + pre-commit run ruff-format --all-files fi fi diff --git a/scripts/lint b/scripts/lint index b2211f9..41ee170 100755 --- a/scripts/lint +++ b/scripts/lint @@ -18,7 +18,7 @@ if [ "${BASH_SOURCE[0]}" = "${0}" ]; then usage else # Lint - pre-commit run flake8 --all-files + pre-commit run ruff --all-files # Type checking pre-commit run mypy --all-files fi