Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Test invalid positive-integer environment settings

Đang mở Phù hợp với người mới
#56 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
72/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
fastapi, python
Lĩnh vực
api, backend

Hướng nghiên cứu

Tìm MAX_FILE_SIZE trong repository và trước tiên đọc phần phân tích cấu hình của nó cùng các test lân cận. Bổ sung coverage tập trung cho các giá trị hợp lệ, không phải số nguyên, bằng không và âm; được coi là hoàn thành khi các thiết lập không hợp lệ tạo ra lỗi cấu hình rõ ràng và các thiết lập hợp lệ vẫn tiếp tục hoạt động.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area:auth contributor-roadmap difficulty:intermediate help wanted status:ready

AUT-02 · Authentication and configuration

Difficulty: intermediate · Status: ready

This is a focused contribution against current main. No unmerged feature PR is required.

Why this is useful

positive_int validates values but parsing errors are not covered

Start here

Source audit: 9d8ac3e01df1. Read these files on current main too, because paths may change after the audit:

Scope and intended output

Add the focused test file tests/roadmap/auth/test_numeric_settings.py. Change runtime code only if the acceptance criteria explicitly request a behavior fix; otherwise report newly discovered behavior separately.

Acceptance criteria
  • Cover zero, negative, noninteger, and valid values for all numeric settings
  • Run import-sensitive cases in isolated subprocesses
  • Assert no model or provider work occurs
Verification
uv run pytest tests/roadmap/auth/test_numeric_settings.py -q
uv run pylint app tests

Create the named focused test file before running its command. Tests must be deterministic, mock external services, and avoid paid calls. Run bash scripts/check.sh before submitting a Python change.

Dependencies

None. Keep the PR based on current upstream main.

Out of scope
  • Unrelated refactors, broad formatting, endpoint renames, or extra dependencies without agreement.
  • Live cloud provisioning, paid model calls, real private messages, or credentials in fixtures/logs.
  • Implementing neighboring roadmap issues in the same PR.
Getting help and submitting

Comment with your intended approach and ask when expected behavior is unclear. Check for an existing PR before starting; there is no deadline for a volunteer contribution. A useful reproduction or partial finding is welcome.

Use the issue's criteria as the review checklist. Include the commands actually run and any limitations. Link the issue; use Fixes only when its entire agreed scope is complete. If CONTRIBUTING.md is not yet on main, the contributor-roadmap PR provides the onboarding guide.

Original issue before the source audit (historical context)

Problem

MAX_FILE_SIZE is parsed directly with int(), so invalid, zero, or negative values produce confusing startup or runtime behavior.

Acceptance criteria

  • Reject non-integer values with a clear configuration error.
  • Reject zero and negative values.
  • Add focused tests for valid and invalid configuration values.
Ngôn ngữ chính
Python
Star
3
Fork
10
Merge trung bình
8 giờ 46 phút
Pull request đã merge (30 ngày)
16

Chuẩn bị môi trường

Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ashrafee-dev/scamshield-api

Tất cả issue của ashrafee-dev/scamshield-api

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.