Documentation Website#151
Conversation
There was a problem hiding this comment.
Pull request overview
Introduces an initial skeleton for a GitHub Pages–hosted documentation website under docs/website-src, using Next.js + Nextra, and adds a GitHub Actions workflow to verify the docs site builds on PRs.
Changes:
- Added Nextra/Next.js docs site scaffold (config + basic pages).
- Added initial site navigation metadata and app wrapper.
- Added a PR workflow to install dependencies and build/upload the Pages artifact.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
docs/website-src/theme.config.tsx |
Nextra theme configuration for repo links, sidebar, header/footer. |
docs/website-src/pages/index.mdx |
Landing page content scaffold. |
docs/website-src/pages/crate_validator.mdx |
Placeholder page for validator documentation. |
docs/website-src/pages/_meta.js |
Sidebar/page metadata configuration. |
docs/website-src/pages/_app.jsx |
Next.js custom App wrapper. |
docs/website-src/package.json |
Docs site dependencies and scripts. |
docs/website-src/next.config.mjs |
Next.js + Nextra integration and static export settings. |
.github/workflows/check.build.docs.yml |
CI workflow to build (and currently upload) the docs site output. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import { useConfig } from 'nextra-theme-docs' | ||
|
|
||
| export default { | ||
| docsRepositoryBase: 'https://github.com/eScienceLab/Cratey-Validator/tree/main/docs/website', |
| @@ -0,0 +1,23 @@ | |||
| import React from "react"; | |||
| head() { | ||
| const { frontMatter } = useConfig() | ||
|
|
| import { Cards } from 'nextra/components' | ||
| import { Steps,Callout } from "nextra/components" | ||
|
|
| pull_request: | ||
|
|
||
| paths: | ||
| - "docs/website-src/**" |
There was a problem hiding this comment.
Could we just have docs/ be the root? there is almost nothing in there and the stuff in docs/assets/ will be useful for the site anyway
| - "docs/website-src/**" | |
| - "docs/**" |
There was a problem hiding this comment.
We probably could - I was following the deployment system for the original docs page, and trying to fit the logic into our filesystem. But, I must admit, I have followed the workflow by rote, rather than considering if we need every step.
In the deployment workflow we have these steps:
- name: Copy built files to docs
run: |
rm -rf docs/website/*
cp -r docs/website-src/out docs/website
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/website
If we move to using docs rather than docs/website as the root, then perhaps we could get rid of the copy step, and upload directly from the docs/website/out (or, as it would be, docs/out) path?
There was a problem hiding this comment.
yeah, that makes sense to me
There was a problem hiding this comment.
I've reviewed the content. (sorry for the brusque comments, I'm rushing this before the weekend as I've held you up long enough)
It would be good if the website setup, content, & c4 diagrams could each be separated into their own PRs - the structure here is now quite confusing to review
| and validation is performed by the CRS4 `rocrate_validator` library. | ||
|
|
||
|
|
||
| ## Runtime Flow |
There was a problem hiding this comment.
This section is much more like developer documentation and shouldn't be in this file which is user-oriented.
Instead we should include/link to the user-facing API docs in rest_api.mdx
| Date: 2026-05-14 | ||
|
|
||
|
|
||
| ## Service Snapshot |
There was a problem hiding this comment.
avoid duplicating content so we don't have to maintain it twice - if it's useful to have in both places we could move this into a separate file that gets imported in both
There was a problem hiding this comment.
I addressed that in the last splitting of the text into three different files.
| 4. Celery runs `process_validation_task_by_metadata`. | ||
| 5. The API waits for the Celery result and returns the validation output synchronously. | ||
|
|
||
| ## API Surface |
There was a problem hiding this comment.
in the same vein, could we just import/include rest_api.mdx here, or link to it?
There was a problem hiding this comment.
If we need to segregate different sections of the current documents in separate documents with different focuses, I'm not sure why we would import that content back into the current document. I'd rather use links.
There was a problem hiding this comment.
yeah, this probably indicates that we need a little restructuring. Right now the development page is basically the deployment page with a bunch of extra information - maybe we remove most of the duplicated stuff altogether and basically expect people to read the deployment page first before the development page.
We could then rename "Deployment" to "Installation and Setup" to make it clearer that it's aimed at all users rather than just those deploying it in production. So we end up with a page structure something like:
- index page
- About (the "service snapshot" bit? or combine this with the index page)
- Installation and Setup
- API reference
- Development
|
|
||
| <div style={{ display: "flex", flexDirection: "column", alignItems: "center", paddingTop: "2rem" }}> | ||
|
|
||
| # RO-Crate Validation Service |
There was a problem hiding this comment.
This is organised a bit backward. First we should summarise what this service is, then provide the context. i.e. the last paragraph should come first.
| such as the [Five Safes RO-Crate extension](https://trefx.uk/5s-crate/), for working with sensitive data within Trusted Research Environments (TREs). | ||
|
|
||
| This validation process can be complex, requiring both structural and semantic checks to ensure that the RO-Crate is compliant with the relevant standards. | ||
| The [rocrate-validator](https://rocrate-validator.readthedocs.io/en/latest/) provides a means for the structural validation of RO-Crates, |
There was a problem hiding this comment.
explain more clearly that this service is a wrapper for this validation tool
|
|
||
| This RO-Crate Validation Service provides a REST API for validating RO-Crates using the rocrate-validator. | ||
| It is built in python using flask, and is provided as a docker image for ease of deployment. | ||
| Several base profiles are included, while more can be added as needed when the service is deployed. |
There was a problem hiding this comment.
explain briefly what profiles are, or link to the ro-crate website page
…(1) crate_validator.mdx, which is fpcised on the end user, and (2) rest_api.mdx and (3) developer_architecture.mdx, which are focused on a developer perspective.
|
Following on @elichad comments, I have split the text content of the original file into three files: deployment.mdx RO-Crate Validator Service DeploymentService SnapshotCratey Validator is a web service that checks whether RO-Crates follow the At a high level, a client sends a validation request, the service runs the What You Can ValidateStored RO-CratesUse this option when the RO-Crate already exists in MinIO-compatible object This is useful for validating complete crates as part of an upload, review, Metadata FilesUse this option when you only need to check the contents of This is useful for quick checks while editing metadata or before a complete Saved Validation ResultsAfter a stored RO-Crate has been validated, the saved validation result can be Before You StartFor stored RO-Crate validation, you need:
For metadata-only validation, you only need the contents of Running The ServiceThe service can be started with Docker Compose: docker compose up --buildFor local container development, use: docker compose --file docker-compose-develop.yml up --buildExpected local services:
MinIO needs a bucket for RO-Crates, normally ConfigurationThe main environment variables are:
API calls also pass MinIO access details in More Information
rest_api.mdx Crate Validator REST APIOverviewThe Crate Validator REST API exposes operations for validating stored Stored RO-Crate validation uses MinIO-compatible object storage. Requests that Endpoints
|
This will be a GitHub pages hosted website. Currently just a skeleton setup.