From ce34e6615441fbcc44fc966785f3df603a60c7b2 Mon Sep 17 00:00:00 2001 From: MohammadAmin Baranzehi Date: Tue, 1 Sep 2026 17:01:28 +0330 Subject: [PATCH] chore: setup team collaboration guidelines, gitignore and requirements --- .gitignore | 57 +++++++++++++++++++++++++++++++++- CONTRIBUTING.md | 79 ++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 61 +++++++++++++++++++++++++++++++++++++ requirements.txt | 2 ++ 4 files changed, 198 insertions(+), 1 deletion(-) create mode 100644 CONTRIBUTING.md create mode 100644 README.md create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore index d5e4f15..ffdde72 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,56 @@ -**/__pycache__ \ No newline at end of file +# Python +__pycache__/ +*.py[cod] +*$py.class +*.so +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# Virtual Environments +venv/ +.venv/ +env/ +ENV/ +env.bak/ +venv.bak/ + +# IDE & Editors +.idea/ +.vscode/ +*.swp +*.swo +*~ +.DS_Store +Thumbs.db + +# Testing & Coverage +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ + +# Logs and temporary files +*.log +*.tmp +temp/ \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..ce8678a --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,79 @@ +# Team Contribution & Git Guidelines + +This document defines the Git conventions, branching strategy, and contribution workflow for the `acc-installer` team. + +--- + +## 1. Branching Strategy + +Our team uses a **Feature Branch** workflow based on `main` and `develop`: + +* `main` — **Production / Release**: Contains only stable, tested code. Direct commits or push to `main` are strictly forbidden. +* `develop` — **Integration / Staging**: Contains completed features ready for integration and testing. +* `feature/` — **New Features**: Branch created from `develop` for a specific feature or task (e.g. `feature/ui-installer`, `feature/config-loader`). +* `fix/` — **Bug Fixes**: Branch created from `develop` to fix bugs. +* `hotfix/` — **Critical Fixes**: Branch created directly from `main` for critical production hotfixes. + +```text +main ─────────────────────────● (v1.0.0) ───────────● (v1.1.0) + ▲ ▲ + │ │ +develop ──────●─────────────────●───────────────────● + \ / \ / +feature ●──────●──────● ●──────●───────● + (feature/copy) (feature/extract) +``` + +--- + +## 2. Commit Message Conventions (Conventional Commits) + +All commit messages must follow the format: + +```text +(): + +[optional body explaining context or breaking changes] +``` + +### Allowed Types: +* `feat`: A new feature or functionality +* `fix`: A bug fix +* `refactor`: Code restructuring without changing external behavior +* `docs`: Documentation updates (`README.md`, docstrings, etc.) +* `chore`: Maintenance tasks, config updates, `.gitignore`, dependencies +* `test`: Adding or modifying tests + +### Examples: +* `feat(copier): add verification checksum after file copy` +* `fix(drive): fallback to C: drive when no other drive exists` +* `docs: update setup steps in README` + +--- + +## 3. Pull Request / Merge Request Workflow + +1. **Pull latest changes** before starting: + ```powershell + git checkout develop + git pull origin develop + ``` +2. **Create a new branch**: + ```powershell + git checkout -b feature/your-feature-name + ``` +3. **Make commits** adhering to conventional commit rules. +4. **Push branch to remote**: + ```powershell + git push -u origin feature/your-feature-name + ``` +5. **Open a Merge Request / Pull Request** targeting the `develop` branch. +6. **Code Review**: At least one peer review is required before merging. +7. **Delete merged branch** after merging. + +--- + +## 4. Code Standards +* Use Python type annotations (`str`, `Optional[str]`, `Path`, etc.). +* Avoid hardcoded paths; use `module.config.InstallerConfig`. +* Keep error messages clear and informative with actionable failure reasons. diff --git a/README.md b/README.md new file mode 100644 index 0000000..c9ec0d9 --- /dev/null +++ b/README.md @@ -0,0 +1,61 @@ +# Acc Installer + +An automated software setup, extraction, and installation pipeline for NovinPardaz systems. + +## Overview + +Acc Installer performs the end-to-end setup process for NovinPardaz applications: +1. **Directory Setup & Source File Transfer**: Identifies the primary non-system drive (e.g. `D:\`, `E:\`) and initializes directory structures (`NovinPardazOne/NovinSoft`, `NovinPardazOne/NovinAcc`). Copies required software packages from the source path. +2. **NovinAcc Extraction**: Moves and extracts `NovinAcc.zip` archive to the target accounting directory. +3. **NovinDesk Automated Installation**: Extracts `NovinDesk.zip`, triggers the installer binary, and automates UI acceptance. + +## Project Structure + +```text +acc-installer/ +├── data/ +│ └── sciter.dll # Sciter dynamic library asset +├── module/ +│ ├── __init__.py # Package entry points & public exports +│ ├── config.py # Unified configuration & dynamic drive resolver +│ ├── downloader_copier.py# Directory setup & file copier +│ ├── extract_acc.py # Archive extractor for NovinAcc +│ └── install_novindesk.py# NovinDesk extractor & automated installer +├── .gitignore # Standard ignore definitions +├── CONTRIBUTING.md # Team branching and contribution guidelines +├── main.py # Main orchestrator runner CLI +├── README.md # Project documentation +└── requirements.txt # Python package dependencies +``` + +## Quick Start + +### 1. Requirements +* Python 3.9+ (Windows OS recommended) + +### 2. Setup Virtual Environment +```powershell +python -m venv .venv +.\.venv\Scripts\Activate.ps1 +pip install -r requirements.txt +``` + +### 3. Execution +To run the full installer pipeline: +```powershell +python main.py +``` + +To specify custom drive or source directory: +```powershell +python main.py --source "C:\SoftwareNP" --drive "D:\" +``` + +Or run in dry-run mode (validates setup without making destructive changes): +```powershell +python main.py --dry-run +``` + +## Team Workflow & Branching + +We follow a **Feature-Branching / GitFlow** model. Please read [CONTRIBUTING.md](CONTRIBUTING.md) before pushing code or creating Pull Requests. diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..897a1a9 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +# Automated UI interaction +pyautogui>=0.9.54