You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After moving to a new city and switched to a new network carrier, I failed in aiida-pseudo install sssp at the unpacking archive step as reported in #59 and #61. Running the command with --dowload-only, the downloaded compressed file is actually broken.
As an archlinux user living in China, it is very common to download broken packages when I install new software from AUR. The workaround would always be downloading dependent packages by hand from the browser(with proxy on) and put them in the specific local folder. The md5 is checked manually before rerun the install command.
I think a convenient way to 'semi-automatic' install sssp(and pseudo-dojo) families can be first download archive and protocol .json files into a folder, and install the family by designating the folder. Then run the install command with:
aiida-pseuda install sssp --local-source /tmp/
Otherwise, installing sssp family manually and then setting protocol for it separately is to tedious even with the #93 and the name should be correctly set to make aiida-quantumespresso tool to detect it.
I paste the code modified, I can make a PR to do it if we agree with this.
defdownload_sssp(
configuration: SsspConfiguration,
filepath_archive: pathlib.Path,
filepath_metadata: pathlib.Path,
traceback: bool=False
) ->None:
"""Download the pseudopotential archive and metadata for an SSSP configuration to a path on disk. :param configuration: the SSSP configuration to download. :param filepath_archive: absolute filepath to write the pseudopotential archive to. :param filepath_metadata: absolute filepath to write the metadata file to. :param traceback: boolean, if true, print the traceback when an exception occurs. """fromaiida_pseudo.groups.familyimportSsspFamilyfrom .utilsimportattemptfromrequests_fileimportFileAdapterrequest_file=requests.Session()
request_file.mount('file://', FileAdapter())
url_sssp_base='file:///tmp/'url_archive=f"{url_sssp_base}/{SsspFamily.format_configuration_filename(configuration, 'tar.gz')}"url_metadata=f"{url_sssp_base}/{SsspFamily.format_configuration_filename(configuration, 'json')}"withattempt('downloading selected pseudopotentials archive... ', include_traceback=traceback):
response=request_file.get(url_archive)
response.raise_for_status()
withopen(filepath_archive, 'wb') ashandle:
handle.write(response.content)
handle.flush()
withattempt('downloading selected pseudopotentials metadata... ', include_traceback=traceback):
response=request_file.get(url_metadata)
response.raise_for_status()
withopen(filepath_metadata, 'wb') ashandle:
handle.write(response.content)
handle.flush()
The text was updated successfully, but these errors were encountered:
Thanks @unkcpz . We are aware of this use case and that it is problematic with the current CLI. @mbercx and I have already been discussing the solution that you also seem to describe in PR #94 . Note that the name of the PR is misleading, but in essence we agreed to add a --from-dir flag that is the parallel to --download-only. Please have a look if that would solve your problem. If so, I propose we continue the discussion there and try to merge the PR at some point. I think @mbercx simply got distracted with other more pressing responsibilities but the code is there in principle and just needs some minor touches.
@sphuber thanks for redirecting. I have run Marnik's branch with --download-only and --from-download and it works good for me. So close this duplicate issue.
After moving to a new city and switched to a new network carrier, I failed in
aiida-pseudo install sssp
at the unpacking archive step as reported in #59 and #61. Running the command with--dowload-only
, the downloaded compressed file is actually broken.As an archlinux user living in China, it is very common to download broken packages when I install new software from AUR. The workaround would always be downloading dependent packages by hand from the browser(with proxy on) and put them in the specific local folder. The md5 is checked manually before rerun the install command.
I think a convenient way to 'semi-automatic' install sssp(and pseudo-dojo) families can be first download archive and protocol
.json
files into a folder, and install the family by designating the folder. Then run the install command with:Otherwise, installing sssp family manually and then setting protocol for it separately is to tedious even with the #93 and the name should be correctly set to make
aiida-quantumespresso
tool to detect it.I paste the code modified, I can make a PR to do it if we agree with this.
The text was updated successfully, but these errors were encountered: