Skip to content

Commit

Permalink
drop 3.6, add 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
pauliacomi committed Nov 8, 2021
1 parent 0b5bb1a commit d661cbc
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 37 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,20 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version : [3.6, 3.7, 3.8, 3.9]
python-version : [3.7, 3.8, 3.9, 3.10]
include:
- python-version: 3.6
toxenv: "py36-cover,report,codecov"
- python-version: 3.7
toxenv: "py37-cover,report,codecov"
- python-version: 3.8
toxenv: "py38-cover,report,codecov"
- python-version: 3.9
toxenv: "py39-cover,report,codecov"
exclude:
# TODO py39 on windows has errors so we exclude it for now
- os: windows-latest
python-version: 3.9
- python-version: 3.10
toxenv: "py310-cover,report,codecov"
# exclude:
# # TODO py39 on windows has errors so we exclude it for now
# - os: windows-latest
# python-version: 3.9

steps:
- uses: actions/checkout@v2
Expand Down
13 changes: 9 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,22 +71,27 @@ jobs:
- pandoc
# Create an test job on the test stage for each python version
- stage: test
python: '3.6'
python: '3.10-cover'
dist: bionic
env:
- TOXENV=py310-cover,report,codecov
- stage: test
python: '3.6-cover'
dist: bionic
env:
- TOXENV=py36-cover,report,codecov
- stage: test
python: '3.7'
python: '3.7-cover'
dist: bionic
env:
- TOXENV=py37-cover,report,codecov
- stage: test
python: '3.8'
python: '3.8-cover'
dist: bionic
env:
- TOXENV=py38-cover,report,codecov
- stage: test
python: '3.9'
python: '3.9-cover'
dist: bionic
env:
- TOXENV=py39-cover,report,codecov
Expand Down
24 changes: 16 additions & 8 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,34 +25,42 @@ environment:
matrix:


- PYTHON_VERSION: '3.6'
- PYTHON_VERSION: '3.10-cover'
platform: x86

- PYTHON_VERSION: '3.6'
- PYTHON_VERSION: '3.10-cover'
platform: x64



- PYTHON_VERSION: '3.7'
- PYTHON_VERSION: '3.6-cover'
platform: x86

- PYTHON_VERSION: '3.7'
- PYTHON_VERSION: '3.6-cover'
platform: x64



- PYTHON_VERSION: '3.8'
- PYTHON_VERSION: '3.7-cover'
platform: x86

- PYTHON_VERSION: '3.8'
- PYTHON_VERSION: '3.7-cover'
platform: x64



- PYTHON_VERSION: '3.9'
- PYTHON_VERSION: '3.8-cover'
platform: x86

- PYTHON_VERSION: '3.9'
- PYTHON_VERSION: '3.8-cover'
platform: x64



- PYTHON_VERSION: '3.9-cover'
platform: x86

- PYTHON_VERSION: '3.9-cover'
platform: x64


Expand Down
2 changes: 1 addition & 1 deletion ci/templates/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
# Create an test job on the test stage for each python version
{%- for env in tox_environments %}{{ '' }}
- stage: test
python: '{{ env.split("-")[0] if env.startswith("pypy") else "{0[2]}.{0[3]}".format(env) }}'
python: '{{ env.split("-")[0] if env.startswith("pypy") else "{0[2]}.".format(env) + env[3:] }}'
dist: bionic
env:
- TOXENV={{ env }}{% if 'cover' in env %},report,codecov{% endif -%}
Expand Down
4 changes: 2 additions & 2 deletions ci/templates/appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ environment:
{% for env in tox_environments %}{{ '' }}
{% if env.startswith(('py2', 'py3')) %}

- PYTHON_VERSION: '{{ env[2] }}.{{ env[3] }}'
- PYTHON_VERSION: '{{ env[2] }}.{{ env[3:] }}'
platform: x86
{% if 'nocov' in env %}
WHEEL_PATH: .tox/dist
{% endif %}

- PYTHON_VERSION: '{{ env[2] }}.{{ env[3] }}'
- PYTHON_VERSION: '{{ env[2] }}.{{ env[3:] }}'
platform: x64
{% if 'nocov' in env %}
WHEEL_PATH: .tox/dist
Expand Down
4 changes: 2 additions & 2 deletions ci/templates/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ wheel = true
basepython =
bootstrap: python
{% for env in tox_environments|sort %}
{{ env.split("-")[0] }}: {env:TOXPYTHON:{{ env.split("-")[0] if env.startswith("pypy") else "python{0[2]}.{0[3]}".format(env) }}}
{{ env.split("-")[0] }}: {env:TOXPYTHON:{{ env.split("-")[0] if env.startswith("pypy") else "python{0[2]}.".format(env) + env[3:]}}}
{% endfor %}
{docs,spell,clean,check,report,codecov}: {env:TOXPYTHON:python3}
setenv =
Expand All @@ -38,7 +38,7 @@ deps =
cover: pytest-cov
commands =
cover: python setup.py clean --all build_ext --force --inplace
nocov: {posargs:pytest -vv --ignore=src}
nocov: {posargs:pytest --ignore=src -vv}
cover: {posargs:pytest --cov --cov-report=term-missing -vv}

[testenv:bootstrap]
Expand Down
7 changes: 3 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ def remove_badges(text):
'Operating System :: POSIX',
'Operating System :: Microsoft :: Windows',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
Expand All @@ -69,14 +68,14 @@ def remove_badges(text):
'Topic :: Scientific/Engineering :: Chemistry',
],
keywords=['adsorption', 'characterization', 'porous materials'],
python_requires='>=3.6',
python_requires='>=3.7',
setup_requires=[
'setuptools_scm',
'pytest-runner',
],
install_requires=[
'numpy',
'scipy',
'numpy >= 1.16.5',
'scipy >= 1.6',
'pandas',
'matplotlib',
'xlrd >= 1.1',
Expand Down
4 changes: 1 addition & 3 deletions src/pygaps/parsing/sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ def wrapper(*args, **kwargs):

db_path = kwargs.get('db_path', DATABASE)
db_path = db_path if db_path else DATABASE
conn = sqlite3.connect(
str(db_path)
) # TODO remove 'str' call when dropping P3.6
conn = sqlite3.connect(db_path)
conn.row_factory = sqlite3.Row

try:
Expand Down
3 changes: 1 addition & 2 deletions src/pygaps/utilities/sqlite_db_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ def db_execute_general(statement, pth, verbose=False):
"""
# Attempt to connect
try:
# TODO remove str call on python 3.7
with sqlite3.connect(str(pth)) as db:
with sqlite3.connect(pth) as db:

# Get a cursor object
cursor = db.cursor()
Expand Down
10 changes: 6 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ envlist =
clean,
check,
docs,
py310-cover,
py36-cover,
py37-cover,
py38-cover,
Expand All @@ -13,10 +14,11 @@ envlist =
wheel = true
basepython =
bootstrap: python
py36: {env:TOXPYTHON:python3.6}
py37: {env:TOXPYTHON:python3.7}
py38: {env:TOXPYTHON:python3.8}
py39: {env:TOXPYTHON:python3.9}
py310: {env:TOXPYTHON:python3.10-cover}
py36: {env:TOXPYTHON:python3.6-cover}
py37: {env:TOXPYTHON:python3.7-cover}
py38: {env:TOXPYTHON:python3.8-cover}
py39: {env:TOXPYTHON:python3.9-cover}
{docs,spell,clean,check,report,codecov}: {env:TOXPYTHON:python3}
setenv =
PYTHONPATH={toxinidir}/tests
Expand Down

0 comments on commit d661cbc

Please sign in to comment.