Skip to content

Commit 07d1ec4

Browse files
committed
Merge pull request mongodb-labs#34 from aclark4life/main
Move project* under `dm proj`, app* under `dm app`
1 parent 38ff5ec commit 07d1ec4

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

django_mongodb_cli/repo.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
get_management_command,
1515
get_repos,
1616
get_status,
17+
get_repo_name_map,
1718
install_package,
1819
)
1920

@@ -33,15 +34,6 @@ def __repr__(self):
3334
pass_repo = click.make_pass_decorator(Repo)
3435

3536

36-
def get_repo_name_map(repos, url_pattern):
37-
"""Return a dict mapping repo_name to repo_url from a list of repo URLs."""
38-
return {
39-
os.path.basename(url_pattern.search(url).group(0)): url
40-
for url in repos
41-
if url_pattern.search(url)
42-
}
43-
44-
4537
@click.group(invoke_without_command=True)
4638
@click.option(
4739
"-l",
@@ -52,7 +44,7 @@ def get_repo_name_map(repos, url_pattern):
5244
@click.pass_context
5345
def repo(context, list_repos):
5446
"""
55-
Run Django fork and third-party library tests.
47+
Run tests configured to test django-mongodb-backend.
5648
"""
5749
context.obj = Repo()
5850
repos, url_pattern, branch_pattern = get_repos("pyproject.toml")

django_mongodb_cli/utils.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,15 @@ def clone_repo(repo_entry, url_pattern, branch_pattern, repo):
267267
)
268268

269269

270+
def get_repo_name_map(repos, url_pattern):
271+
"""Return a dict mapping repo_name to repo_url from a list of repo URLs."""
272+
return {
273+
os.path.basename(url_pattern.search(url).group(0)): url
274+
for url in repos
275+
if url_pattern.search(url)
276+
}
277+
278+
270279
def install_package(clone_path):
271280
"""
272281
Install a package from the given clone path.

0 commit comments

Comments
 (0)