From 80bcfba1d7d5b32fbd677e403d7db1ea3070a992 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 8 Feb 2026 07:49:27 +0000 Subject: [PATCH 1/9] Initial plan From 04d18ee1f775ae525d3fe35bc69cb312eb8110be Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 8 Feb 2026 07:52:06 +0000 Subject: [PATCH 2/9] feat: add semantic-release and conventional commit infrastructure - Create pyproject.toml with python-semantic-release configuration - Add release.yml workflow for automated releases - Add commitlint pre-commit hook for conventional commits validation - Add python-semantic-release to dev dependencies Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com> --- .github/workflows/release.yml | 71 ++++++++++++ .pre-commit-config.yaml | 8 ++ pyproject.toml | 199 ++++++++++++++++++++++++++++++++++ requirements-dev.txt | 5 +- 4 files changed, 282 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yml create mode 100644 pyproject.toml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..2b1fa070 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,71 @@ +name: Semantic Release + +on: + push: + branches: + - main + workflow_dispatch: + +permissions: + contents: write + issues: write + pull-requests: write + packages: write + +jobs: + release: + name: Semantic Release + runs-on: ubuntu-latest + if: github.repository == 'christianlouis/DocuElevate' + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + cache: 'pip' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install python-semantic-release + + - name: Configure Git + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + + - name: Run Semantic Release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + semantic-release version --print + semantic-release version + semantic-release publish + + - name: Update VERSION file if changed + run: | + if [ -f VERSION ]; then + git add VERSION + if ! git diff --staged --quiet; then + git commit -m "chore(release): update VERSION file [skip ci]" + git push + fi + fi + + - name: Trigger Docker Build on Tag + if: startsWith(github.ref, 'refs/tags/') + uses: actions/github-script@v7 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const ref = context.ref; + const tag = ref.replace('refs/tags/', ''); + console.log(`New tag created: ${tag}`); + console.log('Docker build will be triggered automatically by the docker-build workflow'); diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0c0500f5..035bec2b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -69,3 +69,11 @@ repos: .+\.json| .env.demo )$ + + # Conventional commits validation + - repo: https://github.com/compilerla/conventional-pre-commit + rev: v3.0.0 + hooks: + - id: conventional-pre-commit + stages: [commit-msg] + args: [] diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..5e93fd81 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,199 @@ +[build-system] +requires = ["setuptools>=45", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "docuelevate" +dynamic = ["version"] +description = "Intelligent document processing system with AI-powered metadata extraction" +readme = "README.md" +requires-python = ">=3.11" +license = {text = "Apache-2.0"} +authors = [ + {name = "Christian Louis", email = "christianlouis@users.noreply.github.com"} +] +keywords = ["document", "processing", "ocr", "ai", "metadata", "extraction"] +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", +] + +[project.urls] +Homepage = "https://github.com/christianlouis/DocuElevate" +Documentation = "https://github.com/christianlouis/DocuElevate/tree/main/docs" +Repository = "https://github.com/christianlouis/DocuElevate" +Issues = "https://github.com/christianlouis/DocuElevate/issues" +Changelog = "https://github.com/christianlouis/DocuElevate/blob/main/CHANGELOG.md" + +[tool.setuptools.dynamic] +version = {file = "VERSION"} + +[tool.semantic_release] +version_toml = [] +version_variables = ["VERSION:__version__"] +version_source = "tag" +commit_version_number = true +tag_format = "v{version}" +major_on_zero = false +allow_zero_version = true +build_command = """ + chmod +x scripts/generate_build_metadata.sh + ./scripts/generate_build_metadata.sh +""" + +[tool.semantic_release.branches.main] +match = "main" +prerelease = false + +[tool.semantic_release.changelog] +template_dir = "templates" +changelog_file = "CHANGELOG.md" +exclude_commit_patterns = [ + "^chore\\(release\\):", + "^Merge", + "^Bump version", +] + +[tool.semantic_release.changelog.environment] +block_start_string = "{%" +block_end_string = "%}" +variable_start_string = "{{" +variable_end_string = "}}" +comment_start_string = "{#" +comment_end_string = "#}" +trim_blocks = false +lstrip_blocks = false +newline_sequence = "\n" +keep_trailing_newline = false +extensions = [] +autoescape = true + +[tool.semantic_release.commit_parser_options] +allowed_tags = [ + "feat", + "fix", + "docs", + "style", + "refactor", + "perf", + "test", + "build", + "ci", + "chore", +] +minor_tags = ["feat"] +patch_tags = ["fix", "perf"] +default_bump_level = 0 + +[tool.semantic_release.remote] +name = "origin" +type = "github" +ignore_token_for_push = false + +[tool.semantic_release.remote.token] +env = "GH_TOKEN" + +[tool.semantic_release.publish] +dist_glob_patterns = [] +upload_to_vcs_release = true +upload_to_pypi = false +upload_to_repository = false + +# Black configuration +[tool.black] +line-length = 120 +target-version = ['py311'] +include = '\.pyi?$' +extend-exclude = ''' +/( + # directories + \.eggs + | \.git + | \.hg + | \.mypy_cache + | \.tox + | \.venv + | build + | dist + | migrations +)/ +''' + +# isort configuration +[tool.isort] +profile = "black" +line_length = 120 +skip_gitignore = true +known_first_party = ["app"] +sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"] + +# pytest configuration +[tool.pytest.ini_options] +minversion = "7.0" +testpaths = ["tests"] +python_files = ["test_*.py"] +python_classes = ["Test*"] +python_functions = ["test_*"] +addopts = [ + "-v", + "--strict-markers", + "--strict-config", + "--cov=app", + "--cov-report=term-missing", + "--cov-report=html", + "--cov-branch", +] +markers = [ + "unit: Unit tests for individual functions/methods", + "integration: Integration tests for API endpoints and workflows", + "slow: Tests that take significant time to run", + "security: Security-related tests", + "requires_external: Tests requiring external services (OpenAI, Azure, etc.)", + "requires_db: Tests requiring database", + "requires_redis: Tests requiring Redis", +] + +# mypy configuration +[tool.mypy] +python_version = "3.11" +warn_return_any = true +warn_unused_configs = true +disallow_untyped_defs = false +disallow_incomplete_defs = false +check_untyped_defs = true +no_implicit_optional = true +warn_redundant_casts = true +warn_unused_ignores = true +warn_no_return = true +warn_unreachable = true +strict_equality = true +ignore_missing_imports = true + +# Coverage configuration +[tool.coverage.run] +source = ["app"] +omit = [ + "*/tests/*", + "*/migrations/*", + "*/__pycache__/*", + "*/venv/*", + "*/env/*", +] + +[tool.coverage.report] +precision = 2 +show_missing = true +skip_covered = false +exclude_lines = [ + "pragma: no cover", + "def __repr__", + "raise AssertionError", + "raise NotImplementedError", + "if __name__ == .__main__.:", + "if TYPE_CHECKING:", + "@abstractmethod", +] diff --git a/requirements-dev.txt b/requirements-dev.txt index 574d971d..15cbb280 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -23,4 +23,7 @@ safety>=3.0.0 pre-commit>=3.6.0 # License compliance -pip-licenses==5.5.1 # For license compliance checking \ No newline at end of file +pip-licenses==5.5.1 # For license compliance checking + +# Release automation +python-semantic-release>=9.0.0 \ No newline at end of file From ed8134dea9ac402578d02a60369ffd30bd09f3df Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 8 Feb 2026 07:52:48 +0000 Subject: [PATCH 3/9] docs: archive one-off documentation files - Create docs/archive/ directory with README explaining purpose - Move ANALYSIS_SUMMARY.md to archive - Move FRAMEWORK_ANALYSIS.md to archive - Move FILENAME_FIX_SUMMARY.md to archive - Move IMPLEMENTATION_CHECKLIST.md to archive - Move SETTINGS_IMPLEMENTATION.md to archive Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com> --- .../archive/ANALYSIS_SUMMARY.md | 0 .../archive/FILENAME_FIX_SUMMARY.md | 0 .../archive/FRAMEWORK_ANALYSIS.md | 0 .../archive/IMPLEMENTATION_CHECKLIST.md | 0 docs/archive/README.md | 33 +++++++++++++++++++ .../archive/SETTINGS_IMPLEMENTATION.md | 0 6 files changed, 33 insertions(+) rename ANALYSIS_SUMMARY.md => docs/archive/ANALYSIS_SUMMARY.md (100%) rename FILENAME_FIX_SUMMARY.md => docs/archive/FILENAME_FIX_SUMMARY.md (100%) rename FRAMEWORK_ANALYSIS.md => docs/archive/FRAMEWORK_ANALYSIS.md (100%) rename IMPLEMENTATION_CHECKLIST.md => docs/archive/IMPLEMENTATION_CHECKLIST.md (100%) create mode 100644 docs/archive/README.md rename SETTINGS_IMPLEMENTATION.md => docs/archive/SETTINGS_IMPLEMENTATION.md (100%) diff --git a/ANALYSIS_SUMMARY.md b/docs/archive/ANALYSIS_SUMMARY.md similarity index 100% rename from ANALYSIS_SUMMARY.md rename to docs/archive/ANALYSIS_SUMMARY.md diff --git a/FILENAME_FIX_SUMMARY.md b/docs/archive/FILENAME_FIX_SUMMARY.md similarity index 100% rename from FILENAME_FIX_SUMMARY.md rename to docs/archive/FILENAME_FIX_SUMMARY.md diff --git a/FRAMEWORK_ANALYSIS.md b/docs/archive/FRAMEWORK_ANALYSIS.md similarity index 100% rename from FRAMEWORK_ANALYSIS.md rename to docs/archive/FRAMEWORK_ANALYSIS.md diff --git a/IMPLEMENTATION_CHECKLIST.md b/docs/archive/IMPLEMENTATION_CHECKLIST.md similarity index 100% rename from IMPLEMENTATION_CHECKLIST.md rename to docs/archive/IMPLEMENTATION_CHECKLIST.md diff --git a/docs/archive/README.md b/docs/archive/README.md new file mode 100644 index 00000000..02b10cd2 --- /dev/null +++ b/docs/archive/README.md @@ -0,0 +1,33 @@ +# Documentation Archive + +This directory contains historical documentation that was created for specific one-time tasks or analysis. These documents are preserved for reference but are not part of the ongoing documentation set. + +## Archived Documents + +### Analysis & Research +- **`ANALYSIS_SUMMARY.md`** - One-off analysis document from a specific feature investigation +- **`FRAMEWORK_ANALYSIS.md`** - Framework decision rationale and comparison document +- **`SETTINGS_IMPLEMENTATION.md`** - Implementation notes for the settings management feature + +### Task-Specific Documents +- **`IMPLEMENTATION_CHECKLIST.md`** - Task-specific checklist for a completed feature +- **`FILENAME_FIX_SUMMARY.md`** - Summary of filename-related fixes + +## Why Archive? + +These documents provided value during specific development phases but: +- Are not part of ongoing user or developer documentation +- Document completed one-time tasks +- Contain information that has been integrated into other docs +- Were created for specific decision-making processes + +## Active Documentation + +For current, maintained documentation, see: +- **Root Level**: `README.md`, `CONTRIBUTING.md`, `CHANGELOG.md`, `ROADMAP.md` +- **`docs/`**: User guides, API docs, deployment guides, configuration references +- **`AGENTIC_CODING.md`**: Developer and AI agent guidelines + +--- + +*Last Updated: 2026-02-08* diff --git a/SETTINGS_IMPLEMENTATION.md b/docs/archive/SETTINGS_IMPLEMENTATION.md similarity index 100% rename from SETTINGS_IMPLEMENTATION.md rename to docs/archive/SETTINGS_IMPLEMENTATION.md From 6437f0143481424e2b82a6fc87b91626115c776f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 8 Feb 2026 07:53:10 +0000 Subject: [PATCH 4/9] ci: update Docker image names from document-processor to docuelevate - Change Docker Hub image name to christianlouis/docuelevate - Update GHCR references to use docuelevate - Ensure consistency across all Docker build tags Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com> --- .github/workflows/docker-build.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml index f2349fc9..cd5dd6c9 100644 --- a/.github/workflows/docker-build.yaml +++ b/.github/workflows/docker-build.yaml @@ -17,7 +17,7 @@ on: - main env: - IMAGE_NAME: christianlouis/document-processor + IMAGE_NAME: christianlouis/docuelevate jobs: docker: @@ -58,7 +58,7 @@ jobs: with: images: | ${{ env.IMAGE_NAME }} - ghcr.io/${{ github.repository_owner }}/document-processor + ghcr.io/${{ github.repository_owner }}/docuelevate - name: Build and Push Docker Image with Provenance and SBOM uses: docker/build-push-action@v6 @@ -72,9 +72,9 @@ jobs: tags: | ${{ env.IMAGE_NAME }}:latest ${{ env.IMAGE_NAME }}:${{ github.sha }} - ghcr.io/${{ github.repository_owner }}/document-processor:latest - ghcr.io/${{ github.repository_owner }}/document-processor:${{ github.sha }} + ghcr.io/${{ github.repository_owner }}/docuelevate:latest + ghcr.io/${{ github.repository_owner }}/docuelevate:${{ github.sha }} ${{ startsWith(github.ref, 'refs/tags/') && format('{0}:{1}', env.IMAGE_NAME, env.VERSION) || '' }} - ${{ startsWith(github.ref, 'refs/tags/') && format('ghcr.io/{0}/document-processor:{1}', github.repository_owner, env.VERSION) || '' }} + ${{ startsWith(github.ref, 'refs/tags/') && format('ghcr.io/{0}/docuelevate:{1}', github.repository_owner, env.VERSION) || '' }} cache-from: type=gha cache-to: type=gha,mode=max From d2d4f113d09fdb9a0c3908c5bb207154c5208fef Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 8 Feb 2026 07:55:03 +0000 Subject: [PATCH 5/9] docs: add comprehensive conventional commits and semantic-release guide - Update CONTRIBUTING.md with full conventional commits specification - Add versioning and release automation section - Update AGENTIC_CODING.md with detailed commit format guide - Update .github/copilot-instructions.md with commit rules for AI agents - Add examples and version bump explanations - Document semantic-release automation process Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com> --- .github/copilot-instructions.md | 80 ++++++++++++++++++- AGENTIC_CODING.md | 102 ++++++++++++++++++++---- CONTRIBUTING.md | 134 +++++++++++++++++++++++++++++++- 3 files changed, 298 insertions(+), 18 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 2d96b8ca..fb182fff 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -105,10 +105,88 @@ DocuElevate is an intelligent document processing system that automates handling ### Git Workflow - Write clear, descriptive commit messages +- **ALWAYS follow Conventional Commits format** (see below) - Keep commits focused and atomic - Run tests and linters before committing - Pre-commit hooks are configured (`.pre-commit-config.yaml`) -- Follow conventional commits format when appropriate + +## Conventional Commits (REQUIRED) + +All commit messages MUST follow the [Conventional Commits](https://www.conventionalcommits.org/) specification. + +### Format +``` +(): + + + +