Skip to content

Commit

Permalink
Merge pull request #655 from hakonanes/fix-654
Browse files Browse the repository at this point in the history
Fix downloading remote datasets to cache on Windows
  • Loading branch information
hakonanes committed Nov 3, 2023
2 parents 7e0425a + f5b79b9 commit bde4cd0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
"profile": "https://github.com/ericpre",
"contributions": [
"code",
"maintenance"
"maintenance",
"bug"
]
},
{
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ Fixed
- Conversion from EDAX TSL projection center (PC) convention for (PCy, PCz) for
rectangular detectors is corrected.
(`#652 <https://github.com/pyxem/kikuchipy/pull/652>`_)
- Downloading files in the ``data`` module to the local cache on Windows.
(`#655 <https://github.com/pyxem/kikuchipy/pull/655>`_)

0.8.7 (2023-07-24)
==================
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Thanks go to these wonderful people ([emoji key](https://allcontributors.org/doc
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/AndreasBugten"><img src="https://avatars.githubusercontent.com/u/106192446?v=4?s=100" width="100px;" alt="AndreasBugten"/><br /><sub><b>AndreasBugten</b></sub></a><br /><a href="https://github.com/pyxem/kikuchipy/commits?author=AndreasBugten" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/CSSFrancis"><img src="https://avatars.githubusercontent.com/u/41125831?v=4?s=100" width="100px;" alt="Carter Francis"/><br /><sub><b>Carter Francis</b></sub></a><br /><a href="https://github.com/pyxem/kikuchipy/commits?author=CSSFrancis" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ericpre"><img src="https://avatars.githubusercontent.com/u/11851990?v=4?s=100" width="100px;" alt="Eric Prestat"/><br /><sub><b>Eric Prestat</b></sub></a><br /><a href="https://github.com/pyxem/kikuchipy/commits?author=ericpre" title="Code">💻</a> <a href="#maintenance-ericpre" title="Maintenance">🚧</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ericpre"><img src="https://avatars.githubusercontent.com/u/11851990?v=4?s=100" width="100px;" alt="Eric Prestat"/><br /><sub><b>Eric Prestat</b></sub></a><br /><a href="https://github.com/pyxem/kikuchipy/commits?author=ericpre" title="Code">💻</a> <a href="#maintenance-ericpre" title="Maintenance">🚧</a> <a href="https://github.com/pyxem/kikuchipy/issues?q=author%3Aericpre" title="Bug reports">🐛</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.ntnu.edu/employees/hakon.w.anes"><img src="https://avatars.githubusercontent.com/u/12139781?v=4?s=100" width="100px;" alt="Håkon Wiik Ånes"/><br /><sub><b>Håkon Wiik Ånes</b></sub></a><br /></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/friedkitteh"><img src="https://avatars.githubusercontent.com/u/11888052?v=4?s=100" width="100px;" alt="Lars Lervik"/><br /><sub><b>Lars Lervik</b></sub></a><br /><a href="https://github.com/pyxem/kikuchipy/issues?q=author%3Afriedkitteh" title="Bug reports">🐛</a> <a href="https://github.com/pyxem/kikuchipy/commits?author=friedkitteh" title="Code">💻</a> <a href="https://github.com/pyxem/kikuchipy/commits?author=friedkitteh" title="Documentation">📖</a> <a href="#question-friedkitteh" title="Answering Questions">💬</a> <a href="https://github.com/pyxem/kikuchipy/pulls?q=is%3Apr+reviewed-by%3Afriedkitteh" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/pyxem/kikuchipy/commits?author=friedkitteh" title="Tests">⚠️</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.ntnu.edu/employees/magnus.nord"><img src="https://avatars.githubusercontent.com/u/1690979?v=4?s=100" width="100px;" alt="Magnus Nord"/><br /><sub><b>Magnus Nord</b></sub></a><br /><a href="https://github.com/pyxem/kikuchipy/commits?author=magnunor" title="Documentation">📖</a></td>
Expand Down
4 changes: 2 additions & 2 deletions kikuchipy/data/_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -769,12 +769,12 @@ def fetch_file_path_from_collection(
self, downloader: pooch.HTTPDownloader
) -> file_path: # pragma: no cover
file_paths = marshall.fetch(
os.path.join("data", self.collection_name),
"data/" + self.collection_name,
downloader=downloader,
processor=pooch.Unzip(extract_dir=self.file_directory),
)

os.remove(os.path.join(marshall.path, "data", self.collection_name))
os.remove(Path(marshall.path) / "data" / self.collection_name)

# Ensure the file is in the collection
desired_name = self.file_relpath.name
Expand Down

0 comments on commit bde4cd0

Please sign in to comment.