Skip to content

Add repository find mechanism #120

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

Open
wants to merge 2 commits into
base: rewrite-as-mkdocs-plugin
Choose a base branch
from

Conversation

pedro-psb
Copy link
Member

No description provided.

@pedro-psb pedro-psb force-pushed the add-fetch-functionality branch from abcdddd to 747b324 Compare April 28, 2025 18:47
@pedro-psb pedro-psb changed the title Add fetch functionality Add repository find mechanism Apr 28, 2025
@pedro-psb pedro-psb force-pushed the add-fetch-functionality branch 3 times, most recently from 874c2eb to 8838f05 Compare April 28, 2025 19:24
@@ -34,6 +35,33 @@ class ComponentOption(Config):
git_url = config_options.Type(str, default="")
rest_api = config_options.Type(str, default="")

_repository_dir = None
Copy link
Member

Choose a reason for hiding this comment

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

Don't make this a class var.

Comment on lines 43 to 45
raise RuntimeError(
"Can't get repository/component path before resolving the dir in the filesystem."
)
Copy link
Member

Choose a reason for hiding this comment

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

What if we did not extend the mkdocs config class and instead wrapped a fat interface class around it?
I think we could prevent the "you need to post initialize this class before you can use it" situation.

Put another way: The easiest/safest way to maintain state is to never change it.

@pedro-psb pedro-psb force-pushed the add-fetch-functionality branch 2 times, most recently from 0beec0d to 99d32e4 Compare April 29, 2025 15:14
@pedro-psb pedro-psb force-pushed the add-fetch-functionality branch 3 times, most recently from 556d490 to 4207db1 Compare April 29, 2025 16:08
@pedro-psb pedro-psb force-pushed the add-fetch-functionality branch from 4207db1 to 1c3e210 Compare April 29, 2025 16:14
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.

2 participants