mirror of
https://github.com/ludo-technologies/pyscn.git
synced 2025-10-06 00:59:45 +03:00
chore: finalize repository for public release (#76)
* chore: standardize project name to pyscn throughout codebase - Fix project name inconsistency from pyqol to pyscn in all files - Update HTML report titles and branding to pyscn - Rename config file: pyqol.yaml.example → .pyscn.yaml.example - Update test function names and documentation references - Clean copyright attribution in LICENSE file - Remove temporary files (.DS_Store, coverage files, venv) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * docs: clean up CHANGELOG and remove legacy beta versions - Update CHANGELOG.md to reflect current state with v0.1.0-beta.13 - Remove references to deleted beta versions (beta.1-12, b7) - Add explanation note about removed versions with distribution issues - Update installation instructions to use latest beta version 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: DaisukeYoda <daisukeyoda@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -21,7 +21,6 @@ vendor/
|
||||
/pyscn
|
||||
/pyscan
|
||||
/pyscn.exe
|
||||
/pyqol
|
||||
/dist/
|
||||
/build/
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# pyqol Configuration File
|
||||
# pyscn Configuration File
|
||||
# This is an example configuration file showing all available options
|
||||
|
||||
# Complexity analysis configuration
|
||||
12
CHANGELOG.md
12
CHANGELOG.md
@@ -5,9 +5,11 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [0.1.0-beta.1] - 2025-09-07
|
||||
## [0.1.0-beta.13] - 2025-09-08
|
||||
|
||||
### Initial Beta Release
|
||||
### Latest Beta Release
|
||||
|
||||
*Note: Previous beta versions (0.1.0-beta.1 through 0.1.0-beta.12) contained distribution issues and have been removed from both PyPI and GitHub releases.*
|
||||
|
||||
#### Features
|
||||
- **Complexity Analysis**: CFG-based cyclomatic complexity calculation with risk thresholds
|
||||
@@ -69,11 +71,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
#### Installation
|
||||
```bash
|
||||
# Install beta version
|
||||
# Install latest beta version
|
||||
pip install --pre pyscn
|
||||
|
||||
# Or specify exact version
|
||||
pip install pyscn==0.1.0b1
|
||||
pip install pyscn==0.1.0b13
|
||||
```
|
||||
|
||||
#### Usage
|
||||
@@ -90,5 +92,3 @@ pyscn deadcode src/
|
||||
pyscn clone src/
|
||||
pyscn cbo src/
|
||||
```
|
||||
|
||||
[0.1.0-beta.1]: https://github.com/pyscn/pyscn/releases/tag/v0.1.0-beta.1
|
||||
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2025 pyqol
|
||||
Copyright (c) 2025 pyscn
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -636,7 +636,7 @@ Test complete user workflows through the CLI interface.
|
||||
// e2e/complexity_e2e_test.go
|
||||
func TestComplexityE2EBasic(t *testing.T) {
|
||||
// Build actual binary
|
||||
binaryPath := buildPyqolBinary(t)
|
||||
binaryPath := buildPyscnBinary(t)
|
||||
defer os.Remove(binaryPath)
|
||||
|
||||
// Create test Python files
|
||||
|
||||
@@ -421,7 +421,7 @@ go tool pprof -http=:8080 cpu.prof
|
||||
go build -gcflags="all=-N -l" ./cmd/pyscn
|
||||
|
||||
# Run with debug logging
|
||||
PYQOL_DEBUG=1 ./pyscn analyze test.py
|
||||
PYSCN_DEBUG=1 ./pyscn analyze test.py
|
||||
|
||||
# Use delve debugger
|
||||
dlv debug ./cmd/pyscn -- analyze test.py
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
// TestCloneE2EBasic tests basic clone detection command
|
||||
func TestCloneE2EBasic(t *testing.T) {
|
||||
// Build the binary first
|
||||
binaryPath := buildPyqolBinary(t)
|
||||
binaryPath := buildPyscnBinary(t)
|
||||
defer os.Remove(binaryPath)
|
||||
|
||||
// Create test directory with Python files containing simple clones
|
||||
@@ -53,7 +53,7 @@ def func2():
|
||||
|
||||
// TestCloneE2EJSONOutput tests JSON output format
|
||||
func TestCloneE2EJSONOutput(t *testing.T) {
|
||||
binaryPath := buildPyqolBinary(t)
|
||||
binaryPath := buildPyscnBinary(t)
|
||||
defer os.Remove(binaryPath)
|
||||
|
||||
testDir := t.TempDir()
|
||||
@@ -168,7 +168,7 @@ def function_b(arg):
|
||||
|
||||
// TestCloneE2ETypes tests different clone types filtering
|
||||
func TestCloneE2ETypes(t *testing.T) {
|
||||
binaryPath := buildPyqolBinary(t)
|
||||
binaryPath := buildPyscnBinary(t)
|
||||
defer os.Remove(binaryPath)
|
||||
|
||||
testDir := t.TempDir()
|
||||
@@ -224,7 +224,7 @@ def func_b():
|
||||
|
||||
// TestCloneE2EThreshold tests similarity threshold configuration
|
||||
func TestCloneE2EThreshold(t *testing.T) {
|
||||
binaryPath := buildPyqolBinary(t)
|
||||
binaryPath := buildPyscnBinary(t)
|
||||
defer os.Remove(binaryPath)
|
||||
|
||||
testDir := t.TempDir()
|
||||
@@ -289,7 +289,7 @@ def low_similarity():
|
||||
|
||||
// TestCloneE2EFlags tests various command line flags
|
||||
func TestCloneE2EFlags(t *testing.T) {
|
||||
binaryPath := buildPyqolBinary(t)
|
||||
binaryPath := buildPyscnBinary(t)
|
||||
defer os.Remove(binaryPath)
|
||||
|
||||
testDir := t.TempDir()
|
||||
@@ -381,7 +381,7 @@ def sample_func2(arg):
|
||||
|
||||
// TestCloneE2EErrorHandling tests error scenarios
|
||||
func TestCloneE2EErrorHandling(t *testing.T) {
|
||||
binaryPath := buildPyqolBinary(t)
|
||||
binaryPath := buildPyscnBinary(t)
|
||||
defer os.Remove(binaryPath)
|
||||
|
||||
tests := []struct {
|
||||
@@ -433,7 +433,7 @@ func TestCloneE2EErrorHandling(t *testing.T) {
|
||||
|
||||
// TestCloneE2EMultipleFiles tests clone detection across multiple files
|
||||
func TestCloneE2EMultipleFiles(t *testing.T) {
|
||||
binaryPath := buildPyqolBinary(t)
|
||||
binaryPath := buildPyscnBinary(t)
|
||||
defer os.Remove(binaryPath)
|
||||
|
||||
testDir := t.TempDir()
|
||||
@@ -470,7 +470,7 @@ def another_func():
|
||||
|
||||
// TestCloneE2EAdvancedOptions tests advanced configuration options
|
||||
func TestCloneE2EAdvancedOptions(t *testing.T) {
|
||||
binaryPath := buildPyqolBinary(t)
|
||||
binaryPath := buildPyscnBinary(t)
|
||||
defer os.Remove(binaryPath)
|
||||
|
||||
testDir := t.TempDir()
|
||||
@@ -531,7 +531,7 @@ def function_with_different_literals():
|
||||
|
||||
// TestCloneE2ERecursiveAnalysis tests recursive directory analysis
|
||||
func TestCloneE2ERecursiveAnalysis(t *testing.T) {
|
||||
binaryPath := buildPyqolBinary(t)
|
||||
binaryPath := buildPyscnBinary(t)
|
||||
defer os.Remove(binaryPath)
|
||||
|
||||
testDir := t.TempDir()
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
// TestComplexityE2EBasic tests basic complexity analysis command
|
||||
func TestComplexityE2EBasic(t *testing.T) {
|
||||
// Build the binary first
|
||||
binaryPath := buildPyqolBinary(t)
|
||||
binaryPath := buildPyscnBinary(t)
|
||||
defer os.Remove(binaryPath)
|
||||
|
||||
// Create test directory with Python files
|
||||
@@ -59,7 +59,7 @@ def complex_function(x):
|
||||
|
||||
// TestComplexityE2EJSONOutput tests JSON output format
|
||||
func TestComplexityE2EJSONOutput(t *testing.T) {
|
||||
binaryPath := buildPyqolBinary(t)
|
||||
binaryPath := buildPyscnBinary(t)
|
||||
defer os.Remove(binaryPath)
|
||||
|
||||
testDir := t.TempDir()
|
||||
@@ -127,7 +127,7 @@ def sample_function(x):
|
||||
|
||||
// TestComplexityE2EFlags tests various command line flags
|
||||
func TestComplexityE2EFlags(t *testing.T) {
|
||||
binaryPath := buildPyqolBinary(t)
|
||||
binaryPath := buildPyscnBinary(t)
|
||||
defer os.Remove(binaryPath)
|
||||
|
||||
testDir := t.TempDir()
|
||||
@@ -187,7 +187,7 @@ def medium_complexity(x):
|
||||
|
||||
// TestComplexityE2EErrorHandling tests error scenarios
|
||||
func TestComplexityE2EErrorHandling(t *testing.T) {
|
||||
binaryPath := buildPyqolBinary(t)
|
||||
binaryPath := buildPyscnBinary(t)
|
||||
defer os.Remove(binaryPath)
|
||||
|
||||
tests := []struct {
|
||||
@@ -240,7 +240,7 @@ func TestComplexityE2EErrorHandling(t *testing.T) {
|
||||
|
||||
// TestComplexityE2EMultipleFiles tests analysis of multiple files
|
||||
func TestComplexityE2EMultipleFiles(t *testing.T) {
|
||||
binaryPath := buildPyqolBinary(t)
|
||||
binaryPath := buildPyscnBinary(t)
|
||||
defer os.Remove(binaryPath)
|
||||
|
||||
testDir := t.TempDir()
|
||||
@@ -282,7 +282,7 @@ def func2(x):
|
||||
|
||||
// Helper functions
|
||||
|
||||
func buildPyqolBinary(t *testing.T) string {
|
||||
func buildPyscnBinary(t *testing.T) string {
|
||||
t.Helper()
|
||||
|
||||
// Create temporary binary
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
// TestDeadCodeE2EBasic tests basic dead code analysis command
|
||||
func TestDeadCodeE2EBasic(t *testing.T) {
|
||||
// Build the binary first
|
||||
binaryPath := buildPyqolBinary(t)
|
||||
binaryPath := buildPyscnBinary(t)
|
||||
defer os.Remove(binaryPath)
|
||||
|
||||
// Create test directory with Python files containing dead code
|
||||
@@ -77,7 +77,7 @@ def function_with_raise():
|
||||
|
||||
// TestDeadCodeE2EJSONOutput tests JSON output format
|
||||
func TestDeadCodeE2EJSONOutput(t *testing.T) {
|
||||
binaryPath := buildPyqolBinary(t)
|
||||
binaryPath := buildPyscnBinary(t)
|
||||
defer os.Remove(binaryPath)
|
||||
|
||||
testDir := t.TempDir()
|
||||
@@ -153,7 +153,7 @@ def simple_function():
|
||||
|
||||
// TestDeadCodeE2EFlags tests various command line flags
|
||||
func TestDeadCodeE2EFlags(t *testing.T) {
|
||||
binaryPath := buildPyqolBinary(t)
|
||||
binaryPath := buildPyscnBinary(t)
|
||||
defer os.Remove(binaryPath)
|
||||
|
||||
testDir := t.TempDir()
|
||||
@@ -234,7 +234,7 @@ def warning_dead_code(x):
|
||||
|
||||
// TestDeadCodeE2ESeverityFiltering tests severity filtering functionality
|
||||
func TestDeadCodeE2ESeverityFiltering(t *testing.T) {
|
||||
binaryPath := buildPyqolBinary(t)
|
||||
binaryPath := buildPyscnBinary(t)
|
||||
defer os.Remove(binaryPath)
|
||||
|
||||
testDir := t.TempDir()
|
||||
@@ -289,7 +289,7 @@ def warning_example(x):
|
||||
|
||||
// TestDeadCodeE2EErrorHandling tests error scenarios
|
||||
func TestDeadCodeE2EErrorHandling(t *testing.T) {
|
||||
binaryPath := buildPyqolBinary(t)
|
||||
binaryPath := buildPyscnBinary(t)
|
||||
defer os.Remove(binaryPath)
|
||||
|
||||
tests := []struct {
|
||||
@@ -350,7 +350,7 @@ func TestDeadCodeE2EErrorHandling(t *testing.T) {
|
||||
|
||||
// TestDeadCodeE2EMultipleFiles tests analysis of multiple files
|
||||
func TestDeadCodeE2EMultipleFiles(t *testing.T) {
|
||||
binaryPath := buildPyqolBinary(t)
|
||||
binaryPath := buildPyscnBinary(t)
|
||||
defer os.Remove(binaryPath)
|
||||
|
||||
testDir := t.TempDir()
|
||||
@@ -410,7 +410,7 @@ def func3():
|
||||
|
||||
// TestDeadCodeE2EContextDisplay tests context line display functionality
|
||||
func TestDeadCodeE2EContextDisplay(t *testing.T) {
|
||||
binaryPath := buildPyqolBinary(t)
|
||||
binaryPath := buildPyscnBinary(t)
|
||||
defer os.Remove(binaryPath)
|
||||
|
||||
testDir := t.TempDir()
|
||||
|
||||
@@ -46,7 +46,7 @@ func (f *AnalyzeFormatter) Write(response *domain.AnalyzeResponse, format domain
|
||||
|
||||
// writeText formats the response as plain text
|
||||
func (f *AnalyzeFormatter) writeText(response *domain.AnalyzeResponse, writer io.Writer) error {
|
||||
fmt.Fprintf(writer, "PyQOL Comprehensive Analysis Report\n")
|
||||
fmt.Fprintf(writer, "pyscn Comprehensive Analysis Report\n")
|
||||
fmt.Fprintf(writer, "====================================\n\n")
|
||||
fmt.Fprintf(writer, "Generated: %s\n\n", response.GeneratedAt.Format(time.RFC3339))
|
||||
|
||||
@@ -145,7 +145,7 @@ const analyzeHTMLTemplate = `<!DOCTYPE html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>PyQOL Analysis Report</title>
|
||||
<title>pyscn Analysis Report</title>
|
||||
<style>
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
body {
|
||||
@@ -266,7 +266,7 @@ const analyzeHTMLTemplate = `<!DOCTYPE html>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<h1>PyQOL Analysis Report</h1>
|
||||
<h1>pyscn Analysis Report</h1>
|
||||
<p>Generated: {{.GeneratedAt.Format "2006-01-02 15:04:05"}}</p>
|
||||
<div class="score-badge grade-{{if eq .Summary.Grade "A"}}a{{else if eq .Summary.Grade "B"}}b{{else if eq .Summary.Grade "C"}}c{{else if eq .Summary.Grade "D"}}d{{else}}f{{end}}">
|
||||
Health Score: {{.Summary.HealthScore}}/100 (Grade: {{.Summary.Grade}})
|
||||
|
||||
@@ -256,7 +256,7 @@ func (f *HTMLFormatterImpl) getHTMLTemplate() string {
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>PyQol Code Quality Report - {{.OverallScore.ProjectName}}</title>
|
||||
<title>pyscn Code Quality Report - {{.OverallScore.ProjectName}}</title>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
@@ -466,7 +466,7 @@ func (f *HTMLFormatterImpl) getHTMLTemplate() string {
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
Generated by <strong>PyQol</strong> - Python Code Quality Analysis Tool
|
||||
Generated by <strong>pyscn</strong> - Python Code Quality Analysis Tool
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -305,7 +305,7 @@ func TestHTMLFormatter_FormatComplexityAsHTML(t *testing.T) {
|
||||
|
||||
// Check HTML structure
|
||||
assert.Contains(t, html, "<!DOCTYPE html>")
|
||||
assert.Contains(t, html, "<title>PyQol Code Quality Report - Test Project</title>")
|
||||
assert.Contains(t, html, "<title>pyscn Code Quality Report - Test Project</title>")
|
||||
assert.Contains(t, html, "Test Project")
|
||||
assert.Contains(t, html, "Overall Score")
|
||||
assert.Contains(t, html, "Complexity Score")
|
||||
|
||||
@@ -255,7 +255,7 @@ func TestOutputFormatter_Format(t *testing.T) {
|
||||
// Verify HTML structure
|
||||
assert.Contains(t, output, "<!DOCTYPE html>", "Should contain HTML doctype")
|
||||
assert.Contains(t, output, "<title>", "Should contain title tag")
|
||||
assert.Contains(t, output, "PyQol Code Quality Report", "Should contain report title")
|
||||
assert.Contains(t, output, "pyscn Code Quality Report", "Should contain report title")
|
||||
assert.Contains(t, output, "Overall Score", "Should contain overall score")
|
||||
assert.Contains(t, output, "<style>", "Should contain embedded CSS")
|
||||
assert.Contains(t, output, "Complexity Score", "Should contain complexity score")
|
||||
|
||||
Reference in New Issue
Block a user