Skip to content

Conversation

Pouyanpi
Copy link
Collaborator

No description provided.

Replace isort and black with ruff and ruff-format in pre-commit config.
Update hooks to use ruff for both linting and formatting, specifying
versions v0.9.6 and v0.11.2. Remove isort and black hooks, and keep
other hooks unchanged.
Introduced a new `imports.py` module providing utilities to handle optional
dependencies. This includes functions for importing optional modules with
customizable error handling, checking for their presence, and version
validation. Also added a mapping for commonly used optional dependencies
and a helper to retrieve them with predefined settings.
Copy link
Contributor

Documentation preview

https://nvidia.github.io/NeMo-Guardrails/review/pr-1351

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 68.43100% with 334 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.55%. Comparing base (2732d3b) to head (c54f0f0).

Files with missing lines Patch % Lines
nemoguardrails/imports.py 37.03% 34 Missing ⚠️
nemoguardrails/eval/ui/common.py 0.00% 17 Missing ⚠️
nemoguardrails/colang/v1_0/lang/colang_parser.py 58.82% 14 Missing ⚠️
nemoguardrails/eval/check.py 0.00% 13 Missing ⚠️
nemoguardrails/cli/chat.py 0.00% 12 Missing ⚠️
nemoguardrails/actions/v2_x/generation.py 64.51% 11 Missing ⚠️
nemoguardrails/colang/v2_x/runtime/runtime.py 52.17% 11 Missing ⚠️
nemoguardrails/actions/llm/generation.py 84.37% 10 Missing ⚠️
nemoguardrails/evaluate/evaluate_topical.py 0.00% 10 Missing ⚠️
nemoguardrails/colang/v2_x/runtime/statemachine.py 91.66% 9 Missing ⚠️
... and 67 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1351      +/-   ##
===========================================
- Coverage    71.59%   71.55%   -0.04%     
===========================================
  Files          168      169       +1     
  Lines        16862    16887      +25     
===========================================
+ Hits         12072    12084      +12     
- Misses        4790     4803      +13     
Flag Coverage Δ
python 71.55% <68.43%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
nemoguardrails/__init__.py 100.00% <100.00%> (ø)
nemoguardrails/actions/__init__.py 100.00% <100.00%> (ø)
nemoguardrails/actions/core.py 100.00% <100.00%> (ø)
nemoguardrails/actions/langchain/actions.py 28.57% <ø> (ø)
nemoguardrails/actions/math.py 44.82% <100.00%> (ø)
nemoguardrails/actions/retrieve_relevant_chunks.py 95.83% <100.00%> (ø)
nemoguardrails/actions/validation/__init__.py 100.00% <100.00%> (ø)
nemoguardrails/actions/validation/base.py 81.42% <100.00%> (ø)
nemoguardrails/cli/__init__.py 48.10% <100.00%> (ø)
nemoguardrails/colang/runtime.py 90.24% <100.00%> (ø)
... and 120 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Pouyanpi Pouyanpi marked this pull request as ready for review August 28, 2025 10:19
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