-
Notifications
You must be signed in to change notification settings - Fork 10
feat: added configs and improved dependency checks #157
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
af8b79b to
820acec
Compare
820acec to
b3871aa
Compare
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.
Pull Request Overview
This PR adds environment-specific configuration files for different deployment environments and improves dependency management by removing unused dependencies and adding necessary ones for web scraping and cryptographic operations. The changes also include improvements to the docker-compose setup with better environment variable handling.
- Added three new configuration YAML files for different environments (f910, e176, a779) with rate limiting and web search settings
- Removed unused dependencies (accelerate, authlib, pg8000, verifier, etc.) and added new ones (trafilatura, deptry, sentence-transformers 5.1.1, etc.)
- Enhanced docker-composer.py script to load environment variables from .env files based on deployment mode
Reviewed Changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| uv.lock | Updated dependency lock file with removed unused packages and added new dependencies for web scraping, cryptography, and dependency checking |
| scripts/docker-composer.py | Added load_environment_variables function to dynamically load .env.mainnet or .env.dev based on deployment mode |
| nilai-api/src/nilai_api/config/config-f910.yaml | New configuration file for f910 environment with rate limiting and web search settings |
| nilai-api/src/nilai_api/config/config-e176.yaml | New configuration file for e176 environment with different rate limit thresholds |
| nilai-api/src/nilai_api/config/config-a779.yaml | New configuration file for a779 environment with stricter rate limits |
| nilai-api/pyproject.toml | Updated dependencies by removing unused packages and adding required cryptography and web scraping libraries |
| nilai-api/alembic/versions/9ddf28cf6b6f_feat_new_user_config_and_web_rate_limits.py | Added server_default to web_search_calls column migration |
| docker/compose/docker-compose.nilai-prod-1.yml | Updated env_file reference from .env to .env.mainnet |
| docker-compose.testnet.prod.yml | Removed POSTGRES_DB_TESTNET environment variable override |
| docker-compose.prod.yml | Changed hardcoded database name to use POSTGRES_DB_NUC environment variable |
| README.md | Updated production setup documentation with new image versions and reorganized steps |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Load environment variables from .env.mainnet file. | ||
| Returns: | ||
| dict: Environment variables dictionary with .env.mainnet loaded |
Copilot
AI
Nov 13, 2025
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.
The docstring states "Load environment variables from .env.mainnet file" but the function actually loads from either .env.mainnet or .env.dev depending on the is_dev parameter. The docstring should be updated to reflect this behavior.
| Load environment variables from .env.mainnet file. | |
| Returns: | |
| dict: Environment variables dictionary with .env.mainnet loaded | |
| Load environment variables from either .env.mainnet or .env.dev file, depending on the is_dev parameter. | |
| Args: | |
| is_dev (bool): If True, load from .env.dev; otherwise, load from .env.mainnet. | |
| Returns: | |
| dict: Environment variables dictionary with the selected .env file loaded. |
Pull Request Overview
This PR adds environment-specific configuration files for different deployment environments and improves dependency management by removing unused dependencies and adding necessary ones for web scraping and cryptographic operations. The changes also include improvements to the docker-compose setup with better environment variable handling.