diff --git a/.github/workflows/create_release_pr.yml b/.github/workflows/create_release_pr.yml index a832702df..069b4de4a 100644 --- a/.github/workflows/create_release_pr.yml +++ b/.github/workflows/create_release_pr.yml @@ -29,6 +29,11 @@ jobs: - name: Check CONTRIBUTING.md uses: cylc/release-actions/check-shortlog@v1 + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.x' + - name: Create & checkout PR branch uses: cylc/release-actions/stage-1/checkout-pr-branch@v1 @@ -36,11 +41,10 @@ jobs: run: | npm version $VERSION - - name: Update "released on" date in changelog - continue-on-error: true - uses: cylc/release-actions/stage-1/update-changelog-release-date@v1 - with: - changelog-file: 'CHANGES.md' + - name: Generate changelog + run: | + python3 -m pip install -q towncrier + towncrier build --yes --version $VERSION - name: Create pull request uses: cylc/release-actions/stage-1/create-release-pr@v1 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b2fe969ee..a798237f9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,6 +27,11 @@ jobs: node-version: 'lts/*' cache: yarn + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.x' + - name: Install run: yarn install @@ -51,6 +56,11 @@ jobs: - name: Check browser compatibility run: yarn run lint:compat + - name: Towncrier - draft changelog + run: | + python3 -m pip install -q towncrier + towncrier build --draft --version $(node -p "require('./package.json').version") + cypress-run: runs-on: ${{ matrix.os }} timeout-minutes: 15 diff --git a/CHANGES.md b/CHANGES.md index 59c27cbe2..12df78625 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,21 +5,14 @@ all changes see the [closed milestones](https://github.com/cylc/cylc-ui/milestones?state=closed) for each release. - -------------------------------------------------------------------------------- -## __cylc-ui-2.5.0 (Upcoming)__ + -### Enhancements - -[#1751](https://github.com/cylc/cylc-ui/pull/1751) - -More view options are now remembered & restored when navigating between workflows. + -------------------------------------------------------------------------------- -## __cylc-ui-2.4.0 (Released 2024-04-02)__ +## cylc-ui-2.4.0 (Released 2024-04-02) ### Enhancements @@ -48,16 +41,16 @@ Various other efficiency improvements. Fix bug where the up/down/home/end keys would not work inside the Edit Runtime form inputs. -------------------------------------------------------------------------------- -## __cylc-ui-2.3.0 (Released 2023-11-28)__ + +## cylc-ui-2.3.0 (Released 2023-11-28) ### Fixes [#1549](https://github.com/cylc/cylc-ui/pull/1549) - Fix workflow filtering bug in the sidebar. -------------------------------------------------------------------------------- -## __cylc-ui-2.2.0 (Released 2023-11-02)__ + +## cylc-ui-2.2.0 (Released 2023-11-02) ### Enhancements @@ -78,8 +71,8 @@ Fixed bug where toggle buttons in view toolbars would not change state. [#1434](https://github.com/cylc/cylc-ui/pull/1434) - Small accessibility/appearance improvements. -------------------------------------------------------------------------------- -## __cylc-ui-2.1.0 (Released 2023-09-07)__ + +## cylc-ui-2.1.0 (Released 2023-09-07) ### Enhancements @@ -95,8 +88,8 @@ Pinned buttons to the bottom of the command edit form. [#1437](https://github.com/cylc/cylc-ui/pull/1437) - Add landing page for unauthorised users. -------------------------------------------------------------------------------- -## __cylc-ui-2.0.0 (Released 2023-07-21)__ + +## cylc-ui-2.0.0 (Released 2023-07-21) ### Enhancements @@ -127,8 +120,8 @@ Fixed incorrect latest job info in table view. [#1336](https://github.com/cylc/cylc-ui/pull/1336) - Fixed task state filtering bug in tree view. -------------------------------------------------------------------------------- -## __cylc-ui-1.6.0 (Released 2023-04-27)__ + +## cylc-ui-1.6.0 (Released 2023-04-27) ### Enhancements @@ -149,8 +142,8 @@ A new view that displays task timing statistics when navigating between workflows in the standalone `#/tree/` and `#/table/` views. -------------------------------------------------------------------------------- -## __cylc-ui-1.5.0 (Released 2023-02-20)__ + +## cylc-ui-1.5.0 (Released 2023-02-20) ### Enhancements @@ -169,8 +162,8 @@ use multi-level family inheritance. [#1182](https://github.com/cylc/cylc-ui/pull/1182) - Fixes bug in filtering by task name. -------------------------------------------------------------------------------- -## __cylc-ui-1.4.0 (Released 2023-01-16)__ + +## cylc-ui-1.4.0 (Released 2023-01-16) ### Enhancements @@ -219,24 +212,24 @@ of the table view so it matches the tree view. [#1107](https://github.com/cylc/cylc-ui/pull/1107) - Use natural sort for table view cycle point column. -------------------------------------------------------------------------------- -## __cylc-ui-1.3.0 (Released 2022-07-27)__ + +## cylc-ui-1.3.0 (Released 2022-07-27) ### Enhancements [#1073](https://github.com/cylc/cylc-ui/pull/1073) - Improve validation of the command edit form. -------------------------------------------------------------------------------- -## __cylc-ui-1.2.1 (Released 2022-05-30)__ + +## cylc-ui-1.2.1 (Released 2022-05-30) ### Fixes [#1011](https://github.com/cylc/cylc-ui/pull/1011) - Fix bug where the workflow commands menu would show the wrong workflow. -------------------------------------------------------------------------------- -## __cylc-ui-1.2.0 (Released 2022-05-19)__ + +## cylc-ui-1.2.0 (Released 2022-05-19) ### Enhancements @@ -250,16 +243,16 @@ workflow commands menu would show the wrong workflow. [#979](https://github.com/cylc/cylc-ui/pull/979) - Fix bug where the commands menu could sometimes break. -------------------------------------------------------------------------------- -## __cylc-ui-1.1.0 (Released 2022-03-23)__ + +## cylc-ui-1.1.0 (Released 2022-03-23) ### Enhancements [#928](https://github.com/cylc/cylc-ui/pull/928) - Enable accessing the workflow commands menu from GScan (sidebar). -------------------------------------------------------------------------------- -## __cylc-ui-1.0.0 (Released 2022-02-17)__ + +## cylc-ui-1.0.0 (Released 2022-02-17) ### Enhancements @@ -285,8 +278,8 @@ or jobs now shows the relevant ID and status. [#927](https://github.com/cylc/cylc-ui/pull/927) - Fix bug where the commands menu would disappear when clicking on another task/cycle point/etc. -------------------------------------------------------------------------------- -## __cylc-ui-0.6 (Released 2021-11-10)__ + +## cylc-ui-0.6 (Released 2021-11-10) ### Enhancements @@ -315,8 +308,8 @@ commands in the commands menu. - Fix issues with the workflow status and play/pause/stop buttons not updating correctly & enable starting a workflow from stopped. -------------------------------------------------------------------------------- -## __cylc-ui-0.5 (Released 2021-07-28)__ + +## cylc-ui-0.5 (Released 2021-07-28) ### Enhancements @@ -385,8 +378,8 @@ fetches more data than what it needs when GScan + a view/component are used. [#671](https://github.com/cylc/cylc-ui/pull/671) - UI shows loading state forever if no workflows exist. -------------------------------------------------------------------------------- -## __cylc-ui-0.4 (Released 2021-04-16)__ + +## cylc-ui-0.4 (Released 2021-04-16) ### Enhancements @@ -397,8 +390,8 @@ Display the new "platform" for jobs rather than the legacy "host" value. Create a urls module to simplify how we concatenate strings to create URLs. -------------------------------------------------------------------------------- -## __cylc-ui-0.3 (Released 2021-03-25)__ + +## cylc-ui-0.3 (Released 2021-03-25) Release 0.3 of Cylc UI. @@ -500,8 +493,8 @@ None. None. -------------------------------------------------------------------------------- -## __cylc-ui-0.2 (2020-07-14)__ + +## cylc-ui-0.2 (2020-07-14) Release 0.2 of Cylc UI. @@ -593,7 +586,7 @@ of a user guide. None. -------------------------------------------------------------------------------- -## __cylc-ui-0.1 (2019-09-18)__ + +## cylc-ui-0.1 (2019-09-18) Initial release of Cylc UI. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ffd173fb2..5e30dd035 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,16 +22,16 @@ first Pull Request (for each Cylc repository you contribute to). ## Contribute Code -**Enhancements** are made on the `master` branch. - -**Bugfixes** are made on the branch of the same name as the issue's milestone. -E.G. if the issue is on the `8.0.x` milestone, branch off of `8.0.x` to -develop your bugfix, then raise the pull request against the `8.0.x` branch. -We will later merge the `8.0.x` branch into `master`. - -Feel free to ask questions on the issue or developers chat if unsure about +Contributions are generally made against the `master` branch. +Feel free to ask questions on the issue or [developers chat](https://matrix.to/#/#cylc-web-gui:matrix.org) if unsure about anything. +We use [towncrier](https://towncrier.readthedocs.io/en/stable/index.html) for +generating the changelog. Changelog entries are added by running +``` +towncrier create ..md --content "Short description" +``` + ## Code Contributors diff --git a/changes.d/1751.feat.md b/changes.d/1751.feat.md new file mode 100644 index 000000000..7938e3f9b --- /dev/null +++ b/changes.d/1751.feat.md @@ -0,0 +1 @@ +More view options are now remembered & restored when navigating between workflows. \ No newline at end of file diff --git a/changes.d/template.jinja b/changes.d/template.jinja new file mode 100644 index 000000000..9a9651269 --- /dev/null +++ b/changes.d/template.jinja @@ -0,0 +1,13 @@ +{% if sections[""] %} +{% for category, val in definitions.items() if category in sections[""] %} +### {{ definitions[category]['name'] }} + +{% for text, pulls in sections[""][category].items() %} +{{ pulls|join(', ') }} - {{ text }} + +{% endfor %} +{% endfor %} +{% else %} +No significant changes. + +{% endif %} diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..7e020b216 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,17 @@ +[tool.towncrier] +directory = "changes.d" +filename = "CHANGES.md" +template = "changes.d/template.jinja" +underlines = ["", "", ""] +title_format = "## cylc-ui-{version} (Released {project_date})" +issue_format = "[#{issue}](https://github.com/cylc/cylc-ui/pull/{issue})" + +# These changelog sections will be shown in the defined order: +[[tool.towncrier.type]] +directory = "feat" # NB this is just the filename not directory e.g. 123.break.md +name = "🚀 Enhancements" +showcontent = true +[[tool.towncrier.type]] +directory = "fix" +name = "🔧 Fixes" +showcontent = true