studytrails 0.2.0__tar.gz → 0.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. {studytrails-0.2.0 → studytrails-0.2.2}/PKG-INFO +10 -5
  2. {studytrails-0.2.0 → studytrails-0.2.2}/README.md +36 -28
  3. {studytrails-0.2.0 → studytrails-0.2.2}/docs/PYPI.md +8 -3
  4. {studytrails-0.2.0 → studytrails-0.2.2}/docs/RELEASING.md +16 -18
  5. studytrails-0.2.2/docs/SETUP.md +187 -0
  6. {studytrails-0.2.0 → studytrails-0.2.2}/pyproject.toml +2 -2
  7. {studytrails-0.2.0 → studytrails-0.2.2}/study_agent/agent.py +8 -2
  8. {studytrails-0.2.0 → studytrails-0.2.2}/tests/test_agent.py +5 -5
  9. studytrails-0.2.2/uv.lock +872 -0
  10. studytrails-0.2.0/uv.lock +0 -593
  11. {studytrails-0.2.0 → studytrails-0.2.2}/.gitignore +0 -0
  12. {studytrails-0.2.0 → studytrails-0.2.2}/.python-version +0 -0
  13. {studytrails-0.2.0 → studytrails-0.2.2}/CONTRIBUTING.md +0 -0
  14. {studytrails-0.2.0 → studytrails-0.2.2}/LICENSE +0 -0
  15. {studytrails-0.2.0 → studytrails-0.2.2}/assets/banner.svg +0 -0
  16. {studytrails-0.2.0 → studytrails-0.2.2}/assets/logo.svg +0 -0
  17. {studytrails-0.2.0 → studytrails-0.2.2}/docs/USER_GUIDE.md +0 -0
  18. {studytrails-0.2.0 → studytrails-0.2.2}/study_agent/__init__.py +0 -0
  19. {studytrails-0.2.0 → studytrails-0.2.2}/study_agent/__main__.py +0 -0
  20. {studytrails-0.2.0 → studytrails-0.2.2}/study_agent/cli.py +0 -0
  21. {studytrails-0.2.0 → studytrails-0.2.2}/study_agent/config.py +0 -0
  22. {studytrails-0.2.0 → studytrails-0.2.2}/study_agent/default_notes/java/basics.md +0 -0
  23. {studytrails-0.2.0 → studytrails-0.2.2}/study_agent/default_notes/python/collections.md +0 -0
  24. {studytrails-0.2.0 → studytrails-0.2.2}/study_agent/default_notes/python/functions.md +0 -0
  25. {studytrails-0.2.0 → studytrails-0.2.2}/study_agent/default_notes/python/loops.md +0 -0
  26. {studytrails-0.2.0 → studytrails-0.2.2}/study_agent/demo.py +0 -0
  27. {studytrails-0.2.0 → studytrails-0.2.2}/study_agent/models.py +0 -0
  28. {studytrails-0.2.0 → studytrails-0.2.2}/study_agent/notes.py +0 -0
  29. {studytrails-0.2.0 → studytrails-0.2.2}/study_agent/onboarding.py +0 -0
  30. {studytrails-0.2.0 → studytrails-0.2.2}/study_agent/preferences.py +0 -0
  31. {studytrails-0.2.0 → studytrails-0.2.2}/study_agent/storage.py +0 -0
  32. {studytrails-0.2.0 → studytrails-0.2.2}/study_agent/tools.py +0 -0
  33. {studytrails-0.2.0 → studytrails-0.2.2}/tests/conftest.py +0 -0
  34. {studytrails-0.2.0 → studytrails-0.2.2}/tests/test_cli.py +0 -0
  35. {studytrails-0.2.0 → studytrails-0.2.2}/tests/test_config.py +0 -0
  36. {studytrails-0.2.0 → studytrails-0.2.2}/tests/test_onboarding.py +0 -0
  37. {studytrails-0.2.0 → studytrails-0.2.2}/tests/test_storage.py +0 -0
  38. {studytrails-0.2.0 → studytrails-0.2.2}/tests/test_tools.py +0 -0
  39. {studytrails-0.2.0 → studytrails-0.2.2}/tests/wheel_smoke.py +0 -0
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: studytrails
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: A personal multi-subject AI study coach with tools, local progress, and an offline demo.
5
5
  License-Expression: MIT
