Skip to content

Commit ecdaf86

Browse files
committed
Use mkdocs for documentation
1 parent 99d08a8 commit ecdaf86

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+4835
-289
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# SCM syntax highlighting & preventing 3-way merges
2+
pixi.lock merge=binary linguist-language=YAML linguist-generated=true

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,8 @@ docs/source/_build
9191
# CMT junk
9292
/*/*/x86_64-*-*-*/
9393
*/*/cmt/Makefile
94+
95+
# pixi environments
96+
.pixi
97+
pixi.lock
98+
*.egg-info

.pre-commit-config.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ repos:
1010
- id: trailing-whitespace
1111
- id: end-of-file-fixer
1212
- id: check-yaml
13+
args: ["--unsafe"]
1314
- id: check-added-large-files
1415

1516
- repo: https://github.com/astral-sh/ruff-pre-commit
@@ -50,5 +51,7 @@ repos:
5051
rev: v2.4.1
5152
hooks:
5253
- id: codespell
53-
args: ["--skip=diracx-client/src/diracx/client/_generated/*, diracx-[a-z]*/tests/*, diracx-testing/*, build/*, extensions/gubbins/gubbins-client/src/gubbins/client/_generated/*, extensions/gubbins/gubbins-*/tests/*",
54-
"--ignore-words-list=CheckIn", "-w"]
54+
args:
55+
- "--skip=diracx-client/src/diracx/client/_generated/*, diracx-[a-z]*/tests/*, diracx-testing/*, build/*, extensions/gubbins/gubbins-client/src/gubbins/client/_generated/*, extensions/gubbins/gubbins-*/tests/*"
56+
- "--ignore-words-list=CheckIn"
57+
- "-w"

.readthedocs.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: 2
2+
3+
build:
4+
os: "ubuntu-24.04"
5+
tools:
6+
python: "3"
7+
# We recommend using a requirements file for reproducible builds.
8+
# This is just a quick example to get started.
9+
# https://docs.readthedocs.io/page/guides/reproducible-builds.html
10+
jobs:
11+
pre_install:
12+
- pip install mkdocs-material
13+
- pip install mkdocs-diracx-plugin@git+https://github.com/aldbr/mkdocs-diracx-plugin
14+
15+
mkdocs:
16+
configuration: mkdocs.yml

docs/CLIENT.md

Lines changed: 0 additions & 196 deletions
This file was deleted.

docs/MIGRATION.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

docs/README.md

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,3 @@
1-
## Run a full diracx demo
2-
3-
This will allow you to run a demo setup.
4-
5-
The code changes will be reflected in the demo.
6-
7-
Requirement: docker, internet
8-
9-
```bash
10-
# Clone the diracx repository
11-
git clone git@github.com:DIRACGrid/diracx.git
12-
13-
# Clone the diracx-chart repository
14-
git clone git@github.com:DIRACGrid/diracx-charts.git
15-
16-
# Run the demo
17-
diracx-charts/run_demo.sh diracx/
18-
```
19-
20-
To login, click the **authorize** button
21-
22-
![authorize](login_demo_1.png)
23-
24-
Connect using the authorization code flow, ticking the "vo:diracAdmin" scope
25-
26-
![codeflow](login_demo_2.png)
27-
28-
And enter the credentials prompted by the `run_demo.sh` script in the `Dex` interface
29-
30-
![Dexlogin](login_demo_3.png)
31-
321
## Create the dev environment
332

343
This will help you setup a dev environment to run the unit tests
File renamed without changes.
Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Configuration
22

3-
This page describes the way by which configuration is handled within DiracX.
43
Configuration refers to the central store of configuration data which is made available to both servers and clients.
54
This is in contrast to "Settings" which are only available on the server side.
65
Confidential information (such as passwords) is only handled in Settings, see the DiracX helm chart for details.
@@ -29,43 +28,5 @@ Currently the canonical source of configuration is from the legacy DIRAC Configu
2928
We foresee this will continue to be the case until the migration from DIRAC -> DiracX is complete.
3029
During this time, the DiracX configuration is not intended to be edited directly.
3130
The DiracX `default.yml` file differs in structure and contents from the legacy DIRAC Configuration Service.
32-
The legacy DIRAC CFG file can be converted into the new YAML format with:
3331

34-
```bash
35-
DIRAC_COMPAT_ENABLE_CS_CONVERSION=true dirac internal legacy cs-sync dirac-cs.cfg diracx-config/default.yml
36-
```
37-
38-
The following can be run on any client with a proxy
39-
40-
```python
41-
#!/usr/bin/env python
42-
import subprocess
43-
import os
44-
import tempfile
45-
import zlib
46-
from pathlib import Path
47-
48-
import DIRAC
49-
50-
DIRAC.initialize()
51-
from DIRAC import gConfig
52-
from DIRAC.Core.Utilities.ReturnValues import returnValueOrRaise
53-
from DIRAC.ConfigurationSystem.Client.ConfigurationClient import ConfigurationClient
54-
55-
client = ConfigurationClient(
56-
url=gConfig.getValue("/DIRAC/Configuration/MasterServer", "")
57-
)
58-
data = returnValueOrRaise(client.getCompressedData())
59-
data = zlib.decompress(data)
60-
with tempfile.NamedTemporaryFile() as tmp:
61-
tmp.write(data)
62-
tmp.flush()
63-
cmd = ["dirac", "internal", "legacy", "cs-sync", tmp.name, "default.yml"]
64-
subprocess.run(
65-
cmd, env=os.environ | {"DIRAC_COMPAT_ENABLE_CS_CONVERSION": "yes"}, check=True
66-
)
67-
68-
print("Synced CS to default.yml, now you can review the changes and commit/push them")
69-
```
70-
71-
TODO: Document how we will actually do the sync for production deployments...
32+
See [how-to](../how-to/convert_cs.md) for how to convert.
File renamed without changes.

0 commit comments

Comments
 (0)