Skip to content

Commit

Permalink
Fix cache location and doc urls for Windows. (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsirois authored Jan 13, 2025
1 parent 5a54f9b commit 3f34db5
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 8 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.11.1

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` now work. Previously they
mistakenly contained `\` in some URL path components causing deep links to return to the home
page.

## 0.11.0

This release brings a new `science download` family of commands for downloading `ptex` binaries,
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.11.0"
__version__ = "0.11.1"

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
8 changes: 4 additions & 4 deletions uv.lock

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

0 comments on commit 3f34db5

Please sign in to comment.