Skip to content

Commit f8ce3b1

Browse files
committed
docs: add CONTRIBUTING.md, ROADMAP.md, and GitHub issue/PR templates
1 parent 2e8ea60 commit f8ce3b1

File tree

5 files changed

+197
-236
lines changed

5 files changed

+197
-236
lines changed
Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,36 @@
11
---
22
name: Bug Report
33
about: Something is broken or producing wrong output
4-
title: '[BUG] '
54
labels: bug
6-
assignees: ''
75
---
86

9-
## 🐛 Describe the Bug
7+
## Description
108

11-
A clear, concise description of what went wrong.
9+
A clear, concise description of the bug.
1210

13-
## 📋 Steps to Reproduce
11+
## Steps to Reproduce
1412

15-
1. Run `python scripts/...`
16-
2. With these parameters / data / config: ...
17-
3. See error
13+
1. Run script: `python scripts/XX_...py`
14+
2. With config / data: ...
15+
3. Error or wrong output observed: ...
1816

19-
## Expected Behaviour
17+
## Expected Behaviour
2018

21-
What you expected to happen.
19+
What should have happened?
2220

23-
## Actual Behaviour
21+
## Actual Behaviour
2422

25-
What actually happened. Paste the full traceback or error output below.
23+
What actually happened? Include error messages or wrong output.
2624

27-
```
28-
# paste traceback here
29-
```
30-
31-
## 🌍 Environment
32-
33-
- OS: [e.g. macOS 14, Ubuntu 22.04, Windows 11]
34-
- Python version: [e.g. 3.13.0]
35-
- Key dependency versions (run `pip freeze | grep -E 'pandas|numpy|yfinance|plotly|scipy'`):
25+
## Logs / Traceback
3626

3727
```
38-
# paste pip freeze output here
28+
Paste full traceback here
3929
```
4030

41-
## 📎 Additional Context
31+
## Environment
4232

43-
Any other context, screenshots, or sample data that helps reproduce the issue.
33+
- OS:
34+
- Python version:
35+
- Key package versions (pandas, yfinance, plotly, etc.):
36+
- How you ran the pipeline (which scripts, in which order):
Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,28 @@
11
---
22
name: Feature Request
33
about: Propose a new model, data source, output format, or improvement
4-
title: '[FEAT] '
54
labels: enhancement
6-
assignees: ''
75
---
86

9-
## 💡 Summary
7+
## Motivation
108

11-
One-sentence description of the feature.
9+
What problem does this solve, or what capability does it add? Why is it valuable for a capital-markets research platform?
1210

13-
## 🎯 Motivation
11+
## Proposed Change
1412

15-
Why would this improve the platform? Which vertical does it strengthen?
16-
- [ ] IPO Event Study
17-
- [ ] M&A Screening
18-
- [ ] Sovereign Risk
19-
- [ ] Cross-Asset Regime
20-
- [ ] Yield Curve
21-
- [ ] Infrastructure / DevEx
22-
- [ ] Output / Dashboards
23-
- [ ] Documentation
13+
Describe the feature clearly. Include:
14+
- Which module/script it affects (IPO, M&A, sovereign, macro, output generation, infra)
15+
- High-level approach or implementation idea
16+
- Any new dependencies required
2417

25-
## 📐 Proposed Approach
18+
## Data Required
2619

27-
Brief description of how you'd implement it. If it's an analytical model, cite your methodology source.
20+
Does this need new data sources? If so, are they free and API-key-free?
2821

29-
## 📦 Data Requirements
22+
## Expected Output / Impact
3023

31-
What data sources does this need? Is it already available in the repo, or does it need a new fetcher?
24+
What does success look like? What changes in the outputs (dashboards, Excel, PDFs, memos)?
3225

33-
## 🔗 New Dependencies
26+
## Additional Context
3427

35-
Any new Python packages required? Are they zero-API-key compatible?
36-
37-
## 📎 References
38-
39-
Links to academic papers, practitioner notes, or existing open-source implementations.
28+
Links, references, related issues, or examples from other open-source finance projects.

