Skip to content

Commit

Permalink
Make dev package unique
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeNaccarato committed Sep 30, 2024
1 parent 685708a commit fb8bf27
Show file tree
Hide file tree
Showing 23 changed files with 77 additions and 76 deletions.
8 changes: 4 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
"src/boilercore/settings_schema.json": "src/boilercore/settings.yaml",
"src/boilercore/settings_plugin_schema.json": "src/boilercore/settings_plugin.yaml",
// ? `dev.docs`
"packages/_dev/dev/docs/settings_schema.json": "packages/_dev/dev/docs/settings.yaml",
"packages/_dev/dev/docs/settings_plugin_schema.json": "packages/_dev/dev/docs/settings_plugin.yaml",
"packages/_dev/boilercore_dev/docs/settings_schema.json": "packages/_dev/dev/docs/settings.yaml",
"packages/_dev/boilercore_dev/docs/settings_plugin_schema.json": "packages/_dev/dev/docs/settings_plugin.yaml",
// ? `dev.tests`
"packages/_dev/dev/tests/settings_schema.json": "packages/_dev/dev/tests/settings.yaml",
"packages/_dev/dev/tests/settings_plugin_schema.json": "packages/_dev/dev/tests/settings_plugin.yaml"
"packages/_dev/boilercore_dev/tests/settings_schema.json": "packages/_dev/dev/tests/settings.yaml",
"packages/_dev/boilercore_dev/tests/settings_plugin_schema.json": "packages/_dev/dev/tests/settings_plugin.yaml"
}, // * ----------------------------------------------------------------------------- * #
//! Terminal
//? Use PowerShell on all platforms, facilitates running template scripts
Expand Down
10 changes: 5 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
from hashlib import sha256
from pathlib import Path

from dev.docs import DOCS, PYPROJECT, chdir_docs
from dev.docs.intersphinx import get_ispx, get_rtd, get_url
from dev.docs.types import IspxMappingValue
from boilercore_dev.docs import DOCS, PYPROJECT, chdir_docs
from boilercore_dev.docs.intersphinx import get_ispx, get_rtd, get_url
from boilercore_dev.docs.types import IspxMappingValue
from ruamel.yaml import YAML
from sphinx.application import Sphinx

Expand Down Expand Up @@ -172,15 +172,15 @@ def dpath(path: Path, rel: Path = DOCS) -> str:
mermaid_d3_zoom = False
# ! Autodoc2
nitpicky = True
autodoc2_packages = [f"../src/{PACKAGE}", "../packages/_dev/dev"]
autodoc2_packages = [f"../src/{PACKAGE}", f"../packages/_dev/{PACKAGE}_dev"]
autodoc2_render_plugin = "myst"
# ? Autodoc2 does not currently obey `python_display_short_literal_types` or
# ? `python_use_unqualified_type_names`, but `maximum_signature_line_length` makes it a
# ? bit prettier.
# ? https://github.com/sphinx-extensions2/sphinx-autodoc2/issues/58
maximum_signature_line_length = 1
# ? Parse Numpy docstrings
autodoc2_docstring_parser_regexes = [(".*", "dev.docs.docstrings")]
autodoc2_docstring_parser_regexes = [(".*", f"{PACKAGE}_dev.docs.docstrings")]
# ! Intersphinx
intersphinx_mapping = ISPX_MAPPING
nitpick_ignore = [
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from myst_parser.parsers.sphinx_ import MystParser
from numpydoc.docscrape import NumpyDocString, Parameter

from dev.docs.types import RegularSection, SeeAlsoSection, SingleSeeAlso
from boilercore_dev.docs.types import RegularSection, SeeAlsoSection, SingleSeeAlso

_PARAMETERS_SECTIONS: Final[tuple[str, ...]] = (
"Parameters",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Intersphinx URL handlers."""

from dev.docs.types import IspxMappingValue
from boilercore_dev.docs.types import IspxMappingValue


def get_url(url: str, latest: bool = False):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import seaborn as sns

from boilercore.notebooks.namespaces import get_nb_ns
from dev.tests.modelfun import FIT
from boilercore_dev.tests.modelfun import FIT

MODELFUN = Path("src/boilercore/stages/modelfun.ipynb").resolve()

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
from cyclopts import App
from pydantic import BaseModel

from dev.tools import add_changes, environment
from dev.tools.environment import escape, run
from dev.tools.types import ChangeType
from boilercore_dev.tools import add_changes, environment
from boilercore_dev.tools.environment import escape, run
from boilercore_dev.tools.types import ChangeType


class Constants(BaseModel):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from dulwich.repo import Repo

from dev.tools.types import ChangeType
from boilercore_dev.tools.types import ChangeType


def add_change(typ: ChangeType = "change"):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
SettingsConfigDict,
)

import dev
from dev.modules import get_module_name
import boilercore_dev
from boilercore_dev.modules import get_module_name


class Constants(BaseModel):
"""Constants for {mod}`~dev.tools.environment`."""

dev_tool_config: tuple[str, ...] = ("tool", get_module_name(dev))
dev_tool_config: tuple[str, ...] = ("tool", get_module_name(boilercore_dev))
"""Path to `dev` tool configuration in `pyproject.toml`."""
pylance_version_source: str = ".pylance-version"
"""Path to Pylance version file."""
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions packages/_dev/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["flit_core==3.9.0"]
build-backend = "flit_core.buildapi"

[project]
name = "dev"
name = "boilercore_dev"
version = "0.0.0"
description = "Dev"
dependencies = [
Expand All @@ -28,7 +28,7 @@ dependencies = [
"pytest>=8.2.2",
]
[project.scripts]
"dev" = "dev.tools.__main__:main"
dev = "boilercore_dev.tools.__main__:main"

[tool.fawltydeps]
deps = ["packages/_dev/pyproject.toml"]
Expand All @@ -37,7 +37,7 @@ ignore_undeclared = [
# ? This project
"boilercore",
# ? Workspaces
"dev",
"boilercore_dev",
# ? Path-sourced deps
"cachier",
]
Expand Down
11 changes: 6 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ classifiers = [
# "Programming Language :: Python :: 3.14", # ? Not yet beta (https://peps.python.org/pep-0745)
]
dependencies = [
# TODO
# ? Path-sourced deps
"cachier",
# ? Proper dependencies
Expand Down Expand Up @@ -59,7 +60,7 @@ constraint-dependencies = [
]
dev-dependencies = [
# ? Workspaces
"dev",
"boilercore_dev",
# ? Dev
"debugpy>=1.8.2",
"dvc[gs]>=3.51.2",
Expand Down Expand Up @@ -100,11 +101,11 @@ members = ["packages/*"]
exclude = ["packages/cachier"]
[tool.uv.sources]
cachier = { path = "packages/cachier", editable = true }
dev = { workspace = true }
boilercore_dev = { workspace = true }

[tool.coverage.run]
branch = true
source = ["boilercore", "dev", "tests"]
source = ["boilercore", "boilercore_dev", "tests"]

[tool.fawltydeps]
deps = ["pyproject.toml"]
Expand Down Expand Up @@ -273,7 +274,7 @@ reportUnusedCallResult = "none"
cache-dir = ".cache/.ruff_cache"
extend-exclude = ["typings", "packages/cachier"]
extend-include = ["*.ipynb"]
src = ["src", "docs", "scripts", "f"]
src = ["src", "docs", "scripts"]
output-format = "grouped"
fix = true
preview = true
Expand Down Expand Up @@ -354,7 +355,7 @@ convention = "numpy"
"S101", # Allow assert
"T201", # Allow print in notebooks
]
"packages/_dev/dev/tools/add_changes.py" = [
"packages/_dev/boilercore_dev/tools/add_changes.py" = [
"S603", # Allow shell expressions here
"S607", # Allow shell expressions here
]
Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

import pytest
import seaborn as sns
from boilercore_dev.tests import EMPTY_NB
from boilercore_dev.tests.modelfun import FIT
from cachier import cachier, set_default_params # pyright: ignore[reportMissingImports]
from dev.tests import EMPTY_NB
from dev.tests.modelfun import FIT

import boilercore
from boilercore.hashes import hash_args
Expand Down
2 changes: 1 addition & 1 deletion tests/test_modelfun.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Test model function and model fit."""

import pytest
from dev.tests.modelfun import FIT
from boilercore_dev.tests.modelfun import FIT
from numpy import allclose, array, linspace, sqrt
from sympy import Eq

Expand Down
2 changes: 1 addition & 1 deletion tests/test_namespaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from types import SimpleNamespace

from dev.tests import NB
from boilercore_dev.tests import NB


def test_not_cached_before(cache_file):
Expand Down
90 changes: 45 additions & 45 deletions uv.lock

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

0 comments on commit fb8bf27

Please sign in to comment.