Skip to content

Commit a983088

Browse files
committed
feat(doc): Add user/dev/admin documentation
1 parent dc93692 commit a983088

28 files changed

+852
-7180
lines changed

.github/DISCUSSION_TEMPLATE/design-ideas.yaml

-45
This file was deleted.

.github/DISCUSSION_TEMPLATE/user-personas-and-stories.yaml

+23-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ body:
44
attributes:
55
value: >
66
Develop a user persona and a story to capture the goals and tasks your users want to accomplish with diracx-web.
7-
We are interested in understanding your needs and goals. Please focus on what you want to achieve rather than how you think it should be achieved.
7+
We are interested in understanding your needs and goals. Please, first focus on what you want to achieve rather than how you think it should be achieved first.
88
All ideas are welcome, and there are no wrong answers. We appreciate your honest feedback as it helps us improve the system to better meet your needs.
99
1010
- type: textarea
@@ -43,10 +43,27 @@ body:
4343
validations:
4444
required: true
4545

46+
- type: markdown
47+
attributes:
48+
value: |
49+
From this point, you can optionally propose ideas of how it should be conceived, even if you technically do not know whether it is achievable.
50+
4651
- type: textarea
47-
id: additional-comments
52+
id: design-solution
4853
attributes:
49-
label: Additional Comments or Suggestions
50-
description: "Share any other feedback, ideas, or suggestions that can help us understand your needs better."
51-
validations:
52-
required: false
54+
label: Proposed Design Solution
55+
description: |
56+
Design proposal(s) can be submitted here.
57+
Explain how your design solves the problem. Describe the design changes in details.
58+
placeholder: "Describe your design solution..."
59+
60+
- type: markdown
61+
attributes:
62+
value: |
63+
If possible, please attach an image representing a mockup or sketch of your design idea. Visual representations can help communicate your idea more clearly.
64+
65+
- type: markdown
66+
attributes:
67+
value: |
68+
Once again, thank you for your contribution. Our team will review your design proposal(s) and provide feedback.
69+

.github/workflows/deployment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
cache: 'npm'
7575

7676
- name: Build documentation
77-
run: npm ci && npm --prefix packages/diracx-web-components run build-storybook
77+
run: npm ci && npm --prefix packages/diracx-web-components run build-doc
7878

7979
- name: Upload artifact
8080
uses: actions/upload-pages-artifact@v3

.github/workflows/gubbins-test.yml

+103-26
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Gubbins extension tests
1+
name: Gubbins extension Tests
22

33
on:
44
push:
@@ -41,9 +41,64 @@ jobs:
4141
run: npm --prefix packages/extensions run ts-lint
4242

