Skip to content

Commit

Permalink
Fix cache location and doc urls for Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsirois committed Jan 11, 2025
1 parent 6ce9413 commit 39f7220
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 5 deletions.
10 changes: 10 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Release Notes

## 0.10.2

This release brings two fixes for `science` on Windows:
+ Previously the default `science` cache location was
`%USERPROFILE%\AppData\Local\science\science\Cache`. The redundant `science` subdirectory is now
removed, resulting in a default of `%USERPROFILE%\AppData\Local\science\Cache`.
+ The intra-site links in the local docs served via `science doc open` are now work. Previously
they mistakenly contained `\` in some URL path components causing deep links to return to the
home page.

## 0.10.1

This release fixes `science` to retry failed HTTP(S) fetches when appropriate.
Expand Down
2 changes: 1 addition & 1 deletion docs/_ext/sphinx_science/directives.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def run(self) -> list[nodes.Node]:
self.options.pop("toctree_hidden")

docnames = tuple(
str(doc.write(dest_dir).relative_to(app.srcdir).with_suffix(""))
doc.write(dest_dir).relative_to(app.srcdir).with_suffix("").as_posix()
for doc in doc_gen_directive.enumerate_docs(
DirectiveSpec(
name=doc_gen_directive_name,
Expand Down
2 changes: 1 addition & 1 deletion docs/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ similar small set of configuration, and then injects the file in your configurat
referencable by the interpreter `id` you supply in [command](science-model-command) `#{id}`
substitutions. Additionally, interpreter providers can provide keyed access to important files and
binaries within the distribution archives that you can reference via `{#id:<key>}`. The
documentation for each interpreter provider will detail both the distibution archive file keys
documentation for each interpreter provider will detail both the distribution archive file keys
supported and the configuration information required.

(built-in-providers)=
Expand Down
2 changes: 1 addition & 1 deletion science/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

from packaging.version import Version

__version__ = "0.10.1"
__version__ = "0.10.2"

VERSION = Version(__version__)
2 changes: 1 addition & 1 deletion science/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def active_context_config(config_type: type[_T]) -> _T | None:

@dataclass(frozen=True)
class ScienceConfig(ContextConfig):
DEFAULT_CACHE_DIR = Path(user_cache_dir("science"))
DEFAULT_CACHE_DIR = Path(user_cache_dir("science", appauthor=False))

@classmethod
def active(cls) -> ScienceConfig:
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 39f7220

Please sign in to comment.