-
Notifications
You must be signed in to change notification settings - Fork 1
Add dm
cli + docs
#1
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with merging, but could you create new tasks to track the remediation of things outlined?
Specifically redoing the file hierarchy for the integrated libraries.
Additionally, a task to provide more context on the best steps to follow for adding a new third-party library, following the new paradigm.
There's also a loose understanding of what support means in the CLI versus what it means from external user perspective. In this context, is it more to say "it runs in the cli" or is it still referring to "being functional enough that we can cosign others using it."
def clone(repo, ctx, repo_names, all_repos, install): | ||
"""Clone repositories from `pyproject.toml`.""" | ||
repos, url_pattern, branch_pattern, upstream_pattern = get_repos("pyproject.toml") | ||
|
||
if repo_names: | ||
for repo_name in repo_names: | ||
not_found = set() | ||
for repo_entry in repos: | ||
if ( | ||
os.path.basename(url_pattern.search(repo_entry).group(0)) | ||
== repo_name | ||
): | ||
repo_clone(repo_entry, url_pattern, branch_pattern, repo) | ||
if install: | ||
clone_path = os.path.join(ctx.obj.home, repo_name) | ||
if os.path.exists(clone_path): | ||
repo_install(clone_path) | ||
return | ||
else: | ||
not_found.add(repo_name) | ||
click.echo(f"Repository '{not_found.pop()}' not found.") | ||
return | ||
|
||
if all_repos: | ||
click.echo(f"Cloning {len(repos)} repositories...") | ||
for repo_entry in repos: | ||
repo_clone(repo_entry, url_pattern, branch_pattern, repo) | ||
return | ||
|
||
if ctx.args == []: | ||
click.echo(ctx.get_help()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't pip install from pyproject be the proxy for installing these?
something like pip install ".[django_rest_framework]"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That syntax is for optional dependencies which I don't think can be "editable" or downloadable via git+ssh
. However, it's possible this could be improved by having pyproject.toml
read and install packages from requirements.txt
which can contain editable git+ssh
package references.
if check_function(item): | ||
if os.path.isdir(item): | ||
shutil.rmtree(item) | ||
click.echo(f"Removed directory: {item}") | ||
elif os.path.isfile(item): | ||
os.remove(item) | ||
click.echo(f"Removed file: {item}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could create a lambda wrapper for these two, honestly.
if outcome := check_function(item):
outcome() # executes the curried delete
`
OK I'll do quick fixes then merge then tickets for the rest, thanks
The latter. The goal is to define what support of third party libraries means and we're doing the work to meet those requirements here. Beyond that work, the CLI currently has no use and "working in the CLI" is just a convenience for us and not very meaningful beyond that. It's possible we could prototype some additional CLI commands here in the future, but that work is TBD. |
@Jibola I have this issue for the docs and I changed the dir structure, anything else to open tickets for ? Separate docs tickets maybe ? |
No longer needed with wagtail fork
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Honestly, that'll do it |
No description provided.