Skip to content

Comments

feat: license checker#201

Merged
michaelneale merged 5 commits intoblock:mainfrom
lamchau:lam/license-checker-v2
Oct 26, 2024
Merged

feat: license checker#201
michaelneale merged 5 commits intoblock:mainfrom
lamchau:lam/license-checker-v2

Conversation

@lamchau
Copy link
Contributor

@lamchau lamchau commented Oct 25, 2024

just format triggered ruff errors so normalized. ended up adding some quality of life for maintenance and possibly we can consider OSS as an action

changes

  • added argparse/help
  • added docstrings
  • added test cases
  • colorized output with columnized alignment
  • ability to pass in multiple toml files
  • sorted output

Output

uv run python3 .github/workflows/scripts/check_licenses.py packages/exchange/pyproject.toml pyproject.toml

image

Tests

$ uv run pytest -m "not integration" .github/workflows/
========================== test session starts ==========================
platform darwin -- Python 3.10.0, pytest-8.3.3, pluggy-1.5.0
rootdir: /Users/lam/Development/goose-dev/goose
configfile: pyproject.toml
plugins: vcr-1.0.2, mock-3.14.0, anyio-4.6.2.post1
collected 9 items

.github/workflows/scripts/test_check_licenses.py .........        [100%]

=========================== 9 passed in 0.30s ===========================

@lamchau lamchau force-pushed the lam/license-checker-v2 branch from 54dfd88 to d965977 Compare October 25, 2024 13:17
@lamchau lamchau added enhancement New feature or request ready labels Oct 25, 2024
Returns:
str | None: The license of the package, or None if not found.
"""
if package_name in self.config.exceptions:
Copy link
Collaborator

Choose a reason for hiding this comment

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

this line seems redundant with the check in check_packages?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ohh v good catch! i was being overly defensive during refactoring. deleted in 48ee1ce

Copy link
Collaborator

@michaelneale michaelneale left a comment

Choose a reason for hiding this comment

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

nice improvements!

@michaelneale michaelneale merged commit 1e0c4c0 into block:main Oct 26, 2024
@lamchau lamchau deleted the lam/license-checker-v2 branch October 26, 2024 01:13
lamchau added a commit to lamchau/goose that referenced this pull request Oct 27, 2024
* upstream/main:
  chore: add `.vscode` workspace settings and suggested extensions (block#200)
  feat: license checker (block#201)
  feat: include new anthropic model in docs and recommended config (block#198)
lifeizhou-ap added a commit that referenced this pull request Oct 30, 2024
* main:
  chore: housekeeping (#202)
  feat: reduce tool entrypoints in synopsis for text editor, bash, process manager (#191)
  feat: list moderators (#204)
  chore: Minor changes in providers envs logic (#161)
  chore: add `.vscode` workspace settings and suggested extensions (#200)
  feat: license checker (#201)
  feat: include new anthropic model in docs and recommended config (#198)
  feat: tiny change so you know what processing is doing (#196)
  docs: correct intellij link (#197)
  docs: remove small duplication (#194)
  chore: add tracing option to run and group traces under session name (#187)
  docs: fix mkdocs, update to new references (#193)
ahau-square pushed a commit that referenced this pull request Nov 6, 2024
ahau-square pushed a commit that referenced this pull request May 2, 2025
cbruyndoncx pushed a commit to cbruyndoncx/goose that referenced this pull request Jul 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants