Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
d1a3200
Reduce using "please" in docs
alexander-yevsyukov Jan 20, 2026
11c6121
Improve text layout
alexander-yevsyukov Jan 20, 2026
b16788a
Bump version -> `2.0.0-SNAPSHOT.394`
alexander-yevsyukov Jan 20, 2026
9c0a34b
Bump Validation and CoreJvm Compiler
alexander-yevsyukov Jan 20, 2026
6379b9f
Update dependency reports
alexander-yevsyukov Jan 20, 2026
1d17e3b
Merge remote-tracking branch 'origin/master' into docs-set-1
alexander-yevsyukov Jan 20, 2026
1397636
Update config ref.
alexander-yevsyukov Jan 20, 2026
6e2fe2b
Remove "Migration Guide" section
alexander-yevsyukov Jan 21, 2026
479c28c
Improve text layout
alexander-yevsyukov Jan 21, 2026
4230509
Remove unnecessary decorations
alexander-yevsyukov Jan 21, 2026
77bbd9c
Remove hallucinated section links
alexander-yevsyukov Jan 21, 2026
4bf36f0
Remove redundant horizontal lines
alexander-yevsyukov Jan 21, 2026
09a9d47
Convert titles to sentence case
alexander-yevsyukov Jan 22, 2026
90bc7db
Allow empty lines after headers
alexander-yevsyukov Jan 22, 2026
78da3fb
Fix the proto options example
alexander-yevsyukov Jan 22, 2026
2d1f0aa
Use braces around proto options
alexander-yevsyukov Jan 22, 2026
0300e79
Temporarily add source code of proto options
alexander-yevsyukov Jan 22, 2026
94f69c0
Fix capitalization
alexander-yevsyukov Jan 22, 2026
449a789
Backtick code in ToC
alexander-yevsyukov Jan 22, 2026
3671ae4
Put the "Collection constraints" section after "Temporal constraints"
alexander-yevsyukov Jan 22, 2026
16a2736
Describe Validation components
alexander-yevsyukov Jan 22, 2026
7fb87ac
Remove "Configuration & tooling" section
alexander-yevsyukov Jan 22, 2026
51c5036
Rename "Installation" to "Adding Validation to your build"
alexander-yevsyukov Jan 22, 2026
d3d0b60
Describe adding Validation to a Gradle build
alexander-yevsyukov Jan 22, 2026
5383ae2
Improve the example type name in the `ValidationError` docs
alexander-yevsyukov Jan 22, 2026
0bb6196
Remove the leading zero in the Introduction section title
alexander-yevsyukov Jan 22, 2026
f99685a
Add wording for the `first-model.md`
alexander-yevsyukov Jan 22, 2026
9f5204a
Remove mentioning of temporal constraints
alexander-yevsyukov Jan 23, 2026
e409aa5
Add `code/first-model` subproject
alexander-yevsyukov Jan 23, 2026
c681d66
Make JVM runtime expose `Base.lib` at the `api` level
alexander-yevsyukov Jan 23, 2026
9e97727
Remove redundant dependencies
alexander-yevsyukov Jan 23, 2026
5918462
Remove commented out code
alexander-yevsyukov Jan 23, 2026
fe8e722
Improve package name for the `BankCard` example
alexander-yevsyukov Jan 23, 2026
fe75e36
Fix Kotlin package path
alexander-yevsyukov Jan 23, 2026
5316c03
Add Java test for `BankCard`
alexander-yevsyukov Jan 23, 2026
8ee49bd
Improve Kotlin test name
alexander-yevsyukov Jan 23, 2026
652a545
Bump Gradle -> `9.3.0`
alexander-yevsyukov Jan 23, 2026
c1dde85
Update dependency reports
alexander-yevsyukov Jan 23, 2026
de11e7e
Add `spine-compiler` plugin dependency
alexander-yevsyukov Jan 29, 2026
e48782a
Remove outdated configuration proto code
alexander-yevsyukov Jan 29, 2026
5cc8b40
Update dependency reports
alexander-yevsyukov Jan 29, 2026
01e5e12
Add requirements for supported browsers
alexander-yevsyukov Jan 29, 2026
7300c06
Auto-updated by IDEA
alexander-yevsyukov Jan 29, 2026
a274f85
Improve the structure of the `docs` directory
alexander-yevsyukov Jan 31, 2026
b7f6ab0
Add structure proposal
alexander-yevsyukov Jan 31, 2026
ebe0672
Improve formatting
alexander-yevsyukov Jan 31, 2026
69f0da2
Move content under the `content/docs` dir
alexander-yevsyukov Feb 3, 2026
e6827a6
Add scripts and settings
alexander-yevsyukov Feb 3, 2026
0e9cc87
Add Gradle project
alexander-yevsyukov Feb 3, 2026
ea1dca4
Add Go module for Validation Docs
alexander-yevsyukov Feb 4, 2026
912a91e
Add `docs/.gitignore`
alexander-yevsyukov Feb 4, 2026
0f3b92f
Add assets
alexander-yevsyukov Feb 4, 2026
c475633
Rename `_site` to `_preview`
alexander-yevsyukov Feb 4, 2026
eff6d99
Add content for the preview
alexander-yevsyukov Feb 4, 2026
d383d34
Fix placement of `_index.md`
alexander-yevsyukov Feb 5, 2026
f340143
Fix import of `site-commons`
alexander-yevsyukov Feb 5, 2026
3b8236c
Add `buildAll` tasks for building embedded code
alexander-yevsyukov Feb 5, 2026
ae5826b
Obtain the example version from the main code build
alexander-yevsyukov Feb 5, 2026
d085a55
Use the same `gradle.properties` for the documentation Gradle build
alexander-yevsyukov Feb 5, 2026
091f906
Document Gradle project of the documentation
alexander-yevsyukov Feb 5, 2026
bf1ace9
Fix relative paths in scripts
alexander-yevsyukov Feb 5, 2026
9b38339
Fix symlinks to use relative paths
alexander-yevsyukov Feb 5, 2026
90bdaf4
Fix import placement
alexander-yevsyukov Feb 5, 2026
181ba88
Bump Gradle -> `9.3.1`
alexander-yevsyukov Feb 5, 2026
75a0f4e
Ignore `_out` directories in `_code` subprojects
alexander-yevsyukov Feb 9, 2026
011527b
Do not use code from `buildSrc` in example projects
alexander-yevsyukov Feb 9, 2026
d299f4d
Add `TIMEOUT_MINUTES` property
alexander-yevsyukov Feb 9, 2026
ca70c08
Refer to Spine Maven repositories for plugin management
alexander-yevsyukov Feb 9, 2026
169e733
Stop using `includeBuild`
alexander-yevsyukov Feb 9, 2026
a6adb93
Build `firat-model` via `RunGradle`
alexander-yevsyukov Feb 9, 2026
5edee38
Add `docs/buildSrc` reference
alexander-yevsyukov Feb 9, 2026
1df5d08
Improve regex patterns and docs
alexander-yevsyukov Feb 9, 2026
e31ae89
Improve regex patterns and docs
alexander-yevsyukov Feb 9, 2026
ca5f681
Fix the reference to the `clean` task
alexander-yevsyukov Feb 9, 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
34 changes: 34 additions & 0 deletions .github/workflows/check-code-embedding.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Check Code Embedding

