chore: setup team collaboration guidelines, gitignore and requirements
This commit is contained in:
57
.gitignore
vendored
57
.gitignore
vendored
@@ -1 +1,56 @@
|
||||
**/__pycache__
|
||||
# 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/
|
||||
79
CONTRIBUTING.md
Normal file
79
CONTRIBUTING.md
Normal file
@@ -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/<feature-name>` — **New Features**: Branch created from `develop` for a specific feature or task (e.g. `feature/ui-installer`, `feature/config-loader`).
|
||||
* `fix/<bug-name>` — **Bug Fixes**: Branch created from `develop` to fix bugs.
|
||||
* `hotfix/<issue-name>` — **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
|
||||
<type>(<scope>): <short summary>
|
||||
|
||||
[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.
|
||||
61
README.md
Normal file
61
README.md
Normal file
@@ -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.
|
||||
2
requirements.txt
Normal file
2
requirements.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
# Automated UI interaction
|
||||
pyautogui>=0.9.54
|
||||
Reference in New Issue
Block a user