Skip to content

Commit

Permalink
Fix py.typed (#9)
Browse files Browse the repository at this point in the history
* Move py.typed into package folder

* bump version

* reenable PYTHON_MYPY

* lint all files

To match MYPY
  • Loading branch information
drernie authored Aug 24, 2024
1 parent e99a593 commit 5c8f684
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on: # yamllint disable-line rule:truthy
permissions: read-all
env: # Comment env block if you do not want to apply fixes
APPLY_FIXES: all # When active, APPLY_FIXES must also be defined as environment variable (in github/workflows/mega-linter.yml or other CI tool)
DISABLE_LINTERS: SPELL_CSPELL,COPYPASTE_JSCPD,MAKEFILE_CHECKMAKE,PYTHON_BANDIT,PYTHON_MYPY,PYTHON_PYRIGHT,PYTHON_PYLINT,REPOSITORY_GRYPE,REPOSITORY_SECRETLINT,REPOSITORY_TRIVY,REPOSITORY_TRUFFLEHOG,REPOSITORY_CHECKOV
DISABLE_LINTERS: SPELL_CSPELL,COPYPASTE_JSCPD,MAKEFILE_CHECKMAKE,PYTHON_BANDIT,PYTHON_PYRIGHT,PYTHON_PYLINT,REPOSITORY_GRYPE,REPOSITORY_SECRETLINT,REPOSITORY_TRIVY,REPOSITORY_TRUFFLEHOG,REPOSITORY_CHECKOV
MARKDOWN_MARKDOWNLINT_FILTER_REGEX_EXCLUDE: "tests/example.*ME\\.md" # Exclude example markdown files from markdownlint
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG.md

## [0.1.6] - 2024-08-24

- Move py.typed into package folder

## [0.1.5] - 2024-08-24

- Add py.typed file to support type checking
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ watch:

# Lint code using flake8
lint:
poetry run black $(PROJ)
poetry run black .
poetry run flake8
poetry run mypy $(PROJ)
poetry run mypy .

# Clean up generated files
clean:
Expand Down
File renamed without changes.
9 changes: 6 additions & 3 deletions example/sample_data_source.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Dict, List, Mapping
from typing import Any, Dict, List, Mapping, Iterable

import pyarrow as pa
from athena_federation.athena_data_source import AthenaDataSource
Expand All @@ -12,11 +12,14 @@ class SampleDataSource(AthenaDataSource):
"""

@staticmethod
def TransposeData(columns: List[str], data: List[List[Any]]) -> Dict[str, List[Any]]:
def TransposeData(
columns: List[str], data: List[List[Any]]
) -> Dict[str, List[Any]]:
"""
Transpose the data so that it is a dictionary of columns.
"""
return dict(zip(columns, list(zip(*data))))
zipped: Iterable[list[Any]] = zip(*data) # type: ignore
return dict(zip(columns, list(zipped)))

def __init__(self):
super().__init__()
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "athena-federation"
version = "0.1.5"
version = "0.1.6"
description = "Unofficial Python SDK for Athena Federation"
authors = ["Damon P. Cortesi <[email protected]>", "Ernest Prabhakar <[email protected]>"]
license = "APACHE"
Expand Down
11 changes: 0 additions & 11 deletions tests/test_import.py

This file was deleted.

0 comments on commit 5c8f684

Please sign in to comment.