Skip to content

Commit cfe2ec9

Browse files
Merge branch 'aditya' of https://github.com/adityacosmos24/QuantResearch_Opcode into aditya
2 parents 50f717d + c8c5596 commit cfe2ec9

File tree

37 files changed

+2336
-1447
lines changed

37 files changed

+2336
-1447
lines changed

.coverage

-52 KB
Binary file not shown.
Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
1-
2-
## Description
3-
4-
> Give a brief description of the pull request.
5-
6-
### Testing
7-
8-
- [ ] `pytest` passes locally
9-
- [ ] Linting passes (`ruff`, `black`)
10-
11-
## Semver Changes
12-
13-
- [ ] Patch (bug fix, no new features)
14-
- [ ] Minor (new features, no breaking changes)
15-
- [ ] Major (breaking changes)
16-
17-
## Issues
18-
19-
> List any issues that this pull request closes.
20-
21-
## Checklist
22-
23-
- [ ] I have read the [Contributing Guidelines](../Contributor_Guide/Contruting.md).
24-
1+
2+
## Description
3+
4+
> Give a brief description of the pull request.
5+
6+
### Testing
7+
8+
- [ ] `pytest` passes locally
9+
- [ ] Linting passes (`ruff`, `black`)
10+
11+
## Semver Changes
12+
13+
- [ ] Patch (bug fix, no new features)
14+
- [ ] Minor (new features, no breaking changes)
15+
- [ ] Major (breaking changes)
16+
17+
## Issues
18+
19+
> List any issues that this pull request closes.
20+
21+
## Checklist
22+
23+
- [ ] I have read the [Contributing Guidelines](../Contributor_Guide/Contruting.md).

.github/workflows/ci.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: [3.11, 3.12]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -e ".[dev]"
28+
29+
- name: Lint with ruff
30+
run: |
31+
ruff check src/ tests/
32+
33+
- name: Check formatting with black
34+
run: |
35+
black --check src/ tests/
36+
37+
- name: Run tests
38+
run: |
39+
pytest --cov=src/quant_research_starter --cov-report=xml
40+
41+
- name: Upload coverage to Codecov
42+
uses: codecov/codecov-action@v3
43+
with:
44+
file: ./coverage.xml
45+
flags: unittests
46+
name: codecov-umbrella
47+
48+
build-docker:
49+
runs-on: ubuntu-latest
50+
steps:
51+
- uses: actions/checkout@v4
52+
53+
- name: Build Docker image
54+
run: |
55+
docker build -t quant-research-starter:latest .

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ node_modules
44
__pycache__/
55
*.py[cod]
66
*$py.class
7+
<<<<<<< HEAD
78
src/quant_research_starter.egg-info/PKG-INFO
9+
=======
10+
>>>>>>> c8c55966502a7633c73ef7af4d794b072c7f94df

.husky/commit-msg

20 Bytes
Binary file not shown.

.husky/pre-commit

Whitespace-only changes.

.pre-commit-config.yaml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
repos:
2-
- repo: https://github.com/psf/black
3-
rev: 23.7.0
4-
hooks:
5-
- id: black
6-
args: ["--line-length=88"]
7-
- repo: https://github.com/charliermarsh/ruff-pre-commit
8-
rev: v0.0.280
9-
hooks:
10-
- id: ruff
11-
args: ["--fix"]
12-
- repo: https://github.com/pre-commit/pre-commit-hooks
13-
rev: v4.4.0
14-
hooks:
15-
- id: end-of-file-fixer
16-
- id: trailing-whitespace
17-
18-
19-
1+
repos:
2+
- repo: https://github.com/psf/black
3+
rev: 23.7.0
4+
hooks:
5+
- id: black
6+
args: ["--line-length=88"]
7+
- repo: https://github.com/charliermarsh/ruff-pre-commit
8+
rev: v0.0.280
9+
hooks:
10+
- id: ruff
11+
args: ["--fix"]
12+
- repo: https://github.com/pre-commit/pre-commit-hooks
13+
rev: v4.4.0
14+
hooks:
15+
- id: end-of-file-fixer
16+
- id: trailing-whitespace
17+
18+
19+

CODE_OF_CONDUCT.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
### Code of Conduct
2-
3-
We are committed to fostering a welcoming and inclusive community.
4-
5-
#### Our Standards
6-
- Be respectful and considerate.
7-
- Assume good intent; seek to understand.
8-
- Accept constructive feedback gracefully.
9-
- Focus on what is best for the community.
10-
11-
#### Unacceptable Behavior
12-
- Harassment, discrimination, or demeaning comments.
13-
- Trolling, personal attacks, or political flame wars.
14-
- Publishing others' private information without consent.
15-
16-
#### Enforcement
17-
- Report incidents to the maintainers via `SECURITY.md` contact or GitHub.
18-
- Maintainers may take appropriate action, including warnings or bans.
19-
20-
Adapted from the Contributor Covenant.
1+
### Code of Conduct
2+
3+
We are committed to fostering a welcoming and inclusive community.
4+
5+
#### Our Standards
6+
- Be respectful and considerate.
7+
- Assume good intent; seek to understand.
8+
- Accept constructive feedback gracefully.
9+
- Focus on what is best for the community.
10+
11+
#### Unacceptable Behavior
12+
- Harassment, discrimination, or demeaning comments.
13+
- Trolling, personal attacks, or political flame wars.
14+
- Publishing others' private information without consent.
15+
16+
#### Enforcement
17+
- Report incidents to the maintainers via `SECURITY.md` contact or GitHub.
18+
- Maintainers may take appropriate action, including warnings or bans.
19+
20+
Adapted from the Contributor Covenant.

