Skip to content

Commit a62ce2e

Browse files
authored
Merge branch 'master' into 59-change-context-type-for-v2
2 parents e6fdf00 + aa426b7 commit a62ce2e

File tree

9 files changed

+21
-13
lines changed

9 files changed

+21
-13
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ This version adds Clowder 2 support and removes the old method of extractor regi
1515
- remove RABBITMQ_EXCHANGE parameter and REGISTRATION_URL parameter.
1616
- remove DatasetsAPI and object-oriented ClowderClient.
1717

18+
## 2.7.0 - 2023-02-14
19+
20+
When extractors download a file from clowder it will ask clowder to not track that download.
21+
This will result in only those donwloads to be counted by users, not extractors.
22+
23+
### Changed
24+
- Ask not to track a download from an extractor.
25+
1826
## 2.6.0 - 2022-06-14
1927

2028
This will change how clowder sees the extractors. If you have an extractor, and you specify

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ create new extractors.
1515
Install using pip (for most recent versions see: https://pypi.org/project/pyclowder/):
1616

1717
```
18-
pip install pyclowder==2.6.0
18+
pip install pyclowder==2.7.0
1919
```
2020

2121
Install pyClowder on your system by cloning this repo:

description.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Installation
1414
Install using pip (for most recent versions see: https://pypi.org/project/pyclowder/):
1515

1616
```
17-
pip install pyclowder==2.6.0
17+
pip install pyclowder==2.7.0
1818
```
1919

2020
Install pyClowder on your system by cloning this repo:

docs/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@
5757
# built documents.
5858
#
5959
# The short X.Y version.
60-
version = u'2.6'
60+
version = u'2.7'
6161
# The full version, including alpha/beta/rc tags.
62-
release = u'2.6.0'
62+
release = u'2.7.0'
6363

6464
# The language for content autogenerated by Sphinx. Refer to documentation
6565
# for a list of supported languages.

pyclowder/connectors.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ def _prepare_dataset(self, host, secret_key, resource):
340340
for ds_file in missing_files:
341341
# Download file to temp directory
342342
inputfile = pyclowder.files.download(self, host, secret_key, ds_file['id'], ds_file['id'],
343-
ds_file['file_ext'])
343+
ds_file['file_ext'], tracking=False)
344344
# Also get file metadata in format expected by extractor
345345
(file_md_dir, file_md_tmp) = self._download_file_metadata(host, secret_key, ds_file['id'],
346346
ds_file['filepath'])
@@ -426,8 +426,9 @@ def _process_message(self, body):
426426
file_path = self._check_for_local_file(file_metadata)
427427
if not file_path:
428428
file_path = pyclowder.files.download(self, host, secret_key, resource["id"],
429-
resource["intermediate_id"],
430-
resource["file_ext"])
429+
resource["intermediate_id"],
430+
resource["file_ext"],
431+
tracking=False)
431432
else:
432433
found_local = True
433434
resource['local_paths'] = [file_path]

pyclowder/files.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def get_download_url(connector, host, key, fileid, intermediatefileid=None, ext=
3636
return download_url
3737

3838
# pylint: disable=too-many-arguments
39-
def download(connector, host, key, fileid, intermediatefileid=None, ext=""):
39+
def download(connector, host, key, fileid, intermediatefileid=None, ext="", tracking=True):
4040
"""Download file to be processed from Clowder.
4141
4242
Keyword arguments:
@@ -46,6 +46,7 @@ def download(connector, host, key, fileid, intermediatefileid=None, ext=""):
4646
fileid -- the file that is currently being processed
4747
intermediatefileid -- either same as fileid, or the intermediate file to be used
4848
ext -- the file extension, the downloaded file will end with this extension
49+
tracking -- should the download action be tracked
4950
"""
5051
client = ClowderClient(host=host, key=key)
5152
if clowder_version == 2:
@@ -54,7 +55,6 @@ def download(connector, host, key, fileid, intermediatefileid=None, ext=""):
5455
inputfilename = v1files.download(connector, client, fileid, intermediatefileid, ext)
5556
return inputfilename
5657

57-
5858
def download_info(connector, host, key, fileid):
5959
"""Download file summary metadata from Clowder.
6060

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# pip-compile
66
#
7-
certifi==2021.10.8
7+
certifi==2022.12.7
88
# via requests
99
charset-normalizer==2.0.10
1010
# via requests
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pyclowder==2.6.0
1+
pyclowder==2.7.0

version.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/bin/bash
22

3-
VERSION=${1:-2.5.1}
4-
3+
VERSION=$(awk '/^## / { print $2 }' CHANGELOG.md | head -1)
54
MAJOR=${VERSION%.*}
65

76
sed -i~ "s/## unreleased.*/## ${VERSION} - $(date +'%Y-%m-%d')/i" CHANGELOG.md

0 commit comments

Comments
 (0)