on:
pull_request:

jobs:
build-embedded-code:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
submodules: 'recursive'

- uses: actions/setup-java@v5
with:
java-version: 17
distribution: zulu

- run: cd docs && ./gradlew :buildAll

check-embedded-samples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
submodules: 'recursive'

- uses: actions/setup-java@v5
with:
java-version: 17
distribution: zulu

- name: Check Embedding
run: cd docs && ./gradlew :checkSamples
1 change: 1 addition & 0 deletions .idea/inspectionProfiles/Project_Default.xml

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

3 changes: 3 additions & 0 deletions buildSrc/src/main/kotlin/BuildExtensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ val PluginDependenciesSpec.protobuf: PluginDependencySpec
val PluginDependenciesSpec.prototap: PluginDependencySpec
get() = id(ProtoTap.gradlePluginId).version(ProtoTap.version)

val PluginDependenciesSpec.`spine-compiler`: PluginDependencySpec
get() = id(Compiler.pluginId).version(Compiler.version)

val PluginDependenciesSpec.`gradle-doctor`: PluginDependencySpec
get() = id(GradleDoctor.pluginId).version(GradleDoctor.version)

Expand Down
1 change: 1 addition & 0 deletions buildSrc/src/main/kotlin/BuildSettings.kt
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ object BuildSettings {
val javaVersionCompat = JavaVersion.toVersion(JVM_VERSION)
val jvmTarget = JvmTarget.JVM_17
const val REMOTE_DEBUG_PORT = 5566
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This introduces a magic-number timeout without context. Consider adding a short KDoc/line comment explaining what this timeout is used for, and/or naming it more specifically (e.g., DOCS_BUILD_TIMEOUT_MINUTES, CI_TASK_TIMEOUT_MINUTES) so its scope is clear.

Suggested change
const val REMOTE_DEBUG_PORT = 5566
const val REMOTE_DEBUG_PORT = 5566
/**
* Default timeout (in minutes) for long-running Gradle tasks in CI.
*/

Copilot uses AI. Check for mistakes.
const val TIMEOUT_MINUTES = 42L
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ object CoreJvmCompiler {
/**
* The version used to in the build classpath.
*/
const val dogfoodingVersion = "2.0.0-SNAPSHOT.050"
const val dogfoodingVersion = "2.0.0-SNAPSHOT.051"

/**
* The version to be used for integration tests.
*/
const val version = "2.0.0-SNAPSHOT.050"
const val version = "2.0.0-SNAPSHOT.051"

/**
* The ID of the Gradle plugin.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ object Validation {
/**
* The version of the Validation library artifacts.
*/
const val version = "2.0.0-SNAPSHOT.392"
const val version = "2.0.0-SNAPSHOT.393"

/**
* The last version of Validation compatible with ProtoData.
Expand Down
100 changes: 50 additions & 50 deletions dependencies.md

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Hugo cache files
_preview/resources
public

# Node modules
_preview/node_modules

# Used to control concurrency between multiple Hugo instances
_preview/.hugo_build.lock

# Needed for navigation/intellisense help inside code editors
jsconfig.json

# `_out` directory in the example projects
**/_out
62 changes: 62 additions & 0 deletions docs/GRADLE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Gradle project of the Validation Documentation

This document describes the Gradle project structure and build configuration for
building the documentation [preview site](./_preview) for the Spine Validation library.

The site built by this project is used for development and preview purposes.
It is not meant to be published as-is, but rather to be used as a staging area for
the documentation before it is merged into the main [documentation][main-documentation] project.

## Build tasks

The [Gradle build](build.gradle.kts) under the `docs/` provides the following tasks:

1. **`buildAll`** — building the code of the examples embedded in the documentation.
This ensures that all code snippets are valid and can be compiled.

2. **`embedCode`** — embedding the source code of the examples into the Markdown files.
This allows the documentation to include up-to-date code snippets from the source files.
This task is meant to be run manually when you write or update the documentation.

3. **`checkSamples`** — checking that the embedded code snippets in the Markdown files are
consistent with the source code.
This is a validation step to ensure that the documentation accurately reflects the example code.
This task is executed automatically via the [GitHub workflow][check-code-embedding].

4. **`buildSite`** — building the documentation site using Hugo.
The site is generated in the [_preview/](./_preview) directory.

5. **`runSite`** — running a local Hugo server to preview the documentation site.
This allows you to view the documentation in a web browser during development.

6. **`installDependencies`** — installing the Node dependencies for the preview site.
Tasks related to Hugo depend on this task. It is not meant to be run manually.

## Paths in the scripts

The shell [scripts](./_script) used by the Gradle build assume that **this** `docs/`
directory is the current working directory.

So when you start working with the documentation, make sure to `cd` into
it before running any of the scripts or Gradle tasks.

## Including example sources

It is done in the [`settings.gradle.kts`](settings.gradle.kts) file via `includeBuild` directive.
If you add another example proejct, please remember to update
the [`settings.gradle.kts`](settings.gradle.kts) file.

## Linking to the main project build

The example projects share the following directories and files with
the main code project via symlinks:
* `buildSrc`
* `gradle.properties`
* `gradlew`
* `gradlew.bat`

When you add an example project, make sure to create the necessary symlinks to
these files and directories.

[check-code-embedding]: ../.github/workflows/check-code-embedding.yml
[main-documentation]: https://github.com/SpineEventEngine/documentation/
175 changes: 175 additions & 0 deletions docs/STRUCTURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
# Structuring repositories for Hugo documentation using Go modules

This document describes the **recommended repository layout and Hugo
Module mount strategy** for building modular documentation where:

- The **main site** assembles documentation from multiple repositories
- Each framework/library keeps **all documentation isolated under
`docs/`**
- Hugo Modules (Go modules) are used for versioning and composition

------------------------------------------------------------------------

## High-level architecture

- **Main site repository**
- Hugo site that assembles all documentation
- Imports documentation modules only
- **Documentation provider repositories** (framework, libraries)
- Each repo exposes its documentation as a **Hugo Module**
- All doc-related files live under `docs/`

Each `docs/` directory is:
- a **Go module root** (`go.mod`)
- a **Hugo project root** (`hugo.yaml`)

------------------------------------------------------------------------

## Main site repository

main-site/
go.mod
hugo.yaml
content/
layouts/
assets/

### hugo.yaml

``` yaml
module:
imports:
- path: github.com/your-org/framework/docs
- path: github.com/your-org/lib-foo/docs
- path: github.com/your-org/lib-bar/docs
```

------------------------------------------------------------------------

## Framework documentation repository

framework/
docs/
go.mod
go.sum
hugo.yaml
content/
framework/
_index.md
layouts/
assets/

### docs/go.mod

``` go
module github.com/your-org/framework/docs
go 1.22
```

### docs/hugo.yaml

``` yaml
module:
mounts:
- source: content
target: content/framework
- source: layouts
target: layouts
- source: assets
target: assets
```

------------------------------------------------------------------------

## Library documentation repository (example: lib-foo)

lib-foo/
docs/
go.mod
hugo.yaml
content/
libraries/
foo/
_index.md

### docs/go.mod

``` go
module github.com/your-org/lib-foo/docs
go 1.22
```

### docs/hugo.yaml

``` yaml
module:
mounts:
- source: content
target: content/libraries/foo
- source: layouts
target: layouts
- source: assets
target: assets
```

------------------------------------------------------------------------

## Content conventions
* Always mount into namespaced sections:
* `content/framework/...`
* `content/libraries/<libname>/...`
* Use `_index.md` at section roots to create proper landing pages
* Avoid mounting directly to `content/` without a subdirectory

------------------------------------------------------------------------

## Optional: shared documentation UI module

For shared shortcodes, partials, and styling:

docs-ui/
go.mod
hugo.yaml
layouts/
shortcodes/
partials/
assets/

**docs-ui/hugo.yaml:**

```yaml
module:
mounts:
- source: layouts
target: layouts
- source: assets
target: assets
```
Import this module before content modules in the main site.

------------------------------------------------------------------------

## Local development

Run documentation standalone from a repo:

cd framework
hugo server --source docs

For multi-repo development, consider a go.work file to use local checkouts instead of remote module versions.

------------------------------------------------------------------------

## Key rules to follow
* docs/ is the only Hugo + Go module root in doc-providing repos
* Each docs module defines its own mounts
* The main site only imports modules
* Mount targets must be unique and namespaced
* Commit both go.mod and go.sum for reproducible builds

------------------------------------------------------------------------

## References
* Hugo Modules overview: https://gohugo.io/hugo-modules/
* Hugo module configuration: https://gohugo.io/configuration/module/
* Go modules reference: https://go.dev/ref/mod
Loading
Loading