Tags: djt35/fli
Tags
Add configurable default currency via environment variable and CLI op… …tion (punitarani#123) * fix: make fallback currency configurable instead of hardcoded USD (punitarani#108) When Google Flights does not return a currency in its response, `fli` previously always labeled prices as USD regardless of the user's locale. This produced incorrect results for non-US users (e.g., CAD prices shown as USD). - Read fallback currency from FLI_DEFAULT_CURRENCY env var (default: USD) - Add --currency CLI flag to both `flights` and `dates` commands - Thread default_currency through serialization and display functions - Apply fallback currency consistently in both JSON and rich display - Remove dead _parse_price method (superseded by _parse_price_info) - Migrate tests from deleted method to _parse_price_info - Add tests for currency override behavior https://claude.ai/code/session_01EPvRRhETZaLR8GPo3cfvDd * fix: validate --currency flag and normalize env var to uppercase Add a validate_currency typer callback that rejects values not matching the 3-letter ISO 4217 format. Also normalize FLI_DEFAULT_CURRENCY to uppercase at read time so lowercase env values work correctly. https://claude.ai/code/session_01EPvRRhETZaLR8GPo3cfvDd * simplify: drop env var, use --currency flag as sole config point Remove FLI_DEFAULT_CURRENCY env var and DEFAULT_CURRENCY constant. The --currency CLI flag (defaulting to "USD") is now the single way to configure the fallback currency, keeping the implementation simpler. https://claude.ai/code/session_01EPvRRhETZaLR8GPo3cfvDd --------- Co-authored-by: Claude <noreply@anthropic.com>
Update test dates from 2026 to 2027 (punitarani#110) * Fix hardcoded test dates that are now in the past The tests in test_builders.py used hardcoded date "2026-4-2" which is now past (today is 2026-04-03), causing FlightSegment validation to reject them. Push all hardcoded test dates to 2027-01-15 to avoid this for ~9 months. https://claude.ai/code/session_01Wi2e1qcAHBZzCAQ4rPFkAp * Update uv.lock after dependency sync https://claude.ai/code/session_01Wi2e1qcAHBZzCAQ4rPFkAp * Restore distinct test coverage for date normalization scenarios Fix duplicate assertions introduced in the previous commit: ensure single-digit month+day, single-digit day, and single-digit month each have a unique test case. https://claude.ai/code/session_01Wi2e1qcAHBZzCAQ4rPFkAp --------- Co-authored-by: Claude <noreply@anthropic.com>
Update docs for v0.8.0 (punitarani#87) * Update docs for v0.8.0 - Remove defunct FastAPI server references from CLAUDE.md, AGENTS.md, Makefile - Add missing CLI options to README (--return, --duration, --round, --airlines, --time, --sort) - Update all example dates from 2024/2025 to 2026 across all docs - Fix incorrect round-trip result processing in advanced examples - Add missing LayoverRestrictions import in advanced examples - Expand quickstart example list from 5 to all 11 files - Update mkdocs.yml copyright year and description - Fix MCP HTTP URL trailing slash in AGENTS.md Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Update docs/examples/advanced.md Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
v0.7.0 (punitarani#27) * Enhance MCP Server Functionality and CLI Improvements This commit introduces significant updates to the MCP server and CLI for flight search: - **MCP Server Enhancements**: - Added `search_dates` tool for finding cheapest travel dates. - Improved parameter handling in `FlightSearchParams` and `DateSearchParams` for better clarity and usability. - Refactored server to streamline request handling and improve error messaging. - **CLI Updates**: - Updated command options to reflect new parameter names and improve user experience. - Enhanced validation and parsing utilities for better error handling. - Improved documentation and examples for MCP server integration. - **Core Utilities**: - Introduced shared parsing and building utilities to reduce code duplication between CLI and MCP. These changes aim to enhance the overall functionality and user experience of the flight search tools. * Refactor CLI Commands and Enhance Flight Search Functionality This commit updates the CLI commands for flight searches, replacing the previous `search` and `cheap` commands with `flights` and `dates`. Key changes include: - **CLI Command Updates**: - Renamed commands to better reflect their functionality. - Updated documentation and examples to align with new command names. - **New Command Implementations**: - Introduced `dates.py` for searching the cheapest travel dates. - Implemented `flights.py` for searching specific flights with enhanced filtering options. - **Testing Enhancements**: - Added comprehensive tests for both new commands to ensure functionality and reliability. These changes aim to improve user experience and streamline the flight search process. * Bump Package Version to 0.7.0 * Format * Add plotext dependency and integrate sparkline chart in date results display This commit introduces the `plotext` library as a new dependency for rendering sparkline charts. The `display_date_results` function is updated to visualize price trends over dates using a sparkline chart, enhancing the user experience by providing a graphical representation of data alongside the existing table format. The chart includes proper labeling and formatting for clarity. * Add retry logic for flight search API calls This commit introduces a new `search_with_retry` function that implements retry logic for the flight search API, utilizing the `tenacity` library. The function attempts to search for flights up to three times with exponential backoff if the initial search returns empty results. This enhancement aims to improve the reliability of flight search results in the face of flaky API responses.
PreviousNext