4343
# ============================================================================#
44-
# WARNING: In your CI/CD pipeline, you should remove the following job #
44+
# WARNING: In your CI/CD pipeline, you should remove the following jobs #
4545
# ----------------------------------------------------------------------------#
46-
prepare-gubbins-as-a-standalone:
46+
# By default, the gubbins extension is part of a monorepo and uses a local #
47+
# version of `diracx-web-components`. This default setup is not #
48+
# representative of a standalone extension configuration. Here we want to #
49+
# closely mimic a standalone extension. To do so, we: #
50+
# - Isolate the packages/extensions directory: Move its content to a new #
51+
# repository or directory outside the monorepo. #
52+
# - Update Configuration: Adjust relevant variables to align with a #
53+
# standalone setup. #
54+
prepare-gubbins-backend:
55+
runs-on: ubuntu-latest
56+
if: ${{ github.event_name != 'push' || github.repository == 'DIRACGrid/diracx-web' }}
57+
steps:
58+
- name: Clone source
59+
run: |
60+
cd ..
61+
git clone https://github.com/DIRACGrid/diracx.git
62+
63+
- name: Where the magic happens (Move extensions to a temporary directory)
64+
run: |
65+
# We have to copy the code to another directory
66+
# and make it a git repository by itself because otherwise the
67+
# root in the pyproject to do not make sense once mounted
68+
# in the containers.
69+
cp -r ../diracx/extensions/gubbins /tmp/
70+
sed -i 's@../..@.@g' /tmp/gubbins/pyproject.toml
71+
sed -i 's@../../@@g' /tmp/gubbins/gubbins-*/pyproject.toml
72+
git init /tmp/gubbins/
73+
74+
- name: Upload artifact
75+
uses: actions/upload-artifact@v4
76+
with:
77+
name: gubbins
78+
path: /tmp/gubbins
79+
80+
- name: Set up QEMU
81+
uses: docker/setup-qemu-action@v3
82+
- name: Set up Docker Buildx
83+
uses: docker/setup-buildx-action@v3
84+
85+
- name: Build and export service
86+
uses: docker/build-push-action@v6
87+
with:
88+
context: ../diracx/extensions/containers/services
89+
tags: gubbins/services:dev
90+
outputs: type=docker,dest=/tmp/gubbins_services_image.tar
91+
build-args: |
92+
EXTRA_PACKAGES_TO_INSTALL=git+https://github.com/DIRACGrid/DIRAC.git@integration
93+
EXTENSION_CUSTOM_SOURCES_TO_INSTALL=/bindmount/gubbins_db*.whl,/bindmount/gubbins_routers*.whl,/bindmount/gubbins_client*.whl
94+
95+
- name: Upload artifact
96+
uses: actions/upload-artifact@v4
97+
with:
98+
name: gubbins-services-img
99+
path: /tmp/gubbins_services_image.tar
100+
101+
prepare-gubbins-frontend-as-a-standalone:
47102
runs-on: ubuntu-latest
48103
if: ${{ github.event_name != 'push' || github.repository == 'DIRACGrid/diracx-web' }}
49104
steps:
@@ -64,37 +119,39 @@ jobs:
64119
65120
- name: Where the magic happens (Move extensions to a temporary directory)
66121
run: |
67-
# Move the library package to the extensions directory
68-
mv packages/diracx-web-components/*.tgz packages/extensions/diracx-web-components.tgz
69122
# Move the extensions to the temporary directory
70-
mv packages/extensions /tmp/extensions
123+
cp -r packages/extensions /tmp/gubbins-web
124+
# Move the library package to the extensions directory
125+
mv packages/diracx-web-components/*.tgz /tmp/gubbins-web/diracx-web-components.tgz
71126
# Update the package.json to point to the local diracx-web-components
72-
jq '.dependencies["@dirac-grid/diracx-web-components"] = "file:./diracx-web-components.tgz"' /tmp/extensions/package.json > /tmp/extensions/package.temp.json
73-
mv /tmp/extensions/package.temp.json /tmp/extensions/package.json
127+
jq '.dependencies["@dirac-grid/diracx-web-components"] = "file:./diracx-web-components.tgz"' /tmp/gubbins-web/package.json > /tmp/gubbins-web/package.temp.json
128+
mv /tmp/gubbins-web/package.temp.json /tmp/gubbins-web/package.json
74129
# Update the package.json to point to the correct postinstall script
75-
jq '.scripts.postinstall = "node ./node_modules/@axa-fr/react-oidc/bin/copy-service-worker-files.mjs public"' /tmp/extensions/package.json > /tmp/extensions/package.temp.json
76-
mv /tmp/extensions/package.temp.json /tmp/extensions/package.json
130+
jq '.scripts.postinstall = "node ./node_modules/@axa-fr/react-oidc/bin/copy-service-worker-files.mjs public"' /tmp/gubbins-web/package.json > /tmp/gubbins-web/package.temp.json
131+
mv /tmp/gubbins-web/package.temp.json /tmp/gubbins-web/package.json
132+
# Update the next.config.js to prevent the standalone extension from searching a local version of diracx-web-components that does not exist
133+
echo 'const nextConfig = { output: "export", images: { unoptimized: true }}; export default nextConfig;' > /tmp/gubbins-web/next.config.js
77134
78135
- name: Install extensions dependencies
79-
working-directory: /tmp/extensions
136+
working-directory: /tmp/gubbins-web
80137
run: npm install
81138

82139
- name: Upload the extensions directory
83140
uses: actions/upload-artifact@v4
84141
with:
85-
name: gubbins
86-
path: /tmp/extensions
142+
name: gubbins-web
143+
path: /tmp/gubbins-web
87144
retention-days: 1
88145
# ----------------------------------------------------------------------------#
89146
# In the following jobs, you should: #
90-
# - Replace /tmp/extensions with the path to your extension source code #
147+
# - Replace /tmp/gubbins-web with the path to your extension source code #
91148
# - Remove the `needs: prepare-gubbins-as-a-standalone` line #
92149
# ============================================================================#
93150

94151
# Build the extension image
95152
build-gubbins-dev-image:
96153
runs-on: ubuntu-latest
97-
needs: prepare-gubbins-as-a-standalone
154+
needs: prepare-gubbins-frontend-as-a-standalone
98155
if: ${{ github.event_name != 'push' || github.repository == 'DIRACGrid/diracx-web' }}
99156
steps:
100157
- uses: actions/checkout@v4
@@ -114,52 +171,72 @@ jobs:
114171
# ========================================================================#
115172
# WARNING: In your CI/CD pipeline, you should remove the following steps #
116173
# ------------------------------------------------------------------------#
117-
- name: Download the extensions directory
174+
- name: Download gubbins-web
118175
uses: actions/download-artifact@v4
119176
with:
120-
name: gubbins
121-
path: /tmp/extensions
177+
name: gubbins-web
178+
path: /tmp/gubbins-web
122179
# ------------------------------------------------------------------------#
123180
# ========================================================================#
124181

125182
# In your extension, you have to push the image to the registry (check deployment.yml)
126183
- name: Build Docker image (extension example)
127184
uses: docker/build-push-action@v6
128185
with:
129-
context: /tmp/extensions
186+
context: /tmp/gubbins-web
130187
push: false
131188
tags: ghcr.io/diracgrid/diracx-web/gubbins:dev
132189
platforms: linux/amd64,linux/arm64
133190

134-
# Run the demo with the extension source code
191+
# Run the demo with the extension source code (frontend and backend)
135192
run-demo:
136193
runs-on: ubuntu-latest
137-
needs: prepare-gubbins-as-a-standalone
194+
needs: [prepare-gubbins-frontend-as-a-standalone, prepare-gubbins-backend]
138195
if: github.event_name != 'push' || github.repository == 'DIRACGrid/diracx-web'
139196
steps:
140197
- uses: actions/checkout@v4
141198

142-
- name: Clone source
199+
- name: Clone source
143200
run: |
144201
cd ..
145202
git clone https://github.com/DIRACGrid/diracx-charts.git
146203
147204
# ========================================================================#
148205
# WARNING: In your CI/CD pipeline, you should remove the following steps #
149206
# ------------------------------------------------------------------------#
150-
- name: Download the extensions directory
207+
- name: Download gubbins
151208
uses: actions/download-artifact@v4
152209
with:
153210
name: gubbins
154-
path: /tmp/extensions
211+
path: /tmp/gubbins
212+
213+
- name: Clone diracx source
214+
run: |
215+
cd ..
216+
git clone https://github.com/DIRACGrid/diracx.git
217+
218+
- name: Download gubbins:services image
219+
uses: actions/download-artifact@v4
220+
with:
221+
name: gubbins-services-img
222+
path: /tmp/gubbins_services_image.tar
223+
224+
- name: Load docker image
225+
run: docker load --input /tmp/gubbins_services_image.tar
226+
227+
- name: Download gubbins-web
228+
uses: actions/download-artifact@v4
229+
with:
230+
name: gubbins-web
231+
path: /tmp/gubbins-web
155232
# ------------------------------------------------------------------------#
156233
# ========================================================================#
157234

158235
# Runs the demo with the extension source code
159236
- name: Start demo
160237
run: |
161238
cd ..
162-
diracx-charts/run_demo.sh --exit-when-done /tmp/extensions/
239+
diracx-charts/run_demo.sh --exit-when-done --set-value developer.autoReload=false --ci-values ./diracx/extensions/gubbins_values.yaml --load-docker-image "gubbins/services:dev" diracx/ /tmp/gubbins/ /tmp/gubbins-web/
163240
164241
- name: Debugging information
165242
run: |
@@ -194,4 +271,4 @@ jobs:
194271
with:
195272
browser: chrome
196273
config: baseUrl=${{ env.DIRACX_URL }}
197-
project: /tmp/extensions
274+
project: /tmp/gubbins-web

.prettierignore

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
node_modules
1+
.github
22
build
3+
CONTRIBUTING.md
34
dist
4-
public
5-
.github
5+
docs
66
jest.config.mjs
7+
node_modules
8+
public
9+
README.md
710

811
packages/*/node_modules
912
packages/*/build
@@ -19,4 +22,4 @@ packages/*/out
1922

2023
**/release-please-config.json
2124
**/.release-please-manifest.json
22-
**/CHANGELOG.md
25+
**/CHANGELOG.md

0 commit comments

Comments
 (0)