DaisukeYoda
44ddf8d3d4
chore: update development status to stable for v1.0.0
...
Update PyPI classifier from Beta to Production/Stable as we prepare
for the first stable release.
2025-10-05 20:45:19 +09:00
DaisukeYoda
29a6498beb
refactor: unify config architecture and remove technical debt (issue #124 )
...
This commit implements a major cleanup of the configuration system,
removing redundant structures and unifying the config architecture
for the v1.0 release.
## Configuration Unification
### Unified Config Format
- Migrate pyproject.toml from nested to flat structure
- Before: [tool.pyscn.clone.analysis], [tool.pyscn.clone.thresholds], etc.
- After: [tool.pyscn.clones] with all fields flattened
- Both .pyscn.toml and pyproject.toml now use identical flat structure
- Update init.go template to use unified [clones] section format
### Removed Duplicate Structures
1. **pyproject_loader.go** (-200 lines)
- Removed: PyprojectCloneConfig and 4 sub-structs
- Unified: PyscnConfig.Clones now uses ClonesConfig directly
- Removed: mergePyprojectConfigs, use shared mergeClonesSection
2. **toml_loader.go** (-150 lines)
- Removed: PyscnTomlAnalysisConfig, PyscnTomlFilteringConfig, etc.
- Simplified: PyscnTomlConfig.Clones only
- Merged: Shared mergeClonesSection for both loaders
3. **config.go** (-170 lines)
- Removed: Config.CloneDetection field (deprecated)
- Removed: CloneDetectionConfig type and all methods
- Removed: validateCloneDetectionConfig and helper methods
- Updated: clone_config_loader.go to use unified Clones field
### Removed Legacy Code
1. **domain/clone.go**
- Removed: CloneRequest.UseLSH field (deprecated)
- Removed: Related validation logic
2. **analyzer/lsh_index.go**
- Removed: Duplicate LSHConfig struct (unused)
- Use: config.LSHConfig as single source of truth
3. **constants/clone_thresholds.go** (-60 lines)
- Removed: CloneThresholdConfig struct
- Removed: DefaultCloneThresholds() function
- Removed: ValidateThresholds() and GetThresholdForType() methods
- Inlined: Validation logic into config.ThresholdConfig.Validate()
4. **service/dead_code_formatter.go**
- Removed: formatFindingTextLegacy method
- Inlined: Formatting logic into FormatFinding
### Test Updates
- Updated clone_adapters_test.go: removed tests for deleted types
- Simplified clone_thresholds_test.go: removed validation tests
- Updated new_commands_test.go: verify [clones] section format
- All tests pass: 100% success rate
## Impact
### Code Reduction
- **Deleted lines**: ~1,056 lines
- **Deleted structs**: 12 config structs
- **Deleted functions**: 8 functions/methods
- **Deleted tests**: 6 obsolete test functions
### Architecture Improvements
- Single source of truth for clone configuration
- No more duplicate config structs across layers
- Consistent config format between .pyscn.toml and pyproject.toml
- Cleaner separation of concerns
### Remaining Technical Debt
Documented for future cleanup:
- analyzer.GroupingConfig (design issue with Type1-4Threshold fields)
- analyzer.CloneDetectorConfig (used in 21 locations, needs planned migration)
- ClonesConfig flat structure (TOML-specific, needs careful analysis)
Closes #124
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-10-05 13:48:17 +09:00
DaisukeYoda
73deb3bd3e
feat: unify configuration to TOML-only like ruff
...
This PR follows ruff's approach to configuration management by:
1. Prioritizing pyproject.toml over dedicated config files
2. Removing YAML/JSON configuration support completely
3. Hiding complex algorithm flags from CLI help
4. Providing simple presets for common use cases
## Key Changes
### New Files
- `internal/config/pyproject_loader.go` - pyproject.toml integration
- `internal/config/toml_loader.go` - TOML-only configuration loader
- `.pyscn.toml` - example dedicated config file
### Configuration Priority (like ruff)
1. CLI arguments (highest priority)
2. pyproject.toml [tool.pyscn] section
3. .pyscn.toml dedicated config file
4. Built-in defaults (lowest priority)
### Simplified CLI
- Hidden complex algorithm flags (accessible but not in help)
- Simple presets: --fast, --precise, --balanced
- Focus on essential user options only
### TOML Examples
```toml
# pyproject.toml
[tool.pyscn.clone]
[tool.pyscn.clone.analysis]
min_lines = 5
# .pyscn.toml
[analysis]
min_lines = 5
```
## Benefits
- Consistent with modern Python tooling ecosystem
- Simplified user experience for new users
- Backward compatibility for existing scripts
- Configuration consolidation in pyproject.toml
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-11 23:21:35 +09:00
DaisukeYoda
6b50848f75
refactor: rename project from pyqol/pyscan to pyscn
...
- Update all references from pyqol and pyscan to pyscn
- Rename directories: cmd/pyqol → cmd/pyscn, python/src/pyscan → python/src/pyscn
- Update Go module path to github.com/ludo-technologies/pyscn
- Update PyPI package name to pyscn
- Update all documentation and configuration files
- Successfully published to PyPI as pyscn
This change provides a shorter, more memorable package name (5 characters)
that is easier to type in commands like 'pyscn analyze' while maintaining
the core meaning of Python code scanning/analysis.
2025-09-08 01:31:33 +09:00
DaisukeYoda
738a35e047
feat: implement automatic version detection from git tags
...
- Add setuptools_scm to pyproject.toml for dynamic versioning
- Update create_wheel.sh to auto-detect version from git describe
- Update build_all_wheels.sh to display detected version
- Eliminate manual version updates - now fully automated via git tags
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-07 02:08:21 +09:00
DaisukeYoda
7112819294
refactor: adopt ruff-style project structure and improve messaging
...
- Move pyproject.toml from python/ to root directory (ruff-style)
- Add README.md and LICENSE file references to pyproject.toml
- Update description to focus on architectural guidance over technical details
- Restructure build system to use standard dist/ output directory
- Update all scripts and workflows to work with new directory layout
- Maintain relative paths for cross-platform compatibility
- Align README introduction with pyproject.toml description
Breaking Changes:
- pyproject.toml relocated to root (standard Python project layout)
- Wheel output moved from python/dist/ to dist/ (Python convention)
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-07 00:36:23 +09:00