learnstat 0.2.2__tar.gz → 0.2.3__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 (35) hide show
  1. {learnstat-0.2.2 → learnstat-0.2.3}/PKG-INFO +1 -1
  2. {learnstat-0.2.2 → learnstat-0.2.3}/learnstat/__init__.py +1 -1
  3. {learnstat-0.2.2 → learnstat-0.2.3}/learnstat/cli.py +3 -1
  4. {learnstat-0.2.2 → learnstat-0.2.3}/learnstat/guide.py +13 -10
  5. {learnstat-0.2.2 → learnstat-0.2.3}/learnstat.egg-info/PKG-INFO +1 -1
  6. {learnstat-0.2.2 → learnstat-0.2.3}/pyproject.toml +1 -1
  7. {learnstat-0.2.2 → learnstat-0.2.3}/LICENSE +0 -0
  8. {learnstat-0.2.2 → learnstat-0.2.3}/README.md +0 -0
  9. {learnstat-0.2.2 → learnstat-0.2.3}/learnstat/advisor.py +0 -0
  10. {learnstat-0.2.2 → learnstat-0.2.3}/learnstat/commands.py +0 -0
  11. {learnstat-0.2.2 → learnstat-0.2.3}/learnstat/config.py +0 -0
  12. {learnstat-0.2.2 → learnstat-0.2.3}/learnstat/ipython_ext.py +0 -0
  13. {learnstat-0.2.2 → learnstat-0.2.3}/learnstat/knowledge.py +0 -0
  14. {learnstat-0.2.2 → learnstat-0.2.3}/learnstat/llm.py +0 -0
  15. {learnstat-0.2.2 → learnstat-0.2.3}/learnstat/memory.py +0 -0
  16. {learnstat-0.2.2 → learnstat-0.2.3}/learnstat/profile.py +0 -0
  17. {learnstat-0.2.2 → learnstat-0.2.3}/learnstat/providers.py +0 -0
  18. {learnstat-0.2.2 → learnstat-0.2.3}/learnstat/recovery.py +0 -0
  19. {learnstat-0.2.2 → learnstat-0.2.3}/learnstat/safety.py +0 -0
  20. {learnstat-0.2.2 → learnstat-0.2.3}/learnstat/session.py +0 -0
  21. {learnstat-0.2.2 → learnstat-0.2.3}/learnstat/setup.py +0 -0
  22. {learnstat-0.2.2 → learnstat-0.2.3}/learnstat/suggestions.py +0 -0
  23. {learnstat-0.2.2 → learnstat-0.2.3}/learnstat.egg-info/SOURCES.txt +0 -0
  24. {learnstat-0.2.2 → learnstat-0.2.3}/learnstat.egg-info/dependency_links.txt +0 -0
  25. {learnstat-0.2.2 → learnstat-0.2.3}/learnstat.egg-info/entry_points.txt +0 -0
  26. {learnstat-0.2.2 → learnstat-0.2.3}/learnstat.egg-info/requires.txt +0 -0
  27. {learnstat-0.2.2 → learnstat-0.2.3}/learnstat.egg-info/top_level.txt +0 -0
  28. {learnstat-0.2.2 → learnstat-0.2.3}/setup.cfg +0 -0
  29. {learnstat-0.2.2 → learnstat-0.2.3}/tests/test_advisor.py +0 -0
  30. {learnstat-0.2.2 → learnstat-0.2.3}/tests/test_ai_config.py +0 -0
  31. {learnstat-0.2.2 → learnstat-0.2.3}/tests/test_commands.py +0 -0
  32. {learnstat-0.2.2 → learnstat-0.2.3}/tests/test_guide.py +0 -0
  33. {learnstat-0.2.2 → learnstat-0.2.3}/tests/test_ipython.py +0 -0
  34. {learnstat-0.2.2 → learnstat-0.2.3}/tests/test_profile_memory.py +0 -0
  35. {learnstat-0.2.2 → learnstat-0.2.3}/tests/test_recovery.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: learnstat
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: An AI-assisted learning companion for statistical analysis with pandas, NumPy, SciPy and Matplotlib.
5
5
  License: MIT
