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 py38 #500

Merged
merged 9 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/cd_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
with:
fetch-depth: 0

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

- name: Install Python dependencies
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci_automerge_dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:
ref: ${{ github.event.pull_request.head.ref }}
persist-credentials: false

- name: Setup Python 3.8
- name: Setup Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9

- name: Install Python dependencies
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci_dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
with:
ref: ${{ env.DEFAULT_REPO_BRANCH }}

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

- name: Install `pre-commit`
run: |
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
steps:
- uses: actions/checkout@v4

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

- name: Install dependencies
run: |
Expand All @@ -45,7 +45,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10']
python-version: ['3.9', '3.10', '3.11']

services:
mongo:
Expand Down Expand Up @@ -105,14 +105,14 @@ jobs:
run: pytest -v --cov=./aiida_optimade/ --cov-report=xml:mongo_cov.xml --durations=20

- name: Upload coverage to Codecov
if: matrix.python-version == 3.8
if: matrix.python-version == 3.9
uses: codecov/codecov-action@v3
with:
flags: aiida
file: ./coverage.xml

- name: Upload coverage to Codecov
if: matrix.python-version == 3.8
if: matrix.python-version == 3.9
uses: codecov/codecov-action@v3
with:
flags: mongo
Expand Down Expand Up @@ -148,10 +148,10 @@ jobs:
steps:
- uses: actions/checkout@v4

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

- name: Install python dependencies
run: |
Expand Down Expand Up @@ -223,10 +223,10 @@ jobs:
steps:
- uses: actions/checkout@v4

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

- name: Install python dependencies
run: |
Expand Down Expand Up @@ -292,10 +292,10 @@ jobs:
steps:
- uses: actions/checkout@v4

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

- name: Install python dependencies
run: |
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ The compatibility matrix below assumes the user always install the latest patch

| Plugin | AiiDA | Python | Specification |
|-|-|-|-|
| `v1.0 < v2.0` | ![Compatibility for v1.0][AiiDA v2 range] | [![PyPI pyversions](https://img.shields.io/pypi/pyversions/aiida-optimade)](https://pypi.org/project/aiida-optimade) | ![OPTIMADE API compatibility][OPTIMADE from OPT] |
| `v1.2 < v2.0` | ![Compatibility for v1.0][AiiDA v2 range] | [![PyPI pyversions](https://img.shields.io/pypi/pyversions/aiida-optimade)](https://pypi.org/project/aiida-optimade) | ![OPTIMADE API compatibility][OPTIMADE from OPT] |
CasperWA marked this conversation as resolved.
Show resolved Hide resolved
| `v1.0 < v1.2` | ![Compatibility for v1.0][AiiDA v2 range] | [![PyPI pyversions][Python v3.8-v3.10]](https://pypi.org/project/aiida-optimade/1.1.1/) | ![OPTIMADE API compatibility][OPTIMADE from OPT] |
| `v0.18 <= v0.20` | ![Compatibility for v0][AiiDA v1 range] | [![PyPI pyversions][Python v3.7-v3.9]](https://pypi.org/project/aiida-optimade/0.20.0/) | ![OPTIMADE API compatibility][OPTIMADE from OPT] |

| Latest release | Build status | Activity |
Expand Down Expand Up @@ -175,6 +176,9 @@ For example: `v2.3.12`.

[AiiDA v1 range]: https://img.shields.io/badge/AiiDA->=1.6.0,<2.0.0-007ec6.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAhCAYAAABTERJSAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAFhgAABYYBG6Yz4AAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAUbSURBVFiFzZhrbFRVEMd%2Fc%2B5uu6UUbIFC%2FUAUVEQCLbQJBIiBDyiImJiIhmohYNCkqJAQxASLF8tDgYRHBLXRhIcKNtFEhVDgAxBJqgmVh4JEKg3EIn2QYqBlt917xg%2BFss%2ByaDHOtzsz5z%2B%2FuZl7ztmF%2F5HJvxVQN6cPYX8%2FPLnOmsvNAvqfwuib%2FbNIk9cQeQnLcKRL5xLIV%2Fic9eJeunjPYbRs4FjQSpTB3aS1IpRKeeOOewajy%2FKKEO8Q0DuVdKy8IqsbPulxGHUfCBBu%2BwUYGuFuBTK7wQnht6PEbf4tlRomVRjCbXNjQEB0AyrFQOL5ENIJm7dTLZE6DPJCnEtFZVXDLny%2B4Sjv0PmmYu1ZdUek9RiMgoDmJ8V0L7XJqsZ3UW8YsBOwEeHeeFce7jEYXBy0m9m4BbXqSj2%2Bxnkg26MCVrN6DEZcwggtd8pTFx%2Fh3B9B50YLaFOPwXQKUt0tBLegtSomfBlfY13PwijbEnhztGzgJsK5h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qrNvZWjsHZFuqMqKcDWdlFjF7UGvX8Jn24DyEAykJwNcdg0OvJ4p5pQ9tV6SMlP4A0PNh8aYze1ArROyUNTNouy8tNF3Rt0CSXb6bRFl4%2FIfQzNMjaE9WwpYOWQnOdEF%2BTdJNO0iFh7%2BI0kfORzQZb6P2kymS9oTxzBiM9rUqLWr1WE5G6ODhycQd%2FUnNVeMbcH68hYkGycNoUNWc8fxaxfwhDbHpfwM5oeTY7rUX8QAAAABJRU5ErkJggg%3D%3D


[Python v3.8-v3.10]: https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10-blue

[Python v3.7-v3.9]: https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9-blue

[OPTIMADE from OPT]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/Materials-Consortia/optimade-python-tools/v0.24.1/optimade-version.json
2 changes: 1 addition & 1 deletion aiida_optimade/cli/cmd_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def init(obj: "AttributeDict", force: bool, silent: bool, mongo: bool, filename:
"consider using --force to first drop the collection, if possible."
)

with open(filename, "r") as handle:
with open(filename) as handle:
if silent:
all_chunks = read_chunks(handle, chunk_size=chunk_size)
else:
Expand Down
2 changes: 1 addition & 1 deletion aiida_optimade/mappers/entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def all_aliases(cls) -> Tuple[Tuple[str, str]]:
"""Get all aliases as a tuple
Also add `PROJECT_PREFIX` fields to the tuple
"""
res = super(ResourceMapper, cls).all_aliases()
res = super().all_aliases()
return res + tuple(
(field, f"{cls.PROJECT_PREFIX}{field}")
for field in set(cls.ENTRY_RESOURCE_ATTRIBUTES.keys())
Expand Down
2 changes: 1 addition & 1 deletion setup.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Intended Audience :: Developers",
"Topic :: Database",
"Topic :: Database :: Database Engines/Servers",
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
long_description=open(MODULE_DIR.joinpath("README.md")).read(),
long_description_content_type="text/markdown",
packages=find_packages(exclude=["tests", "profiles"]),
python_requires=">=3.8",
python_requires=">=3.9",
install_requires=REQUIREMENTS,
extras_require={"dev": DEV, "testing": TESTING},
entry_points={
Expand Down
2 changes: 1 addition & 1 deletion tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

def update_file(filename: str, sub_line: Tuple[str, str], strip: str = None):
"""Utility function for tasks to read, update, and write files"""
with open(filename, "r") as handle:
with open(filename) as handle:
lines = [
re.sub(sub_line[0], sub_line[1], line.rstrip(strip)) for line in handle
]
Expand Down