Skip to content

Commit 4230799

Browse files
author
Vasileios Karakasis
authored
Merge branch 'master' into test/updates-for-new-batch-policies
2 parents 3bd8972 + edfd903 commit 4230799

File tree

5 files changed

+22
-39
lines changed

5 files changed

+22
-39
lines changed

.github/linters/.flake8

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[flake8]
2+
select = F401

.github/workflows/main.yml

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -47,24 +47,15 @@ jobs:
4747
run: |
4848
docker run reframe:${{ matrix.modules-version }}
4949
50-
flake8:
51-
if: github.event_name == 'pull_request'
50+
unusedimports:
5251
runs-on: ubuntu-latest
5352
steps:
5453
- uses: actions/checkout@v2
5554
with:
5655
fetch-depth: 0
57-
- name: Changed Python Files
58-
run: |
59-
echo 'CHANGED_PYTHON_FILES<<EOF' >> $GITHUB_ENV
60-
git diff --name-only ${{ github.event.pull_request.base.sha }}..${{ github.sha }} | grep '.py' >> $GITHUB_ENV
61-
echo 'EOF' >> $GITHUB_ENV
62-
- uses: actions/setup-python@v2
63-
with:
64-
python-version: 3.8
65-
- name: Unused Imports Check
66-
run: |
67-
pip install flake8
68-
echo 'Checking Python Files:'
69-
for f in "$CHANGED_PYTHON_FILES"; do echo "$f"; done
70-
flake8 --select F401 $CHANGED_PYTHON_FILES
56+
- name: Lint Code Base
57+
uses: github/super-linter@v3
58+
env:
59+
VALIDATE_ALL_CODEBASE: false
60+
VALIDATE_PYTHON_FLAKE8: true
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

docs/migration_2_to_3.rst

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,18 @@ Updating Your Site Configuration
1414
--------------------------------
1515

1616
As described in `Configuring ReFrame for Your Site <configure.html>`__, ReFrame's configuration file has changed substantially.
17-
However, you don't need to manually update your configuration; ReFrame will do that automatically for you.
18-
As soon as it detects an old-style configuration file, it will convert it to the new syntax save it in a temporary file:
19-
20-
21-
.. code-block:: none
22-
23-
$ ./bin/reframe -C unittests/resources/settings_old_syntax.py -l
24-
./bin/reframe: the syntax of the configuration file 'unittests/resources/settings_old_syntax.py' is deprecated
25-
./bin/reframe: configuration file has been converted to the new syntax here: '/var/folders/h7/k7cgrdl13r996m4dmsvjq7v80000gp/T/tmph5n8u3kf.py'
26-
27-
Alternatively, you can convert any old configuration file using the command line option :option:`--upgrade-config-file`:
17+
However, you can convert any old configuration file using the command line option :option:`--upgrade-config-file`:
2818

2919
.. code-block:: none
3020
3121
$ ./bin/reframe --upgrade-config-file unittests/resources/settings_old_syntax.py:new_config.py
3222
Conversion successful! The converted file can be found at 'new_config.py'.
3323
24+
.. warning::
25+
.. versionchanged:: 3.4
26+
The old configuration syntax in no longer supported and it will not be automatically converted by the `-C` option.
27+
28+
3429
Another important change is that default locations for looking up a configuration file has changed (see `Configuring ReFrame for Your Site <configure.html>`__ for more details).
3530
That practically means that if you were relying on ReFrame loading your ``reframe/settings.py`` by default, this is no longer true.
3631
You have to move it to any of the default settings locations or set the corresponding command line option or environment variable.
@@ -39,8 +34,8 @@ You have to move it to any of the default settings locations or set the correspo
3934
The conversion tool will create a JSON configuration file if the extension of the target file is ``.json``.
4035

4136

42-
Automatic conversion limitations
43-
================================
37+
Configuration conversion limitations
38+
====================================
4439

4540
ReFrame does a pretty good job in converting correctly your old configuration files, but there are some limitations:
4641

reframe/core/config.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,11 @@
1515
import tempfile
1616

1717
import reframe
18-
import reframe.core.fields as fields
1918
import reframe.core.settings as settings
2019
import reframe.utility as util
21-
import reframe.utility.osext as osext
22-
import reframe.utility.typecheck as types
2320
from reframe.core.environments import normalize_module_list
2421
from reframe.core.exceptions import ConfigError, ReframeFatalError
2522
from reframe.core.logging import getlogger
26-
from reframe.core.warnings import ReframeDeprecationWarning
2723
from reframe.utility import ScopedDict
2824

2925

@@ -229,9 +225,10 @@ def _create_from_python(cls, filename):
229225

230226
if hasattr(mod, 'settings'):
231227
# Looks like an old style config
232-
raise ReframeDeprecationWarning(
233-
f"the syntax of the configuration file '{filename}' "
234-
f"is deprecated"
228+
raise ConfigError(
229+
f"the syntax of the configuration file {filename!r} "
230+
f"is no longer supported; please convert it using the "
231+
f"'--upgrade-config-file' option"
235232
)
236233

237234
mod = util.import_module_from_file(filename)

unittests/test_config.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@
44
# SPDX-License-Identifier: BSD-3-Clause
55

66
import json
7-
import os
87
import pytest
98

109
import reframe.core.config as config
1110
from reframe.core.exceptions import ConfigError
1211
from reframe.core.systems import System
13-
from reframe.core.warnings import ReframeDeprecationWarning
1412

1513

1614
def test_load_config_fallback(monkeypatch):
@@ -24,7 +22,7 @@ def test_load_config_python():
2422

2523

2624
def test_load_config_python_old_syntax():
27-
with pytest.raises(ReframeDeprecationWarning):
25+
with pytest.raises(ConfigError):
2826
site_config = config.load_config(
2927
'unittests/resources/settings_old_syntax.py'
3028
)

0 commit comments

Comments
 (0)