Skip to content

Commit

Permalink
Merge 4631647 into bf6873f
Browse files Browse the repository at this point in the history
  • Loading branch information
arturponinski committed Feb 1, 2022
2 parents bf6873f + 4631647 commit 6d7ec3f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 22 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/test-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ jobs:
steps:
- name: Determine what scope of testing is available on ${{ matrix.os }}
if: |
matrix.python >= '3.6' && matrix.python != '3.9' && matrix.python != '3.10' &&
(matrix.os != 'windows-latest' || matrix.python == '3.8')
(matrix.python >= '3.' ) && ( matrix.os != 'windows-latest' )
run: |
echo 'testing=full' >> $GITHUB_ENV
Expand All @@ -59,7 +58,7 @@ jobs:
- name: Install test dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-tests.txt
python -m pip install --prefer-binary -r requirements-tests.txt
- name: Setup environment variables for remote filesystem testing
if: matrix.os == 'ubuntu-latest' && matrix.python == '3.8'
Expand All @@ -69,7 +68,7 @@ jobs:
echo "Setup SFTP environment variable to trigger testing in Petl"
echo 'PETL_TEST_SFTP=sftp://petl:test@localhost:2244/public/' >> $GITHUB_ENV
echo "::group::Install remote test dependencies"
python -m pip install -r requirements-remote.txt
python -m pip install --prefer-binary -r requirements-remote.txt
echo "::endgroup::"
- name: Install optinal test dependencies for mode ${{ env.testing }}
Expand Down Expand Up @@ -105,7 +104,7 @@ jobs:
docker run -it --name postgres -p 5432:5432 -e POSTGRES_DB=petl -e POSTGRES_USER=petl -e POSTGRES_PASSWORD=test -d postgres:latest
echo "::endgroup::"
echo "::group::Install database test dependencies"
python -m pip install -r requirements-database.txt
python -m pip install --prefer-binary -r requirements-database.txt
echo "::endgroup::"
- name: Setup petl package
Expand All @@ -119,10 +118,10 @@ jobs:
if: env.testing == 'full'
run: |
echo "::group::Install extra packages test dependencies"
python -m pip install -r requirements-formats.txt
python -m pip install --prefer-binary -r requirements-formats.txt
echo "::endgroup::"
echo "::group::Perform doc test execution with coverage"
pytest --cov=petl petl
echo "::group::Perform doctest-modules execution with coverage"
pytest --doctest-modules --cov=petl petl
echo "::endgroup::"
- name: Coveralls
Expand Down Expand Up @@ -154,7 +153,7 @@ jobs:

- name: Install doc generation dependencies
run: |
python -m pip install -r requirements-docs.txt
python -m pip install --prefer-binary -r requirements-docs.txt
- name: Setup petl package
run: python setup.py build
Expand Down
2 changes: 2 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
[pytest]
log_level=DEBUG
doctest_optionflags = NORMALIZE_WHITESPACE ALLOW_UNICODE
addopts = --ignore-glob=*_py2.py --ignore-glob=petl/io/db.py
4 changes: 3 additions & 1 deletion requirements-formats.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
Cython<0.29.21,>=0.29.13
numpy<=1.19.2,>=1.16.4
numpy<=1.19.2,>=1.16.4 ; python_version < '3.10'
numpy ; python_version >= '3.10'
numexpr<=2.7.1,>=2.6.9
intervaltree==3.0.2
lxml==4.6.5
openpyxl==2.6.2
pandas<=1.1.2,>=0.24.2 ; python_version < '3.9'
pandas ; python_version >= '3.9'
tables
Whoosh==2.7.4
xlrd==2.0.1
Expand Down
16 changes: 4 additions & 12 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,18 @@
# and then run "tox" from this directory.

[tox]
envlist = py27, py36, py37, py38, py39, {py36,py37,py38}-docs
# trick to enable pre-installation of numpy and numexpr
indexserver =
preinstall1 = https://pypi.org/simple
preinstall2 = https://pypi.org/simple
envlist = py27, py36, py37, py38, py39, py310, {py36,py37,py38,py39,py310}-docs

[testenv]
# get stable output for unordered types
setenv =
PYTHONHASHSEED = 42
py27: PY_MAJOR_VERSION = py2
py36,py37,py38,py39: PY_MAJOR_VERSION = py3
py36,py37,py38,py39,py310: PY_MAJOR_VERSION = py3
commands =
pytest --cov=petl petl
coverage report -m
deps =
:preinstall1: Cython<=0.29.21,>=0.29.13
:preinstall1: numpy<=1.19.2,>=1.16.4
:preinstall2: numexpr<=2.7.1,>=2.6.9
-rrequirements-tests.txt
-rrequirements-formats.txt

Expand All @@ -34,10 +27,9 @@ deps =
commands =
sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html

[testenv:{py36,py37,py38}-doctest]
[testenv:{py36,py37,py38,py39,py310}-doctest]
commands =
py36,py37,py38: nosetests -v --with-doctest --doctest-options=+NORMALIZE_WHITESPACE petl -I"csv_py2\.py" -I"db\.py"

py36,py37,py38,py39,py310: pytest --doctest-modules --cov=petl petl
[testenv:{py36,py37,py38,py39}-dochtml]
changedir = docs
deps =
Expand Down

0 comments on commit 6d7ec3f

Please sign in to comment.