Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for Python 3.7 #1179

Merged
merged 3 commits into from
Jul 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
41 changes: 16 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: '3.10'

- name: Install dependencies
run: |
Expand All @@ -46,10 +46,10 @@ jobs:
with:
submodules: true

- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: '3.10'

- name: Install dependencies
run: |
Expand All @@ -71,10 +71,10 @@ jobs:
with:
submodules: true

- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: '3.10'

- name: Install tools
run: |
Expand Down Expand Up @@ -142,7 +142,7 @@ jobs:
fail-fast: false
max-parallel: 4
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
python-version: ['3.8', '3.9', '3.10']

services:
mongo:
Expand Down Expand Up @@ -211,16 +211,7 @@ jobs:
run: |
pip install -r requirements-client.txt

- name: Setup environment for AiiDA v1 (Python 3.7)
if: matrix.python-version == 3.7
env:
AIIDA_TEST_BACKEND: django
run: |
reentry scan
.github/aiida/setup_aiida.sh

- name: Setup environment for AiiDA v2 (Python 3.8+)
if: matrix.python-version != 3.7
- name: Setup environment for AiiDA
env:
AIIDA_TEST_BACKEND: psql_dos
run: |
Expand All @@ -230,20 +221,20 @@ jobs:
run: pytest -rs -vvv --cov=./optimade/ --cov-report=xml --cov-append tests/adapters/

- name: Run tests for validator only to assess coverage (mongomock)
if: matrix.python-version == 3.8
if: matrix.python-version == 3.10
run: pytest -rs --cov=./optimade/ --cov-report=xml:validator_cov.xml --cov-append tests/server/test_server_validation.py
env:
OPTIMADE_DATABASE_BACKEND: 'mongomock'

- name: Run tests for validator only to assess coverage (Elasticsearch)
if: matrix.python-version == 3.8
if: matrix.python-version == 3.10
run: pytest -rs --cov=./optimade/ --cov-report=xml:validator_cov.xml --cov-append tests/server/test_server_validation.py
env:
OPTIMADE_DATABASE_BACKEND: 'elastic'
OPTIMADE_INSERT_TEST_DATA: false # Must be specified as previous steps will have already inserted the test data

- name: Run tests for validator only to assess coverage (MongoDB)
if: matrix.python-version == 3.8
if: matrix.python-version == 3.10
run: pytest -rs --cov=./optimade/ --cov-report=xml:validator_cov.xml --cov-append tests/server/test_server_validation.py
env:
OPTIMADE_DATABASE_BACKEND: 'mongodb'
Expand Down Expand Up @@ -278,15 +269,15 @@ jobs:
coverage xml

- name: Upload coverage to Codecov
if: matrix.python-version == 3.8 && github.repository == 'Materials-Consortia/optimade-python-tools'
if: matrix.python-version == '3.10' && github.repository == 'Materials-Consortia/optimade-python-tools'
uses: codecov/codecov-action@v3
with:
name: project
file: ./coverage.xml
flags: project

- name: Upload validator coverage to Codecov
if: matrix.python-version == 3.8 && github.repository == 'Materials-Consortia/optimade-python-tools'
if: matrix.python-version == '3.10' && github.repository == 'Materials-Consortia/optimade-python-tools'
uses: codecov/codecov-action@v3
with:
name: validator
Expand All @@ -303,7 +294,7 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: '3.10'

- name: Install dependencies
run: |
Expand All @@ -329,10 +320,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: '3.10'

- name: Install Python dependencies
run: |
Expand Down
17 changes: 0 additions & 17 deletions optimade/__init__.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,2 @@
__version__ = "0.18.0"
__api_version__ = "1.1.0"

import sys

if sys.version_info.minor == 7:
import warnings

warnings.filterwarnings(
action="once",
message=r"v0\.17 of the `optimade` package.*",
category=DeprecationWarning,
append=True,
)
warnings.warn(
"v0.17 of the `optimade` package will be the last to support Python 3.7. "
"Please upgrade to Python 3.8+ to use v0.18 and later versions of `optimade`.",
DeprecationWarning,
)
6 changes: 2 additions & 4 deletions requirements-client.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
aiida-core==1.6.8;python_version<'3.8'
aiida-core==2.0.1;python_version>='3.8'
aiida-core==2.0.1
ase==3.22.1
jarvis-tools==2022.5.20
numpy==1.21.5;python_version<'3.8'
numpy==1.23.0;python_version>='3.8'
numpy==1.22.3
JPBergsma marked this conversation as resolved.
Show resolved Hide resolved
pymatgen==2022.0.16
1 change: 0 additions & 1 deletion requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
griffe==0.21 # Currently mkdocstrings-python does not pin a griffe version, but it is quite flaky...
markupsafe==2.0.1 # Can be removed once aiida supports Jinja2>=3, see pallets/markupsafe#284
mike==1.1.2
mkdocs==1.3.0
mkdocs-awesome-pages-plugin==2.7.0
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ pydantic==1.9.1
pymongo==4.1.1
pyyaml==5.4
requests==2.28.0
typing-extensions==4.0.0;python_version<'3.8'
uvicorn==0.18.1
8 changes: 3 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@

# Client minded
aiida_deps = [
"aiida-core~=1.6,>=1.6.4;python_version<'3.8'",
"aiida-core~=2.0;python_version>='3.8'",
"aiida-core~=2.0",
]
http_client_deps = [
"httpx~=0.23",
Expand Down Expand Up @@ -92,7 +91,6 @@
classifiers=[
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand All @@ -101,14 +99,14 @@
"Topic :: Database :: Database Engines/Servers",
"Topic :: Database :: Front-Ends",
],
python_requires=">=3.7,<3.11",
python_requires=">=3.8,<3.11",
install_requires=[
"lark~=1.1",
"fastapi~=0.78",
"pydantic~=1.9",
"email_validator~=1.2",
"requests~=2.28",
"typing-extensions~=4.0;python_version<'3.8'",
"requests~=2.28",
],
extras_require={
"all": all_deps,
Expand Down