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

feat: add load_git, to load Module from a git committish #76

Merged
merged 14 commits into from
Jun 6, 2022

Conversation

tlambert03
Copy link
Contributor

@tlambert03 tlambert03 commented May 29, 2022

Since you mentioned liking the module-from-git approach in griffediff. Here's a PR for your consideration that adds it here. This will create a temporary git worktree with a specific commit or tag checked out, then add it to the search_paths passed to the loader

from griffe.git import load_git

module = load_git('my_module', commit='v0.1.0', repo='path/to/repository')

leaving in draft for now, as i'm sure there's some stuff to discuss (and I haven't run all the checks yet).

@tlambert03
Copy link
Contributor Author

Fixed up docstrings and checks... and created a better test fixture strategy.

Note, I had to noqa a bunch of subprocess warnings (S404,S603,S607) if that concerns you

@tlambert03 tlambert03 marked this pull request as ready for review May 29, 2022 23:33
@pawamoy
Copy link
Member

pawamoy commented May 31, 2022

Thanks, I didn't get the time to review yet, but soon 🙂

@pawamoy pawamoy self-requested a review May 31, 2022 16:47
Copy link
Member

@pawamoy pawamoy left a comment

Choose a reason for hiding this comment

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

Review done! Mostly good, just one or two questions, and some nitpicks about file structure 🙂

config/mypy.ini Outdated Show resolved Hide resolved
src/griffe/git.py Outdated Show resolved Hide resolved
src/griffe/git.py Outdated Show resolved Hide resolved
src/griffe/git.py Outdated Show resolved Hide resolved
tests/test_git/test_from_git.py Outdated Show resolved Hide resolved
tests/test_git/test_from_git.py Outdated Show resolved Hide resolved
@tlambert03
Copy link
Contributor Author

all set

Copy link
Member

@pawamoy pawamoy left a comment

Choose a reason for hiding this comment

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

OK! Thanks a lot! This paves the way to great things 😎

@pawamoy pawamoy merged commit b2c3946 into mkdocstrings:master Jun 6, 2022
@tlambert03 tlambert03 deleted the from-git branch June 9, 2022 01:15
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