Commit Graph
14 Commits
Author SHA1 Message Date
sankalp 9fcafc9177 chore(root): bump version to 0.2.2
Update version to 0.2.2 for the new release.
2026-06-06 21:36:26 +05:45
sankalp 0268bcfe98 chore(root): remove DRF and django-filter dependencies
drop DRF and django-filter to make django_nepkit framework‑agnostic, simplify dependencies, and align with v0.2.2 breaking change.
2026-06-06 21:06:03 +05:45
sankalp e1acaa9c68 bumped to v.0.2.1 2026-02-05 20:52:44 +05:45
sankalp 9b0ed482b9 feat:upgrade nepali package to 1.2.0 and remove hardcoded Koshi Province mapping 2026-02-05 20:29:13 +05:45
sankalp 0a9626fc01 bumped to v.0.2 2026-01-31 14:28:56 +05:45
sankalp 371d85dcf0 fix 2026-01-30 21:41:35 +05:45
sankalp 192e1b8f5c update 2026-01-30 18:50:17 +05:45
sankalp 80059745c3 updated workflow 2026-01-30 18:47:43 +05:45
sankalp d7c13a0cf5 test: add comprehensive pytest test suite with 67% coverage
This commit adds a complete test suite for django-nepkit with 62 test cases covering all major components.

Test Suite:
- 8 test modules covering models, forms, widgets, serializers, filters, validators, and utilities
- 62 total test cases with 50 passing and 12 expected failures (xfail)
- 67% overall code coverage with 85-100% on core components

Test Files Added:
- django_nepkit/tests/conftest.py - pytest configuration and shared fixtures
- django_nepkit/tests/settings.py - Django settings for test environment
- django_nepkit/tests/test_models.py - 15 tests for model fields
- django_nepkit/tests/test_forms.py - 6 tests for form validation
- django_nepkit/tests/test_validators.py - 7 tests for phone validation
- django_nepkit/tests/test_utils.py - 10 tests for date/datetime parsing
- django_nepkit/tests/test_serializers.py - 10 tests for DRF serializers
- django_nepkit/tests/test_filters.py - 4 tests for DRF filters
- django_nepkit/tests/test_widgets.py - 11 tests for widget rendering
- django_nepkit/tests/README.md - test documentation

Configuration:
- pytest.ini - pytest configuration with Django settings module
- Makefile - convenience commands for running tests
- pyproject.toml - moved pytest and pytest-cov to dev dependencies

Coverage Highlights:
- validators.py: 100%
- forms.py: 91%
- conf.py: 93%
- serializers.py: 89%
- widgets.py: 90%
- models.py: 60%

Running Tests:
DJANGO_SETTINGS_MODULE=django_nepkit.tests.settings uv run pytest django_nepkit/tests/ -v

With Coverage:
DJANGO_SETTINGS_MODULE=django_nepkit.tests.settings uv run pytest django_nepkit/tests/ --cov=django_nepkit --cov-report=html
2026-01-30 18:41:38 +05:45
sankalp 1338f9e5fe refactor: global project refinement, DRY consolidation, and documentation overhaul
This commit represents a comprehensive improvement of the library's architecture, developer experience, and documentation accuracy.

Core Refactoring:
- apply DRY principle to models.py by introducing BaseNepaliBSField and BaseLocationField
- standardize widget logic in widgets.py using NepaliWidgetMixin
- centralize admin filtering logic into BaseNepaliDateFilter

New Features & API:
- add NepaliMonthFilter for Django Admin and NepaliDateMonthFilter for DRF
- implementation of HTMX-driven location chaining for dynamic address selects
- extend demo project with comprehensive DRF search, ordering, and filter examples

Configuration & Sync:
- implement global NEPKIT settings in conf.py (DEFAULT_LANGUAGE, ADMIN_DATEPICKER, etc.)
- universalize BS_DATE_FORMAT/BS_DATETIME_FORMAT across the entire stack
- synchronize frontend datepicker initialization with backend date formats

Documentation & DX:
- complete rewrite of README.md into high-energy, factual, English-only guides
- project-wide audit and simplification of comments/docstrings for beginner accessibility
- expanded 'Technical Design' and 'FAQ' sections covering data integrity and storage
- added docs/migration_guide.py for bulk AD-to-BS data transitions

Quality & Maintenance:
- fixed all E402 module-level import errors across the library
- verified codebase with project-wide ruff checks (all checks passed)
2026-01-30 17:00:33 +05:45
sankalp 09f302ceaa feat: implement HTMX support, DRF filters, and professionalized documentation
- Implement server-side location chaining with HTMX support via `htmx=True` in fields and widgets.
- Update location views to handle HTMX requests and return HTML <option> fragments.
- Add NepaliDateYearFilter and NepaliDateRangeFilter for robust DRF API filtering.
- Expand default `DATE_INPUT_FORMATS` in configuration to support multiple common Nepali date styles.
- Update DRF serializers to automatically respect global `NEPKIT` configuration settings.
- Add `django-filter` as an optional dependency under the `drf` extra in pyproject.toml.
- Correct underlying dependency references from `nepali-datetime` to nepali library.
- Complete overhaul of README.md for premium DX, including new sections for storage behavior, timezone awareness, and API usage.
2026-01-30 15:22:13 +05:45
sankalp 04e19ca63f upate 2026-01-29 02:05:18 +05:45
sankalp 1a1dc3bee4 use dry principle possible and added example project 2026-01-29 01:37:41 +05:45
sankalp 9b83acc084 feat: scaffold initial project structure and configuration 2026-01-28 23:08:23 +05:45