Adding BaseFetcher and StaticFetcher#1
Open
jauy123 wants to merge 74 commits into
Open
Conversation
6 tasks
jauy123
commented
Jun 17, 2026
Comment on lines
-165
to
-181
| if not HAS_POOCH: | ||
| raise ModuleNotFoundError( | ||
| "pooch is needed as a dependency for from_PDB()" | ||
| ) | ||
| elif file_format not in SUPPORTED_FILE_FORMATS_DOWNLOADER: | ||
| if file_format not in SUPPORTED_FILE_FORMATS_DOWNLOADER: | ||
| raise ValueError( | ||
| "Invalid file format. Supported file formats " | ||
| f"are {SUPPORTED_FILE_FORMATS_DOWNLOADER}" | ||
| ) | ||
|
|
||
|
|
||
| if isinstance(pdb_ids, str): | ||
| _pdb_ids = (pdb_ids,) | ||
| else: | ||
| _pdb_ids = pdb_ids | ||
|
|
||
| if cache_path is None: | ||
| cache_path = pooch.os_cache(DEFAULT_CACHE_NAME_DOWNLOADER) |
jauy123
commented
Jun 17, 2026
Comment on lines
+149
to
+161
| match downloader: | ||
| case "HTTP": | ||
| fetch_downloader = pooch.HTTPDownloader(**download_kwargs) | ||
| case "FTP": | ||
| fetch_downloader = pooch.FTPDownloader(**download_kwargs) | ||
| case "SFTP": | ||
| fetch_downloader = pooch.SFTPDownloader(**download_kwargs) | ||
| case "DOI": | ||
| fetch_downloader = pooch.DOIDownloader(**download_kwargs) | ||
| case _: | ||
| raise ValueError( | ||
| f"Invalid downloader '{downloader}'. Valid options are 'HTTP', 'FTP', 'SFTP', 'DOI'." | ||
| ) |
Owner
Author
There was a problem hiding this comment.
There should be a case where the user can pass their own custom downloader (like for authentication for a web server)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #
Changes made in this Pull Request:
LLM / AI generated code disclosure
LLMs or other AI-powered tools (beyond simple IDE use cases) were used in this contribution: yes / no
PR Checklist
package/CHANGELOGfile updated?package/AUTHORS? (If it is not, add it!)Developers Certificate of Origin
I certify that I can submit this code contribution as described in the Developer Certificate of Origin, under the MDAnalysis LICENSE.