Skip to content

Commit

Permalink
Merge branch 'rc/2.16.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
morriscb committed Nov 9, 2023
2 parents 028a9e6 + 1454801 commit 4467f13
Show file tree
Hide file tree
Showing 170 changed files with 183,181 additions and 170,555 deletions.
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
extend-ignore = E203
2 changes: 1 addition & 1 deletion .github/workflows/github-actions-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
strategy:
matrix:
os: ["macos-latest", "windows-latest", "ubuntu-latest"]
python-version: ["3.7", "3.8", "3.9"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
fail-fast: false
defaults:
run:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: ci/nightly
on:
schedule:
- cron: '05 6 * * *'
workflow_dispatch:



jobs:
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Change Log
All notable changes to this project will be documented in this file.

## [2.16.0] = 2023-11-09
- Python 3.10 and 3.11 support
- Support for VBO update release.
- Uspport for new VBO release
- Various bug fixes.
- See release notes on Github

## [2.14.0] = 2022-12-12
- Support for updated vbn release containing probe, lfp and behavior only data.
- Updates to Ophys data in anticipation of a forthcoming updated data release
Expand Down
2 changes: 1 addition & 1 deletion allensdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#
import logging

__version__ = '2.15.2'
__version__ = '2.16.0'


try:
Expand Down
32 changes: 31 additions & 1 deletion allensdk/api/cloud_cache/cloud_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,17 @@ def latest_manifest_file(self) -> str:
"""
return self._find_latest_file(self.manifest_file_names)

@property
def cache_dir(self) -> str:
"""Return the cache directory path.
Returns
-------
str
Full cache directory path
"""
return self._cache_dir

# ====================== BasicLocalCache methods ==========================

@abstractmethod
Expand Down Expand Up @@ -330,7 +341,7 @@ def data_path(self, file_id) -> dict:
RuntimeError
If the file cannot be downloaded
"""
file_attributes = self._manifest.data_file_attributes(file_id)
file_attributes = self.get_file_attributes(file_id)
exists = self._file_exists(file_attributes)
local_path = file_attributes.local_path
output = {'local_path': local_path,
Expand All @@ -339,6 +350,21 @@ def data_path(self, file_id) -> dict:

return output

def get_file_attributes(self, file_id):
"""
Retrieve file attributes for a given file_id from the meatadata.
Parameters
----------
file_id: str or int
The unique identifier of the file to be accessed
Returns
-------
CacheFileAttributes
"""
return self._manifest.data_file_attributes(file_id)


class CloudCacheBase(BasicLocalCache):
"""
Expand Down Expand Up @@ -1042,6 +1068,10 @@ def __init__(self, cache_dir, bucket_name, project_name,

_s3_client = None

@property
def bucket_name(self) -> str:
return self._bucket_name

@property
def s3_client(self):
if self._s3_client is None:
Expand Down
Loading

0 comments on commit 4467f13

Please sign in to comment.