ACEsuit / ACE.jl

Parameterisation of Equivariant Properties of Particle Systems
66 stars 15 forks source link

`create_artifacts.jl` doesn't work as it should? #122

Closed gelzinyte closed 2 years ago

gelzinyte commented 2 years ago

The way I understand scripts/create_artifacts.jl is that it should download the file from the url and add the corresponding hashes to Artifacts.toml so that the same files can be downloaded whenever an artefact is called. The problem currently, I think, is that tarfile gets downloaded, but then the line

tarball_hash = archive_artifact(hash_, joinpath(tarfile))

re-compresses the downloaded file and gives a hash not to the original file, but to the tar. As a result, whenever an artefact is called, the original (non-tarred) file gets downloaded, but its hash doesn't match the hash of the downloaded and archive_artifact-tarred hash.

Instead of using archive_artifact, the script should just get and bind the hash of the directly downloaded file, which ArtifactUtils does.

You can also see the problem, because re-running create_artifacts.jl gives different file-hashes every time.

I think I solved the "make a file with a url into an artefact" issue in ACE1pack, here.

cortner commented 2 years ago

I think this should be in ACE1.jl?