.github/pull_request_template.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
## What This PR Does
2+
3+
Brief description of the change and why it's needed. Link to the related issue: Closes #
4+
5+
## Changes Made
6+
7+
-
8+
-
9+
-
10+
11+
## How I Tested It
12+
13+
Describe how you validated the change:
14+
- [ ] Ran quick validation pipeline (`01`, `05`, `10`, `11`)
15+
- [ ] Ran full pipeline (`01``13`)
16+
- [ ] Checked specific output (dashboard / Excel / PDF / memo) — describe what you checked
17+
- [ ] Ran pytest (if tests exist)
18+
- [ ] Other:
19+
20+
## Screenshots / Sample Output
21+
22+
If this touches dashboards, Excel, PDF, or chart output — paste a screenshot or describe the diff in output.
23+
24+
## Checklist
25+
26+
- [ ] My code follows the coding style in [CONTRIBUTING.md](../CONTRIBUTING.md)
27+
- [ ] I have not introduced new hard-coded tickers, countries, or date ranges (use config instead)
28+
- [ ] I have used `pathlib.Path` for file paths
29+
- [ ] I have used `logging` instead of `print()`
30+
- [ ] I have added type hints to new functions
31+
- [ ] I have updated documentation if needed (README, QUICK_START, CONTRIBUTING)

CONTRIBUTING.md

Lines changed: 80 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -1,122 +1,108 @@
11
# Contributing to Capital Markets Intelligence Platform
22

3-
Thank you for your interest in contributing! This project is open to contributions from anyone with an interest in quantitative finance, data engineering, or Python development.
3+
Thank you for your interest in contributing! This platform is built to mirror institutional research standards — contributions that raise analytical depth, code quality, or usability are all welcome.
44

55
---
66

7-
## 📋 Table of Contents
7+
## Table of Contents
88

