Skip to content

Conversation

@jcabrero
Copy link
Member

@jcabrero jcabrero commented Oct 6, 2025

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

@jcabrero jcabrero force-pushed the feat/minor_improvements branch from af8b79b to 820acec Compare November 13, 2025 10:33
@jcabrero jcabrero force-pushed the feat/minor_improvements branch from 820acec to b3871aa Compare November 13, 2025 10:36
@jcabrero jcabrero marked this pull request as ready for review November 13, 2025 11:08
@jcabrero jcabrero requested a review from Copilot November 13, 2025 11:08
Copilot finished reviewing on behalf of jcabrero November 13, 2025 11:11
Copy link
Contributor

Copilot AI left a 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.

Comment on lines +26 to +29
Load environment variables from .env.mainnet file.
Returns:
dict: Environment variables dictionary with .env.mainnet loaded
Copy link

Copilot AI Nov 13, 2025

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.

Suggested change
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.

Copilot uses AI. Check for mistakes.
@jcabrero jcabrero merged commit 028dc61 into main Nov 13, 2025
14 checks passed
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