Skip to content

Commit

Permalink
Merge branch 'main' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewpeterkort authored Sep 18, 2024
2 parents 2fe8467 + 37a2c65 commit 561be43
Show file tree
Hide file tree
Showing 96 changed files with 792 additions and 13,928 deletions.
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
[flake8]
per-file-ignores =
tests/integration/test_problems.py:E501
max-line-length=120
ignore = W605

exclude =
__pycache__
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,7 @@ jobs:
- name: Unit tests (No server dependencies) with pytest
run: pytest tests/unit --cov=drs_downloader --cov-report term-missing

# - name: Unit and Integration tests with pytest
# run: pytest tests/unit tests/integration --cov=drs_downloader --cov-report term-missing


build-linux:
needs: test
runs-on: ubuntu-latest
Expand All @@ -74,7 +71,7 @@ jobs:
with:
python-version: "3.10"

- name: Install dependencies
- name: Build executable
shell: bash
run: |
python -m venv venv
Expand Down Expand Up @@ -104,7 +101,7 @@ jobs:
with:
python-version: "3.10"

- name: Install dependencies
- name: Build executable
shell: bash
run: |
python -m venv venv
Expand Down
Binary file removed drs_downloader/.DS_Store
Binary file not shown.
15 changes: 15 additions & 0 deletions drs_downloader/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,18 @@
DEFAULT_MAX_SIMULTANEOUS_DOWNLOADERS = 10
DEFAULT_MAX_SIMULTANEOUS_PART_HANDLERS = 3
DEFAULT_PART_SIZE = 10 * MB


def check_for_AnVIL_URIS(uris_list: list[str]) -> bool:
for uri in uris_list:
if is_AnVIL_URI(uri):
return True


def is_AnVIL_URI(uri: str) -> bool:
if isinstance(uri, str):
# Making the whole uri lowercase shouldn't matter since uuids are lowercase anyway
uri = uri.lower()
if (uri.startswith("drs://drs.anv0:") or uri.startswith("drs://dg.anv0:")):
return True
return False
Loading

0 comments on commit 561be43

Please sign in to comment.