6
6
  Project-URL: Homepage, https://github.com/umorfaruksupto/leanstat
@@ -21,7 +21,7 @@ from .recovery import Executor, RunResult
21
21
  from .session import Session, get_session, set_session
22
22
  from .suggestions import Suggestion
23
23
 
24
- __version__ = "0.2.2"
24
+ __version__ = "0.2.3"
25
25
 
26
26
 
27
27
  def read_csv(path, name: str | None = None, **kwargs):
@@ -119,7 +119,8 @@ def _repl(s: Session, data: str | None) -> int:
119
119
  if data:
120
120
  s.ns["df"] = s.read_csv(data)
121
121
  if "df" in s.ns:
122
- ready.insert(0, "df")
122
+ shape = getattr(s.ns["df"], "shape", None)
123
+ ready.insert(0, f"df ({shape[0]} x {shape[1]})" if shape and len(shape) == 2 else "df")
123
124
  print(f"Ready: {', '.join(ready)} | /help | menu")
124
125
  buffer: list[str] = []
125
126
  while True:
@@ -237,6 +238,7 @@ def _start(args, run_setup: bool) -> int:
237
238
  from .guide import run_guide
238
239
 
239
240
  s = _session(args)
241
+ s.verbose = False # no profile dump on load; suggestions appear when the user writes code
240
242
  if ai_error:
241
243
  s.assistant, s.ai_status = None, f"offline ({ai_error}) - menu 8 to fix"
242
244
  return run_guide(s, repl=lambda: _repl(s, None), data=args.data)
@@ -7,6 +7,7 @@ extras (AI questions, script checks, lessons, AI settings).
7
7
  from __future__ import annotations
8
8
 
9
9
  import sys
10
+ import warnings
10
11
  from pathlib import Path
11
12
  from typing import Callable
12
13
 
@@ -69,16 +70,18 @@ def ask_file(io: IO, pick: Callable, what: str, types: list[tuple[str, str]], sk
69
70
  def load_dataset(s: Session, io: IO, path: Path):
70
71
  suffix = path.suffix.lower()
71
72
  try:
72
- if suffix in (".xlsx", ".xls"):
73
- df = s.read_excel(path)
74
- elif suffix == ".json":
75
- df = s.read_json(path)
76
- elif suffix == ".parquet":
77
- df = s.read_parquet(path)
78
- elif suffix == ".tsv":
79
- df = s.read_csv(path, sep="\t")
80
- else:
81
- df = s.read_csv(path)
73
+ with warnings.catch_warnings(): # library chatter (e.g. openpyxl) is not for students
74
+ warnings.simplefilter("ignore")
75
+ if suffix in (".xlsx", ".xls"):
76
+ df = s.read_excel(path)
77
+ elif suffix == ".json":
78
+ df = s.read_json(path)
79
+ elif suffix == ".parquet":
80
+ df = s.read_parquet(path)
81
+ elif suffix == ".tsv":
82
+ df = s.read_csv(path, sep="\t")
83
+ else:
84
+ df = s.read_csv(path)
82
85
  except ImportError as e:
83
86
  io.say(f"Missing package for {suffix} files: {e}")
84
87
  return None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: learnstat
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: An AI-assisted learning companion for statistical analysis with pandas, NumPy, SciPy and Matplotlib.
5
5
  License: MIT
6
6
  Project-URL: Homepage, https://github.com/umorfaruksupto/leanstat
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "learnstat"
7
- version = "0.2.2"
7
+ version = "0.2.3"
8
8
  description = "An AI-assisted learning companion for statistical analysis with pandas, NumPy, SciPy and Matplotlib."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes