remove .codecov.yml and MANIFEST.in, move .coveragerc to pyproject.toml (#8500)

* remove .codecov.yml and MANIFEST.in, move .coveragerc to pyproject.toml

* remove scripts/pypi_upload.sh
This commit is contained in:
skshetry
2022-11-01 10:11:55 +05:45
committed by GitHub
parent c0054fa57e
commit 4b720e5820
8 changed files with 34 additions and 60 deletions
-10
View File
@@ -1,10 +0,0 @@
comment: false
coverage:
status:
project:
default:
target: 90
threshold: 10%
patch:
default:
threshold: 25%
-16
View File
@@ -1,16 +0,0 @@
[run]
branch = True
source = dvc
omit =
*__main__.py
[report]
exclude_lines =
if __name__ == .__main__.:
if typing.TYPE_CHECKING:
if TYPE_CHECKING:
pass
raise NotImplementedError
# pragma: no cover
# pragma: no cover
\.\.\.$
+5 -3
View File
@@ -50,7 +50,7 @@ jobs:
- name: Install deps - name: Install deps
run: | run: |
pip install -U wheel pip setuptools pip install --upgrade pip wheel setuptools
pip install .[all] pip install .[all]
pip install -r scripts/build-requirements.txt pip install -r scripts/build-requirements.txt
@@ -84,11 +84,13 @@ jobs:
python-version: 3.8 python-version: 3.8
- name: Install - name: Install
run: pip install -U wheel pip build setuptools_scm run: pip install --upgrade pip wheel
- name: Force version for Test PyPI uploads - name: Force version for Test PyPI uploads
if: ${{ !startsWith(github.ref, 'refs/tags') }} if: ${{ !startsWith(github.ref, 'refs/tags') }}
run: echo version=$(python -m setuptools_scm | awk -F+ '{print $1}' | tail -1) >> $GITHUB_ENV run: |
pip install setuptools_scm
echo version=$(python -m setuptools_scm | awk -F+ '{print $1}' | tail -1) >> $GITHUB_ENV
- name: Build packages - name: Build packages
run: ./scripts/build_package.sh run: ./scripts/build_package.sh
+4 -10
View File
@@ -36,11 +36,8 @@ jobs:
cache-dependency-path: pyproject.toml cache-dependency-path: pyproject.toml
- name: Install requirements - name: Install requirements
run: | run: |
pip install --upgrade pip setuptools wheel pip install --upgrade pip wheel
pip install collective.checkdocs==0.2
pip install ".[dev]" pip install ".[dev]"
- name: Check README
run: python setup.py checkdocs
- uses: pre-commit/[email protected] - uses: pre-commit/[email protected]
tests: tests:
timeout-minutes: 45 timeout-minutes: 45
@@ -67,13 +64,12 @@ jobs:
cache: pip cache: pip
cache-dependency-path: pyproject.toml cache-dependency-path: pyproject.toml
- name: install - name: install
if: steps.cache.pip-cache-dir.cache-hit != 'true'
run: | run: |
pip install --upgrade pip setuptools wheel pip install --upgrade pip wheel
pip install -e ".[dev]" pip install -e ".[dev]"
- name: run tests - name: run tests
timeout-minutes: 20 timeout-minutes: 20
run: pytest -nauto -ra --durations 100 --cov=dvc --cov-report=xml --cov-report=term -k "${{ matrix.pytest-filter }}" run: pytest -nauto --durations 100 --cov --cov-report=xml --cov-report=term -k "${{ matrix.pytest-filter }}"
- name: upload coverage report - name: upload coverage report
uses: codecov/codecov-action@v3 uses: codecov/codecov-action@v3
with: with:
@@ -81,9 +77,7 @@ jobs:
fail_ci_if_error: false fail_ci_if_error: false
notify: notify:
if: github.ref == 'refs/heads/main' && failure() if: github.ref == 'refs/heads/main' && failure()
needs: needs: [lint, tests]
- lint
- tests
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Slack Notification - name: Slack Notification
-3
View File
@@ -1,3 +0,0 @@
include LICENSE
recursive-include requirements *.txt
recursive-include dvc/repo/plots/templates *.json
+23 -3
View File
@@ -132,8 +132,8 @@ dvc = "dvc.api:DVCFileSystem"
[tool.setuptools] [tool.setuptools]
license-files = ["LICENSE"] license-files = ["LICENSE"]
[tool.setuptools.packages.find] [tool.setuptools.packages]
exclude = ["tests", "tests.*"] find = {namespaces = false, exclude=["tests", "tests.*"]}
[tool.setuptools_scm] [tool.setuptools_scm]
write_to = "dvc/_dvc_version.py" write_to = "dvc/_dvc_version.py"
@@ -163,13 +163,33 @@ line_length = 79
[tool.pytest.ini_options] [tool.pytest.ini_options]
log_level = "debug" log_level = "debug"
addopts = "-ra -p no:hydra_pytest" addopts = "-ra -p no:hydra_pytest --cov-config pyproject.toml"
markers = [ markers = [
"needs_internet: Might need network access for the tests", "needs_internet: Might need network access for the tests",
"vscode: Tests verifying contract between DVC and VSCode plugin", "vscode: Tests verifying contract between DVC and VSCode plugin",
"studio: Tests verifying contract between DVC and Studio", "studio: Tests verifying contract between DVC and Studio",
] ]
xfail_strict = true xfail_strict = true
testpaths = ["tests"]
[tool.coverage.run]
branch = true
source = ["dvc", "tests"]
[tool.coverage.paths]
source = ["dvc"]
[tool.coverage.report]
show_missing = true
exclude_lines = [
"pragma: no cover",
"if __name__ == .__main__.:",
"if typing.TYPE_CHECKING:",
"if TYPE_CHECKING:",
"raise NotImplementedError",
"raise AssertionError",
"@overload",
]
[tool.mypy] [tool.mypy]
# Error output # Error output
+2 -1
View File
@@ -10,5 +10,6 @@ fi
echo 'PKG = "pip"' >dvc/utils/build.py echo 'PKG = "pip"' >dvc/utils/build.py
python -m pip install -U build setuptools>=61 python -m pip install build twine
python -m build python -m build
twine check dist/*
-14
View File
@@ -1,14 +0,0 @@
#!/bin/bash
set -e
if [ ! -d "dvc" ]; then
echo "Please run this script from repository root"
exit 1
fi
rm -rf dist/
pip install twine
python -m pip install -U build setuptools>=58.2
python -m build --sdist --wheel --outdir dist/
twine upload dist/*