Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modified dietz returns #28

Merged
merged 7 commits into from
Jun 27, 2024
Merged
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
21 changes: 21 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash

use flake

# Add venv bin to PATH so development tools can be invoked more easily
PATH_add .venv/bin

# Add src to PYTHONPATH so Python and tools can find imports correctly
path_add PYTHONPATH src

# Add venv site packages to PYTHONPATH so imports work
path_add PYTHONPATH ".venv/$NIX_PYTHON_SITE_PACKAGES"

# Make pip use the venv (useful for ad-hoc temporary package installation)
PIP_PREFIX="$(expand_path .)/.venv"
export PIP_PREFIX
export PIP_IGNORE_INSTALLED=1

# These are annoying so stuff them all in one place
PYTHONPYCACHEPREFIX="$(expand_path .)/.pycache"
export PYTHONPYCACHEPREFIX
17 changes: 14 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
build
__pycache__
*.egg-info
# Python artifacts
/.coverage
/.pycache
/.pytest_cache
/.venv
/dist
/build
/*.egg-info

# Direnv cache
/.direnv

# Nix artifacts
/result
2 changes: 1 addition & 1 deletion beangrow/compute_returns.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def main():
prices.build_price_map(entries),
end_date,
output_reports,
args.parallel, args.pdf)
parallel=args.parallel, pdf=args.pdf)

# Generate price reports.
output_prices = path.join(args.output, "prices")
Expand Down
Loading