Skip to content

Commit bb57aeb

Browse files
rename process-docs to examples/simple (#17)
1 parent e726066 commit bb57aeb

8 files changed

Lines changed: 53 additions & 27 deletions

File tree

.vscode/settings.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
// General Settings
3+
"files.insertFinalNewline": true,
4+
"files.trimFinalNewlines": true,
5+
"files.trimTrailingWhitespace": true,
6+
"editor.insertSpaces": true,
7+
"editor.tabCompletion": "on",
8+
9+
// When using ruff for formatting 88 characters per line is the standard.
10+
"editor.rulers": [88],
11+
"[python]": {
12+
// Opinionated option for the future:
13+
// "editor.formatOnSave": true,
14+
"editor.codeActionsOnSave": {
15+
"source.sortImports": "explicit"
16+
},
17+
"editor.defaultFormatter": "charliermarsh.ruff"
18+
},
19+
20+
// RST Settings
21+
"[restructuredtext]": {
22+
"editor.tabSize": 3
23+
},
24+
//
25+
//
26+
"python.testing.pytestArgs": [
27+
".",
28+
"--ignore-glob=bazel-*/*",
29+
"--ignore-glob=.venv_docs/*",
30+
"--ignore-glob=_build/*"
31+
],
32+
"python.testing.unittestEnabled": false,
33+
"python.testing.pytestEnabled": true,
34+
"bazel.lsp.command": "bazel",
35+
"bazel.lsp.args": ["run", "//:starpls_server"]
36+
}

BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ load("@score_cr_checker//:cr_checker.bzl", "copyright_checker")
1616
copyright_checker(
1717
name = "copyright",
1818
srcs = [
19-
"process-docs",
19+
"examples",
2020
"src",
2121
"//:BUILD",
2222
"//:MODULE.bazel",

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ bazel_dep(name = "score_docs_as_code", version = "0.1.0")
2929
And make sure to also add the S-core bazel registry to your `.bazelrc` file
3030

3131
```starlark
32-
common --registry=https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/
32+
common --registry=https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/
3333
common --registry=https://bcr.bazel.build
3434
```
3535

@@ -61,7 +61,7 @@ docs(
6161
#### 2. Adapt your conf.py if needed
6262

6363
```python
64-
# ...
64+
# ...
6565
extensions = [
6666
"sphinx_design",
6767
"sphinx_needs",
@@ -76,7 +76,7 @@ extensions = [
7676
```
7777

7878
Make sure that your conf.py imports all of the extensions you want to enable.\
79-
For a full example look at [This repos conf.py](process-docs/conf.py)
79+
For a full example look at [a simple example](examples/simple)
8080

8181
#### 3. Run a documentation build:
8282

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ load("//:docs.bzl", "docs")
2121
# - `docs:docs` for building documentation at build-time
2222

2323
docs(
24-
conf_dir = "process-docs",
24+
conf_dir = "examples/simple",
2525
docs_targets = [
2626
{
2727
"suffix": "", # local without external needs
2828
},
2929
],
30-
source_dir = "process-docs",
30+
source_dir = "examples/simple",
3131
source_files_to_scan_for_needs_links = [
3232
# Note: you can add filegroups, globs, or entire targets here.
3333
"//src:score_extension_files",
Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,17 @@
1616
# For the full list of built-in configuration values, see the documentation:
1717
# https://www.sphinx-doc.org/en/master/usage/configuration.html
1818

19-
import logging
20-
2119

2220
# -- Project information -----------------------------------------------------
2321
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
2422

25-
project = "score_docs_as_code"
26-
author = "Score"
23+
project = "Simple Example Project"
24+
author = "S-CORE"
2725
version = "0.1"
2826

2927
# -- General configuration ---------------------------------------------------
3028
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
3129

32-
logger = logging.getLogger("process-docs")
33-
logger.debug("Loading score_docs_as_code conf.py")
34-
3530

3631
extensions = [
3732
"sphinx_design",
@@ -44,13 +39,11 @@
4439
"score_layout",
4540
]
4641

47-
logger.debug("After loading extensions")
48-
4942
exclude_patterns = [
50-
# The following entries are not required when building the documentation
51-
# via 'bazel build //docs:docs', as that command runs in a sandboxed environment.
52-
# However, when building the documentation via 'sphinx-build' or esbonio,
53-
# these entries are required to prevent the build from failing.
43+
# The following entries are not required when building the documentation via 'bazel
44+
# build //docs:docs', as that command runs in a sandboxed environment. However, when
45+
# building the documentation via 'bazel run //docs:incremental' or esbonio, these
46+
# entries are required to prevent the build from failing.
5447
"bazel-*",
5548
".venv_docs",
5649
]
@@ -59,6 +52,3 @@
5952

6053
# Enable numref
6154
numfig = True
62-
63-
64-
logger.debug("After loading S-CORE conf.py")
File renamed without changes.

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This file is at the root level, as it applies to all Python code,
22
# not only to docs or to tools.
3-
[tool.pyright]
4-
extends = "bazel-bin/process-docs/ide_support.runfiles/score_python_basics~/pyproject.toml"
3+
[tool.pyright]
4+
extends = "bazel-bin/examples/simple/ide_support.runfiles/score_python_basics~/pyproject.toml"
55

66
exclude = [
77
"**/__pycache__",
@@ -11,7 +11,7 @@ exclude = [
1111
]
1212

1313
[tool.ruff]
14-
extend = "bazel-bin/process-docs/ide_support.runfiles/score_python_basics~/pyproject.toml"
14+
extend = "bazel-bin/examples/simple/ide_support.runfiles/score_python_basics~/pyproject.toml"
1515

1616
extend-exclude = [
1717
"**/__pycache__",

src/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ It should be treated as a 'get-started' guide, giving you all needed information
1111
1. Install Bazelisk (version manager for Bazel)
1212
2. Create the Python virtual environment:
1313
```bash
14-
bazel run //process-docs:ide_support
14+
bazel run //your-docs-dir:ide_support
1515
```
1616
3. Select `.venv_docs/bin/python` as the python interpreter inside your IDE
1717
*Note: This virtual environment does **not** have pip, therefore `pip install` is not available.*
@@ -57,7 +57,7 @@ It should be treated as a 'get-started' guide, giving you all needed information
5757
## score_docs_as_code Directory Architecture
5858

5959
```
60-
process-docs/ # Local documentation to test functionality
60+
examples/ # Shows how to use doc-as-code tooling
6161
src/
6262
├── assets/ # Documentation styling (CSS)
6363
├── decision_records/ # Architecture Decision Records (ADRs)

0 commit comments

Comments
 (0)