6
6
  License-File: LICENSE
7
- Requires-Python: <3.14,>=3.12
7
+ Requires-Python: <3.15,>=3.10
8
8
  Requires-Dist: keyring<26,>=25
9
9
  Requires-Dist: openai<3,>=2.0
10
10
  Requires-Dist: platformdirs<5,>=4
@@ -20,9 +20,14 @@ Learn a little. Practise with purpose. See your progress.
20
20
  StudyTrail is a terminal AI study coach. Bring your own compatible provider API
21
21
  key, add study notes, practise with quizzes, and track progress locally.
22
22
 
23
- Requires Python 3.12 or 3.13. Once this release is published, install it in an
24
- activated environment with `pip install studytrails`, or install an isolated CLI
25
- with `uv tool install studytrails`. Run `studytrails` to open the welcome menu.
23
+ Requires Python 3.10 through 3.14. Install the latest release in an activated
24
+ environment with `python -m pip install --upgrade studytrails`, or install an
25
+ isolated CLI with `uv tool install --upgrade studytrails`. Run `studytrails` to
26
+ open the welcome menu.
27
+
28
+ Created by Yash Patil, a Python and AI learner. The project uses OpenAI's Python
29
+ SDK for compatible chat APIs. OpenAI created the GPT-OSS model family; the API host
30
+ may be another provider, such as Groq. Users may configure other model families.
26
31
 
27
32
  ## Features
28
33
 
@@ -6,38 +6,46 @@
6
6
 
7
7
  **Learn a little. Practise with purpose. See your progress.**
8
8
 
9
- StudyTrail is a terminal study coach for Python, Java, and other subjects. Bring
10
- an API key from a compatible provider, add your notes, and practise with quizzes.
11
- Your progress stays on your computer. You do not need to run a server.
9
+ StudyTrail is a terminal study coach for Python, Java, and other subjects. Bring
10
+ an API key from a compatible provider, add your notes, and practise with quizzes.
11
+ Your progress stays on your computer. You do not need to run a server.
12
+
13
+ StudyTrail was created by Yash Patil, a Python and AI learner. The project uses
14
+ OpenAI's Python SDK for compatible chat APIs. OpenAI created the GPT-OSS model
15
+ family; the API host may be another provider, such as Groq, and users can select
16
+ other model families too.
12
17
 
13
- **Python 3.12 or 3.13 | Your choice of compatible AI provider | Local progress**
18
+ **Python 3.10–3.14 | Your choice of compatible AI provider | Local progress**
14
19
 
15
20
  ## Get started
16
21
 
17
- This version is prepared for packaging but **has not been published to PyPI**.
18
- Do not assume a package currently using the name `studytrails` is this project.
19
-
20
- From the source checkout:
21
-
22
- ```powershell
23
- cd C:\CLAUDE_env\Study_Agent_python
24
- uv sync --locked
25
- uv run studytrails
26
- ```
27
-
28
- If uv is not on your terminal PATH after installation, run the existing environment:
29
-
30
- ```powershell
31
- & .\.venv\Scripts\studytrails.exe
32
- ```
33
-
34
- The original command also works: `python -m study_agent` in the activated environment.
35
- Keep development environments under `C:\CLAUDE_env`; do not install into system Python.
36
-
37
- After the maintainer publishes a verified release, users will be able to install it
38
- in an activated Python environment with `pip install studytrails`, or use
39
- `uv tool install studytrails` for an isolated command-line installation. They can
40
- then run `studytrails` from any directory.
22
+ Install the published release in a virtual environment (recommended for people new
23
+ to Python):
24
+
25
+ ```powershell
26
+ py -3.12 -m venv .venv
27
+ .\.venv\Scripts\Activate.ps1
28
+ python -m pip install --upgrade pip
29
+ python -m pip install studytrails
30
+ studytrails
31
+ ```
32
+
33
+ On macOS/Linux, use these commands instead:
34
+
35
+ ```bash
36
+ python3.12 -m venv .venv
37
+ source .venv/bin/activate
38
+ python -m pip install --upgrade pip
39
+ python -m pip install studytrails
40
+ studytrails
41
+ ```
42
+
43
+ After activating `.venv`, users can run `studytrails` whenever they open a new
44
+ terminal for that environment. See the [downloadable setup guide](docs/SETUP.md)
45
+ for uv installation, first-run configuration, and troubleshooting.
46
+
47
+ For a one-time isolated CLI installation, `uv tool install studytrails` installs
48
+ the command so it can run from any directory without activating a virtual environment.
41
49
 
