fix(ingest): setup pyproject.toml (#2446)

This commit is contained in:
Harshal Sheth 2021-04-23 23:50:28 -07:00 committed by GitHub
parent a857d3b9d8
commit c64196e8cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 9 deletions

View File

@ -0,0 +1,18 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools", "wheel", "pip"]
[tool.black]
extend-exclude = '''
# A regex preceded with ^/ will apply only to files and directories
# in the root of the project.
^/tmp
'''
include = '\.pyi?$'
target-version = ['py36', 'py37', 'py38']
[tool.isort]
indent = ' '
profile = 'black'
sections = 'FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER'
skip_glob = 'src/datahub/metadata'

View File

@ -1,8 +1,8 @@
[flake8]
# We ignore the line length issues here, since black will take care of them.
max-line-length = 150
max-complexity = 15
ignore =
# Ignore: line length issues, since black's formatter will take care of them.
E501,
# Ignore: 1 blank line required before class docstring.
D203,
# See https://stackoverflow.com/a/57074416.
@ -29,12 +29,6 @@ disallow_untyped_decorators = yes
# eventually we'd like to enable these
disallow_untyped_defs = no
[isort]
profile = black
indent=' '
sections = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
skip_glob=src/datahub/metadata
[tool:pytest]
addopts = --cov src --cov-report term --cov-config setup.cfg --strict-markers
markers =

View File

@ -43,7 +43,7 @@ basicAuditStamp = models.AuditStampClass(
),
"datasets",
json.loads(
'{"snapshot": {"urn": "urn:li:dataset:(urn:li:dataPlatform:bigquery,downstream,PROD)", "aspects": [{"com.linkedin.dataset.UpstreamLineage": {"upstreams": [{"auditStamp": {"time": 1618987484580, "actor": "urn:li:corpuser:datahub"}, "dataset": "urn:li:dataset:(urn:li:dataPlatform:bigquery,upstream1,PROD)", "type": "TRANSFORMED"}, {"auditStamp": {"time": 1618987484580, "actor": "urn:li:corpuser:datahub"}, "dataset": "urn:li:dataset:(urn:li:dataPlatform:bigquery,upstream2,PROD)", "type": "TRANSFORMED"}]}}]}}' # noqa: E501
'{"snapshot": {"urn": "urn:li:dataset:(urn:li:dataPlatform:bigquery,downstream,PROD)", "aspects": [{"com.linkedin.dataset.UpstreamLineage": {"upstreams": [{"auditStamp": {"time": 1618987484580, "actor": "urn:li:corpuser:datahub"}, "dataset": "urn:li:dataset:(urn:li:dataPlatform:bigquery,upstream1,PROD)", "type": "TRANSFORMED"}, {"auditStamp": {"time": 1618987484580, "actor": "urn:li:corpuser:datahub"}, "dataset": "urn:li:dataset:(urn:li:dataPlatform:bigquery,upstream2,PROD)", "type": "TRANSFORMED"}]}}]}}'
),
),
(