aimsapccoe 0.1.0__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 (31) hide show
  1. aimsapccoe-0.1.0/PKG-INFO +157 -0
  2. aimsapccoe-0.1.0/README.md +138 -0
  3. aimsapccoe-0.1.0/aimsapccoe/__init__.py +41 -0
  4. aimsapccoe-0.1.0/aimsapccoe/cli.py +102 -0
  5. aimsapccoe-0.1.0/aimsapccoe/core/__init__.py +16 -0
  6. aimsapccoe-0.1.0/aimsapccoe/core/scoring.py +64 -0
  7. aimsapccoe-0.1.0/aimsapccoe/core/scraper.py +209 -0
  8. aimsapccoe-0.1.0/aimsapccoe/core/tokenizer.py +626 -0
  9. aimsapccoe-0.1.0/aimsapccoe/secretary/__init__.py +10 -0
  10. aimsapccoe-0.1.0/aimsapccoe/secretary/evaluator.py +210 -0
  11. aimsapccoe-0.1.0/aimsapccoe/student/__init__.py +10 -0
  12. aimsapccoe-0.1.0/aimsapccoe/student/evaluator.py +223 -0
  13. aimsapccoe-0.1.0/aimsapccoe/web/__init__.py +11 -0
  14. aimsapccoe-0.1.0/aimsapccoe/web/app.py +227 -0
  15. aimsapccoe-0.1.0/aimsapccoe/web/static/aimsa.jpeg +0 -0
  16. aimsapccoe-0.1.0/aimsapccoe/web/static/script.js +336 -0
  17. aimsapccoe-0.1.0/aimsapccoe/web/static/style.css +573 -0
  18. aimsapccoe-0.1.0/aimsapccoe/web/templates/index.html +87 -0
  19. aimsapccoe-0.1.0/aimsapccoe/web/templates/secretary.html +214 -0
  20. aimsapccoe-0.1.0/aimsapccoe/web/templates/student.html +213 -0
  21. aimsapccoe-0.1.0/aimsapccoe.egg-info/PKG-INFO +157 -0
  22. aimsapccoe-0.1.0/aimsapccoe.egg-info/SOURCES.txt +29 -0
  23. aimsapccoe-0.1.0/aimsapccoe.egg-info/dependency_links.txt +1 -0
  24. aimsapccoe-0.1.0/aimsapccoe.egg-info/entry_points.txt +2 -0
  25. aimsapccoe-0.1.0/aimsapccoe.egg-info/requires.txt +6 -0
  26. aimsapccoe-0.1.0/aimsapccoe.egg-info/top_level.txt +1 -0
  27. aimsapccoe-0.1.0/pyproject.toml +46 -0
  28. aimsapccoe-0.1.0/setup.cfg +4 -0
  29. aimsapccoe-0.1.0/setup.py +8 -0
  30. aimsapccoe-0.1.0/tests/test_evaluators.py +74 -0
  31. aimsapccoe-0.1.0/tests/test_tokenizer.py +87 -0
@@ -0,0 +1,157 @@
1
+ Metadata-Version: 2.4
2
+ Name: aimsapccoe
3
+ Version: 0.1.0
4
+ Summary: College club recruitment matching using web-scraped GitHub & portfolio data scored via NLP.
5
+ Author-email: aimsapccoe Team <info@aimsapccoe.org>
6
+ Classifier: Programming Language :: Python :: 3
7
+ Classifier: License :: OSI Approved :: MIT License
8
+ Classifier: Operating System :: OS Independent
9
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
10
+ Classifier: Framework :: Flask
11
+ Requires-Python: >=3.9
12
+ Description-Content-Type: text/markdown
13
+ Requires-Dist: morphscrapper
14
+ Requires-Dist: flask
15
+ Requires-Dist: nltk
16
+ Requires-Dist: scikit-learn
17
+ Requires-Dist: textstat
18
+ Requires-Dist: langdetect
19
+
20
+ # aimsapccoe — College Club Recruitment Matcher
21
+
22
+ `aimsapccoe` is a Python package and web application for college club recruitment matching. It automatically evaluates and scores candidate fit against position requirements or club descriptions using web-scraped GitHub and portfolio data.
23
+
24
+ Scoring is processed across **5 weighted NLP levels**:
25
+ 1. **Level 1 — Language & Word Count** (10 pts)
26
+ 2. **Level 2 — Vocabulary Richness** (20 pts)
27
+ 3. **Level 3 — Keyword Match** (30 pts) — *TF-IDF cosine similarity*
28
+ 4. **Level 4 — Readability** (15 pts) — *Flesch Reading Ease*
29
+ 5. **Level 5 — Parts of Speech Analysis** (25 pts) — *Action verb and noun ratios*
30
+
31
+ ---
32
+
33
+ ## 📦 Installation
34
+
35
+ To install the package in editable mode (for development and local running):
36
+
37
+ ```bash
38
+ # From the project root folder:
39
+ pip install -e .
40
+ ```
41
+
42
+ ### 📥 Post-Install NLTK Setup
43
+ `aimsapccoe` automatically attempts to verify and download required NLTK corpus datasets upon first run, but you can download them manually if needed:
44
+
45
+ ```python
46
+ import nltk
47
+ nltk.download('punkt')
48
+ nltk.download('punkt_tab')
49
+ nltk.download('averaged_perceptron_tagger')
50
+ nltk.download('averaged_perceptron_tagger_eng')
51
+ nltk.download('stopwords')
52
+ ```
53
+
54
+ ---
55
+
56
+ ## 🚀 Usage
57
+
58
+ ### 1. Launch the Web UI
59
+ The package includes a modern local dashboard built using a **Neo-Brutalism design system**. Launch the Flask application with:
60
+
61
+ ```bash
62
+ aimsapccoe web
63
+ ```
64
+
65
+ Then visit [http://127.0.0.1:5000](http://127.0.0.1:5000) in your browser.
66
+
67
+ ### 2. Python API Usage
68
+
69
+ #### Secretary Mode (Evaluate Applicants)
70
+ ```python
71
+ from aimsapccoe import SecretaryEvaluator
72
+
73
+ # Define what position requirements the club is looking for
74
+ evaluator = SecretaryEvaluator(
75
+ position_description="Looking for a Python backend developer skilled in Flask and SQL."
76
+ )
77
+
78
+ # Run scoring against the candidate's public URLs
79
+ result = evaluator.evaluate_student(
80
+ github_url="https://github.com/someuser",
81
+ portfolio_url="https://someuser.github.io"
82
+ )
83
+
84
+ print(f"Total Match Score: {result['score']}/100")
85
+ print(f"Recommendation Verdict: {result['recommendation']}")
86
+ # Output: RECRUIT, REVIEW, or IGNORE
87
+ ```
88
+
89
+ #### Student Mode (Evaluate Personal Fit)
90
+ ```python
91
+ from aimsapccoe import StudentEvaluator
92
+
93
+ # Scrapes and caches target club site once upon instantiation
94
+ evaluator = StudentEvaluator(
95
+ club_website_url="https://acm.pccoe.org"
96
+ )
97
+
98
+ # Evaluate fit against your own profile URLs
99
+ result = evaluator.evaluate_fit(
100
+ github_url="https://github.com/myusername",
101
+ portfolio_url="https://myportfolio.dev"
102
+ )
103
+
104
+ print(f"Fit Match Score: {result['score']}/100")
105
+ print(f"Recommendation: {result['recommendation']}")
106
+ # Output: APPLY or SKIP
107
+ ```
108
+
109
+ ---
110
+
111
+ ## 🧪 Running Tests
112
+ Unit tests use mocked API/Scraping requests to run instantly without making live HTTP requests:
113
+
114
+ ```bash
115
+ # Run using unittest
116
+ python -m unittest discover -s tests
117
+ ```
118
+
119
+ ---
120
+
121
+ ## 🚀 Publishing to PyPI
122
+
123
+ To upload this package to PyPI, follow these steps:
124
+
125
+ ### 1. Install Build Tools
126
+ Ensure you have the latest versions of `build` and `twine` installed:
127
+ ```bash
128
+ pip install --upgrade build twine
129
+ ```
130
+
131
+ ### 2. Build the Package
132
+ Generate the source distribution and wheel archives by running the python build frontend from the project root:
133
+ ```bash
134
+ python -m build
135
+ ```
136
+ This will create a `dist/` directory containing the distribution packages (`.tar.gz` and `.whl`).
137
+
138
+ ### 3. Check Distribution Archives
139
+ Validate that your package description will render correctly on PyPI:
140
+ ```bash
141
+ twine check dist/*
142
+ ```
143
+
144
+ ### 4. Upload to TestPyPI (Recommended first step)
145
+ It is highly recommended to upload your package to TestPyPI first to verify everything looks correct:
146
+ ```bash
147
+ twine upload --repository testpypi dist/*
148
+ ```
149
+ *Note: You will need to create an account on [TestPyPI](https://test.pypi.org/) and generate an API Token.*
150
+
151
+ ### 5. Upload to PyPI Production
152
+ Once verified on TestPyPI, upload to the live PyPI index:
153
+ ```bash
154
+ twine upload dist/*
155
+ ```
156
+ *Note: You will need a production [PyPI](https://pypi.org/) account and an API Token to authenticate.*
157
+
@@ -0,0 +1,138 @@
1
+ # aimsapccoe — College Club Recruitment Matcher
2
+
3
+ `aimsapccoe` is a Python package and web application for college club recruitment matching. It automatically evaluates and scores candidate fit against position requirements or club descriptions using web-scraped GitHub and portfolio data.
4
+
5
+ Scoring is processed across **5 weighted NLP levels**:
6
+ 1. **Level 1 — Language & Word Count** (10 pts)
7
+ 2. **Level 2 — Vocabulary Richness** (20 pts)
8
+ 3. **Level 3 — Keyword Match** (30 pts) — *TF-IDF cosine similarity*
9
+ 4. **Level 4 — Readability** (15 pts) — *Flesch Reading Ease*
10
+ 5. **Level 5 — Parts of Speech Analysis** (25 pts) — *Action verb and noun ratios*
11
+
12
+ ---
13
+
14
+ ## 📦 Installation
15
+
16
+ To install the package in editable mode (for development and local running):
17
+
18
+ ```bash
19
+ # From the project root folder:
20
+ pip install -e .
21
+ ```
22
+
23
+ ### 📥 Post-Install NLTK Setup
24
+ `aimsapccoe` automatically attempts to verify and download required NLTK corpus datasets upon first run, but you can download them manually if needed:
25
+
26
+ ```python
27
+ import nltk
28
+ nltk.download('punkt')
29
+ nltk.download('punkt_tab')
30
+ nltk.download('averaged_perceptron_tagger')
31
+ nltk.download('averaged_perceptron_tagger_eng')
32
+ nltk.download('stopwords')
33
+ ```
34
+
35
+ ---
36
+
37
+ ## 🚀 Usage
38
+
39
+ ### 1. Launch the Web UI
40
+ The package includes a modern local dashboard built using a **Neo-Brutalism design system**. Launch the Flask application with:
41
+
42
+ ```bash
43
+ aimsapccoe web
44
+ ```
45
+
46
+ Then visit [http://127.0.0.1:5000](http://127.0.0.1:5000) in your browser.
47
+
48
+ ### 2. Python API Usage
49
+
50
+ #### Secretary Mode (Evaluate Applicants)
51
+ ```python
52
+ from aimsapccoe import SecretaryEvaluator
53
+
54
+ # Define what position requirements the club is looking for
55
+ evaluator = SecretaryEvaluator(
56
+ position_description="Looking for a Python backend developer skilled in Flask and SQL."
57
+ )
58
+
59
+ # Run scoring against the candidate's public URLs
60
+ result = evaluator.evaluate_student(
61
+ github_url="https://github.com/someuser",
62
+ portfolio_url="https://someuser.github.io"
63
+ )
64
+
65
+ print(f"Total Match Score: {result['score']}/100")
66
+ print(f"Recommendation Verdict: {result['recommendation']}")
67
+ # Output: RECRUIT, REVIEW, or IGNORE
68
+ ```
69
+
70
+ #### Student Mode (Evaluate Personal Fit)
71
+ ```python
72
+ from aimsapccoe import StudentEvaluator
73
+
74
+ # Scrapes and caches target club site once upon instantiation
75
+ evaluator = StudentEvaluator(
76
+ club_website_url="https://acm.pccoe.org"
77
+ )
78
+
79
+ # Evaluate fit against your own profile URLs
80
+ result = evaluator.evaluate_fit(
81
+ github_url="https://github.com/myusername",
82
+ portfolio_url="https://myportfolio.dev"
83
+ )
84
+
85
+ print(f"Fit Match Score: {result['score']}/100")
86
+ print(f"Recommendation: {result['recommendation']}")
87
+ # Output: APPLY or SKIP
88
+ ```
89
+
90
+ ---
91
+
92
+ ## 🧪 Running Tests
93
+ Unit tests use mocked API/Scraping requests to run instantly without making live HTTP requests:
94
+
95
+ ```bash
96
+ # Run using unittest
97
+ python -m unittest discover -s tests
98
+ ```
99
+
100
+ ---
101
+
102
+ ## 🚀 Publishing to PyPI
103
+
104
+ To upload this package to PyPI, follow these steps:
105
+
106
+ ### 1. Install Build Tools
107
+ Ensure you have the latest versions of `build` and `twine` installed:
108
+ ```bash
109
+ pip install --upgrade build twine
110
+ ```
111
+
112
+ ### 2. Build the Package
113
+ Generate the source distribution and wheel archives by running the python build frontend from the project root:
114
+ ```bash
115
+ python -m build
116
+ ```
117
+ This will create a `dist/` directory containing the distribution packages (`.tar.gz` and `.whl`).
118
+
119
+ ### 3. Check Distribution Archives
120
+ Validate that your package description will render correctly on PyPI:
121
+ ```bash
122
+ twine check dist/*
123
+ ```
124
+
125
+ ### 4. Upload to TestPyPI (Recommended first step)
126
+ It is highly recommended to upload your package to TestPyPI first to verify everything looks correct:
127
+ ```bash
128
+ twine upload --repository testpypi dist/*
129
+ ```
130
+ *Note: You will need to create an account on [TestPyPI](https://test.pypi.org/) and generate an API Token.*
131
+
132
+ ### 5. Upload to PyPI Production
133
+ Once verified on TestPyPI, upload to the live PyPI index:
134
+ ```bash
135
+ twine upload dist/*
136
+ ```
137
+ *Note: You will need a production [PyPI](https://pypi.org/) account and an API Token to authenticate.*
138
+
@@ -0,0 +1,41 @@
1
+ """
2
+ aimsapccoe — College Club Recruitment Matching Package
3
+ =======================================================
4
+ A Python package for matching students to college clubs (or evaluating
5
+ students for club positions) using web-scraped GitHub and portfolio data,
6
+ tokenized and scored across 5 weighted NLP levels.
7
+
8
+ Modules:
9
+ core — shared scraping, tokenization, and scoring logic
10
+ secretary — evaluate students for a specific position/club role
11
+ student — evaluate student fit for a club based on its website
12
+ web — Flask-based dashboard (Neo-Brutalism UI)
13
+ cli — command-line entry points
14
+
15
+ Usage (Python API):
16
+ from aimsapccoe.secretary import SecretaryEvaluator
17
+ ev = SecretaryEvaluator(position_description="We need a passionate coder...")
18
+ result = ev.evaluate_student(
19
+ github_url="https://github.com/someuser",
20
+ portfolio_url="https://someuser.dev"
21
+ )
22
+ print(result) # {"score": 75, "breakdown": {...}, "recommendation": "RECRUIT"}
23
+
24
+ Usage (Web UI):
25
+ $ aimsapccoe web # launches http://127.0.0.1:5000
26
+ """
27
+
28
+ __version__ = "0.1.0"
29
+ __author__ = "aimsapccoe"
30
+ __description__ = "College club recruitment matching via NLP scoring"
31
+
32
+ # Expose top-level convenience imports so users can do:
33
+ # from aimsapccoe import SecretaryEvaluator, StudentEvaluator
34
+ from aimsapccoe.secretary.evaluator import SecretaryEvaluator
35
+ from aimsapccoe.student.evaluator import StudentEvaluator
36
+
37
+ __all__ = [
38
+ "SecretaryEvaluator",
39
+ "StudentEvaluator",
40
+ "__version__",
41
+ ]
@@ -0,0 +1,102 @@
1
+ """
2
+ cli.py — Command-line entry point for aimsapccoe
3
+ =================================================
4
+ Purpose:
5
+ Provides the `aimsapccoe` command-line interface. Currently supports:
6
+
7
+ aimsapccoe web — launch the web dashboard on localhost:5000
8
+
9
+ Future commands could include:
10
+ aimsapccoe score — score from command line arguments
11
+ aimsapccoe batch — score a CSV of applicants
12
+
13
+ Usage:
14
+ $ aimsapccoe web
15
+ $ aimsapccoe web --port 8080
16
+ $ aimsapccoe web --host 0.0.0.0
17
+ """
18
+
19
+ import argparse
20
+ import sys
21
+
22
+
23
+ def _cmd_web(args):
24
+ """
25
+ Launch the aimsapccoe web dashboard.
26
+
27
+ Args:
28
+ args: Parsed argparse namespace with .host and .port attributes.
29
+ """
30
+ # Import Flask app here (not at module level) so `aimsapccoe` CLI commands
31
+ # that don't use the web UI don't pay the Flask import cost.
32
+ from aimsapccoe.web.app import create_app
33
+
34
+ app = create_app()
35
+ print(f"\n🚀 aimsapccoe web dashboard starting...")
36
+ print(f" URL: http://{args.host}:{args.port}")
37
+ print(f" Press Ctrl+C to stop.\n")
38
+
39
+ app.run(host=args.host, port=args.port, debug=args.debug)
40
+
41
+
42
+ def main():
43
+ """
44
+ Main entry point for the `aimsapccoe` CLI command.
45
+
46
+ Parses arguments and dispatches to the appropriate sub-command handler.
47
+ Registered in pyproject.toml under [project.scripts].
48
+ """
49
+ parser = argparse.ArgumentParser(
50
+ prog="aimsapccoe",
51
+ description="aimsapccoe — College Club Recruitment Matching via NLP",
52
+ formatter_class=argparse.RawDescriptionHelpFormatter,
53
+ epilog=(
54
+ "Examples:\n"
55
+ " aimsapccoe web # launch on http://127.0.0.1:5000\n"
56
+ " aimsapccoe web --port 8080 # use a different port\n"
57
+ " aimsapccoe web --host 0.0.0.0 # expose on all interfaces\n"
58
+ ),
59
+ )
60
+
61
+ subparsers = parser.add_subparsers(dest="command", metavar="<command>")
62
+ subparsers.required = True
63
+
64
+ # ── `aimsapccoe web` sub-command ──────────────────────────────────────────
65
+ web_parser = subparsers.add_parser(
66
+ "web",
67
+ help="Launch the aimsapccoe web dashboard (Neo-Brutalism UI)",
68
+ description=(
69
+ "Start the local Flask web server. Open http://127.0.0.1:5000 in "
70
+ "your browser to use the dashboard."
71
+ ),
72
+ )
73
+ web_parser.add_argument(
74
+ "--host",
75
+ default="127.0.0.1",
76
+ help="Host to bind the server to. Default: 127.0.0.1",
77
+ )
78
+ web_parser.add_argument(
79
+ "--port",
80
+ type=int,
81
+ default=5000,
82
+ help="Port to run the server on. Default: 5000",
83
+ )
84
+ web_parser.add_argument(
85
+ "--debug",
86
+ action="store_true",
87
+ default=False,
88
+ help="Enable Flask debug mode (auto-reloads on code changes).",
89
+ )
90
+ web_parser.set_defaults(func=_cmd_web)
91
+
92
+ # Parse and dispatch
93
+ args = parser.parse_args()
94
+ try:
95
+ args.func(args)
96
+ except KeyboardInterrupt:
97
+ print("\n\nStopped.")
98
+ sys.exit(0)
99
+
100
+
101
+ if __name__ == "__main__":
102
+ main()
@@ -0,0 +1,16 @@
1
+ """
2
+ core/__init__.py — Core module for aimsapccoe
3
+ =============================================
4
+ Exposes the main shared utilities: scraper wrappers, the tokenization
5
+ engine, and the scoring function. Both the secretary and student modules
6
+ depend on this core.
7
+ """
8
+
9
+ from aimsapccoe.core.scraper import scrape_profile, scrape_github_repos
10
+ from aimsapccoe.core.scoring import calculate_score
11
+
12
+ __all__ = [
13
+ "scrape_profile",
14
+ "scrape_github_repos",
15
+ "calculate_score",
16
+ ]
@@ -0,0 +1,64 @@
1
+ """
2
+ core/scoring.py — Top-level scoring function for aimsapccoe
3
+ ============================================================
4
+ Purpose:
5
+ Provides the single public function `calculate_score()` that acts as the
6
+ entry point for the entire NLP scoring pipeline. It wires together the
7
+ TokenizerEngine and returns a clean, standardised result dict.
8
+
9
+ Both the secretary and student evaluators call this function — they never
10
+ use TokenizerEngine directly. This keeps the interface simple and makes
11
+ it easy to swap the scoring engine in the future.
12
+ """
13
+
14
+ from typing import Optional
15
+
16
+ from aimsapccoe.core.tokenizer import TokenizerEngine
17
+
18
+
19
+ def calculate_score(
20
+ candidate_text: str,
21
+ reference_text: str,
22
+ language_override: Optional[str] = None,
23
+ ) -> dict:
24
+ """
25
+ Score a candidate against a reference description.
26
+
27
+ Purpose:
28
+ Run the full 5-level NLP pipeline and return a structured result
29
+ suitable for use in the secretary/student evaluators and the web UI.
30
+
31
+ Args:
32
+ candidate_text (str): Combined text scraped from the candidate's GitHub
33
+ profile, repositories, and/or portfolio website.
34
+ reference_text (str): The reference text to compare against. For the
35
+ secretary module this is a position description; for the student
36
+ module this is the club's scraped website text.
37
+ language_override (str | None): Optional ISO language code (e.g. "en")
38
+ to skip auto-detection. Pass None (default) to auto-detect.
39
+
40
+ Returns:
41
+ dict: {
42
+ "total": int, # Final score 0–100
43
+ "breakdown": { # Per-level detail for UI display
44
+ "level1": { "score": int, "max": 10, "label": str, ... },
45
+ "level2": { "score": int, "max": 20, ... },
46
+ "level3": { "score": int, "max": 30, ... },
47
+ "level4": { "score": int, "max": 15, ... },
48
+ "level5": { "score": int, "max": 25, ... },
49
+ }
50
+ }
51
+
52
+ Example:
53
+ result = calculate_score(
54
+ candidate_text="Alice built a React dashboard for her college club...",
55
+ reference_text="We are looking for a front-end developer who knows React..."
56
+ )
57
+ print(result["total"]) # e.g. 68
58
+ print(result["breakdown"]["level3"]["similarity"]) # e.g. 0.423
59
+ """
60
+ engine = TokenizerEngine(language_override=language_override)
61
+ return engine.score(
62
+ candidate_text=candidate_text,
63
+ reference_text=reference_text,
64
+ )