Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] Update pre commit hooks, copyright dates for 2025, Doc-QA checks, mypy version pin #1699

Merged
merged 7 commits into from
Jan 15, 2025
Merged
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
105 changes: 0 additions & 105 deletions .doctor-rst.yaml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/doc-preview.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This Workflow exists solely to push a link into
# PR descriptions to a preview build of the docs
# from the PRs source branch.
#
# It requires extra permissions, to write to the PR.
#
# It uses the unusual `pull_request_target` trigger, which
# only gives it access to the target of the PR, not the source.
# But this is a-okay because it doesn't even look at the source
# code, it just updates the PR description with a link.
name: Post RTD Preview Link to PRs
on:
pull_request_target:
types:
- opened

permissions:
pull-requests: write

jobs:
documentation-preview:
runs-on: ubuntu-latest
steps:
- uses: readthedocs/actions/preview@v1
with:
project-slug: "datacube-core"
20 changes: 6 additions & 14 deletions .github/workflows/doc-qa.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
name: Doc QA
on:
# Triggers the workflow on pull request events for the main branch
pull_request_target:
types:
- opened

permissions:
pull-requests: write
pull_request:
paths:
- '**'

jobs:
pyspell:
Expand Down Expand Up @@ -41,13 +38,8 @@ jobs:
key: ${{ runner.os }}-doctor-rst-${{ steps.extract_base_branch.outputs.branch }}

- name: "Run DOCtor-RST"
uses: docker://oskarstark/doctor-rst:1.23.0
uses: docker://oskarstark/doctor-rst:1.64.0
with:
args: --short --error-format=github --cache-file=/github/workspace/.cache/doctor-rst.cache

documentation-preview:
runs-on: ubuntu-latest
steps:
- uses: readthedocs/actions/preview@v1
with:
project-slug: "datacube-core"
env:
DOCS_DIR: 'docs/'
2 changes: 2 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- '**'

push:
branches:
- develop
paths:
- '**'
- '!.github/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- '**'

push:
branches:
- develop
paths:
- '**'
- '!docs/**'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test-conda-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
- '**'

push:
branches:
- develop
paths:
- '**'

Expand Down
12 changes: 8 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ repos:
hooks:
- id: yamllint
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
rev: v5.0.0
hooks:
- id: flake8
- id: end-of-file-fixer
- id: check-docstring-first
- id: check-json
Expand All @@ -18,10 +17,15 @@ repos:
exclude: ^tests/drivers/fail_drivers
- id: check-added-large-files
- id: check-merge-conflict
- repo: https://github.com/pre-commit/mirrors-pylint
rev: v3.0.0a5 # Use the sha / tag you want to point at
- repo: https://github.com/pylint-dev/pylint
rev: v3.3.3 # Use the sha / tag you want to point at
hooks:
- id: pylint
language_version: '3.12' # Reqd of 2025-01-15
- repo: https://github.com/pycqa/flake8
rev: '7.1.1'
hooks:
- id: flake8
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Run unit tests with:

``./check-code.sh integration_tests``

- Assumes the sexistence of two password-less Postgres databases running on localhost called
- Assumes the existence of two password-less Postgres databases running on localhost called
``pgintegration`` and ``pgisintegration``.

- Otherwise copy ``integration_tests/integration.conf`` to
Expand Down
2 changes: 1 addition & 1 deletion datacube/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of the Open Data Cube, see https://opendatacube.org for more information
#
# Copyright (c) 2015-2024 ODC Contributors
# Copyright (c) 2015-2025 ODC Contributors
# SPDX-License-Identifier: Apache-2.0
"""
Datacube
Expand Down
2 changes: 1 addition & 1 deletion datacube/api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of the Open Data Cube, see https://opendatacube.org for more information
#
# Copyright (c) 2015-2024 ODC Contributors
# Copyright (c) 2015-2025 ODC Contributors
# SPDX-License-Identifier: Apache-2.0
"""
Modules for the Storage and Access Query API
Expand Down
2 changes: 1 addition & 1 deletion datacube/api/core.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of the Open Data Cube, see https://opendatacube.org for more information
#
# Copyright (c) 2015-2024 ODC Contributors
# Copyright (c) 2015-2025 ODC Contributors
# SPDX-License-Identifier: Apache-2.0
import logging
import uuid
Expand Down
2 changes: 1 addition & 1 deletion datacube/api/query.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of the Open Data Cube, see https://opendatacube.org for more information
#
# Copyright (c) 2015-2024 ODC Contributors
# Copyright (c) 2015-2025 ODC Contributors
# SPDX-License-Identifier: Apache-2.0
"""
Storage Query and Access API module
Expand Down
2 changes: 1 addition & 1 deletion datacube/cfg/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of the Open Data Cube, see https://opendatacube.org for more information
#
# Copyright (c) 2015-2024 ODC Contributors
# Copyright (c) 2015-2025 ODC Contributors
# SPDX-License-Identifier: Apache-2.0


Expand Down
2 changes: 1 addition & 1 deletion datacube/cfg/api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of the Open Data Cube, see https://opendatacube.org for more information
#
# Copyright (c) 2015-2024 ODC Contributors
# Copyright (c) 2015-2025 ODC Contributors
# SPDX-License-Identifier: Apache-2.0

"""
Expand Down
2 changes: 1 addition & 1 deletion datacube/cfg/cfg.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of the Open Data Cube, see https://opendatacube.org for more information
#
# Copyright (c) 2015-2024 ODC Contributors
# Copyright (c) 2015-2025 ODC Contributors
# SPDX-License-Identifier: Apache-2.0
"""
Low level config path resolution, loading and multi-format parsing functions.
Expand Down
2 changes: 1 addition & 1 deletion datacube/cfg/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of the Open Data Cube, see https://opendatacube.org for more information
#
# Copyright (c) 2015-2024 ODC Contributors
# Copyright (c) 2015-2025 ODC Contributors
# SPDX-License-Identifier: Apache-2.0
"""
Config reading/loading exceptions
Expand Down
2 changes: 1 addition & 1 deletion datacube/cfg/opt.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of the Open Data Cube, see https://opendatacube.org for more information
#
# Copyright (c) 2015-2024 ODC Contributors
# Copyright (c) 2015-2025 ODC Contributors
# SPDX-License-Identifier: Apache-2.0

import os
Expand Down
2 changes: 1 addition & 1 deletion datacube/cfg/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of the Open Data Cube, see https://opendatacube.org for more information
#
# Copyright (c) 2015-2024 ODC Contributors
# Copyright (c) 2015-2025 ODC Contributors
# SPDX-License-Identifier: Apache-2.0

import re
Expand Down
2 changes: 1 addition & 1 deletion datacube/config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of the Open Data Cube, see https://opendatacube.org for more information
#
# Copyright (c) 2015-2024 ODC Contributors
# Copyright (c) 2015-2025 ODC Contributors
# SPDX-License-Identifier: Apache-2.0
"""
User configuration.
Expand Down
2 changes: 1 addition & 1 deletion datacube/drivers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of the Open Data Cube, see https://opendatacube.org for more information
#
# Copyright (c) 2015-2024 ODC Contributors
# Copyright (c) 2015-2025 ODC Contributors
# SPDX-License-Identifier: Apache-2.0
"""
This module implements a simple plugin manager for storage and index drivers.
Expand Down
2 changes: 1 addition & 1 deletion datacube/drivers/_tools.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of the Open Data Cube, see https://opendatacube.org for more information
#
# Copyright (c) 2015-2024 ODC Contributors
# Copyright (c) 2015-2025 ODC Contributors
# SPDX-License-Identifier: Apache-2.0
from threading import Lock
from typing import Any
Expand Down
2 changes: 1 addition & 1 deletion datacube/drivers/_types.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of the Open Data Cube, see https://opendatacube.org for more information
#
# Copyright (c) 2015-2024 ODC Contributors
# Copyright (c) 2015-2025 ODC Contributors
# SPDX-License-Identifier: Apache-2.0
""" Defines abstract types for IO drivers.
"""
Expand Down
2 changes: 1 addition & 1 deletion datacube/drivers/datasource.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of the Open Data Cube, see https://opendatacube.org for more information
#
# Copyright (c) 2015-2024 ODC Contributors
# Copyright (c) 2015-2025 ODC Contributors
# SPDX-License-Identifier: Apache-2.0
""" Defines abstract types for IO reader drivers.
"""
Expand Down
2 changes: 1 addition & 1 deletion datacube/drivers/driver_cache.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of the Open Data Cube, see https://opendatacube.org for more information
#
# Copyright (c) 2015-2024 ODC Contributors
# Copyright (c) 2015-2025 ODC Contributors
# SPDX-License-Identifier: Apache-2.0
import logging
from typing import Dict, Any, Tuple, Iterable
Expand Down
2 changes: 1 addition & 1 deletion datacube/drivers/indexes.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of the Open Data Cube, see https://opendatacube.org for more information
#
# Copyright (c) 2015-2024 ODC Contributors
# Copyright (c) 2015-2025 ODC Contributors
# SPDX-License-Identifier: Apache-2.0
from typing import List, Optional

Expand Down
2 changes: 1 addition & 1 deletion datacube/drivers/netcdf/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of the Open Data Cube, see https://opendatacube.org for more information
#
# Copyright (c) 2015-2024 ODC Contributors
# Copyright (c) 2015-2025 ODC Contributors
# SPDX-License-Identifier: Apache-2.0
from ._write import write_dataset_to_netcdf, create_netcdf_storage_unit
from . import writer as netcdf_writer
Expand Down
2 changes: 1 addition & 1 deletion datacube/drivers/netcdf/_write.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of the Open Data Cube, see https://opendatacube.org for more information
#
# Copyright (c) 2015-2024 ODC Contributors
# Copyright (c) 2015-2025 ODC Contributors
# SPDX-License-Identifier: Apache-2.0
from pathlib import Path
import logging
Expand Down
2 changes: 1 addition & 1 deletion datacube/drivers/netcdf/driver.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of the Open Data Cube, see https://opendatacube.org for more information
#
# Copyright (c) 2015-2024 ODC Contributors
# Copyright (c) 2015-2025 ODC Contributors
# SPDX-License-Identifier: Apache-2.0
from urllib.parse import urlsplit

Expand Down
2 changes: 1 addition & 1 deletion datacube/drivers/netcdf/writer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of the Open Data Cube, see https://opendatacube.org for more information
#
# Copyright (c) 2015-2024 ODC Contributors
# Copyright (c) 2015-2025 ODC Contributors
# SPDX-License-Identifier: Apache-2.0
"""
Create netCDF4 Storage Units and write data to them
Expand Down
Loading
Loading