9-
- [Getting Started](#getting-started)
10-
- [Development Workflow](#development-workflow)
11-
- [Project Structure](#project-structure)
12-
- [Coding Style](#coding-style)
13-
- [How to Propose Changes](#how-to-propose-changes)
14-
- [Good First Issues](#good-first-issues)
15-
- [Need Help?](#need-help)
9+
1. [Getting Started](#getting-started)
10+
2. [Development Setup](#development-setup)
11+
3. [Running the Pipeline](#running-the-pipeline)
12+
4. [How to Contribute](#how-to-contribute)
13+
5. [Coding Style](#coding-style)
14+
6. [Submitting a PR](#submitting-a-pr)
15+
7. [Issue Labels](#issue-labels)
1616

1717
---
1818

1919
## Getting Started
2020

21-
### 1. Fork & Clone
21+
1. **Fork** the repository and clone your fork locally.
22+
2. Browse [open issues](../../issues) — look for `good first issue` or `help wanted` labels.
23+
3. Comment on an issue to claim it before starting work.
2224

23-
```bash
24-
git clone https://github.com/YOUR_USERNAME/capital-markets-intelligence.git
25-
cd capital-markets-intelligence
26-
```
25+
---
2726

28-
### 2. Set Up Environment
27+
## Development Setup
2928

30-
Requires **Python 3.10+** (developed on 3.13).
29+
**Requirements:** Python 3.13+
3130

3231
```bash
33-
python -m venv venv
32+
# Clone your fork
33+
git clone https://github.com/<your-username>/capital-markets-intelligence.git
34+
cd capital-markets-intelligence
35+
36+
# Create and activate virtual environment
37+
python3 -m venv venv
3438
source venv/bin/activate # Mac/Linux
3539
# venv\Scripts\activate # Windows
40+
41+
# Install dependencies
3642
pip install -r requirements.txt
3743
```
3844

39-
### 3. Run a Minimal Pipeline (Quick Validation)
45+
---
4046

41-
You don't need to run all 13 scripts to test your changes. A fast subset:
47+
## Running the Pipeline
4248

49+
**Quick validation** (minimal run — recommended for contributors):
4350
```bash
4451
python scripts/01_fetch_ipo_data.py
4552
python scripts/05_fetch_sovereign_data.py
4653
python scripts/10_advanced_analysis.py
4754
python scripts/11_generate_plotly_dashboards.py
4855
```
4956

50-
### 4. Verify Outputs
51-
52-
After running, check that:
53-
- `data/processed/` contains updated CSVs
54-
- `output/dashboards/` contains `.html` files you can open in a browser
55-
56-
---
57-
58-
## Development Workflow
59-
60-
1. **Find or open an issue** — check the [Issues](https://github.com/DogInfantry/capital-markets-intelligence/issues) tab. Look for `good first issue` or `help wanted` labels.
61-
2. **Comment on the issue** to say you're working on it (avoids duplicate work).
62-
3. **Create a branch** from `main`:
63-
```bash
64-
git checkout -b feature/your-feature-name
65-
# or
66-
git checkout -b fix/your-bug-fix
67-
```
68-
4. **Make your changes**, commit with clear messages (see below).
69-
5. **Open a Pull Request** against `main` using the PR template.
70-
6. **Respond to review** — we aim to review PRs within 48–72 hours.
57+
**Full pipeline:**
58+
```bash
59+
# Phase 1 — Data Collection
60+
python scripts/01_fetch_ipo_data.py
61+
python scripts/02_fetch_mna_data.py
62+
python scripts/03_stress_test_model.py
63+
python scripts/04_case_study_builder.py
64+
python scripts/05_fetch_sovereign_data.py
7165

72-
### Commit Message Format
66+
# Phase 2 — Live API Data
67+
python scripts/08_fetch_fred_data.py
68+
python scripts/09_fetch_worldbank_data.py
7369

74-
We follow [Conventional Commits](https://www.conventionalcommits.org/):
70+
# Phase 3 — Advanced Analysis
71+
python scripts/10_advanced_analysis.py
7572

76-
```
77-
feat: add logistic regression to M&A deal screening
78-
fix: handle missing yield curve data for short-dated tenors
79-
docs: add Scenario Cookbook for IPO event study
80-
refactor: extract CSV loading helpers to utils module
81-
test: add golden-data test for sovereign risk index
82-
chore: update requirements.txt with yfinance and plotly
73+
# Phase 4 — Outputs
74+
python scripts/06_generate_visualizations.py
75+
python scripts/07_generate_memos.py
76+
python scripts/11_generate_plotly_dashboards.py
77+
python scripts/12_generate_excel_reports.py
78+
python scripts/13_generate_pdf_reports.py
8379
```
8480

85-
---
81+
Outputs appear in `output/` (dashboards, Excel, PDFs, memos).
8682

87-
## Project Structure
83+
---
8884

89-
```
90-
capital-markets-intelligence/
91-
├── scripts/ # Numbered 01–13 pipeline (data → analysis → outputs)
92-
├── analysis/ # Jupyter notebooks for exploratory work
93-
├── data/
94-
│ ├── raw/ # Live API + curated source data
95-
│ ├── processed/ # Model output CSVs (generated, not tracked)
96-
│ └── cache/ # API response cache (not tracked)
97-
├── output/
98-
│ ├── dashboards/ # Plotly HTML files
99-
│ ├── excel/ # openpyxl workbooks
100-
│ ├── pdf/ # fpdf reports
101-
│ └── memos/ # Text research memos
102-
├── docs/ # Extended documentation
103-
└── tests/ # (Planned) pytest test suite
104-
```
85+
## How to Contribute
10586

106-
**Key principle:** Scripts are numbered in execution order. Each script reads from `data/` and writes back to `data/processed/` or `output/`. Avoid cross-script imports — each script should be independently runnable.
87+
1. Pick an issue or open a new one describing your idea.
88+
2. Create a feature branch: `git checkout -b feature/your-feature-name`
89+
3. Make your changes (keep PRs focused — one feature or fix per PR).
90+
4. Run the quick validation pipeline to confirm nothing is broken.
91+
5. Commit with a clear message: `feat: add sector-level M&A summaries`
92+
6. Push and open a Pull Request against `main`.
10793

10894
---
10995

11096
## Coding Style
11197

11298
- **Formatter:** `black` (line length 100)
11399
- **Linter:** `ruff` or `flake8`
114-
- **Docstrings:** Google-style
115-
- **Type hints:** Encouraged for new functions, required for any new shared utilities
116-
- **No hard-coded paths:** Use `pathlib.Path(__file__).parent` for relative paths
117-
- **No silent failures:** Raise meaningful exceptions or print a clear warning when data is unavailable
100+
- **Docstrings:** NumPy or Google style
101+
- **Paths:** use `pathlib.Path`, not raw string concatenation
102+
- **Logging:** use Python `logging` module, not `print()`
103+
- **Type hints:** encouraged for all new functions
118104

119-
To auto-format before committing:
105+
To format before committing:
120106
```bash
121107
pip install black ruff
122108
black scripts/ analysis/
@@ -125,48 +111,32 @@ ruff check scripts/ analysis/
125111

126112
---
127113

128-
## How to Propose Changes
129-
130-
### Bug Reports
131-
Open an issue using the **Bug Report** template. Include:
132-
- Steps to reproduce
133-
- Expected vs actual behaviour
134-
- Python version, OS, and dependency versions (`pip freeze`)
135-
- Any relevant log output or tracebacks
114+
## Submitting a PR
136115

137-
### Feature Requests
138-
Open an issue using the **Feature Request** template. Include:
139-
- Why this improves the platform (which use case / vertical does it help?)
140-
- What data sources it needs
141-
- Whether it requires new dependencies
116+
Please fill in the PR template when opening a PR. Key points:
142117

143-
### Analytics / Model PRs
144-
If your PR changes an analytical model (e.g., event study methodology, sovereign risk weights):
145-
- Include a short write-up (in the PR body or a `docs/` file) explaining the methodology and its source
146-
- Show sample output before and after
147-
- Link to any academic papers or practitioner references used
118+
- What changed and why.
119+
- How you tested it (e.g., "ran quick validation, checked Excel output").
120+
- Screenshots or sample output if the change touches dashboards/reports.
148121

149122
---
150123

151-
## Good First Issues
152-
153-
Looking for somewhere to start? These are well-scoped entry points:
154-
155-
- 🏷️ Filter by [`good first issue`](https://github.com/DogInfantry/capital-markets-intelligence/issues?q=is%3Aopen+label%3A%22good+first+issue%22)
156-
- 🏷️ Filter by [`help wanted`](https://github.com/DogInfantry/capital-markets-intelligence/issues?q=is%3Aopen+label%3A%22help+wanted%22)
157-
158-
Examples of good first contributions:
159-
- Fix a typo or improve an explanation in the README
160-
- Add a missing dependency to `requirements.txt`
161-
- Add type hints to one script
162-
- Write a pytest test for a single model function
163-
164-
---
165-
166-
## Need Help?
167-
168-
Open a [Discussion](https://github.com/DogInfantry/capital-markets-intelligence/discussions) or tag `@DogInfantry` in an issue comment. We're happy to help you get oriented.
124+
## Issue Labels
125+
126+
| Label | Meaning |
127+
|-------|---------|
128+
| `good first issue` | Small, well-scoped — great for new contributors |
129+
| `help wanted` | Higher-impact work the maintainer wants community help on |
130+
| `analytics` | Changes to quantitative models or analysis logic |
131+
| `data` | Changes to data fetching, cleaning, or schemas |
132+
| `infra` | Packaging, CI, config, testing, logging |
133+
| `ux` | Dashboards, Excel/PDF polish, visual output |
134+
| `docs` | Documentation, notebooks, cookbooks |
135+
| `IPO` | IPO event study module |
136+
| `M&A` | M&A deal screening module |
137+
| `sovereign` | Sovereign risk index and stress testing |
138+
| `macro` | Cross-asset regime detection and yield curve |
169139

170140
---
171141

172-
*Built to institutional research standards — contributions held to the same bar.*
142+
*Built to institutional research standards. Contributions held to the same bar.*

0 commit comments

Comments
 (0)