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

Airflow2 #48

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
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
18 changes: 0 additions & 18 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -1,30 +1,20 @@
[BASIC]
argument-name-hint = [a-z_][a-z0-9_]{2,30}$
argument-rgx = [a-z_][a-z0-9_]{2,30}$
attr-name-hint = [a-z_][a-z0-9_]{2,30}$
attr-rgx = [a-z_][a-z0-9_]{2,30}$
bad-names = foo,bar,baz,toto,tutu,tata
class-attribute-name-hint = ([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
class-attribute-rgx = ([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
class-name-hint = [A-Z_][a-zA-Z0-9]+$
class-rgx = [A-Z_][a-zA-Z0-9]+$
const-name-hint = (([A-Z_][A-Z0-9_]*)|(__.*__))$
const-rgx = (([A-Z_][A-Z0-9_]*)|(__.*__))$
docstring-min-length = -1
function-name-hint = [a-z_][a-z0-9_]{2,30}$
function-rgx = [a-z_][a-z0-9_]{2,30}$
good-names = i,j,k,_,it
include-naming-hint = no
inlinevar-name-hint = [A-Za-z_][A-Za-z0-9_]*$
inlinevar-rgx = [A-Za-z_][A-Za-z0-9_]*$
method-name-hint = [a-z_][a-z0-9_]{2,30}$
method-rgx = [a-z_][a-z0-9_]{2,30}$
module-name-hint = (([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
module-rgx = (([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
name-group =
no-docstring-rgx = ^_
property-classes = abc.abstractproperty
variable-name-hint = [a-z_][a-z0-9_]{2,30}$
variable-rgx = [a-z_][a-z0-9_]{2,30}$

[CLASSES]
Expand All @@ -49,17 +39,13 @@ min-public-methods = 2
[ELIF]
max-nested-blocks = 5

[EXCEPTIONS]
overgeneral-exceptions = Exception

[FORMAT]
expected-line-ending-format =
ignore-long-lines = ^\s*(# )?<?https?://\S+>?$
indent-after-paren = 4
indent-string = ' '
max-line-length = 88
max-module-lines = 1000
no-space-check = trailing-comma,dict-separator
single-line-if-stmt = no

[IMPORTS]
Expand All @@ -80,21 +66,17 @@ ignore = CVS
ignore-patterns =
jobs = 1
load-plugins =
optimize-ast = no
persistent = yes
unsafe-load-any-extension = no

[MESSAGES CONTROL]
confidence =
disable = I,
bad-continuation,

[MISCELLANEOUS]
notes = FIXME,XXX,TODO

[REPORTS]
evaluation = 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
files-output = no
output-format = text
reports = yes

Expand Down
38 changes: 0 additions & 38 deletions .travis.yml

This file was deleted.

44 changes: 12 additions & 32 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# PN - Project Name
PN := airflow_declarative
# PN - Project Version
PV := `python setup.py -q --version`
# PV - Project Version
PV := `poetry version -s`

PYTHON_VENV := python3
PYTHON := python
PYTHON := python3
SHELL := /bin/sh

LINT_TARGET := setup.py src/ tests/
LINT_TARGET := src/ tests/

SPHINXOPTS ?= -n -W

Expand All @@ -18,14 +17,13 @@ all: help
.PHONY: check
# target: check - Run all checks: linters and tests (with coverage)
check: lint test check-docs
@${PYTHON} setup.py check


.PHONY: check-docs
# target: check-docs - Run Sphinx but don't actually generate the docs
check-docs:
@# Doesn't generate any output but prints out errors and warnings.
@sphinx-build -M dummy src/docs build/docs $(SPHINXOPTS)
@. ./airflow_env.sh && sphinx-build -M dummy src/docs build/docs $(SPHINXOPTS)


.PHONY: clean
Expand All @@ -42,31 +40,19 @@ clean:
.PHONY: develop
# target: develop - Install package in editable mode with `develop` extras
develop:
@${PYTHON} -m pip install --upgrade pip setuptools wheel
@${PYTHON} -m pip install --upgrade 'apache-airflow<1.11,>=1.10'
@${PYTHON} -m pip install -e '.[develop]'
@poetry install --sync


.PHONY: dist
# target: dist - Build all artifacts
dist: dist-sdist dist-wheel
dist:
@poetry build


.PHONY: dist-sdist
# target: dist-sdist - Build sdist artifact
dist-sdist:
@${PYTHON} setup.py sdist


.PHONY: dist-wheel
# target: dist-wheel - Build wheel artifact
dist-wheel:
@${PYTHON} setup.py bdist_wheel

.PHONY: docs
# target: docs - Build Sphinx docs
docs:
@sphinx-build -M html src/docs build/docs $(SPHINXOPTS)
@. ./airflow_env.sh && sphinx-build -M html src/docs build/docs $(SPHINXOPTS)

.PHONY: format
# target: format - Format the code according to the coding styles
Expand All @@ -80,7 +66,7 @@ format-black:

.PHONY: format-isort
format-isort:
@isort -rc ${LINT_TARGET}
@isort ${LINT_TARGET}


.PHONY: help
Expand Down Expand Up @@ -115,7 +101,7 @@ lint-flake8:

.PHONY: lint-isort
lint-isort:
@${PYTHON} -m isort.main -df -c -rc ${LINT_TARGET}
@${PYTHON} -m isort -c ${LINT_TARGET}


.PHONY: lint-pylint
Expand All @@ -138,16 +124,10 @@ report-pylint:
.PHONY: test
# target: test - Run tests with coverage
test:
@${PYTHON} -m coverage run -m py.test
@. ./airflow_env.sh && ${PYTHON} -m coverage run -m pytest
@${PYTHON} -m coverage report


# `venv` target is intentionally not PHONY.
# target: venv - Creates virtual environment
venv:
@${PYTHON_VENV} -m venv venv


.PHONY: version
# target: version - Generate and print project version in PEP-440 format
version: VERSION
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ Airflow declarative DAGs via YAML.

Compatibility:

- Python 2.7 / 3.5+
- Airflow 1.10.4+
- Python 3.9+
- Airflow 2+

Key Features
============
Expand Down
4 changes: 4 additions & 0 deletions airflow_env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# configuration for airflow
export AIRFLOW__DATABASE__SQL_ALCHEMY_CONN=sqlite://
export AIRFLOW__CORE__EXECUTOR=SequentialExecutor
export AIRFLOW__CORE__DEFAULT_TIMEZONE=utc
123 changes: 0 additions & 123 deletions patches/1.10.10.patch

This file was deleted.

Loading