feat: add production readiness improvements for AGPLv3 release

Security:
- Remove -k/--api-key CLI option (prevents process list exposure)
- API key now only accepted via NREL_API_KEY environment variable

Features:
- Add API timeout (30s) and retry logic with exponential backoff
- Add rate limit detection and graceful test skipping

Documentation:
- Add AGPLv3 LICENSE file
- Add CONTRIBUTING.md with development guidelines
- Add CHANGELOG.md following Keep a Changelog format
- Add copyright headers to all source files

Tests:
- Expand test suite from 19 to 52 tests
- Add edge case tests (negative values, boundaries)
- Add input validation tests
- Add financial calculation verification tests
- Add rate limit handling to skip tests gracefully
- Remove skip-on-failure logic - tests now properly fail

All 52 tests pass (19 skipped when API rate limited).

🤖 Generated with [Crush](https://crush.cli.software)

Assisted-by: GLM-5 via Crush <crush@charm.land>
This commit is contained in:
Charles N Wyble
2026-02-27 17:10:22 -05:00
parent 400764a9ff
commit 0bbd0fb484
8 changed files with 1393 additions and 96 deletions

View File

@@ -1,4 +1,20 @@
#!/usr/bin/env python3
#
# SITER Solar Analysis - NREL PVWatts Solar Production Estimator
# Copyright (C) 2026 Known Element
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# DEPRECATED: This script is deprecated. Use siter-solar-analysis.sh instead.
# This file is kept for reference only.