Skip to content

Commit

Permalink
Finish sync with template
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeNaccarato committed Sep 30, 2024
1 parent 5f5707b commit a7412ee
Show file tree
Hide file tree
Showing 18 changed files with 589 additions and 803 deletions.
3 changes: 1 addition & 2 deletions dev.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function Install-Uv {
Param([switch]$Update)
$Env:PATH = "$HOME/.cargo/bin$([System.IO.Path]::PathSeparator)$Env:PATH"
if ((Get-Command 'uv' -ErrorAction 'Ignore') -and $Update) {
try { uv self update }
try { return uv self update }
catch [System.Management.Automation.NativeCommandExitException] {}
}
if ($IsWindows) {
Expand Down Expand Up @@ -221,7 +221,6 @@ function Sync-Template {
if (!(Get-Command 'uv' -ErrorAction 'Ignore')) { Install-Uv -Update }
$Copier = "copier@$(Get-Content '.copier-version')"
$Ref = $Stay ? (Get-Content '.copier-answers.yml' | Find-Pattern '^_commit:\s.+-(.+)$') : $Ref
if (!$Ref) {$Ref = 'HEAD'}
if ($Recopy) {
if ($Prompt) { return uvx $Copier recopy $Defaults --vcs-ref=$Ref }
return uvx $Copier recopy --overwrite --defaults
Expand Down
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@

def setup(app: Sphinx):
"""Add functions to Sphinx setup."""
init_nb_env()
app.connect("html-page-context", add_version_to_css)


Expand Down
26 changes: 26 additions & 0 deletions packages/_dev/dev/docs/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,27 @@
"""Documentation tools."""

import os
from pathlib import Path

DOCS = Path("docs")
"""Docs directory."""
PYPROJECT = Path("pyproject.toml")
"""Path to `pyproject.toml`."""
CHECKS = [DOCS, PYPROJECT]
"""Checks for the root directory."""


def chdir_docs() -> Path:
"""Ensure we are in the `docs` directory and return the root directory."""
root = get_root()
os.chdir(root / "docs")
return root


def get_root() -> Path:
"""Get the project root directory."""
path = Path().cwd()
while not all((path / check).exists() for check in CHECKS):
if path == (path := path.parent):
raise RuntimeError("Either documentation or `pyproject.toml` is missing.")
return path
59 changes: 0 additions & 59 deletions packages/_dev/dev/docs/config.py

This file was deleted.

82 changes: 0 additions & 82 deletions packages/_dev/dev/docs/format.py

This file was deleted.

27 changes: 0 additions & 27 deletions packages/_dev/dev/docs/models/__init__.py

This file was deleted.

36 changes: 0 additions & 36 deletions packages/_dev/dev/docs/models/paths.py

This file was deleted.

31 changes: 0 additions & 31 deletions packages/_dev/dev/docs/models/types.py

This file was deleted.

55 changes: 0 additions & 55 deletions packages/_dev/dev/docs/nbs.py

This file was deleted.

Loading

0 comments on commit a7412ee

Please sign in to comment.