Commit graph

17 commits

Author SHA1 Message Date
0eccbd2ac7
Fix all remaining cyclomatic complexity issues
Resolves the final 5 Credo cyclomatic complexity issues by:

1. packet.ex: Create get_field_value/2 helper function
   - Replaces all `data[:field] || data["field"]` patterns
   - Reduces complexity in put_equipment_fields (11 -> 9)
   - Reduces complexity in put_phg_fields (12 -> 9)
   - Reduces complexity in put_standard_parser_fields (11 -> 9)

2. query_builder.ex: Use SQL fragment for weather_only query
   - Replaces multiple Elixir `or` operators with single SQL fragment
   - Reduces complexity from 10 to within limits

3. packet_utils.ex: Use SQL fragment for weather check query
   - Replaces multiple Elixir `or` operators with single SQL fragment
   - Reduces complexity from 11 to within limits

All 71 Credo issues now resolved:
- 14/14 warnings ✓
- 14/14 design suggestions ✓
- 40/40 refactoring issues ✓
- 3/3 code readability issues ✓

100% Credo compliance achieved!
2026-02-09 13:20:54 -06:00
9784cee344
Reduce cyclomatic complexity in multiple files
Extract helper functions to reduce cyclomatic complexity:

- telemetry/database_metrics.ex: Extract emit_packets_table_telemetry/7
  Moves multiple || 0 operators into separate function
  Reduces complexity from 10 to within limits

- packet_utils.ex: Extract build_weather_check_query/1
  Moves Ecto query building with multiple or conditions
  Reduces complexity from 11 to within limits

- packet.ex: Extract merge_extracted_data/3
  Moves telemetry and parser data merging logic
  Reduces complexity from 11 to within limits

Fixes 3 Credo cyclomatic complexity issues (7 remaining).
2026-02-09 13:13:15 -06:00
521aeea3c5
Remove caching from has_weather_packets function
Remove Cachex caching from the has_weather_packets function to ensure
real-time data display. The function now queries the database directly
for weather packet information.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-28 15:52:53 -05:00
e6ccb9662b
major refactor for cleanup 2025-07-14 12:06:10 -05:00
fa89712587
main map improvements 2025-07-13 14:58:13 -05:00
4348d34f62
fix weather 2025-07-12 10:53:11 -05:00
48447ab42e
refactor and performance improvements 2025-07-10 10:53:34 -05:00
514d1b66d5
fix all the main map display issues 2025-07-09 16:20:29 -05:00
711d92ebb6
performance improvements 2025-07-08 10:03:52 -05:00
feb71c73d9
deploy fix 2025-07-07 09:55:56 -05:00
524c8208c3
more i18n 2025-07-06 10:28:27 -05:00
c2b224096c
fix station popup 2025-07-05 14:14:43 -05:00
142900c759
liveview links 2025-07-05 13:33:30 -05:00
d6417ff16b
more live updates and chart version update 2025-07-04 12:15:38 -05:00
c8ee465015
weather charts 2025-07-03 11:29:01 -05:00
f08330b46c
weather fixing 2025-06-25 11:40:04 -05:00
ce7c50caa1
refactor to use external parser 2025-06-24 14:22:09 -05:00
Renamed from lib/aprs_web/live/map_live/packet_utils.ex (Browse further)