Skip to content

Commit

Permalink
Merge branch 'master' into 1.3.x-sync
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-sanders authored Apr 2, 2024
2 parents cefb5de + 3936594 commit 5d9ffe1
Show file tree
Hide file tree
Showing 35 changed files with 1,582 additions and 1,356 deletions.
17 changes: 17 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,20 @@ source=./cylc

[report]
precision=2

exclude_lines =
pragma: no cover

# Don't complain if tests don't hit defensive assertion code:
raise NotImplementedError
return NotImplemented

# Ignore type checking code:
if (typing\.)?TYPE_CHECKING:
@overload( |$)

# Don't complain about ellipsis (exception classes, typing overloads etc):
\.\.\.

# Ignore abstract methods
@(abc\.)?abstractmethod
7 changes: 3 additions & 4 deletions .github/workflows/1_create_release_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: cylc/release-actions/stage-1/sanitize-inputs@v1

- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ env.BASE_REF }}
fetch-depth: 0 # need to fetch all commits to check contributors
Expand All @@ -36,10 +36,9 @@ jobs:
uses: cylc/release-actions/check-shortlog@v1

- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
# return to 3.x once cylc-flow is compatible with 3.10+ (pyuv)
python-version: '3.9'
python-version: '3.x'

- name: Create & checkout PR branch
uses: cylc/release-actions/stage-1/checkout-pr-branch@v1
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/2_auto_publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,14 @@ jobs:
steps:

- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ env.MERGE_SHA }}

- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
# return to 3.x once cylc-flow is compatible with 3.10+ (pyuv)
python-version: '3.9'
python-version: '3.x'

- name: Get the version number
uses: cylc/release-actions/stage-2/get-version-from-pr@v1
Expand All @@ -38,7 +37,7 @@ jobs:
uses: cylc/release-actions/build-python-package@v1

- name: Publish distribution to PyPI
uses: pypa/[email protected].8
uses: pypa/[email protected].14
with:
user: __token__ # uses the API token feature of PyPI - least permissions possible
password: ${{ secrets.PYPI_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/shortlog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0 # need to fetch all commits to check contributors

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
timeout-minutes: 5
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
fail-fast: false
env:
PYTEST_ADDOPTS: --cov --cov-append --color=yes
Expand All @@ -30,7 +30,7 @@ jobs:
uses: actions/checkout@v4

- name: Configure Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
coverage report
- name: Upload coverage artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage_py-${{ matrix.python-version }}
path: coverage.xml
Expand All @@ -111,7 +111,7 @@ jobs:
uses: actions/checkout@v4

- name: Configure Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.9'

Expand Down Expand Up @@ -142,10 +142,10 @@ jobs:
uses: actions/checkout@v4

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

- name: Codecov upload
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
name: ${{ github.workflow }}
fail_ci_if_error: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_copyright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
timeout-minutes: 10
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Configure git
uses: cylc/release-actions/configure-git@v1
Expand Down
11 changes: 11 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,24 @@ creating a new release entry be sure to copy & paste the span tag with the
updated. Only the first match gets replaced, so it's fine to leave the old
ones in. -->

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

### Features

[#269](https://github.com/cylc/cylc-rose/pull/269) - Allow environment variables
set in ``rose-suite.conf`` to be used when parsing ``global.cylc``.


## __cylc-rose-1.3.3 (<span actions:bind='release-date'>Awaiting Release</span>)__

### Fixes

[#300](https://github.com/cylc/cylc-rose/pull/300) -
Fix issues which could cause "fcm_make" and "rose_prune" tasks intermittently
fail with the message
"Workflow database is incompatible with Cylc x.y.z, or is corrupted".


## __cylc-rose-1.3.2 (<span actions:bind='release-date'>Released 2024-01-18</span>)__

[#284](https://github.com/cylc/cylc-rose/pull/284) - Allow use of Metomi-Rose 2.2.*.
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ below.
- Mel Hall
- Bruno Kinoshita
- Hilary Oliver
- Jonny Williams
- Mark Dawson
<!-- end-shortlog -->

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pip install -e cylc-rose[all]

[![License](https://img.shields.io/github/license/cylc/cylc-flow.svg?color=lightgrey)](https://github.com/cylc/cylc-flow/blob/master/COPYING)

Copyright (C) 2008-<span actions:bind='current-year'>2023</span> NIWA &
Copyright (C) 2008-<span actions:bind='current-year'>2024</span> NIWA &
British Crown (Met Office) & Contributors.

Cylc-rose is free software: you can redistribute it and/or modify it under the terms
Expand Down
31 changes: 29 additions & 2 deletions cylc/rose/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,37 @@
for ease of porting Cylc 7 workflows.
The ``global.cylc`` file
^^^^^^^^^^^^^^^^^^^^^^^^
The Cylc Rose Plugin forces the reloading of the ``global.cylc`` file
to allow environment variables set by Rose to change the global configuration.
For example you could use ``CYLC_SYMLINKS`` as a variable to control
the behaviour of ``cylc install``:
.. code-block:: cylc
#!jinja2
# part of a global.cylc file
[install]
[[symlink dirs]]
[[[hpc]]]
{% if environ["CYLC_SYMLINKS"] | default("x") == "A" %}
run = $LOCATION_A
{% elif environ["CYLC_SYMLINKS"] | default("x") == "B" %}
run = $LOCATION_B
{% else %}
run = $LOCATION_C
{% endif %}
Special Variables
-----------------
The Cylc Rose plugin provides two environment/template variables
to the Cylc scheduler:
to the Cylc scheduler.
``ROSE_ORIG_HOST``
Cylc commands (such as ``cylc install``, ``cylc validate`` and
Expand Down Expand Up @@ -111,6 +137,7 @@
``CYLC_VERSION`` will be removed from your configuration by the
Cylc-Rose plugin, as it is now set by Cylc.
Additional CLI options
----------------------
You can use command line options to set or override
Expand Down Expand Up @@ -205,4 +232,4 @@
"""

__version__ = '1.3.3.dev'
__version__ = '1.4.0.dev'
Loading

0 comments on commit 5d9ffe1

Please sign in to comment.