Skip to content

Commit 2a5ac31

Browse files
committed
docs(contributing): expand contributing guide with project structure and dev workflow
1 parent 15f9d8c commit 2a5ac31

1 file changed

Lines changed: 100 additions & 6 deletions

File tree

CONTRIBUTING.md

Lines changed: 100 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,96 @@
11
# Contributing to Pacta
22

3-
Thank you for your interest in contributing to Pacta!
3+
Thank you for your interest in contributing to Pacta!
44
This project is in active development, and all contributions are welcome — from bug reports to feature proposals and pull requests.
55

6+
## Project Structure
7+
8+
```
9+
pacta/
10+
├── pacta/ # Main package
11+
│ ├── analyzers/ # Language analyzers (Python, etc.)
12+
│ ├── cli/ # Command-line interface
13+
│ ├── core/ # Engine and configuration
14+
│ ├── ir/ # Intermediate representation
15+
│ ├── mapping/ # Layer mapping and enrichment
16+
│ ├── model/ # Architecture model (types, loader, resolver)
17+
│ ├── plugins/ # Plugin system and interfaces
18+
│ ├── reporting/ # Report generation and renderers
19+
│ ├── rules/ # Rule DSL (parser, compiler, evaluator)
20+
│ ├── snapshot/ # Snapshot management and diffing
21+
│ ├── utils/ # Utility functions
22+
│ └── vcs/ # Version control integration (git)
23+
├── tests/ # Test suite (mirrors package structure)
24+
├── docs/ # MkDocs documentation
25+
├── examples/ # Example projects
26+
└── assets/ # Logo and other assets
27+
```
28+
29+
## Development Setup
30+
31+
This project uses [uv](https://docs.astral.sh/uv/) for dependency management.
32+
33+
```bash
34+
# Clone the repository
35+
git clone https://github.com/akhundMurad/pacta.git
36+
cd pacta
37+
38+
# Install dependencies with dev tools
39+
make dev
40+
# or: uv sync --group dev
41+
```
42+
43+
## Development Workflow
44+
45+
### Running Tests
46+
47+
```bash
48+
make test
49+
# or: uv run pytest
50+
51+
# With coverage
52+
make test-cov
53+
```
54+
55+
### Linting and Formatting
56+
57+
```bash
58+
# Check for linting issues
59+
make lint
60+
61+
# Auto-format code
62+
make format
63+
```
64+
65+
### Type Checking
66+
67+
```bash
68+
make typecheck
69+
# or: uv run ty check pacta
70+
```
71+
72+
### Documentation
73+
74+
```bash
75+
# Serve docs locally
76+
make docs
77+
78+
# Build docs
79+
make docs-build
80+
```
81+
82+
### Building
83+
84+
```bash
85+
make build
86+
# or: uv build
87+
```
88+
689
## How to Contribute
790

891
### 1. Open an Issue
9-
If you find a bug or want to propose a feature, please open an issue first.
92+
93+
If you find a bug or want to propose a feature, please open an issue first.
1094
This helps keep discussion organized and ensures we're aligned before work begins.
1195

1296
### 2. Fork & Create a Branch
@@ -16,17 +100,27 @@ git checkout -b feature/my-feature
16100
```
17101

18102
### 3. Write Clear, Minimal Code
19-
- Follow the existing coding style
20-
- Add tests for new features
103+
104+
- Follow the existing coding style (enforced by ruff)
105+
- Add tests for new features in the appropriate `tests/` subdirectory
21106
- Keep commits focused and descriptive
22107

23-
### 4. Run Tests
24-
Make sure all tests pass before submitting a PR.
108+
### 4. Run Tests and Checks
109+
110+
Make sure all tests and checks pass before submitting a PR:
111+
112+
```bash
113+
make lint
114+
make typecheck
115+
make test
116+
```
25117

26118
### 5. Submit a Pull Request
119+
27120
Link the related issue and describe your changes clearly.
28121

29122
## Code of Conduct
123+
30124
Be respectful and constructive. We aim to create a friendly, collaborative environment.
31125

32126
---

0 commit comments

Comments
 (0)