42
50
  ## First launch
43
51
 
@@ -5,9 +5,14 @@ Learn a little. Practise with purpose. See your progress.
5
5
  StudyTrail is a terminal AI study coach. Bring your own compatible provider API
6
6
  key, add study notes, practise with quizzes, and track progress locally.
7
7
 
8
- Requires Python 3.12 or 3.13. Once this release is published, install it in an
9
- activated environment with `pip install studytrails`, or install an isolated CLI
10
- with `uv tool install studytrails`. Run `studytrails` to open the welcome menu.
8
+ Requires Python 3.10 through 3.14. Install the latest release in an activated
9
+ environment with `python -m pip install --upgrade studytrails`, or install an
10
+ isolated CLI with `uv tool install --upgrade studytrails`. Run `studytrails` to
11
+ open the welcome menu.
12
+
13
+ Created by Yash Patil, a Python and AI learner. The project uses OpenAI's Python
14
+ SDK for compatible chat APIs. OpenAI created the GPT-OSS model family; the API host
15
+ may be another provider, such as Groq. Users may configure other model families.
11
16
 
12
17
  ## Features
13
18
 
@@ -1,23 +1,22 @@
1
1
  # Releasing StudyTrail
2
2
 
3
- The package is prepared locally. No upload or public release is performed by setup,
4
- tests, or CI. The distribution name is `studytrails`; the import remains `study_agent`.
5
- Version 0.2.0 adds packaging, personal settings, provider setup, and subject notes.
3
+ The distribution name is `studytrails`; the import remains `study_agent`.
4
+ Versions 0.2.0 and 0.2.1 are published on PyPI. Version 0.2.2 is the next local candidate.
5
+ Build, tests, and CI do not publish a release.
6
6
 
7
- ## Before the first release
7
+ ## Before each release
8
8
 
9
- 1. Create your PyPI account and enable two-factor authentication. Check the current
10
- availability of `studytrails` on PyPI and TestPyPI separately. A missing project
11
- page is not a reservation or a guarantee that PyPI will accept the name.
9
+ 1. Choose a new version in `pyproject.toml`. PyPI versions cannot be overwritten;
10
+ check that the version has not already been published.
12
11
  2. Review the MIT licence and package metadata. Add your public repository URL to
13
12
  `[project.urls]` when ready; no repository URL is invented by this project.
14
13
  3. Check package contents for accidental secrets, databases, or personal notes.
15
14
  Wheels include only the `study_agent` package and its bundled example notes.
16
15
  Source distributions use an explicit allowlist. `notes/`, `.env`, and `data/`
17
16
  from the local checkout are not published.
18
- 4. Update the README's unpublished status only when the release is actually live.
19
- Use absolute public links/images in the PyPI description if adding repository
20
- branding there. The package uses a self-contained `docs/PYPI.md` description.
17
+ 4. Commit and push the reviewed source to GitHub. Use absolute public links/images
18
+ in the PyPI description if adding repository branding there. The package uses a
19
+ self-contained `docs/PYPI.md` description.
21
20
 
22
21
  ## Build and verify
23
22
 
@@ -50,20 +49,19 @@ TestPyPI is a separate service with separate accounts, tokens, and project names
50
49
  Install dependencies from the regular index when testing a TestPyPI package; avoid
51
50
  blindly combining indexes for production installs.
52
51
 
53
- For an explicitly approved manual release, uv supports:
52
+ For a manual release, first review the files listed under `dist/`, then publish:
54
53
 
