-
Notifications
You must be signed in to change notification settings - Fork 0
docs: add MkDocs Material site with versioned GitHub Pages deployment #21
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
43e6490
docs: add MkDocs Material site with versioned GitHub Pages deployment
aseguragonzalez 554bbc2
docs: load and initialize Mermaid JS for diagram rendering
aseguragonzalez 8d46b6a
ci: switch docs workflow to uv sync for reproducible builds
aseguragonzalez b3e159b
ci: trigger docs deploy on docs/** and mkdocs.yml changes to main
aseguragonzalez b8c801b
ci: normalize mike version label by stripping leading v
aseguragonzalez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| name: Docs | ||
|
|
||
| # NOTE: The gh-pages branch must exist and GitHub Pages must be enabled in | ||
| # repo Settings → Pages → Source: Deploy from branch `gh-pages`. | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - "v*" | ||
| branches: | ||
| - main | ||
| paths: | ||
| - "docs/**" | ||
| - "mkdocs.yml" | ||
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| description: "Version to deploy (e.g. 0.4.0)" | ||
| required: true | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| jobs: | ||
| deploy: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Setup UV | ||
| uses: astral-sh/setup-uv@v4 | ||
| with: | ||
| python-version: "3.12" | ||
| enable-cache: true | ||
|
|
||
| - name: Install dependencies | ||
| run: uv sync | ||
|
|
||
| - name: Configure git identity | ||
| run: | | ||
| git config --global user.name "github-actions" | ||
| git config --global user.email "github-actions@github.com" | ||
|
|
||
| - name: Resolve version | ||
| id: version | ||
| run: | | ||
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | ||
| raw="${{ github.event.inputs.version }}" | ||
| elif [ "${{ github.ref_type }}" = "tag" ]; then | ||
| raw="${{ github.ref_name }}" | ||
| else | ||
| raw="$(uv run python -m semantic_release version --print-last-released)" | ||
| fi | ||
| echo "value=${raw#v}" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Deploy docs | ||
| run: uv run mike deploy --push --update-aliases ${{ steps.version.outputs.value }} latest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # python-seedwork | ||
|
|
||
| [](https://pypi.org/project/python-seedwork/) | ||
| [](https://pypi.org/project/python-seedwork/) | ||
| [](https://github.com/aseguragonzalez/python-seedwork/blob/main/LICENSE) | ||
| [](https://github.com/aseguragonzalez/python-seedwork/actions/workflows/ci.yml) | ||
|
|
||
| DDD and Hexagonal Architecture building blocks for Python. | ||
|
|
||
| ## Goals | ||
|
|
||
| - **Unify design patterns.** Provide a shared vocabulary — entities, aggregates, value objects, domain events, CQRS buses — so every bounded context starts from the same foundation. | ||
| - **Keep domain logic pure.** The domain layer has zero framework or infrastructure imports. Business rules live in the domain; everything else lives in infrastructure. | ||
| - **Clear layer boundaries.** Protocols define contracts; implementations satisfy them structurally. The dependency direction is enforced: domain ← application ← infrastructure. | ||
|
|
||
| ## Components | ||
|
|
||
| | Layer | Package | Components | | ||
| |---|---|---| | ||
| | Domain | `seedwork.domain` | `Entity`, `AggregateRoot`, `ValueObject`, `DomainEvent`, `DomainEventRecord`, `DomainError`, `Repository`, `UnitOfWork` | | ||
| | Application | `seedwork.application` | `Command`, `Query[TResult]`, `CommandHandler`, `QueryHandler`, `CommandBus`, `QueryBus`, `Result`, `DomainEventBusPublisher`, `DomainEventBusSubscriber`, `DomainEventBus`, `DomainEventHandler`, `BaseIntegrationEvent`, `IntegrationEvent`, `IntegrationEventPublisher`, `IntegrationEventHandler`, `BackgroundTask`, `TaskScheduler` | | ||
| | Infrastructure | `seedwork.infrastructure` | `RegistryCommandBus`, `RegistryQueryBus`, `TransactionalCommandBus`, `DomainEventCoordinatorCommandBus`, `CommandBusBuilder`, `QueryBusBuilder`, `DeferredDomainEventBus`, `DomainEventPublishingRepository`, `InMemoryRepository` | | ||
|
|
||
| All components are re-exported from the top-level `seedwork` package. | ||
|
|
||
| ## Installation | ||
|
|
||
| ```bash | ||
| pip install python-seedwork | ||
| ``` | ||
|
|
||
| Requires Python 3.12+. Ships a `py.typed` marker (PEP 561) — mypy and pyright pick up the inline types automatically. | ||
|
|
||
| ## Documentation | ||
|
|
||
| - [Getting Started](getting-started.md) — Step-by-step guide: install, define a domain model, handle commands, wire buses. | ||
| - [Component Reference](component-reference.md) — Every abstract class, protocol, and infrastructure component. | ||
| - [Architecture](architecture.md) — Service building blocks: API, database, subscriber, publisher, worker, outbox, observability. | ||
| - [Best Practices](best-practices.md) — Design rules for domain components, application layer contracts, and event/task selection. | ||
| - [Coding Standards](coding-standards.md) — Conventions aligned with DDD and Clean Architecture, with do/don't guidelines. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| document$.subscribe(({ body }) => { | ||
| mermaid.initialize({ startOnLoad: false }) | ||
| mermaid.run({ nodes: body.querySelectorAll(".mermaid") }) | ||
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| site_name: python-seedwork | ||
| site_url: https://aseguragonzalez.github.io/python-seedwork/ | ||
| repo_url: https://github.com/aseguragonzalez/python-seedwork | ||
| repo_name: aseguragonzalez/python-seedwork | ||
|
|
||
| theme: | ||
| name: material | ||
| features: | ||
| - navigation.tabs | ||
| - navigation.top | ||
| - content.code.annotate | ||
| - content.code.copy | ||
|
|
||
| markdown_extensions: | ||
| - pymdownx.superfences: | ||
| custom_fences: | ||
| - name: mermaid | ||
| class: mermaid | ||
| format: !!python/name:pymdownx.superfences.fence_code_format | ||
|
|
||
| extra_javascript: | ||
| - javascripts/mermaid.js | ||
| - https://unpkg.com/mermaid@11/dist/mermaid.min.js | ||
|
|
||
| plugins: | ||
| - search | ||
| - mike: | ||
| version_selector: true | ||
|
|
||
| extra: | ||
| version: | ||
| provider: mike | ||
|
|
||
| nav: | ||
| - Home: index.md | ||
| - Getting Started: getting-started.md | ||
| - Component Reference: component-reference.md | ||
| - Architecture: architecture.md | ||
| - Best Practices: best-practices.md | ||
| - Coding Standards: coding-standards.md | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.