This is an automated email from the ASF dual-hosted git repository.

zhoujieguang pushed a commit to branch main
in repository 
https://gitbox.apache.org/repos/asf/dolphinscheduler-sdk-python.git


The following commit(s) were added to refs/heads/main by this push:
     new bf2aac4  feat: Migrate all config into setup.cfg (#82)
bf2aac4 is described below

commit bf2aac431dafe765eb36239f3224bd133a5e2bd2
Author: Jay Chung <[email protected]>
AuthorDate: Thu Mar 23 20:01:04 2023 +0800

    feat: Migrate all config into setup.cfg (#82)
---
 .coveragerc                        |  34 ---------
 .flake8                            |  42 -----------
 .isort.cfg                         |  19 -----
 .pre-commit-config.yaml            |   5 --
 pytest.ini                         |  21 ------
 setup.cfg                          | 142 +++++++++++++++++++++++++++++++++++++
 src/pydolphinscheduler/__init__.py |   2 +-
 tox.ini                            |  86 ----------------------
 8 files changed, 143 insertions(+), 208 deletions(-)

diff --git a/.coveragerc b/.coveragerc
deleted file mode 100644
index 1620509..0000000
--- a/.coveragerc
+++ /dev/null
@@ -1,34 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-[run]
-command_line = -m pytest
-omit = 
-    # Ignore all test cases in tests/
-    tests/*
-    # Ignore examples directory
-    */pydolphinscheduler/examples/*
-    # TODO. Temporary ignore java_gateway file, because we could not find good 
way to test it.
-    */pydolphinscheduler/java_gateway.py
-
-[report]
-# Don’t report files that are 100% covered
-skip_covered = True
-show_missing = True
-precision = 2
-# Report will fail when coverage under 90.00%
-fail_under = 90
diff --git a/.flake8 b/.flake8
deleted file mode 100644
index b00efe5..0000000
--- a/.flake8
+++ /dev/null
@@ -1,42 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-[flake8]
-max-line-length = 110
-exclude =
-    .git,
-    __pycache__,
-    .pytest_cache,
-    *.egg-info,
-    docs/source/conf.py
-    old,
-    build,
-    dist,
-    htmlcov,
-    .tox,
-ignore = 
-    # It's clear and not need to add docstring
-    # D107: Don't require docstrings on __init__
-    D107,
-    # D105: Missing docstring in magic method
-    D105,
-    # Conflict to Black
-    # W503: Line breaks before binary operators
-    W503
-per-file-ignores =
-    */pydolphinscheduler/side/__init__.py:F401
-    */pydolphinscheduler/tasks/__init__.py:F401
diff --git a/.isort.cfg b/.isort.cfg
deleted file mode 100644
index 70fa2e0..0000000
--- a/.isort.cfg
+++ /dev/null
@@ -1,19 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-[settings]
-profile=black
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index a767ea5..c624332 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -41,11 +41,6 @@ repos:
           'flake8-docstrings>=1.6',
           'flake8-black>=0.2',
         ]
-        # pre-commit run in the root, so we have to point out the full path of 
configuration
-        args: [
-          --config,
-          .flake8
-        ]
   - repo: https://github.com/pycqa/autoflake
     rev: v1.4
     hooks:
diff --git a/pytest.ini b/pytest.ini
deleted file mode 100644
index b1aa850..0000000
--- a/pytest.ini
+++ /dev/null
@@ -1,21 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-[pytest]
-# add path here to skip pytest scan it
-norecursedirs =
-    tests/testing
-    # Integration test run seperated which do not calculate coverage, it will 
run in `tox -e integrate-test`
-    tests/integration
diff --git a/setup.cfg b/setup.cfg
index d195c25..ad67231 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -128,3 +128,145 @@ dev =
     apache-dolphinscheduler[style]
     # doc
     apache-dolphinscheduler[doc]
+
+# ---------------------------------------------
+# Test Settings
+# ---------------------------------------------
+[tool:pytest]
+# add path here to skip pytest scan it
+norecursedirs =
+    tests/testing
+    # Integration test run seperated which do not calculate coverage, it will 
run in `tox -e integrate-test`
+    tests/integration
+
+[coverage:run]
+command_line = -m pytest
+omit = 
+    # Ignore all test cases in tests/
+    tests/*
+    # Ignore examples directory
+    */pydolphinscheduler/examples/*
+    # TODO. Temporary ignore java_gateway file, because we could not find good 
way to test it.
+    */pydolphinscheduler/java_gateway.py
+
+[coverage:report]
+# Don’t report files that are 100% covered
+skip_covered = True
+show_missing = True
+precision = 2
+# Report will fail when coverage under 90.00%
+fail_under = 90
+
+# ---------------------------------------------
+# Code Style Settings
+# ---------------------------------------------
+[flake8]
+max-line-length = 110
+exclude =
+    .git,
+    __pycache__,
+    .pytest_cache,
+    *.egg-info,
+    docs/source/conf.py
+    old,
+    build,
+    dist,
+    htmlcov,
+    .tox,
+ignore = 
+    # It's clear and not need to add docstring
+    # D107: Don't require docstrings on __init__
+    D107,
+    # D105: Missing docstring in magic method
+    D105,
+    # Conflict to Black
+    # W503: Line breaks before binary operators
+    W503
+per-file-ignores =
+    */pydolphinscheduler/side/__init__.py:F401
+    */pydolphinscheduler/tasks/__init__.py:F401
+
+[isort]
+profile=black
+
+# ---------------------------------------------
+# TOX Settings
+# ---------------------------------------------
+[tox:tox]
+envlist =
+    local-ci
+    auto-lint
+    lint
+    doc-build
+    doc-build-multi
+    code-test
+    integrate-test
+    local-integrate-test
+    py{36,37,38,39,310,311}
+
+[testenv]
+allowlist_externals =
+    make
+    git
+    find
+
+[testenv:auto-lint]
+extras = style
+commands =
+    python -m isort .
+    python -m black .
+    python -m autoflake --in-place --remove-all-unused-imports 
--ignore-init-module-imports --recursive .
+
+[testenv:lint]
+extras = style
+commands =
+    python -m isort --check .
+    python -m black --check .
+    python -m flake8
+    python -m autoflake --remove-all-unused-imports 
--ignore-init-module-imports --check --recursive .
+    
+[testenv:code-test]
+extras = test
+# Run both tests and coverage
+commands =
+    python -m pytest --cov=pydolphinscheduler --cov-report term --cov-report 
xml:coverage.xml tests/
+
+[testenv:doc-build]
+extras = doc
+commands =
+    make -C {toxinidir}/docs clean
+    make -C {toxinidir}/docs html
+# Remove sensitive information from the generated documentation
+commands_post =
+    find {toxinidir}/docs -type f -name "environment.pickle" -exec rm -rf \{\} 
\;
+
+[testenv:doc-build-multi]
+extras = doc
+commands =
+    # Get all tags for `multiversion` subcommand
+    git fetch --tags
+    make -C {toxinidir}/docs clean
+    make -C {toxinidir}/docs multiversion
+# Remove sensitive information from the generated documentation
+commands_post =
+    find {toxinidir}/docs -type f -name "environment.pickle" -exec rm -rf \{\} 
\;
+
+[testenv:integrate-test]
+extras = test
+commands =
+    python -m pytest tests/integration/
+
+[testenv:local-integrate-test]
+extras = test
+setenv =
+    skip_launch_docker = true
+commands =
+    {[testenv:integrate-test]commands}
+
+# local-ci do not build `doc-build-multi`
+[testenv:local-ci]
+extras = dev
+commands =
+    {[testenv:lint]commands}
+    {[testenv:code-test]commands}
+    {[testenv:doc-build]commands}
diff --git a/src/pydolphinscheduler/__init__.py 
b/src/pydolphinscheduler/__init__.py
index db9ff5f..cf0fe9f 100644
--- a/src/pydolphinscheduler/__init__.py
+++ b/src/pydolphinscheduler/__init__.py
@@ -17,4 +17,4 @@
 
 """Init root of pydolphinscheduler."""
 
-__version__ = "4.0.2-dev"
+__version__ = "4.1.0-dev"
diff --git a/tox.ini b/tox.ini
deleted file mode 100644
index 3e1a7dc..0000000
--- a/tox.ini
+++ /dev/null
@@ -1,86 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-[tox]
-envlist = local-ci, auto-lint, lint, doc-build, doc-build-multi, code-test, 
integrate-test, local-integrate-test, py{36,37,38,39,310,311}
-
-[testenv]
-allowlist_externals =
-    make
-    git
-    find
-
-[testenv:auto-lint]
-extras = style
-commands =
-    python -m isort .
-    python -m black .
-    python -m autoflake --in-place --remove-all-unused-imports 
--ignore-init-module-imports --recursive .
-
-[testenv:lint]
-extras = style
-commands =
-    python -m isort --check .
-    python -m black --check .
-    python -m flake8
-    python -m autoflake --remove-all-unused-imports 
--ignore-init-module-imports --check --recursive .
-    
-[testenv:code-test]
-extras = test
-# Run both tests and coverage
-commands =
-    python -m pytest --cov=pydolphinscheduler 
--cov-config={toxinidir}/.coveragerc --cov-report term --cov-report 
xml:coverage.xml tests/
-
-[testenv:doc-build]
-extras = doc
-commands =
-    make -C {toxinidir}/docs clean
-    make -C {toxinidir}/docs html
-# Remove sensitive information from the generated documentation
-commands_post =
-    find {toxinidir}/docs -type f -name "environment.pickle" -exec rm -rf \{\} 
\;
-
-[testenv:doc-build-multi]
-extras = doc
-commands =
-    # Get all tags for `multiversion` subcommand
-    git fetch --tags
-    make -C {toxinidir}/docs clean
-    make -C {toxinidir}/docs multiversion
-# Remove sensitive information from the generated documentation
-commands_post =
-    find {toxinidir}/docs -type f -name "environment.pickle" -exec rm -rf \{\} 
\;
-
-[testenv:integrate-test]
-extras = test
-commands =
-    python -m pytest tests/integration/
-
-[testenv:local-integrate-test]
-extras = test
-setenv =
-    skip_launch_docker = true
-commands =
-    {[testenv:integrate-test]commands}
-
-# local-ci do not build `doc-build-multi`
-[testenv:local-ci]
-extras = dev
-commands =
-    {[testenv:lint]commands}
-    {[testenv:code-test]commands}
-    {[testenv:doc-build]commands}

Reply via email to