Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
9ef20fc
feat: Models the core contract needs
Oct 2, 2026
771d48a
Feat: Protocols and Exceptions added for the core contract
Oct 2, 2026
5fe30c2
Feat: Private protocols for the BatchBackend
Oct 2, 2026
89d0bc9
feat: a fake backend to run unit tests against
Oct 6, 2026
af4c436
fix: some code cleanup in the helper functions
Oct 6, 2026
99f82ae
feat: setup for the unit test suite
Oct 6, 2026
e041acf
chore: style fix
Oct 6, 2026
d287307
chore: styling, unit test fixture
Oct 6, 2026
e830545
chore: single letter var `h` refering to hanlde changed to `handle`
Oct 6, 2026
be1e998
fix: unused parameter in `test_injected_failure_is_reported_per_job()…
Oct 6, 2026
2aeb589
chore: Making room in local fork for my documentation so i can easily…
Oct 7, 2026
5024ce9
fix: placed in the wrong folder :/
Oct 7, 2026
2c32012
chore: added testplan
Oct 7, 2026
3bf4210
feat: Models the core contract needs
Oct 2, 2026
0a6a9e1
Feat: Protocols and Exceptions added for the core contract
Oct 2, 2026
36cf7df
Feat: Private protocols for the BatchBackend
Oct 2, 2026
357050e
feat: a fake backend to run unit tests against
Oct 6, 2026
56bce86
fix: some code cleanup in the helper functions
Oct 6, 2026
5923545
feat: setup for the unit test suite
Oct 6, 2026
1f92acf
chore: style fix
Oct 6, 2026
f7cf50c
chore: styling, unit test fixture
Oct 6, 2026
bab3989
chore: single letter var `h` refering to hanlde changed to `handle`
Oct 6, 2026
eb3c644
fix: unused parameter in `test_injected_failure_is_reported_per_job()…
Oct 6, 2026
f727cbb
Merge branch 'feat/core-contract' of github.com:Alexander-Auer/interc…
Oct 7, 2026
feaf5e7
fix: made the OutputSpec optional as it is not suppoerted by all and …
Oct 7, 2026
46fd1a3
Feat: Core contract issue #16 (#1)
Alexander-Auer Oct 7, 2026
42dce34
fix: These documents should not exist in this way in the main repository
Oct 7, 2026
d67d380
fix: None check for the outputs in submissionspec
Oct 7, 2026
910b0b0
chore: trailing white spaces
Oct 7, 2026
a9fcca0
chore: fixed pre commit locally
Oct 7, 2026
74c40a7
chore: removed pdf, as they just take up space and no one will use th…
Oct 9, 2026
5cb1ee3
fix: JobHandle key is now a combination of the handle's fields instea…
Oct 19, 2026
b6af530
Merge branch 'main' into feat/core-contract
Alexander-Auer Oct 19, 2026
f90cdd4
feat: backend configuration and a closed registry
Alexander-Auer Oct 19, 2026
ceed1df
Merge branch 'main' into feat/core-contract
Alexander-Auer Oct 23, 2026
d310fe8
test: trim the unit tests to logical cases that can happen
Oct 23, 2026
529fa75
Merge branch 'feat/core-contract' into stack/registry
Oct 23, 2026
5d94d0f
test: trim the registry and configuration tests to logical cases
Oct 23, 2026
a644ce6
docs: follow the Diátaxis structure for the user documentation
Oct 23, 2026
b6e172f
fix: address the review of the core contract
Oct 23, 2026
bc5619e
Merge branch 'feat/core-contract' into stack/registry
Oct 23, 2026
7391fbe
fix: no references to the ADRs in the registry and configuration
Oct 23, 2026
a0211b4
Merge DIRACGrid main into stack/registry (the core contract, squash-m…
Oct 26, 2026
5d10b5a
fix: apply the core contract review to the registry
Oct 26, 2026
7d86596
refactor: rename registry.backend() to get_backend()
Oct 26, 2026
b4fb7bd
refactor!: one public configuration model per backend kind
Oct 26, 2026
03efb2a
docs: generate the configuration reference from the models
Oct 26, 2026
af2109f
fix: Rename FakeSettings to FakeConfig to stay in line with the revie…
Oct 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/user/reference/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ Anything else, including every name starting with `_`, is internal.

::: intercede.models

## Configuration

::: intercede.config

## Registry

::: intercede.registry

## Exceptions

::: intercede.exceptions
6 changes: 6 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ plugins:
show_source: false
members_order: source
merge_init_into_class: true
inherited_members: true
# Field tables for the configuration models, read from the models
# themselves, so the documentation cannot drift from the code.
extensions:
- griffe_pydantic:
schema: false

validation:
links:
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ ignore = [
"FLY002",
]

[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.ruff.lint.isort]
required-imports = ["from __future__ import annotations"]

Expand Down Expand Up @@ -144,6 +147,7 @@ intercede = { path = ".", editable = true }
mkdocs = "<2"
mkdocs-material = "*"
mkdocstrings = { version = "*", extras = ["python"] }
griffe-pydantic = "*"
[tool.pixi.feature.docs.tasks]
docs = { cmd = "mkdocs build --strict", description = "Build the documentation" }

Expand Down
21 changes: 21 additions & 0 deletions src/intercede/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,21 @@
from importlib.metadata import PackageNotFoundError
from importlib.metadata import version as get_version

from intercede import registry
from intercede.config import (
ARCConfig,
BackendConfig,
BatchLocalConfig,
BatchSSHConfig,
CloudConfig,
HTCondorCEConfig,
validate_config,
)
from intercede.exceptions import (
AuthenticationError,
ConfigurationError,
InterCEdeError,
RegistryError,
ResourceUnavailableError,
SpecificationRejectedError,
)
Expand Down Expand Up @@ -47,6 +58,7 @@

__all__ = [
"__version__",
"registry",
# protocols
"Diagnosable",
"JobBackend",
Expand All @@ -71,10 +83,19 @@
"StatusMap",
"Submission",
"SubmissionSpec",
# configuration
"ARCConfig",
"BackendConfig",
"BatchLocalConfig",
"BatchSSHConfig",
"CloudConfig",
"HTCondorCEConfig",
"validate_config",
# exceptions
"AuthenticationError",
"ConfigurationError",
"InterCEdeError",
"RegistryError",
"ResourceUnavailableError",
"SpecificationRejectedError",
]
18 changes: 18 additions & 0 deletions src/intercede/_backends/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"""Settings of the in-memory fake, which no public configuration reaches.

Every other backend is built from its public configuration model in
``intercede.config``.
"""

from __future__ import annotations

from typing import Literal

from intercede.models import _Model


class FakeConfig(_Model):
"""The in-memory fake, for the test suites."""

kind: Literal["fake"] = "fake"
resource: str = "fake://local"
20 changes: 16 additions & 4 deletions src/intercede/_backends/fake.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@

from __future__ import annotations

from collections.abc import Collection, Mapping, Sequence
from collections.abc import Callable, Collection, Mapping, Sequence
from dataclasses import dataclass, field
from pathlib import Path
from types import TracebackType
from typing import Self

from intercede._backends.config import FakeConfig
from intercede.exceptions import (
InterCEdeError,
ResourceUnavailableError,
Expand Down Expand Up @@ -92,6 +93,18 @@ def __init__(
self._next_id = 0
self._closed = False

@classmethod
def from_settings(cls, settings: FakeConfig) -> Self:
"""Build the fake from its settings; how the registry constructs it.

Args:
settings: The fake's settings: only the resource it reports.

Returns:
A new fake, not yet opened.
"""
return cls(resource=settings.resource)

# -- lifecycle ---------------------------------------------------------

async def __aenter__(self) -> Self:
Expand Down Expand Up @@ -252,10 +265,8 @@ def _check_supported(self, spec: SubmissionSpec) -> None:

if not self.resource_staging:
self._check_can_fetch(spec.inputs)
if spec.outputs is not None:
if spec.outputs is not None: # no outputs means nothing to upload
self._check_can_upload(spec.outputs.members)
else:
raise SpecificationRejectedError(f"tag: {spec.tag} contains no outputs")

def _check_container_support(self, spec: SubmissionSpec) -> None:
if spec.container is not None and not self.containers:
Expand Down Expand Up @@ -368,3 +379,4 @@ def _write_job_files(
_kill: type[Killable] = FakeBackend
_purge: type[Purgeable] = FakeBackend
_diag: type[Diagnosable] = FakeBackend
_built_by_registry: Callable[[FakeConfig], JobBackend] = FakeBackend.from_settings
Loading
Loading