Skip to content

Commit 0c4444c

Browse files
authored
Merge pull request #741 from ScilifelabDataCentre/dev
New release: version 2.10.0
2 parents e709662 + d19abe3 commit 0c4444c

19 files changed

Lines changed: 375 additions & 273 deletions

.github/pull_request_template.md

Lines changed: 42 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -6,90 +6,92 @@
66
4. When all boxes are checked, information is filled in, and the branch is updated: mark as Ready For Review and tag reviewers (top right)
77
5. Once there is a submitted review, implement the suggestions (if reasonable, otherwise discuss) and request an new review.
88

9-
If there is a field which you are unsure about, enter the edit mode of this description or go to the [PR template](https://github.com/ScilifelabDataCentre/dds_cli/blob/dev/.github/pull_request_template.md); There are invisible comments providing descriptions which may be of help.
9+
If there is a field which you are unsure about, enter the edit mode of this description or go to the [PR template](../.github/pull_request_template.md); There are invisible comments providing descriptions which may be of help.
1010

1111
## 1. Description / Summary
1212

13-
_Add a summary of the changes in this PR and the related issue._
13+
**Add a summary here**: What does this PR add/change and why?
1414

1515
## 2. Jira task / GitHub issue
1616

17-
_Link to the github issue or add the Jira task ID here._
17+
**Is this a GitHub issue?** --> Add the link to the github issue
1818

19-
## 3. Type of change
19+
**Is this from a Jira task?** --> If your branch does not contain info regarding the Jira task ID, put it here.
2020

21-
What _type of change(s)_ does the PR contain?
21+
## 3. Type of change - Add label
2222

23-
**Check the relevant boxes below. For an explanation of the different sections, enter edit mode of this PR description template.**
23+
**What _type of change(s)_ does the PR contain? For an explanation of the different options below, enter edit mode of this PR description template.**
2424

25-
- [ ] New feature
26-
- [ ] Breaking: _Why / How? Add info here._ <!-- Should be checked if the changes in this PR will cause existing functionality to not work as expected. E.g. with the master branch of the `dds_cli` -->
27-
- [ ] Non-breaking <!-- Should be checked if the changes will not cause existing functionality to fail. "Non-breaking" is just an addition of a new feature. -->
28-
- [ ] Bug fix <!-- Should be checked when a bug is fixed in existing functionality. If the bug fix also is a breaking change (see above), add info about that beside this check box. -->
29-
- [ ] Security Alert fix <!-- Should be checked if the PR attempts to solve a security vulnerability, e.g. reported by the "Security" tab in the repo. -->
30-
- [ ] Package update <!-- Should be checked if the Security alert fix consists of updating a package / dependency version -->
31-
- [ ] Major version update <!-- Should be checked if the package / dependency version update is a major upgrade, e.g. 1.0.0 to 2.0.0 -->
32-
- [ ] Documentation <!-- Should be checked if the PR adds or updates the CLI documentation -- anything in docs/ directory. -->
33-
- [ ] Workflow <!-- Should be checked if the PR includes a change in e.g. the github actions files (dds_cli/.github/*) or another type of workflow change. Anything that alters our or the codes workflow. -->
34-
- [ ] Tests **only** <!-- Should only be checked if the PR only contains tests, none of the other types of changes listed above. -->
25+
_If you do not want this change to be included in release notes, add the label `skip-changelog`._
26+
27+
- New feature
28+
- Breaking --> label: `breaking` <!-- If the changes in this PR will cause existing functionality to not work as expected. E.g. with the master branch of the `dds_cli`. Add info here on how the change is breaking. -->
29+
- Non-breaking --> label: `feature` <!-- If the changes will not cause existing functionality to fail. "Non-breaking" is just an addition of a new feature. -->
30+
- Database change --> label: `feature` or none at all.
31+
_Remember the to include a new migration version, **or** explain here why it's not needed._ <!-- If you've changed something in `models.py`. For a guide on how to add the a new migration version, look at the "Database changes" section in the README.md. -->
32+
- Bug fix --> label: `bug` <!-- If a bug is fixed in existing functionality. If the bug fix also is a breaking change (see above), add info about that beside this check box. -->
33+
- Security Alert fix <!-- If the PR attempts to solve a security vulnerability, e.g. reported by the "Security" tab in the repo. -->
34+
- Package update --> label: `dependency` <!-- If the Security alert fix consists of updating a package / dependency version -->
35+
- Major version update <!-- If the package / dependency version update is a major upgrade, e.g. 1.0.0 to 2.0.0 -->
36+
- Documentation --> label can be skipped, will be included in "other changes" <!-- If the PR adds or updates the cli docs. -->
37+
- Workflow --> label: `skip-changelog` <!-- If the PR includes a change in e.g. the github actions files (dds_web/.github/*) or another type of workflow change. Anything that alters our or the codes workflow. -->
38+
- Tests **only** --> label: `skip-changelog` <!-- If the PR only contains tests, none of the other types of changes listed above. -->
3539

3640
## 4. Additional information
3741

38-
- [ ] [Sprintlog](https://github.com/ScilifelabDataCentre/dds_cli/blob/dev/SPRINTLOG.md) <!-- Add a row at the bottom of the SPRINTLOG.md file (not needed if PR contains only tests). Follow the format of previous rows. If the PR is the first in a new sprint, add a new sprint header row (follow the format of previous sprints). -->
39-
- [ ] Blocking PRs <!-- Should be checked if there are blocking PRs or other tasks that need to be merged prior to this. Add link to PR or Jira card if this is the case. -->
40-
- [ ] Merged <!-- Should be checked if the "Blocking PRs" box was checked AND all blocking PRs have been merged / fixed. -->
41-
- [ ] PR to `master` branch: _If checked, read [the release instructions](https://github.com/ScilifelabDataCentre/dds_cli/blob/dev/docs/procedures/new_release.md)_ <!-- Check this if the PR is made to the `master` branch. Only the `dev` branch should be doing this. -->
42+
- [ ] I have added an entry to the [Sprintlog](../SPRINTLOG.md) <!-- Add a row at the bottom of the SPRINTLOG.md file (not needed if PR contains only tests). Follow the format of previous rows. If the PR is the first in a new sprint, add a new sprint header row (follow the format of previous sprints). -->
43+
- [ ] This is a PR to the `master` branch: _If checked, read [the release instructions](../doc/procedures/new_release.md)_ <!-- Check this if the PR is made to the `master` branch. Only the `dev` branch should be doing this. -->
4244
- [ ] I have followed steps 1-8. <!-- Should be checked if the "PR to `master` branch" box is checked AND the specified steps in the release instructions have been followed. -->
4345

4446
## 5. Actions / Scans
4547

46-
_Check the boxes when the specified checks have passed._
47-
48-
**For information on what the different checks do and how to fix it if they're failing, enter edit mode of this description or go to the [PR template](https://github.com/ScilifelabDataCentre/dds_cli/blob/dev/.github/pull_request_template.md).**
48+
**Make sure that the following checks/actions have passed.**
4949

50-
- [ ] **Black**
50+
- **Black**
5151
<!--
5252
What: Python code formatter.
5353
How to fix: Run `black .` locally to execute formatting.
5454
-->
55-
- [ ] **Pylint**
56-
<!--
57-
What: Python code linter.
58-
How to fix: Manually fix the code producing warnings. Code must get 10/10.
59-
-->
60-
- [ ] **Prettier**
55+
- **Prettier**
6156
<!--
6257
What: General code formatter. Our use case: MD and yaml mainly.
6358
How to fix: Run npx prettier --write . locally to execute formatting.
6459
-->
65-
- [ ] **Yamllint**
60+
- **Pylint**
61+
<!--
62+
What: Python code linter.
63+
How to fix: Manually fix the code producing warnings. Code must get 10/10.
64+
-->
65+
- **Yamllint**
6666
<!--
6767
What: Linting of yaml files.
6868
How to fix: Manually fix any errors locally.
6969
-->
70-
- [ ] **Tests**
70+
- **Tests**
7171
<!--
7272
What: Pytest to verify that functionality works as expected.
7373
How to fix: Manually fix any errors locally. Follow the instructions in the "Run tests" section of the README.md to run the tests locally.
7474
Additional info: The PR should ALWAYS include new tests or fixed tests when there are code changes. When pytest action has finished, it will post a codecov report; Look at this report and verify the files you have changed are listed. "90% <100.00%> (+0.8%)" means "Tests cover 90% of the changed file, <100 % of this PR's code changes are tested>, and (the code changes and added tests increased the overall test coverage with 0.8%)
7575
-->
76-
- [ ] **TestPyPI**
77-
<!--
78-
What: Builds the CLI and publishes to TestPyPI in order to verify before release.
79-
How to fix: Check the action logs and fix potential issues manually.
80-
-->
81-
- [ ] **CodeQL**
76+
- **CodeQL**
8277
<!--
8378
What: Scan for security vulnerabilities, bugs, errors.
8479
How to fix: Go through the alerts and either manually fix, dismiss or ignore. Add info on ignored or dismissed alerts.
8580
-->
86-
- [ ] **Trivy**
81+
- **Trivy**
8782
<!--
8883
What: Security scanner.
8984
How to fix: Go through the alerts and either manually fix, dismiss or ignore. Add info on ignored or dismissed alerts.
9085
-->
91-
- [ ] **Snyk**
86+
- **Snyk**
9287
<!--
9388
What: Security scanner.
9489
How to fix: Go through the alerts and either manually fix, dismiss or ignore. Add info on ignored or dismissed alerts.
9590
-->
91+
- **TestPyPI**
92+
<!--
93+
What: Builds the CLI and publishes to TestPyPI in order to verify before release.
94+
How to fix: Check the action logs and fix potential issues manually.
95+
-->
96+
97+
If an action does not pass and you need help with how to solve it, enter edit mode of this PR template or go to the [PR template](../.github/pull_request_template.md).

.github/release.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# file location/name: .github/release.yml
2+
changelog:
3+
exclude:
4+
labels: # A list of labels that exclude a pull request from appearing in release notes.
5+
- skip-changelog
6+
authors: # A list of user or bot login handles whose pull requests are to be excluded from release notes.
7+
- dependabot[bot]
8+
categories:
9+
- title: 🚀 Features
10+
labels:
11+
- feature
12+
- title: 🐛 Bug Fixes
13+
labels:
14+
- bug
15+
- title: ⛓️‍💥 Breaking Changes
16+
labels:
17+
- breaking
18+
- title: 🛡️ Dependencies
19+
labels:
20+
- dependency
21+
- title: Other Changes
22+
labels:
23+
- "*" # Catch-all for pull requests that didn't match any of the previous categories

.github/workflows/docs-github-pages-cli.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ jobs:
1313
name: Build the DDS CLI Documentation
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
17+
1718
- name: Make dependencies available to Docker container
1819
run: |
1920
cat requirements.txt requirements-dev.txt > ./docs/requirements.txt

.github/workflows/pytest-cli.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ on:
1212

1313
jobs:
1414
build:
15-
runs-on: ubuntu-latest
15+
runs-on: ubuntu-22.04
1616

1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1919

2020
- name: Set up Python 3.12
2121
uses: actions/setup-python@v2
@@ -32,6 +32,7 @@ jobs:
3232
COVERAGE_FILE=./coverage/.coverage
3333
pytest --color=yes --cov=./dds_cli --cov-report=xml:coverage/report.xml
3434
35-
- uses: codecov/codecov-action@v2
35+
- uses: codecov/codecov-action@v5
3636
with:
37+
token: ${{ secrets.CODECOV_TOKEN }}
3738
files: ./coverage/report.xml

.github/workflows/release-cli.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616

1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1919
name: Check out source-code repository
2020

2121
- name: Set up Python 3.12
@@ -77,12 +77,12 @@ jobs:
7777
--exclude-module=tests --log-level INFO dds_cli/__init__.py
7878
OUT_FILE_NAME: dds_cli_win_x86_64.exe
7979
ASSET_MIME: application/vnd.microsoft.portable-executable
80-
- os: ubuntu-20.04
80+
- os: ubuntu-22.04
8181
TARGET: Linux_x86_64
8282
CMD_BUILD: >
83-
pyinstaller -F -c -n dds_cli_ubuntu-20.04_x86_64 -i resources/scilifelab.icns
84-
--exclude-module=tests --target-arch x86_64 --log-level INFO dds_cli/__init__.py
85-
OUT_FILE_NAME: dds_cli_ubuntu-20.04_x86_64
83+
pyinstaller -F -c -n dds_cli_ubuntu-22.04_x86_64 -i resources/scilifelab.icns
84+
--exclude-module=tests --target-arch x86_64 --log-level INFO dds_cli/__init__.py
85+
OUT_FILE_NAME: dds_cli_ubuntu-22.04_x86_64
8686
ASSET_MIME: application/x-elf
8787
- os: ubuntu-latest # ubuntu-22.04 at the moment
8888
TARGET: Linux_x86_64
@@ -92,7 +92,7 @@ jobs:
9292
OUT_FILE_NAME: dds_cli_ubuntu-latest_x86_64
9393
ASSET_MIME: application/x-elf
9494
steps:
95-
- uses: actions/checkout@v3
95+
- uses: actions/checkout@v4
9696
- name: Python 3.9 setup
9797
uses: actions/setup-python@v4
9898
with:
@@ -124,7 +124,7 @@ jobs:
124124
needs: build-n-publish
125125
runs-on: ubuntu-latest
126126
steps:
127-
- uses: actions/checkout@v1
127+
- uses: actions/checkout@v4
128128
- name: Make dependencies available to Docker container
129129
run: |
130130
cat requirements.txt requirements-dev.txt > ./docs/requirements.txt

CHANGELOG.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
Changelog
22
==========
33

4+
.. _2.10.0:
5+
6+
2.10.0 - 2025-04-08
7+
~~~~~~~~~~~~~~~~~~~
8+
9+
- 🚀 Features
10+
- Inform users that data deletion with `dds data rm --rm-all` is queued; DDS handles deletion in background
11+
- Other Changes
12+
- Fix CLI docs action
13+
414
.. _2.9.0:
515

616
2.9.0 - 2024-12-18

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
</a>
2424
<br />
2525
<a href="https://github.com/ScilifelabDataCentre/dds_cli/actions/workflows/lint-black-cli.yml">
26-
<img alt="codecov" src="https://github.com/ScilifelabDataCentre/dds_cli/actions/workflows/lint-black-cli.yml/badge.svg?event=push">
26+
<img alt="Formatter: black" src="https://github.com/ScilifelabDataCentre/dds_cli/actions/workflows/lint-black-cli.yml/badge.svg?event=push">
2727
</a>
2828
<img alt="CodeQL" src="https://github.com/ScilifelabDataCentre/dds_cli/actions/workflows/codeql-cli.yml/badge.svg">
29-
<a href="https://codecov.io/gh/ScilifelabDataCentre/dds_web">
30-
<img alt="codecov" src="https://codecov.io/gh/ScilifelabDataCentre/dds_cli/branch/dev/graph/badge.svg?token=r5tM6o08Sd">
31-
</a>
29+
<a href="https://codecov.io/github/ScilifelabDataCentre/dds_cli" >
30+
<img src="https://codecov.io/github/ScilifelabDataCentre/dds_cli/graph/badge.svg?token=zsrDpNqs6v"/>
31+
</a>
3232
<img alt="Tests" src="https://github.com/ScilifelabDataCentre/dds_cli/actions/workflows/pytest-cli.yml/badge.svg">
3333
</p>
3434

SPRINTLOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,3 +397,21 @@ _Empty sprint_
397397
# 2024-12-16 - 2024-12-20
398398

399399
- New version: 2.9.0 ([#728](https://github.com/ScilifelabDataCentre/dds_cli/pull/728))
400+
- Include legacy packages (removed in Python 3.13) in development requirements to fix documentation on GitHub Pages ([#730](https://github.com/ScilifelabDataCentre/dds_cli/pull/730))
401+
402+
# 2025-01-20 - 2025-01-31
403+
404+
- Make release template ([#732](https://github.com/ScilifelabDataCentre/dds_cli/pull/732))
405+
- Fix codecov action ([#731](https://github.com/ScilifelabDataCentre/dds_cli/pull/731))
406+
407+
# 2025-02-17 – 2025-02-28
408+
409+
- Remove executable for Ubuntu 20.04 and add one for Ubuntu 22.04 ([#733](https://github.com/ScilifelabDataCentre/dds_cli/pull/733)).
410+
411+
# 2025-03-17 – 2025-03-28
412+
413+
- Inform users that data deletion has started when `dds data rm` is run ([#738](https://github.com/ScilifelabDataCentre/dds_cli/pull/738)).
414+
415+
# 2025-03-31 - 2025-04-11
416+
417+
- New version: 2.10.0 ([#742](https://github.com/ScilifelabDataCentre/dds_cli/pull/742))

dds_cli/data_remover.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def __init__(
3939
self,
4040
project: str,
4141
method: str = "rm",
42+
authenticate: bool = True,
4243
no_prompt: bool = False,
4344
token_path: str = None,
4445
):
@@ -47,6 +48,7 @@ def __init__(
4748
super().__init__(
4849
project=project,
4950
method=method,
51+
authenticate=authenticate,
5052
no_prompt=no_prompt,
5153
token_path=token_path,
5254
)
@@ -115,7 +117,6 @@ def delete_tempfile(file: pathlib.Path):
115117
LOG.warning("File deletion may have failed. Usage of space may increase.")
116118

117119
# Public methods ###################### Public methods #
118-
@removal_spinner
119120
def remove_all(self, *_, **__):
120121
"""Remove all files in project."""
121122
# Perform request to API to perform deletion
@@ -128,12 +129,15 @@ def remove_all(self, *_, **__):
128129
)
129130

130131
# Print out response - deleted or not?
131-
if "removed" not in response_json:
132+
queue_message: str = response_json.get("message")
133+
if "removed" not in response_json or "message" not in response_json:
132134
raise dds_cli.exceptions.APIError(
133135
"Malformatted response detected when attempting "
134136
f"to remove all files from {self.project}."
135137
)
136138

139+
dds_cli.utils.console.print("\n" + queue_message)
140+
137141
@removal_spinner
138142
def remove_file(self, files):
139143
"""Remove specific files."""

dds_cli/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
# Do not change bump the major version unless absolutely necessary - makes incompatible with API
44
# If mid or minor version reaches 9, continue to 10, 11 etc.
5-
__version__ = "2.9.0"
5+
__version__ = "2.10.0"

0 commit comments

Comments
 (0)