Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 1 addition & 19 deletions .flox/env/manifest.toml
Original file line number Diff line number Diff line change
@@ -1,29 +1,11 @@
version = 1


[install]
stack.pkg-path = "stack"
uv.pkg-path = "uv"
mise.pkg-path = "mise"
pulumi.pkg-path = "pulumi"
pulumi-language-python.pkg-path = "pulumiPackages.pulumi-language-python"
pulumi-python.pkg-path = "pulumiPackages.pulumi-python"
ormolu.pkg-path = "ormolu"
hlint.pkg-path = "hlint"
ruff.pkg-path = "ruff"
uv.pkg-path = "uv"
vulture.pkg-path = "python313Packages.vulture"

[vars]

[hook]

[profile]

[services]


[options]

systems = [
"aarch64-darwin",
"aarch64-linux",
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ venv.bak/
*.venv

*.log
*.DS_Store
*.swp
*.swo
.idea/
Expand Down
80 changes: 35 additions & 45 deletions .mise.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
[tasks."python:install"]
description = "Install Python dependencies"
run = "uv sync --all-packages"

[tasks."python:format"]
description="format python code"
description = "Format Python code"
run = "ruff format"

[tasks."python:dead-code"]
depends = ["python:format"]
description="check for dead python code"
description = "Check for dead Python code"
run = """
vulture \
--min-confidence 80 \
Expand All @@ -14,67 +18,53 @@ vulture \

[tasks."python:lint"]
depends = ["python:dead-code"]
description="run python code quality checks across the full repository"
description = "Run Python code quality checks"
run = """
ruff check \
--output-format=github \
.
"""

[tasks."haskell:format"]
description = "lint haskell code"
run = "ormolu --mode inplace $(find . -name '*.hs')"
[tasks."python:test"]
description = "Run Python tests"
run = """
uv run coverage run \
--parallel-mode \
--omit '*/__init__.py,**/test_*.py' \
--data-file .python_coverage.output \
--module pytest

[tasks."haskell:lint"]
description = "lint haskell code"
depends = ["haskell:format"]
run = "hlint ."
uv run coverage combine \
--data-file .python_coverage.output

[tasks."haskell:test"]
description = "run haskell tests"
run = "cd platform && stack test"
uv run coverage report \
--data-file .python_coverage.output

[tasks."platform:run"]
description = "run platform in docker compose"
run = """
cd platform
docker compose up
uv run coverage xml \
--data-file .python_coverage.output \
-o .python_coverage.xml
"""

[tasks."platform:build"]
description = "build platform image to dockerhub"
[tasks."application:service:build"]
description = "Build the application service"
run = """
TIMESTAMP=$(date +%Y%m%d)
cd platform
TIMESTAMP=$(date +%Y%m%d)
docker build \
--platform linux/amd64 \
-t pocketsizefund/platform:latest \
-t pocketsizefund/platform:${TIMESTAMP} \
.
--file application/{{arg(name="service_name")}}/Dockerfile \
--tag pocketsizefund/{{arg(name="service_name")}}:latest \
--tag pocketsizefund/{{arg(name="service_name")}}:${TIMESTAMP} \
.
"""

[tasks."platform:push"]
description = "push platform image to dockerhub"
depends = ["platform:build"]
[tasks."application:service:run"]
description = "Run the application service"
run = """
TIMESTAMP=$(date +%Y%m%d)
cd platform
docker push pocketsizefund/platform:latest
docker push pocketsizefund/platform:${TIMESTAMP}
docker run \
--env-file .env \
--publish 8080:8080 \
pocketsizefund/{{arg(name="service_name")}}:latest \
"""

[tasks."infrastructure:up"]
description = "launch infrastructure"
run = "cd infrastructure && uv run pulumi up"

[tasks."format"]
description = "format entire codebase"
depends = ["python:lint", "haskell:lint"]

[tasks."lint"]
description = "lint entire codebase"
depends = ["format"]

[tasks."test"]
description = "run all tests"
depends = ["haskell:test"]
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# pocketsizefund

> Open source quantitative hedge fund 🍊
> Open source quantitative hedge fund 🍊

## About

**Pocket Size Fund** is an open source quantitative hedge fund.
**Pocket Size Fund** is an open source quantitative hedge fund.

This repository holds the resources for the fund platform including data pipelines, model definitions, trading engine, and frontend resources.
This repository holds the resources for the fund platform including data pipelines, model definitions, trading engine, and frontend resources.

The project is actively a work-in-progress.
The project is actively a work-in-progress.

## Project

### Setup

Run the commands below in your terminal to get started.
Run the commands below in your terminal to get started.

```sh
brew install flox # https://flox.dev/ for more information
Expand All @@ -24,21 +24,21 @@ mise tasks # see all available Mise tasks

### Principles

An unordered and non-exhaustive list we work towards:
An unordered and non-exhaustive list we work towards:

> Test in production
> Always roll forward
> Systems over process
> No code is good code
> Never write documentation
> Git is truth
> Communicate without speaking
> Make everything liquid
> Test in production
> Always roll forward
> Systems over process
> No code is good code
> Never write documentation
> Git is truth
> Communicate without speaking
> Make everything liquid

### Links

Here are some places to get started:
Here are some places to get started:

1. [Our tasks](https://github.com/orgs/pocketsizefund/projects/11) that we're currently working on
2. [Open a discussion](https://discord.com/channels/1230911601704435752/1230911601704435755) to ask questions or share ideas
3. [Send a direct message](https://twitter.com/pocketsizefund) on everything else
1. [Our tasks](https://github.com/orgs/pocketsizefund/projects/11) that we're currently working on
2. [Open a discussion](https://discord.com/channels/1230911601704435752/1230911601704435755) to ask questions or share ideas
3. [Send a direct message](https://twitter.com/pocketsizefund) on everything else
21 changes: 0 additions & 21 deletions platform/Dockerfile

This file was deleted.

3 changes: 0 additions & 3 deletions platform/Setup.hs

This file was deleted.

10 changes: 0 additions & 10 deletions platform/app/Main.hs

This file was deleted.

10 changes: 0 additions & 10 deletions platform/compose.yaml

This file was deleted.

64 changes: 0 additions & 64 deletions platform/package.yaml

This file was deleted.

Loading