Skip to content

Commit

Permalink
Merge branch '8.1.x' into fix-prereq-bug
Browse files Browse the repository at this point in the history
  • Loading branch information
hjoliver authored Apr 25, 2023
2 parents d090baf + d34ae53 commit c671bcd
Show file tree
Hide file tree
Showing 75 changed files with 3,258 additions and 1,352 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/2_auto_publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:

- name: Publish GitHub release
id: create-release
uses: actions/create-release@v1
uses: cylc/release-actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build

# build the project whenever the configuration is changed

on:
workflow_dispatch:
pull_request:
paths:
- 'README.md' # check markdown is valid
- 'MANIFEST.in' # check packaging
- 'pyproject.toml' # check build config
- 'setup.cfg' # check deps and project config

jobs:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
matrix:
os: ['ubuntu-latest']
python: ['3.7', '3.8', '3.9', '3.10']
include:
- os: 'macos-latest'
python: '3.7'
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}

- name: Build
uses: cylc/release-actions/build-python-package@v1

- name: Inspect
run: |
unzip -l dist/*.whl | tee files
grep 'cylc_flow.*.dist-info/COPYING' files
grep 'cylc/flow/py.typed' files
grep 'cylc/flow/etc' files
grep 'cylc/flow/etc/cylc-completion.bash' files
48 changes: 27 additions & 21 deletions .github/workflows/test_fast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,6 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Brew Install
if: startsWith(matrix.os, 'macos')
run: |
# speed up install (https://docs.brew.sh/Manpage#environment)
export HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_CLEANUP=1
echo "[command]brew update"
brew update
echo "[command]brew install ..."
brew install bash coreutils
# add GNU coreutils and sed to the user PATH
# (see instructions in brew install output)
echo "$(brew --prefix)/opt/coreutils/libexec/gnubin" \
>> "${GITHUB_PATH}"
- name: Apt-Get Install
if: startsWith(matrix.os, 'ubuntu')
run: |
Expand Down Expand Up @@ -93,7 +79,7 @@ jobs:
run: |
pytest tests/integration
- name: Upload artifact
- name: Upload failed tests artifact
if: failure()
uses: actions/upload-artifact@v3
with:
Expand All @@ -105,15 +91,35 @@ jobs:
coverage xml
coverage report
- name: Upload coverage artifact
uses: actions/upload-artifact@v3
with:
name: coverage_${{ matrix.os }}_py-${{ matrix.python-version }}
path: coverage.xml
retention-days: 7

- name: Linkcheck
if: startsWith(matrix.python-version, '3.10')
run: pytest -m linkcheck --dist=load tests/unit

codecov:
needs: test
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Download coverage artifacts
uses: actions/download-artifact@v3

- name: Codecov upload
uses: codecov/codecov-action@v3
with:
name: '${{ github.workflow }} ${{ matrix.os }} py-${{ matrix.python-version }}'
name: ${{ github.workflow }}
flags: fast-tests
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }} # Token not required for public repos, but might reduce chance of random 404 error?

- name: Linkcheck
if: startsWith(matrix.python-version, '3.10')
run: pytest -m linkcheck --dist=load tests/unit
# Token not required for public repos, but avoids upload failure due
# to rate-limiting (but not for PRs opened from forks)
token: ${{ secrets.CODECOV_TOKEN }}
27 changes: 23 additions & 4 deletions .github/workflows/test_functional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -248,14 +248,13 @@ jobs:
-exec echo '====== {} ======' \; -exec cat '{}' \;
- name: Set artifact upload name
if: failure() && steps.test.outcome == 'failure'
id: uploadname
run: |
# artifact name cannot contain '/' characters
CID="$(sed 's|/|-|g' <<< "${{ matrix.name || matrix.chunk }}")"
echo "uploadname=$CID" >> $GITHUB_OUTPUT
- name: Upload artifact
- name: Upload failed tests artifact
if: failure() && steps.test.outcome == 'failure'
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -294,11 +293,31 @@ jobs:
coverage xml
coverage report
- name: Upload coverage artifact
uses: actions/upload-artifact@v3
with:
name: coverage_${{ steps.uploadname.outputs.uploadname }}
path: coverage.xml
retention-days: 7

codecov:
needs: test
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Download coverage artifacts
uses: actions/download-artifact@v3

- name: Codecov upload
uses: codecov/codecov-action@v3
with:
name: '${{ github.workflow }} ${{ matrix.name }} ${{ matrix.chunk }}'
name: ${{ github.workflow }}
flags: functional-tests
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }} # Token not required for public repos, but might reduce chance of random 404 error?
# Token not required for public repos, but avoids upload failure due
# to rate-limiting (but not for PRs opened from forks)
token: ${{ secrets.CODECOV_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/test_manylinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
fail-fast: false
matrix:
manylinux: ['1']
os: ['ubuntu-18.04'] # run on the oldest linux we have access to
os: ['ubuntu-20.04'] # run on the oldest linux we have access to
python-version: ['3.7', '3.8', '3.9', '3.10']

steps:
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
>> _manylinux.py
- name: Install
timeout-minutes: 25
timeout-minutes: 35
run: |
PYTHONPATH="$PWD:$PYTHONPATH" pip install ."[all]"
Expand All @@ -84,6 +84,6 @@ jobs:
import cylc.flow.scheduler
- name: Test
timeout-minutes: 15
timeout-minutes: 5
run: |
pytest -n 5
58 changes: 58 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,64 @@ creating a new release entry be sure to copy & paste the span tag with the
`actions:bind` attribute, which is used by a regex to find the text to be
updated. Only the first match gets replaced, so it's fine to leave the old
ones in. -->
-------------------------------------------------------------------------------

## __cylc-8.1.3 (<span actions:bind='release-date'>Upcoming</span>)__

### Enhancements

[#5453](https://github.com/cylc/cylc-flow/pull/5453) - `cylc cat-log` can now
list and view workflow log files including install logs and workflow
configuration files.

### Fixes

[5450](https://github.com/cylc/cylc-flow/pull/5450) - Validation provides
better error messages if [sections] and settings are mixed up in a
configuration.

[5445](https://github.com/cylc/cylc-flow/pull/5445) - Fix remote tidy
bug where install target is not explicit in platform definition.

[5398](https://github.com/cylc/cylc-flow/pull/5398) - Fix platform from
group selection order bug.

[#5395](https://github.com/cylc/cylc-flow/pull/5395) - Fix bug where workflow
shuts down if all hosts for all platforms in a platform group are unreachable.

[#5384](https://github.com/cylc/cylc-flow/pull/5384) -
Fixes `cylc set-verbosity`.

[#5479](https://github.com/cylc/cylc-flow/pull/5479) -
Fixes `cylc help license`

[#5394](https://github.com/cylc/cylc-flow/pull/5394) -
Fixes a possible scheduler traceback observed with remote task polling.

[#5386](https://github.com/cylc/cylc-flow/pull/5386) - Fix bug where
absence of `job name length maximum` in PBS platform settings would cause
Cylc to crash when preparing the job script.

[#5343](https://github.com/cylc/cylc-flow/pull/5343) - Fix a bug causing
platform names to be checked as if they were hosts.

[#5359](https://github.com/cylc/cylc-flow/pull/5359) - Fix bug where viewing
a workflow's log in the GUI or using `cylc cat-log` would prevent `cylc clean`
from working.

-------------------------------------------------------------------------------
## __cylc-8.1.2 (<span actions:bind='release-date'>Released 2023-02-20</span>)__

### Fixes

[#5349](https://github.com/cylc/cylc-flow/pull/5349) - Bugfix: `cylc vip --workflow-name`
only worked when used with a space, not an `=`.

[#5367](https://github.com/cylc/cylc-flow/pull/5367) - Enable using
Rose options (`-O`, `-S` & `-D`) with `cylc view`.

[#5363](https://github.com/cylc/cylc-flow/pull/5363) Improvements and bugfixes
for `cylc lint`.

-------------------------------------------------------------------------------
## __cylc-8.1.2 (<span actions:bind='release-date'>Upcoming</span>)__
Expand Down
4 changes: 2 additions & 2 deletions conda-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ dependencies:
- python
- pyzmq >=22,<23
- setuptools >=49, <67
- importlib_metadata # [py<3.8]
- urwid >=2,<3
# Add # [py<3.11] for tomli once Python 3.11 Released
- tomli >=2
- tomli >=2 # [py<3.11]

# optional dependencies
#- empy >=3.3,<3.4
Expand Down
4 changes: 2 additions & 2 deletions cylc/flow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
LOG.addHandler(logging.NullHandler())

LOG_LEVELS = {
"DEBUG": logging.DEBUG,
"INFO": logging.INFO,
"NORMAL": logging.INFO,
"WARNING": logging.WARNING,
"ERROR": logging.ERROR,
"CRITICAL": logging.CRITICAL,
"DEBUG": logging.DEBUG,
}


Expand All @@ -46,7 +46,7 @@ def environ_init():

environ_init()

__version__ = '8.1.2.dev'
__version__ = '8.1.3.dev'


def iter_entry_points(entry_point_name):
Expand Down
3 changes: 2 additions & 1 deletion cylc/flow/cfgspec/globalcfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -1426,7 +1426,8 @@ def default_for(
"[remote]retrieve job logs retry delays")}
''')
Conf('tail command template',
VDR.V_STRING, 'tail -n +1 -F %(filename)s', desc=f'''
VDR.V_STRING, 'tail -n +1 --follow=name -F %(filename)s',
desc=f'''
A command template (with ``%(filename)s`` substitution) to
tail-follow job logs this platform, by ``cylc cat-log``.
Expand Down
7 changes: 0 additions & 7 deletions cylc/flow/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,13 +356,6 @@ def __init__(
except KeyError:
parameter_templates = {}

# Check that parameter templates are a section
if not hasattr(parameter_templates, 'update'):
raise WorkflowConfigError(
'[task parameters][templates] is a section. Don\'t use it '
'as a parameter.'
)

# parameter values and templates are normally needed together.
self.parameters = (parameter_values, parameter_templates)

Expand Down
1 change: 1 addition & 0 deletions cylc/flow/cycling/iso8601.py
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,7 @@ def init(num_expanded_year_digits=0, custom_dump_format=None, time_zone=None,
WorkflowSpecifics.abbrev_util = CylcTimeParser(
None, None, WorkflowSpecifics.iso8601_parsers
)
return WorkflowSpecifics


def get_dump_format():
Expand Down
Loading

0 comments on commit c671bcd

Please sign in to comment.