Skip to content

Commit

Permalink
Merge pull request beancount#28 from francocalvo/modified-dietz-returns
Browse files Browse the repository at this point in the history
Modified dietz returns
  • Loading branch information
blais authored Jun 27, 2024
2 parents 7dd642b + d7347d1 commit 588d16f
Show file tree
Hide file tree
Showing 14 changed files with 7,818 additions and 312 deletions.
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

0 comments on commit 588d16f

Please sign in to comment.