Skip to content

Use env from nomad-docs#144

Merged
ka-sarthak merged 3 commits intomainfrom
fix-docs
Jul 1, 2025
Merged

Use env from nomad-docs#144
ka-sarthak merged 3 commits intomainfrom
fix-docs

Conversation

@ka-sarthak
Copy link
Copy Markdown
Collaborator

@ka-sarthak ka-sarthak commented Jun 30, 2025

  • As the env containing the macros for mkdocs is now moved to nomad-docs, update the import

Summary by Sourcery

Use the macros environment provided by the nomad-docs package for mkdocs and update project dependencies accordingly.

Enhancements:

  • Switch the mkdocs macros env import to come from the nomad-docs package

Build:

  • Add nomad-docs as a dependency in pyproject.toml

@ka-sarthak ka-sarthak requested a review from Copilot June 30, 2025 10:08
@ka-sarthak ka-sarthak self-assigned this Jun 30, 2025
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Jun 30, 2025

Reviewer's Guide

This PR updates the mkdocs build to use the relocated env macros from the nomad-docs package by adding it as a dependency and adjusting the import in the documentation entrypoint.

Class diagram for env macro import change

classDiagram
    class EnvMacros {
        <<module>>
        +macros
    }
    class NomadDocs {
        <<package>>
        +env
    }
    EnvMacros <.. NomadDocs : import env from
Loading

File-Level Changes

Change Details Files
Added nomad-docs as a mkdocs dependency
  • Inserted nomad-docs into the project’s dev dependencies
  • Appended missing comma after the previous dependency to maintain TOML syntax
  • Removed stray trailing whitespace on the mkdocs line
pyproject.toml
Switched env import to use the nomad-docs package
  • Replaced local or prior import of env with from nomad_docs import env
  • Updated any references or plugin registration to point at the new env source
docs/main.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey @ka-sarthak - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the source of the MkDocs macros environment to the new nomad-docs package and adds it as a development dependency.

  • Adds nomad-docs to dev dependencies in pyproject.toml
  • Updates the import in docs/main.py from nomad.mkdocs to nomad_docs

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
pyproject.toml Added nomad-docs to the dev dependency list
docs/main.py Updated define_env import path for MkDocs

Comment thread pyproject.toml Outdated
Comment thread pyproject.toml Outdated
@ka-sarthak
Copy link
Copy Markdown
Collaborator Author

@hampusnasstrom: Small bug fix we discussed sometime ago, please take a look.

Copy link
Copy Markdown
Collaborator

@hampusnasstrom hampusnasstrom left a comment

Choose a reason for hiding this comment

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

Perfect, thank you!

@ka-sarthak ka-sarthak merged commit c497583 into main Jul 1, 2025
5 checks passed
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.

3 participants