Skip to content

Commit 5ecd3b7

Browse files
Docs: Track D BYOD polish (placeholders, PyPI-first copy, nav)
1 parent d8c3a31 commit 5ecd3b7

4 files changed

Lines changed: 60 additions & 32 deletions

File tree

docs/source/workbook/index.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,5 @@ PyStatsV1 Workbook
2020
track_d_outputs_guide
2121
track_d_my_own_data
2222
track_d_byod
23-
track_d_byod_gnucash
24-
track_d_byod_gnucash_demo_analysis
2523
track_d_assignments
2624
track_d_lab_ta_notes

docs/source/workbook/track_d_byod.rst

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Track D BYOD: Bring Your Own Data
77
Track D is built around a realistic accounting case study (NSO), but the *skills* are meant to transfer.
88

99
This BYOD (Bring Your Own Data) pipeline lets you take **real exports** (from a bookkeeping/accounting system)
10-
and convert them into the same **Track D dataset contract** used in the workbook.
10+
and convert them into the same **Track D dataset contract** used in the workbook. In the commands below, replace <BYOD_DIR> with your project folder (for example: byod/gnucash_demo).
1111

1212
What “BYOD” means in Track D
1313
----------------------------
@@ -23,13 +23,18 @@ The core idea is: *separate the messy export from the clean analysis tables*.
2323
Quick start (template)
2424
----------------------
2525

26+
If an option name ever changes, the source of truth is always the CLI help:
27+
28+
- ``pystatsv1 trackd byod --help``
29+
- ``pystatsv1 trackd byod init --help``
30+
2631
Create a BYOD project folder (this writes header-only templates under ``tables/``):
2732

2833
.. code-block:: console
2934
30-
pystatsv1 trackd byod init --dest byod/my_project --profile core_gl
35+
pystatsv1 trackd byod init --dest <BYOD_DIR> --profile core_gl
3136
32-
Edit ``byod/my_project/config.toml`` to choose an adapter (examples):
37+
Edit ``<BYOD_DIR>/config.toml`` to choose an adapter (examples):
3338

3439
- ``adapter = "passthrough"`` — your ``tables/`` files are already in Track D’s canonical format
3540
- ``adapter = "core_gl"`` — generic GL export adapter (varies by source)
@@ -39,18 +44,21 @@ Then normalize:
3944

4045
.. code-block:: console
4146
42-
pystatsv1 trackd byod normalize --project byod/my_project
47+
pystatsv1 trackd byod normalize --project <BYOD_DIR>
48+
49+
# (optional) override profile explicitly
50+
pystatsv1 trackd byod normalize --project <BYOD_DIR> --profile core_gl
4351
4452
You should now have:
4553

46-
- ``byod/my_project/normalized/chart_of_accounts.csv``
47-
- ``byod/my_project/normalized/gl_journal.csv``
54+
- ``<BYOD_DIR>/normalized/chart_of_accounts.csv``
55+
- ``<BYOD_DIR>/normalized/gl_journal.csv``
4856

4957
Validate the normalized tables:
5058

5159
.. code-block:: console
5260
53-
pystatsv1 trackd validate --datadir byod/my_project/normalized --profile core_gl
61+
pystatsv1 trackd validate --datadir <BYOD_DIR>/normalized --profile core_gl
5462
5563
PyPI-only setup (no Git required)
5664
----------------------------------------------
@@ -80,6 +88,12 @@ If you just want to *use* Track D tools (you don’t need to clone the repo):
8088
8189
pystatsv1 doctor
8290
91+
Need a reminder of commands?
92+
93+
.. code-block:: console
94+
95+
pystatsv1 trackd byod --help
96+
8397
Next: choose a tutorial
8498
-----------------------
8599

docs/source/workbook/track_d_byod_gnucash.rst

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
Track D BYOD with GnuCash (core_gl profile)
55
===========================================
66

7-
GnuCash is a **free, open-source** double-entry accounting system.
7+
GnuCash is a **free, open-source** double-entry accounting system.
8+
9+
Note that in the commands below, replace <BYOD_DIR> with your project folder (for example: byod/gnucash_demo).
10+
811
In Track D, we use it as a “real but accessible” source system:
912

1013
- it produces realistic **multi-line split** exports (not toy spreadsheets)
@@ -87,7 +90,9 @@ From any folder you like (your BYOD projects can live anywhere):
8790

8891
.. code-block:: console
8992
90-
pystatsv1 trackd byod init --dest byod/gnucash_demo --profile core_gl
93+
pystatsv1 trackd byod init --dest <BYOD_DIR> --profile core_gl
94+
95+
Need a reminder of options? Run: ``pystatsv1 trackd byod init --help``
9196

9297
This creates:
9398

@@ -100,7 +105,7 @@ Step 5 — Point the project at the GnuCash adapter
100105

101106
Open:
102107

103-
``byod/gnucash_demo/config.toml``
108+
``<BYOD_DIR>/config.toml``
104109

105110
Change:
106111

@@ -116,26 +121,27 @@ Step 6 — Place your export in the expected location
116121

117122
Copy your GnuCash export CSV to:
118123

119-
``byod/gnucash_demo/tables/gl_journal.csv``
124+
``<BYOD_DIR>/tables/gl_journal.csv``
120125

121126
Yes, the file is called ``gl_journal.csv`` even though it is still “raw export.”
122127
The adapter reads this file and writes the canonical tables to ``normalized/``.
123128

124-
If you want to test without GnuCash, copy the demo export instead:
129+
If you downloaded the demo export from this page (PyPI users), copy it into place:
125130

126-
If you installed PyStatsV1 from PyPI (no repo clone), download **"Demo export (complex/multi-line)"** above
127-
and copy that file to ``byod/gnucash_demo/tables/gl_journal.csv``.
131+
.. code-block:: console
128132
129-
If you have the repo source code, you can copy the demo export from this docs folder:
133+
# Windows (PowerShell)
134+
Copy-Item "<PATH_TO_DOWNLOADED_EXPORT_CSV>" (Join-Path "<BYOD_DIR>" "tables\gl_journal.csv")
130135
136+
# Windows (Git Bash)
137+
cp "<PATH_TO_DOWNLOADED_EXPORT_CSV>" "<BYOD_DIR>/tables/gl_journal.csv"
131138
132-
.. code-block:: console
139+
# macOS/Linux
140+
cp "<PATH_TO_DOWNLOADED_EXPORT_CSV>" "<BYOD_DIR>/tables/gl_journal.csv"
133141
134-
# (Windows PowerShell)
135-
copy docs\source\workbook\_downloads\gnucash_demo\gnucash_demo_export_complex.csv byod\gnucash_demo\tables\gl_journal.csv
142+
If you have the repo source code, the same demo export also lives here:
136143

137-
# (macOS/Linux)
138-
cp docs/source/workbook/_downloads/gnucash_demo/gnucash_demo_export_complex.csv byod/gnucash_demo/tables/gl_journal.csv
144+
- ``docs/source/workbook/_downloads/gnucash_demo/gnucash_demo_export_complex.csv``
139145

140146
Step 7 — Normalize
141147
------------------
@@ -144,19 +150,22 @@ Run:
144150

145151
.. code-block:: console
146152
147-
pystatsv1 trackd byod normalize --project byod/gnucash_demo
153+
pystatsv1 trackd byod normalize --project <BYOD_DIR>
154+
155+
# (optional) override profile explicitly
156+
pystatsv1 trackd byod normalize --project <BYOD_DIR> --profile core_gl
148157
149158
You should now have:
150159

151-
- ``byod/gnucash_demo/normalized/chart_of_accounts.csv``
152-
- ``byod/gnucash_demo/normalized/gl_journal.csv``
160+
- ``<BYOD_DIR>/normalized/chart_of_accounts.csv``
161+
- ``<BYOD_DIR>/normalized/gl_journal.csv``
153162

154163
Step 8 — Validate the normalized tables
155164
---------------------------------------
156165

157166
.. code-block:: console
158167
159-
pystatsv1 trackd validate --datadir byod/gnucash_demo/normalized --profile core_gl
168+
pystatsv1 trackd validate --datadir <BYOD_DIR>/normalized --profile core_gl
160169
161170
Step 9 — Do a first analysis
162171
----------------------------

docs/source/workbook/track_d_byod_gnucash_demo_analysis.rst

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,25 @@ If you want to jump straight to analysis without running the normalization step
2727
Option A — Build daily totals from your normalized tables
2828
---------------------------------------------------------
2929

30-
Assume your BYOD project is at ``byod/gnucash_demo`` and you have:
30+
Assume your BYOD project is at ``<BYOD_DIR>`` and you have:
3131

32-
- ``byod/gnucash_demo/normalized/gl_journal.csv``
33-
- ``byod/gnucash_demo/normalized/chart_of_accounts.csv``
32+
- ``<BYOD_DIR>/normalized/gl_journal.csv``
33+
- ``<BYOD_DIR>/normalized/chart_of_accounts.csv``
3434

3535
Run the built-in helper:
3636

3737
.. code-block:: console
3838
39-
pystatsv1 trackd byod daily-totals --project byod/gnucash_demo
39+
pystatsv1 trackd byod daily-totals --project <BYOD_DIR>
40+
41+
# (optional) choose an explicit output path
42+
pystatsv1 trackd byod daily-totals --project <BYOD_DIR> --out <BYOD_DIR>/normalized/daily_totals.csv
43+
44+
Need a reminder of options? Run: ``pystatsv1 trackd byod daily-totals --help``
4045

4146
This writes:
4247

43-
- ``byod/gnucash_demo/normalized/daily_totals.csv``
48+
- ``<BYOD_DIR>/normalized/daily_totals.csv``
4449

4550
Option B — Quick first analysis (no repo clone required)
4651
--------------------------------------------------------
@@ -55,7 +60,9 @@ This snippet prints a few summary stats and writes a simple plot:
5560
import matplotlib.pyplot as plt
5661
from pathlib import Path
5762
58-
csv_path = Path("byod/gnucash_demo/normalized/daily_totals.csv")
63+
project = Path("byod/gnucash_demo") # <-- set to your BYOD project folder (e.g., "<BYOD_DIR>")
64+
65+
csv_path = project / "normalized" / "daily_totals.csv"
5966
outdir = Path("outputs/gnucash_demo")
6067
outdir.mkdir(parents=True, exist_ok=True)
6168

0 commit comments

Comments
 (0)