Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial docs site based on Docusaurus #77

Merged
merged 18 commits into from
Dec 30, 2024
Merged

Initial docs site based on Docusaurus #77

merged 18 commits into from
Dec 30, 2024

Conversation

dgarros
Copy link
Contributor

@dgarros dgarros commented Nov 3, 2024

Exploring what it would take to build the documentation for this repo with Docusaurus


```shell
poetry run infrahubctl run generators/generate_topology.py topology=fra05-pod1
```
Copy link

Choose a reason for hiding this comment

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

A continuation of these could be that we read this info from files instead and have a way to test that it's valid so based on the above we'd have:

File: 0001_graphql_add_repo.gql

mutation AddRepository{
  CoreReadOnlyRepositoryCreate(
    data: {
      name: { value: "infrahub-demo-dc-fabric" }
      location: { value: "https://github.com/opsmill/infrahub-demo-dc-fabric.git" }
    }
  ) {
    ok
    object {
      id
    }
  }
}

File: 0002_shell_run_generator.sh

poetry run infrahubctl run generators/generate_topology.py topology=fra05-pod1

Description

When executing these tests we'd just follow the initial number to indicate order then after that it would be file type or command type followed by some optional information that isn't required.

So if we look at 0001_graphql_add_repo.gql only 0001_graphql_ would be required anything after that is just to help us or guide the language selection in an IDE. The second part graphql or shell would tell the test how to execute the command.

The tests themselves would need to be simple in terms of us just looking at the exit code.

Copy link
Contributor

Choose a reason for hiding this comment

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

Will take on a test for 0002_shell_run_generator.sh when this PR is done: opsmill/infrahub#5287

@BeArchiTek BeArchiTek self-assigned this Nov 26, 2024
Copy link

cloudflare-workers-and-pages bot commented Dec 29, 2024

Deploying infrahub-demo-dc-fabric with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8b23c03
Status: ✅  Deploy successful!
Preview URL: https://57dcc12c.infrahub-demo-dc-fabric.pages.dev
Branch Preview URL: https://dga-20241103-docs.infrahub-demo-dc-fabric.pages.dev

View logs

@petercrocker petercrocker marked this pull request as ready for review December 29, 2024 23:23
@petercrocker petercrocker requested a review from a team December 29, 2024 23:23
@petercrocker
Copy link
Contributor

This got quite big. Scope is:

  • setup docusaurus
  • edit .md pages for site
  • setup cloudflare app to generate temp docs site on PR
  • setup ci pipeline to do linting, vale, build docs
  • moved some docs commands to separate file snippets so they could be tested
  • setup a unit test for the graphql query now imported in to docusaurus as a code snippet

Copy link
Contributor

@BeArchiTek BeArchiTek left a comment

Choose a reason for hiding this comment

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

Except comment in the diagram (non-blocking) LGTM

infrahub-demo-dc-fabric.excalidraw.svg Outdated Show resolved Hide resolved
@petercrocker petercrocker merged commit a81051f into main Dec 30, 2024
6 checks passed
@petercrocker petercrocker deleted the dga-20241103-docs branch December 30, 2024 15:17
BeArchiTek added a commit to opsmill/infrahub-demo-dc-fabric-develop that referenced this pull request Jan 6, 2025
* Update dependabot.yml

* Initial docs site based on Docusaurus (opsmill#77)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants