JobSelect 0.11.3__tar.gz → 0.11.4__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 (30) hide show
  1. {jobselect-0.11.3 → jobselect-0.11.4}/JobSelect.egg-info/PKG-INFO +1 -1
  2. {jobselect-0.11.3 → jobselect-0.11.4}/PKG-INFO +1 -1
  3. jobselect-0.11.4/cli/api_val.py +53 -0
  4. {jobselect-0.11.3 → jobselect-0.11.4}/cli/model_select.py +1 -1
  5. {jobselect-0.11.3 → jobselect-0.11.4}/pyproject.toml +1 -1
  6. jobselect-0.11.3/cli/api_val.py +0 -33
  7. {jobselect-0.11.3 → jobselect-0.11.4}/JobSelect.egg-info/SOURCES.txt +0 -0
  8. {jobselect-0.11.3 → jobselect-0.11.4}/JobSelect.egg-info/dependency_links.txt +0 -0
  9. {jobselect-0.11.3 → jobselect-0.11.4}/JobSelect.egg-info/entry_points.txt +0 -0
  10. {jobselect-0.11.3 → jobselect-0.11.4}/JobSelect.egg-info/requires.txt +0 -0
  11. {jobselect-0.11.3 → jobselect-0.11.4}/JobSelect.egg-info/top_level.txt +0 -0
  12. {jobselect-0.11.3 → jobselect-0.11.4}/LICENSE +0 -0
  13. {jobselect-0.11.3 → jobselect-0.11.4}/README.md +0 -0
  14. {jobselect-0.11.3 → jobselect-0.11.4}/cli/jobselect.py +0 -0
  15. {jobselect-0.11.3 → jobselect-0.11.4}/cli/utils.py +0 -0
  16. {jobselect-0.11.3 → jobselect-0.11.4}/model/Model.py +0 -0
  17. {jobselect-0.11.3 → jobselect-0.11.4}/model/__init__.py +0 -0
  18. {jobselect-0.11.3 → jobselect-0.11.4}/model/eval.py +0 -0
  19. {jobselect-0.11.3 → jobselect-0.11.4}/model/pred.py +0 -0
  20. {jobselect-0.11.3 → jobselect-0.11.4}/model/prep/__init__.py +0 -0
  21. {jobselect-0.11.3 → jobselect-0.11.4}/model/prep/data_prep.py +0 -0
  22. {jobselect-0.11.3 → jobselect-0.11.4}/model/prep/label_vocab.json +0 -0
  23. {jobselect-0.11.3 → jobselect-0.11.4}/model/prep/prepared_data.npz +0 -0
  24. {jobselect-0.11.3 → jobselect-0.11.4}/model/prep/sym_map.py +0 -0
  25. {jobselect-0.11.3 → jobselect-0.11.4}/model/prep/test.py +0 -0
  26. {jobselect-0.11.3 → jobselect-0.11.4}/model/prep/vectorizer.pkl +0 -0
  27. {jobselect-0.11.3 → jobselect-0.11.4}/model_out/skill_classifier.pt +0 -0
  28. {jobselect-0.11.3 → jobselect-0.11.4}/model_out/training_history.json +0 -0
  29. {jobselect-0.11.3 → jobselect-0.11.4}/setup.cfg +0 -0
  30. {jobselect-0.11.3 → jobselect-0.11.4}/test/test_model.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: JobSelect
3
- Version: 0.11.3
3
+ Version: 0.11.4
4
4
  Summary: A CLI Based AI Skill Classifier for Job Descriptions Build by Akshay Babu
5
5
  Author-email: Akshay Babu <akshaysureshbabu100@gmail.com>
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: JobSelect
3
- Version: 0.11.3
3
+ Version: 0.11.4
4
4
  Summary: A CLI Based AI Skill Classifier for Job Descriptions Build by Akshay Babu
5
5
  Author-email: Akshay Babu <akshaysureshbabu100@gmail.com>
6
6
  License-Expression: MIT
@@ -0,0 +1,53 @@
1
+ """
2
+ api_val.py
3
+ ----------
4
+ Handles the API key prompt. Stores the user-entered key in module-level
5
+ `key` so model_select can read it lazily at inference time.
6
+
7
+ No imports from model_select or api_logic — circular import is gone.
8
+ """
9
+
10
+
11
+ from .utils import clear_console, API_title, query
12
+ from dotenv import load_dotenv
13
+ from pathlib import Path
14
+ import os
15
+
16
+
17
+ key: str = ""
18
+
19
+
20
+ def _load_env() -> None:
21
+ candidates = [
22
+ Path.cwd() / ".env",
23
+ Path.home() / ".jobselect" / ".env",
24
+ Path(__file__).resolve().parent.parent / ".env",
25
+ ]
26
+ for path in candidates:
27
+ if path.exists():
28
+ load_dotenv(dotenv_path=path, override=False)
29
+ return
30
+
31
+
32
+ def val_api() -> str:
33
+ """Prompt user for API key exactly once. Stores result in module-level `key`."""
34
+ clear_console()
35
+ API_title()
36
+ query("Enter API Key (Press Enter to run locally)")
37
+
38
+ global key
39
+ key = input(" >> ").strip()
40
+ return key
41
+
42
+
43
+ def infer_mode() -> str:
44
+ """
45
+ Return 'API' or 'LOCAL'.
46
+ Call after val_api() has run.
47
+ Checks typed key first, then .env fallback.
48
+ """
49
+ if key:
50
+ return "API"
51
+ _load_env()
52
+ env_key = os.getenv("JOBSELECT_API_KEY", "").strip()
53
+ return "API" if env_key else "LOCAL"
@@ -18,7 +18,7 @@ if not _env_path.exists():
18
18
  _env_path = PROJECT_ROOT / ".env"
19
19
  load_dotenv(dotenv_path=_env_path)
20
20
 
21
- API_URL = os.getenv("JOBSELECT_API_URL", "")
21
+ API_URL = os.getenv("JOBSELECT_API_URL", "").rstrip("/")
22
22
  _ENV_KEY = os.getenv("JOBSELECT_API_KEY", "").strip()
23
23
 
24
24
  def _resolve_key() -> str:
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "JobSelect"
3
- version = "0.11.3"
3
+ version = "0.11.4"
4
4
  dependencies = [
5
5
  "rich==15.0.0",
6
6
  "pyfiglet==1.0.4",
@@ -1,33 +0,0 @@
1
- """
2
- api_val.py
3
- ----------
4
- Handles the API key prompt. Stores the user-entered key in module-level
5
- `key` so model_select can read it lazily at inference time.
6
-
7
- No imports from model_select or api_logic — circular import is gone.
8
- """
9
-
10
-
11
- import os
12
-
13
- from .utils import clear_console, API_title, query
14
-
15
-
16
- key: str = ""
17
-
18
-
19
- def val_api() -> str:
20
- clear_console()
21
- API_title()
22
- query("Enter API Key (Press Enter to run locally)")
23
-
24
- global key
25
- key = input(" >> ").strip()
26
- return key
27
-
28
-
29
- def infer_mode() -> str:
30
- if key:
31
- return "API"
32
- env_key = os.getenv("JOBSELECT_API_KEY", "").strip()
33
- return "API" if env_key else "LOCAL"
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