Skip to content

Commit

Permalink
Merge pull request #17 from transport-data/ci/setup-python-macos
Browse files Browse the repository at this point in the history
Adjust CI for Python 3.8, 3.9 on macOS
  • Loading branch information
khaeru authored Apr 25, 2024
2 parents b504d1a + 506d36a commit d52312e
Show file tree
Hide file tree
Showing 16 changed files with 26 additions and 8 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ jobs:
- "3.11"
- "3.12"

# Work around https://github.com/actions/setup-python/issues/696
exclude:
- {os: macos-latest, python-version: "3.8"}
- {os: macos-latest, python-version: "3.9"}
include:
- {os: macos-13, python-version: "3.8"}
- {os: macos-13, python-version: "3.9"}

fail-fast: false

runs-on: ${{ matrix.os }}
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
rev: v1.9.0
hooks:
- id: mypy
additional_dependencies:
Expand All @@ -13,7 +13,7 @@ repos:
- types-requests
args: []
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.0
rev: v0.4.1
hooks:
- id: ruff
- id: ruff-format
Expand Down
6 changes: 2 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,9 @@ addopts = """
markers = ["network: tests that perform network requests"]
usefixtures = "tmp_store"

[tool.ruff]
[tool.ruff.lint]
select = ["C9", "E", "F", "I", "W"]
ignore = ["E501", "W191"]

[tool.ruff.mccabe]
max-complexity = 10
mccabe.max-complexity = 10

[tool.setuptools_scm]
1 change: 1 addition & 0 deletions transport_data/adb/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Asian Development Bank (ADB) provider."""

from itertools import chain
from typing import Callable, Tuple
from urllib.parse import quote
Expand Down
1 change: 1 addition & 0 deletions transport_data/cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Command-line interface."""

from importlib import import_module

import click
Expand Down
1 change: 1 addition & 0 deletions transport_data/estat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
In this case, TDC tools can retrieve the structure information and data directly, and no
provider-specific conversion code is needed.
"""

import click
import sdmx

Expand Down
1 change: 1 addition & 0 deletions transport_data/iamc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.. todo:: Add a function to generate distinct DSDs for each data flow in a data set.
.. todo:: Add function(s) to reshape IAMC-like data.
"""

import logging
from typing import Optional

Expand Down
1 change: 1 addition & 0 deletions transport_data/iamc/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
$ tdc iamc --help
"""

from pathlib import Path

import click
Expand Down
1 change: 1 addition & 0 deletions transport_data/jrc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- Convert to SDMX.
"""

import re
from collections import defaultdict
from functools import partial
Expand Down
1 change: 1 addition & 0 deletions transport_data/oica/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
currently only the most recent formats are supported.
- Convert to SDMX following TDCI conventions.
"""

import json
import logging
import re
Expand Down
1 change: 1 addition & 0 deletions transport_data/org/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Information about the TDCI *per se*."""

from datetime import date
from importlib import import_module
from typing import TYPE_CHECKING, Union
Expand Down
1 change: 1 addition & 0 deletions transport_data/org/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
$ tdc org --help
"""

import click

from transport_data import STORE
Expand Down
1 change: 1 addition & 0 deletions transport_data/proto/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
$ tdc proto --help
"""

import click


Expand Down
4 changes: 2 additions & 2 deletions transport_data/store.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Local data storage."""

import logging
import re
import subprocess
Expand Down Expand Up @@ -59,8 +60,7 @@ class BaseStore(ABC):
path: Path

@abstractmethod
def __init__(self, config: "transport_data.config.Config") -> None:
...
def __init__(self, config: "transport_data.config.Config") -> None: ...

def get(self, urn: str) -> object:
"""Retrieve an object given its full or partial `urn`."""
Expand Down
1 change: 1 addition & 0 deletions transport_data/util/pooch.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utilities for :mod:`pooch`."""

from typing import Callable, Optional

import pooch
Expand Down
1 change: 1 addition & 0 deletions transport_data/util/sdmx.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utilities for :mod:`sdmx`."""

from datetime import datetime
from importlib.metadata import version
from typing import TYPE_CHECKING
Expand Down

0 comments on commit d52312e

Please sign in to comment.