CONTRIBUTING.md

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
1-
### Contributing Guidelines
2-
3-
Thank you for considering contributing to QuantResearchStarter!
4-
5-
#### Getting Started
6-
- Fork the repo and create your branch from `main`.
7-
- Python 3.10+ is required.
8-
- Install in editable mode: `pip install -e .[dev]`.
9-
- Run tests and linters locally: `make test` and `make lint`.
10-
11-
#### Development Workflow
12-
- Create a focused branch: `feature/<short-name>` or `fix/<short-name>`.
13-
- Write unit tests for new features and bug fixes.
14-
- Ensure `ruff` and `black` pass.
15-
- Update documentation and docstrings as needed.
16-
17-
#### Pull Requests
18-
- Fill in the PR template.
19-
- Keep PRs small and focused.
20-
- Include before/after behavior when applicable.
21-
- Link related issues.
22-
23-
#### Good First Issues
24-
- Look for issues labeled `good-first-issue` or `help-wanted`.
25-
- Comment on an issue to get assigned.
26-
27-
#### Code Style
28-
- Follow PEP8 with `ruff` and `black` formatting.
29-
- Use type hints for public functions.
30-
- Keep functions small and readable.
31-
32-
#### Testing
33-
- Tests live under `tests/` and run with `pytest`.
34-
- Aim for ~70% coverage of core modules.
35-
36-
#### Commit Messages
37-
- Use imperative tone: "Add X", "Fix Y".
38-
- Reference issues: `Fixes #123`.
39-
40-
#### Security
41-
- See `SECURITY.md` to report vulnerabilities.
42-
43-
We appreciate your contributions!
44-
45-
46-
1+
### Contributing Guidelines
2+
3+
Thank you for considering contributing to QuantResearchStarter!
4+
5+
#### Getting Started
6+
- Fork the repo and create your branch from `main`.
7+
- Python 3.10+ is required.
8+
- Install in editable mode: `pip install -e .[dev]`.
9+
- Run tests and linters locally: `make test` and `make lint`.
10+
11+
#### Development Workflow
12+
- Create a focused branch: `feature/<short-name>` or `fix/<short-name>`.
13+
- Write unit tests for new features and bug fixes.
14+
- Ensure `ruff` and `black` pass.
15+
- Update documentation and docstrings as needed.
16+
17+
#### Pull Requests
18+
- Fill in the PR template.
19+
- Keep PRs small and focused.
20+
- Include before/after behavior when applicable.
21+
- Link related issues.
22+
23+
#### Good First Issues
24+
- Look for issues labeled `good-first-issue` or `help-wanted`.
25+
- Comment on an issue to get assigned.
26+
27+
#### Code Style
28+
- Follow PEP8 with `ruff` and `black` formatting.
29+
- Use type hints for public functions.
30+
- Keep functions small and readable.
31+
32+
#### Testing
33+
- Tests live under `tests/` and run with `pytest`.
34+
- Aim for ~70% coverage of core modules.
35+
36+
#### Commit Messages
37+
- Use imperative tone: "Add X", "Fix Y".
38+
- Reference issues: `Fixes #123`.
39+
40+
#### Security
41+
- See `SECURITY.md` to report vulnerabilities.
42+
43+
We appreciate your contributions!
44+
45+
46+

Dockerfile

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
FROM python:3.11-slim
2-
3-
WORKDIR /app
4-
5-
ENV PYTHONDONTWRITEBYTECODE=1 \
6-
PYTHONUNBUFFERED=1
7-
8-
RUN apt-get update && apt-get install -y --no-install-recommends \
9-
build-essential git && \
10-
rm -rf /var/lib/apt/lists/*
11-
12-
COPY pyproject.toml README.md LICENSE /app/
13-
COPY src /app/src
14-
15-
RUN pip install --upgrade pip && pip install -e .[dev]
16-
17-
CMD ["bash", "-lc", "pytest -q && python -m quant_research_starter.cli backtest -d data_sample/sample_prices.csv -o output/backtest_results.json --no-plot || true && ls -la output || true"]
18-
19-
20-
1+
FROM python:3.11-slim
2+
3+
WORKDIR /app
4+
5+
ENV PYTHONDONTWRITEBYTECODE=1 \
6+
PYTHONUNBUFFERED=1
7+
8+
RUN apt-get update && apt-get install -y --no-install-recommends \
9+
build-essential git && \
10+
rm -rf /var/lib/apt/lists/*
11+
12+
COPY pyproject.toml README.md LICENSE /app/
13+
COPY src /app/src
14+
15+
RUN pip install --upgrade pip && pip install -e .[dev]
16+
17+
CMD ["bash", "-lc", "pytest -q && python -m quant_research_starter.cli backtest -d data_sample/sample_prices.csv -o output/backtest_results.json --no-plot || true && ls -la output || true"]
18+
19+
20+

0 commit comments

Comments
 (0)