Skip to content

Commit

Permalink
Remove rest of warnings in pytest (#94)
Browse files Browse the repository at this point in the history
* Handle more aiida-core deprecation warnings
* Update aiida-core version in CI
  • Loading branch information
danielhollas authored Dec 9, 2024
1 parent c4d217a commit 391a7df
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
aiida-version: ['2.5']
aiida-version-spec: ['>=2.5']
# Include a job with minimum supported aiida-version
include:
- python-version: '3.9'
aiida-version: '2.1'
aiida-version-spec: '==2.1'
fail-fast: false

services:
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
with:
version: ${{ env.UV_VER }}
- name: Install package
run: uv pip install --system -e .[tests] aiida-core==${{ matrix.aiida-version }}
run: uv pip install --system -e .[tests] "aiida-core${{ matrix.aiida-version-spec }}"

- name: Run test suite
env:
Expand Down
6 changes: 3 additions & 3 deletions aiida_test_cache/mock_code/_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,11 @@ def _get_mock_code(
if _config_action == ConfigActions.GENERATE.value:
mock_code_config[label] = code_executable_path
code = InstalledCode(
input_plugin_name=entry_point,
computer=aiida_localhost,
default_calc_job_plugin=entry_point,
filepath_executable=mock_executable_path,
label=code_label,
)
code.label = code_label
variables = MockVariables(
log_file=log_file.absolute(),
label=label,
Expand All @@ -242,7 +242,7 @@ def _get_mock_code(
fail_on_missing=_fail_on_missing,
_hasher=hasher,
)
code.set_prepend_text(variables.to_env())
code.prepend_text = variables.to_env()

code.store()

Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ aiida_archive_cache = "aiida_test_cache.archive_cache"
addopts = '--durations=10 --durations-min=3 --strict-config --strict-markers -ra --cov-report xml --cov-append'
filterwarnings = [
'ignore:Creating AiiDA configuration:UserWarning:aiida',
# https://github.com/aiidateam/plumpy/issues/283
'ignore:There is no current event loop:DeprecationWarning:plumpy',
# https://github.com/aiidateam/aiida-core/issues/6657
'ignore:Python 3.14 will, by default, filter extracted tar archives:DeprecationWarning:aiida',
]

[tool.yapf]
Expand Down

0 comments on commit 391a7df

Please sign in to comment.