55
54
  ```powershell
56
- uv publish dist/studytrails-0.2.0-py3-none-any.whl dist/studytrails-0.2.0.tar.gz
55
+ uv publish
57
56
  ```
58
57
 
59
58
  Supply authentication securely as documented by uv. This command publishes publicly;
60
- it is not part of the build/test workflow. Inspect the exact two artifacts before
61
- running it. A published version cannot simply be replaced with different contents;
62
- increment the version for a correction.
59
+ it is not part of the build/test workflow. A published version cannot be replaced
60
+ with different contents; increment the version for a correction.
63
61
 
64
- After publishing, test a fresh install of the exact published version and update
65
- the README. Users can then run `pip install studytrails` in an activated environment
66
- or `uv tool install studytrails`, followed by `studytrails`.
62
+ After publishing, confirm the new version on PyPI and install it in a fresh
63
+ environment. Users can update with `python -m pip install --upgrade studytrails`
64
+ or `uv tool upgrade studytrails`.
67
65
 
68
66
  References: [uv publishing](https://docs.astral.sh/uv/guides/package/),
69
67
  [PyPI Trusted Publishing](https://docs.pypi.org/trusted-publishers/), and
@@ -0,0 +1,187 @@
1
+ # StudyTrail setup guide
2
+
3
+ This guide helps you install StudyTrail on a new computer. It is a terminal app:
4
+ you install it once, then run `studytrails` from PowerShell, Terminal, or a shell.
5
+
6
+ StudyTrail is free and MIT licensed. Live AI uses an API key from a compatible
7
+ provider. Your provider controls its own free allowance, usage limits, and charges.
8
+ You can use the offline demo without an API key.
9
+
10
+ ## 1. Install Python
11
+
12
+ StudyTrail supports Python **3.10, 3.11, 3.12, 3.13, and 3.14**. Python 3.12 is
13
+ shown in the commands below; replace `3.12` with your installed version when you
14
+ want to use another supported release. The `openai` library used by StudyTrail
15
+ requires Python 3.10 or newer.
16
+
17
+ - **Windows:** Install Python from [python.org](https://www.python.org/downloads/).
18
+ In the installer, enable **Add python.exe to PATH**. Then open a new PowerShell
19
+ window and check `py --version`.
20
+ - **macOS:** Install Python 3.10–3.14 from [python.org](https://www.python.org/downloads/)
21
+ or your preferred package manager. Check `python3.12 --version`.
22
+ - **Linux:** Install Python 3.10–3.14 and its `venv` support using your
23
+ distribution's package manager. Check `python3.12 --version`.
24
+
25
+ ## 2. Install StudyTrail in its own environment
26
+
27
+ An environment keeps StudyTrail's Python packages separate from other projects.
28
+ Choose the instructions for your operating system. Run the commands in the folder
29
+ where you want to keep this environment; create a folder first if needed.
30
+
31
+ ### Windows PowerShell
32
+
33
+ ```powershell
34
+ mkdir StudyTrail
35
+ cd StudyTrail
36
+ py -3.12 -m venv .venv
37
+ .\.venv\Scripts\Activate.ps1
38
+ python -m pip install --upgrade pip
39
+ python -m pip install studytrails
40
+ studytrails
41
+ ```
42
+
43
+ If PowerShell blocks activation, use this for the current terminal only, then
44
+ activate the environment again:
45
+
46
+ ```powershell
47
+ Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned
48
+ .\.venv\Scripts\Activate.ps1
49
+ ```
50
+
51
+ Or skip activation and run the installed command directly:
52
+
53
+ ```powershell
54
+ .\.venv\Scripts\studytrails.exe
55
+ ```
56
+
57
+ ### macOS or Linux
58
+
59
+ ```bash
60
+ mkdir StudyTrail
61
+ cd StudyTrail
62
+ python3.12 -m venv .venv
63
+ source .venv/bin/activate
64
+ python -m pip install --upgrade pip
65
+ python -m pip install studytrails
66
+ studytrails
67
+ ```
68
+
69
+ If your system's `python3.12` command has another name, use the command for your
70
+ chosen supported Python version to create the environment.
71
+
72
+ ### Optional: install uv
73
+
74
+ You can use [uv](https://docs.astral.sh/uv/getting-started/installation/) to
75
+ install StudyTrail as an isolated command-line tool. After installing uv, run:
76
+
77
+ ```powershell
78
+ uv tool install studytrails
79
+ uv tool update-shell
80
+ ```
81
+
82
+ On macOS or Linux, the commands are the same. Open a new terminal after
83
+ `uv tool update-shell`, then run `studytrails` from any folder. If the command
84
+ is still not found, follow uv's PATH instructions for your shell.
85
+
86
+ ## 3. Set up an AI provider (optional)
87
+
88
+ The first run opens a welcome menu. Choose **Configure AI** to use live coaching.
89
+ You will need:
90
+
91
+ 1. An API key from a provider you choose.
92
+ 2. The provider's API address, if you choose a custom OpenAI-compatible endpoint.
93
+ 3. A model ID that your provider account can access and that supports
94
+ OpenAI-compatible Chat Completions with tool calling.
95
+
96
+ StudyTrail offers address presets for OpenAI and Groq. A preset only fills in the
97
+ provider address; it does not provide a key or guarantee every model will work.
98
+ For another compatible service, choose the custom endpoint option and enter its
99
+ API base URL and model ID. StudyTrail cannot use provider APIs with an incompatible
100
+ request format in this release.
101
+
102
+ The key prompt is hidden while you type. Paste the key only into that prompt. Do
103
+ not paste it into the provider number or model prompt, a command line, this guide,
104
+ or a public issue. Setup can make an optional small connection test; the request
105
+ may use provider quota or incur charges. Choose **No** to skip it.
106
+
107
+ StudyTrail stores API keys in a supported operating-system credential manager.
108
+ Provider usage and billing are controlled by the provider. Review your provider's
109
+ plan and limits before making live requests. Each study interaction may use more
110
+ than one request.
111
+
112
+ To configure later, run:
113
+
114
+ ```text
115
+ studytrails config
116
+ ```
117
+
118
+ ## 4. Start studying
119
+
120
+ In the welcome menu, select **Start learning** to chat with the coach. Select
121
+ **Manage notes** to paste notes or import a UTF-8 `.txt` or `.md` file; choose a
122
+ subject such as `python`, `java`, or `biology`. When pasting, enter `.done` on a
123
+ line by itself to save the note. Then start learning and choose the same subject
124
+ to search those notes.
125
+
126
+ Try asking:
127
+
128
+ ```text
129
+ Explain Java inheritance using my notes, then give me two beginner questions.
130
+ ```
131
+
132
+ The app includes sample Python and Java notes. Notes are searched by keywords;
133
+ PDF and Word files are not supported. Note excerpts and study requests are sent to
134
+ the AI provider you configured. Avoid adding private information unless you are
135
+ comfortable sharing it with that provider.
136
+
137
+ If you want to try the app without an API key, choose **Offline demo** from the
138
+ menu. It runs a fixed Python quiz and stores demo results separately from your
139
+ regular progress. It is not a local AI model.
140
+
141
+ ## 5. Run StudyTrail next time
142
+
143
+ For a virtual environment installation, open a new terminal, go to the folder
144
+ where you installed StudyTrail, activate `.venv`, then type `studytrails`:
145
+
146
+ ```powershell
147
+ cd .\StudyTrail
148
+ .\.venv\Scripts\Activate.ps1
149
+ studytrails
150
+ ```
151
+
152
+ The macOS/Linux activation command is `source .venv/bin/activate`. If you used
153
+ `uv tool install`, simply open a new terminal and type `studytrails`.
154
+
155
+ ## 6. Find your notes and progress
156
+
157
+ Run this command from an activated environment or uv tool installation:
158
+
159
+ ```text
160
+ studytrails doctor
161
+ ```
162
+
163
+ It reports the local folder used for your settings, notes, and progress. Installed
164
+ releases store these under your operating-system application data directory.
165
+ Your progress belongs to your computer and is not automatically uploaded or
166
+ synchronized.
167
+
168
+ ## Troubleshooting
169
+
170
+ - **`studytrails` is not recognized / command not found:** activate the same
171
+ virtual environment where you installed it. With uv, open a new terminal after
172
+ `uv tool update-shell` and check uv's PATH instructions.
173
+ - **Python version error:** use Python 3.10 through 3.14 and recreate the `.venv`
174
+ with that version.
175
+ - **PowerShell says scripts are disabled:** use the current-terminal command in
176
+ the Windows section above, then activate again.
177
+ - **401 / authentication failed:** run `studytrails config` and check that the key
178
+ belongs to the displayed provider address. Never share the key in a support
179
+ request.
180
+ - **404 / model not found:** check the exact model ID and that the account can use
181
+ it. Also verify the provider address.
182
+ - **429 / quota exceeded:** check the provider's current plan, rate limit, or
183
+ quota reset time.
184
+ - **Want to test without an API:** select **Offline demo** in the menu.
185
+
186
+ For more features and command details, see the
187
+ [user guide](USER_GUIDE.md) and [project README](../README.md).
@@ -4,12 +4,12 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "studytrails"
7
- version = "0.2.0"
7
+ version = "0.2.2"
8
8
  description = "A personal multi-subject AI study coach with tools, local progress, and an offline demo."
9
9
  readme = "docs/PYPI.md"
10
10
  license = "MIT"
11
11
  license-files = ["LICENSE"]
12
- requires-python = ">=3.12,<3.14"
12
+ requires-python = ">=3.10,<3.15"
13
13
  dependencies = [
14
14
  "openai>=2.0,<3",
15
15
  "pydantic>=2.0,<3",
@@ -9,8 +9,14 @@ from pydantic import ValidationError
9
9
  from .config import Settings
10
10
  from .tools import StudyTools, tool_definitions
11
11
 
12
- INSTRUCTIONS = """You are a practical personal multi-subject study coach for a beginner.
13
- Use plain English. Help the learner understand, practise, and improve.
12
+ INSTRUCTIONS = """You are a practical personal multi-subject study coach for a beginner.
13
+ StudyTrail was created by Yash Patil. If asked who created or made StudyTrail, say
14
+ Yash Patil created the StudyTrail application and is learning Python and AI. The AI
15
+ model is supplied by the provider configured by this user; credit OpenAI for an
16
+ OpenAI model such as GPT-OSS, and name the configured provider as its API host when
17
+ appropriate. Do not claim OpenAI created StudyTrail or guess other personal details
18
+ about Yash Patil.
19
+ Use plain English. Help the learner understand, practise, and improve.
14
20
  For practice recommendations, inspect get_scores first. Search local notes for the
15
21
  chosen topic before teaching or creating a quiz. Use recent attempts as well as totals.
16
22
  If no scores exist, say so and start at beginner level. Respect the learner's chosen topic.
@@ -39,7 +39,7 @@ class ScriptedClient:
39
39
  return next(self.queue)
40
40
 
41
41
 
42
- def test_agent_uses_observations_and_creates_real_quiz(tools, quiz):
42
+ def test_agent_uses_observations_and_creates_real_quiz(tools, quiz):
43
43
  client = ScriptedClient(
44
44
  [
45
45
  response(call("get_scores")),
@@ -56,10 +56,10 @@ def test_agent_uses_observations_and_creates_real_quiz(tools, quiz):
56
56
  assert json.loads(observations[0]["content"])["completed_quizzes"] == 0
57
57
  assert "loops.md" in observations[1]["content"]
58
58
  assert len(tools.store.pending_quizzes()) == 1
59
- assert tools.store.get_scores()["completed_quizzes"] == 0
60
-
61
-
62
- def test_bad_tool_arguments_return_feedback_and_allow_recovery(tools):
59
+ assert tools.store.get_scores()["completed_quizzes"] == 0
60
+
61
+
62
+ def test_bad_tool_arguments_return_feedback_and_allow_recovery(tools):
63
63
  client = ScriptedClient(
64
64
  [
65
65
  response(call("search_notes", "not-json")),