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

Support Python 3.10 #54

Merged
merged 6 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.11", "3.12"]
python: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
- name: Set up PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: "3.11"
python-version: ${{ matrix.python }}
druzhinin-kirill marked this conversation as resolved.
Show resolved Hide resolved
- name: Install dependencies
run: |
pdm sync -d
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: "3.10"
python-version: "3.11"
- name: Publish package distributions to PyPI
run: |
pdm publish
Expand Down
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ documentation website.

You'll need the following:

- Any Python version starting from 3.11
- Any Python version starting from 3.10
- [pre-commit](https://pre-commit.com/) (recommended)
- [PDM](https://pdm-project.org/2.12/)

Expand Down
2 changes: 1 addition & 1 deletion docs/get_started.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Get started

`dbt-score` is a Python library that is easy to install and use. The minimum
required version of Python is `3.11`.
required version of Python is `3.10`.

## Installation

Expand Down
1,353 changes: 666 additions & 687 deletions pdm.lock

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Intended Audience :: Developers",
Expand All @@ -24,8 +25,9 @@ classifiers = [
dependencies = [
"dbt-core>=1.5",
"click>=7.1.1, <9.0.0",
"tomli>=1.1.0; python_version<'3.11'",
]
requires-python = ">=3.11"
requires-python = ">=3.10"
readme = "README.md"
license = {text = "MIT"}

Expand Down
7 changes: 6 additions & 1 deletion src/dbt_score/config.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
"""This module is responsible for loading configuration."""

import logging
import tomllib
import sys
from dataclasses import dataclass, field, replace
from pathlib import Path
from typing import Any, Final

from dbt_score.rule import RuleConfig

if sys.version_info >= (3, 11):
import tomllib
else:
import tomli as tomllib
druzhinin-kirill marked this conversation as resolved.
Show resolved Hide resolved

logger = logging.getLogger(__name__)

DEFAULT_CONFIG_FILE = "pyproject.toml"
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
env_list = py{310,311},lint,docs
env_list = py{310,311,312},lint,docs

skip_missing_interpreters = true

Expand Down