Skip to content

Commit

Permalink
Add deps
Browse files Browse the repository at this point in the history
Update Dockerfile

Update Makefile
  • Loading branch information
kaxil committed Feb 22, 2022
1 parent 34ff584 commit 52f61ee
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 4 deletions.
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ repos:
- id: mixed-line-ending
- id: trailing-whitespace

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.931
hooks:
- id: mypy
exclude: ^tests/
args:
- --config-file=setup.cfg

- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
Expand Down
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ run-tests: ## Run CI tests
docker build -f .circleci/Dockerfile . -t astronomer-operators-ci
docker run --rm -it astronomer-operators-ci pytest tests

run-static-checks: ## Run CI static code checks
docker build -f .circleci/Dockerfile . -t astronomer-operators-ci
docker run --rm -it astronomer-operators-ci pre-commit run --all-files
run-mypy: ## Run CI static code checks
docker build -f dev/Dockerfile . -t astronomer-operators-dev
docker run -t --rm astronomer-operators-dev\
/bin/bash -c "mypy --install-types --config-file astronomer_operators/setup.cfg ./astronomer_operators" \
-v ../../astronomer-operators:/usr/local/airflow/astronomer_operators

help: ## Prints this message
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
2 changes: 1 addition & 1 deletion dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ COPY astronomer/ ${AIRFLOW_HOME}/astronomer_providers/astronomer/
COPY setup.cfg ${AIRFLOW_HOME}/astronomer_providers/setup.cfg
COPY pyproject.toml ${AIRFLOW_HOME}/astronomer_providers/pyproject.toml

RUN pip install -e ${AIRFLOW_HOME}/astronomer_providers
RUN pip install -e ${AIRFLOW_HOME}/astronomer_providers[tests]
USER astro
24 changes: 24 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,27 @@ tests =
pre-commit
pytest
pytest-asyncio
types-aiofiles
types-boto
types-certifi
types-croniter
types-Deprecated
types-docutils
types-freezegun
types-paramiko
types-protobuf
types-python-dateutil
types-python-slugify
types-pytz
types-redis
types-requests
types-setuptools
types-termcolor
types-tabulate
types-toml
types-Markdown
types-PyMySQL
types-PyYAML

[options.packages.find]
include =
Expand Down Expand Up @@ -90,6 +111,9 @@ no_implicit_optional = True
warn_redundant_casts = True
pretty = True
show_error_codes = True
strict = True
show_error_context = True
color_output = True

[mypy-airflow.*]
ignore_missing_imports = True
Expand Down

0 comments on commit 52f61ee

Please sign in to comment.