pubnetwork 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.
- pubnetwork-0.1.0/.gitignore +38 -0
- pubnetwork-0.1.0/CHANGELOG.md +8 -0
- pubnetwork-0.1.0/LICENSE +139 -0
- pubnetwork-0.1.0/PKG-INFO +144 -0
- pubnetwork-0.1.0/README.md +115 -0
- pubnetwork-0.1.0/pyproject.toml +47 -0
- pubnetwork-0.1.0/src/pubnet/__init__.py +3 -0
- pubnetwork-0.1.0/src/pubnet/analyze.py +391 -0
- pubnetwork-0.1.0/src/pubnet/cli.py +255 -0
- pubnetwork-0.1.0/src/pubnet/crossref.py +180 -0
- pubnetwork-0.1.0/src/pubnet/data/demo.json +457 -0
- pubnetwork-0.1.0/src/pubnet/data/scimago.csv +4653 -0
- pubnetwork-0.1.0/src/pubnet/fetch.py +277 -0
- pubnetwork-0.1.0/src/pubnet/formatters.py +253 -0
- pubnetwork-0.1.0/src/pubnet/gui/__init__.py +1 -0
- pubnetwork-0.1.0/src/pubnet/gui/app.py +50 -0
- pubnetwork-0.1.0/src/pubnet/gui/assets/style.css +331 -0
- pubnetwork-0.1.0/src/pubnet/gui/assets/toggle_refs.js +19 -0
- pubnetwork-0.1.0/src/pubnet/gui/callbacks.py +478 -0
- pubnetwork-0.1.0/src/pubnet/gui/components/__init__.py +1 -0
- pubnetwork-0.1.0/src/pubnet/gui/components/clusters.py +87 -0
- pubnetwork-0.1.0/src/pubnet/gui/components/network.py +145 -0
- pubnetwork-0.1.0/src/pubnet/gui/components/pub_table.py +164 -0
- pubnetwork-0.1.0/src/pubnet/gui/components/pubs_per_year.py +61 -0
- pubnetwork-0.1.0/src/pubnet/gui/components/stat_cards.py +46 -0
- pubnetwork-0.1.0/src/pubnet/gui/components/trends.py +82 -0
- pubnetwork-0.1.0/src/pubnet/gui/layouts.py +511 -0
- pubnetwork-0.1.0/src/pubnet/journal_if.py +232 -0
- pubnetwork-0.1.0/src/pubnet/models.py +137 -0
- pubnetwork-0.1.0/src/pubnet/report.py +388 -0
- pubnetwork-0.1.0/src/pubnet/templates/report.html +730 -0
- pubnetwork-0.1.0/tests/__init__.py +0 -0
- pubnetwork-0.1.0/tests/conftest.py +93 -0
- pubnetwork-0.1.0/tests/test_analyze.py +153 -0
- pubnetwork-0.1.0/tests/test_callbacks.py +262 -0
- pubnetwork-0.1.0/tests/test_cli.py +168 -0
- pubnetwork-0.1.0/tests/test_fetch.py +85 -0
- pubnetwork-0.1.0/tests/test_formatters.py +92 -0
- pubnetwork-0.1.0/tests/test_gui.py +165 -0
- pubnetwork-0.1.0/tests/test_journal_if.py +83 -0
- pubnetwork-0.1.0/tests/test_models.py +241 -0
- pubnetwork-0.1.0/tests/test_report.py +96 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
dist/
|
|
6
|
+
build/
|
|
7
|
+
*.egg
|
|
8
|
+
.eggs/
|
|
9
|
+
|
|
10
|
+
# Virtual environments
|
|
11
|
+
.venv/
|
|
12
|
+
venv/
|
|
13
|
+
env/
|
|
14
|
+
|
|
15
|
+
# IDE
|
|
16
|
+
.vscode/
|
|
17
|
+
.idea/
|
|
18
|
+
*.swp
|
|
19
|
+
*.swo
|
|
20
|
+
|
|
21
|
+
# Testing
|
|
22
|
+
.pytest_cache/
|
|
23
|
+
htmlcov/
|
|
24
|
+
.coverage
|
|
25
|
+
coverage.xml
|
|
26
|
+
|
|
27
|
+
# OS
|
|
28
|
+
.DS_Store
|
|
29
|
+
Thumbs.db
|
|
30
|
+
|
|
31
|
+
# PubNet cache
|
|
32
|
+
.pubnet/
|
|
33
|
+
|
|
34
|
+
# Generated reports
|
|
35
|
+
*_pubnet.html
|
|
36
|
+
|
|
37
|
+
# Jupyter
|
|
38
|
+
.ipynb_checkpoints/
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# CHANGELOG.md — PubNet
|
|
2
|
+
|
|
3
|
+
Significant changes, grouped by date. Not every commit, just things
|
|
4
|
+
worth knowing about when picking up the project after a break.
|
|
5
|
+
|
|
6
|
+
## 2026-05-14
|
|
7
|
+
|
|
8
|
+
- **Project created** — pyproject.toml with hatchling, 13 dependencies, `pubnet` CLI entry poin
|
pubnetwork-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# PolyForm Noncommercial License 1.0.0
|
|
2
|
+
|
|
3
|
+
<https://polyformproject.org/licenses/noncommercial/1.0.0>
|
|
4
|
+
|
|
5
|
+
## License
|
|
6
|
+
|
|
7
|
+
This project is licensed under the PolyForm Noncommercial 1.0.0 license.
|
|
8
|
+
|
|
9
|
+
Free for academic, educational, and non-commercial research use.
|
|
10
|
+
|
|
11
|
+
Commercial use requires a separate license.
|
|
12
|
+
|
|
13
|
+
## Acceptance
|
|
14
|
+
|
|
15
|
+
In order to get any license under these terms, you must agree
|
|
16
|
+
to them as both strict obligations and conditions to all
|
|
17
|
+
your licenses.
|
|
18
|
+
|
|
19
|
+
## Copyright License
|
|
20
|
+
|
|
21
|
+
The licensor grants you a copyright license for the
|
|
22
|
+
software to do everything you might do with the software
|
|
23
|
+
that would otherwise infringe the licensor's copyright
|
|
24
|
+
in it for any permitted purpose. However, you may
|
|
25
|
+
only distribute the software according to [Distribution
|
|
26
|
+
License](#distribution-license) and make changes or new works
|
|
27
|
+
based on the software according to [Changes and New Works
|
|
28
|
+
License](#changes-and-new-works-license).
|
|
29
|
+
|
|
30
|
+
## Distribution License
|
|
31
|
+
|
|
32
|
+
The licensor grants you an additional copyright license
|
|
33
|
+
to distribute copies of the software. Your license
|
|
34
|
+
to distribute covers distributing the software with
|
|
35
|
+
changes and new works permitted by [Changes and New Works
|
|
36
|
+
License](#changes-and-new-works-license).
|
|
37
|
+
|
|
38
|
+
## Notices
|
|
39
|
+
|
|
40
|
+
You must ensure that anyone who gets a copy of any part of
|
|
41
|
+
the software from you also gets a copy of these terms or the
|
|
42
|
+
URL for them above, as well as copies of any plain-text lines
|
|
43
|
+
beginning with `Required Notice:` that the licensor provided
|
|
44
|
+
with the software. For example:
|
|
45
|
+
|
|
46
|
+
> Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
|
|
47
|
+
|
|
48
|
+
## Changes and New Works License
|
|
49
|
+
|
|
50
|
+
The licensor grants you an additional copyright license to
|
|
51
|
+
make changes and new works based on the software for any
|
|
52
|
+
permitted purpose.
|
|
53
|
+
|
|
54
|
+
## Patent License
|
|
55
|
+
|
|
56
|
+
The licensor grants you a patent license for the software that
|
|
57
|
+
covers patent claims the licensor can license, or becomes able
|
|
58
|
+
to license, that you would infringe by using the software.
|
|
59
|
+
|
|
60
|
+
## Noncommercial Purposes
|
|
61
|
+
|
|
62
|
+
Any noncommercial purpose is a permitted purpose.
|
|
63
|
+
|
|
64
|
+
## Personal Uses
|
|
65
|
+
|
|
66
|
+
Personal use for research, experiment, and testing for
|
|
67
|
+
the benefit of public knowledge, personal study, private
|
|
68
|
+
entertainment, hobby projects, amateur pursuits, or religious
|
|
69
|
+
observance, without any anticipated commercial application,
|
|
70
|
+
is use for a permitted purpose.
|
|
71
|
+
|
|
72
|
+
## Noncommercial Organizations
|
|
73
|
+
|
|
74
|
+
Use by any charitable organization, educational institution,
|
|
75
|
+
public research organization, public safety or health
|
|
76
|
+
organization, environmental protection organization,
|
|
77
|
+
or government institution is use for a permitted purpose
|
|
78
|
+
regardless of the source of funding or obligations resulting
|
|
79
|
+
from the funding.
|
|
80
|
+
|
|
81
|
+
## Fair Use
|
|
82
|
+
|
|
83
|
+
You may have "fair use" rights for the software under the
|
|
84
|
+
law. These terms do not limit them.
|
|
85
|
+
|
|
86
|
+
## No Other Rights
|
|
87
|
+
|
|
88
|
+
These terms do not allow you to sublicense or transfer any of
|
|
89
|
+
your licenses to anyone else, or prevent the licensor from
|
|
90
|
+
granting licenses to anyone else. These terms do not imply
|
|
91
|
+
any other licenses.
|
|
92
|
+
|
|
93
|
+
## Patent Defense
|
|
94
|
+
|
|
95
|
+
If you make any written claim that the software infringes or
|
|
96
|
+
contributes to infringement of any patent, your patent license
|
|
97
|
+
for the software granted under these terms ends immediately. If
|
|
98
|
+
your company makes such a claim, your patent license ends
|
|
99
|
+
immediately for work on behalf of your company.
|
|
100
|
+
|
|
101
|
+
## Violations
|
|
102
|
+
|
|
103
|
+
The first time you are notified in writing that you have
|
|
104
|
+
violated any of these terms, or done anything with the software
|
|
105
|
+
not covered by your licenses, your licenses can nonetheless
|
|
106
|
+
continue if you come into full compliance with these terms,
|
|
107
|
+
and take practical steps to correct past violations, within
|
|
108
|
+
32 days of receiving notice. Otherwise, all your licenses
|
|
109
|
+
end immediately.
|
|
110
|
+
|
|
111
|
+
## No Liability
|
|
112
|
+
|
|
113
|
+
***As far as the law allows, the software comes as is, without
|
|
114
|
+
any warranty or condition, and the licensor will not be liable
|
|
115
|
+
to you for any damages arising out of these terms or the use
|
|
116
|
+
or nature of the software, under any kind of legal claim.***
|
|
117
|
+
|
|
118
|
+
## Definitions
|
|
119
|
+
|
|
120
|
+
The **licensor** is the individual or entity offering these
|
|
121
|
+
terms, and the **software** is the software the licensor makes
|
|
122
|
+
available under these terms.
|
|
123
|
+
|
|
124
|
+
**You** refers to the individual or entity agreeing to these
|
|
125
|
+
terms.
|
|
126
|
+
|
|
127
|
+
**Your company** is any legal entity, sole proprietorship,
|
|
128
|
+
or other kind of organization that you work for, plus all
|
|
129
|
+
organizations that have control over, are under the control of,
|
|
130
|
+
or are under common control with that organization. **Control**
|
|
131
|
+
means ownership of substantially all the assets of an entity,
|
|
132
|
+
or the power to direct its management and policies by vote,
|
|
133
|
+
contract, or otherwise. Control can be direct or indirect.
|
|
134
|
+
|
|
135
|
+
**Your licenses** are all the licenses granted to you for the
|
|
136
|
+
software under these terms.
|
|
137
|
+
|
|
138
|
+
**Use** means anything you do with the software requiring one
|
|
139
|
+
of your licenses.
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pubnetwork
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Publication network analyser — co-author graphs, citation trends, topic clusters from Google Scholar
|
|
5
|
+
Author-email: Sanjiv Kumar <drsanjivk@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Python: >=3.10
|
|
9
|
+
Requires-Dist: click>=8.0
|
|
10
|
+
Requires-Dist: dash-bootstrap-components>=1.5
|
|
11
|
+
Requires-Dist: dash-cytoscape>=1.0
|
|
12
|
+
Requires-Dist: dash>=2.14
|
|
13
|
+
Requires-Dist: jinja2>=3.0
|
|
14
|
+
Requires-Dist: networkx>=3.0
|
|
15
|
+
Requires-Dist: plotly>=5.0
|
|
16
|
+
Requires-Dist: pydantic>=2.0
|
|
17
|
+
Requires-Dist: pyvis>=0.3
|
|
18
|
+
Requires-Dist: rapidfuzz>=3.0
|
|
19
|
+
Requires-Dist: requests>=2.28
|
|
20
|
+
Requires-Dist: scholarly>=1.7
|
|
21
|
+
Requires-Dist: scikit-learn>=1.3
|
|
22
|
+
Provides-Extra: dev
|
|
23
|
+
Requires-Dist: pytest-cov; extra == 'dev'
|
|
24
|
+
Requires-Dist: pytest>=7.0; extra == 'dev'
|
|
25
|
+
Requires-Dist: ruff; extra == 'dev'
|
|
26
|
+
Provides-Extra: serpapi
|
|
27
|
+
Requires-Dist: google-search-results>=2.4; extra == 'serpapi'
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
|
|
30
|
+
# PubNet
|
|
31
|
+
|
|
32
|
+
Publication network analyser for researchers. Given a Google Scholar profile, PubNet fetches your publications and generates interactive visualisations: co-author networks, citation trends, topic clusters, journal impact factors, and formatted references.
|
|
33
|
+
|
|
34
|
+
## Features
|
|
35
|
+
|
|
36
|
+
- **Co-author network graph** - interactive force-directed graph showing collaboration patterns
|
|
37
|
+
- **Citation trends** - yearly citation counts with rolling h-index overlay
|
|
38
|
+
- **Publications per year** - output volume over time
|
|
39
|
+
- **Topic clusters** - TF-IDF + k-means clustering of research themes
|
|
40
|
+
- **Journal impact factors** - Scimago CSV lookup with OpenAlex API fallback
|
|
41
|
+
- **Crossref enrichment** - corrects venue names and adds DOIs via free Crossref API
|
|
42
|
+
- **Reference formatting** - APA, MLA, BibTeX, Vancouver, Chicago with copy-to-clipboard
|
|
43
|
+
- **Two interfaces** - CLI (self-contained HTML report) and Dash GUI (live interactive exploration)
|
|
44
|
+
|
|
45
|
+
## Install
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pip install pubnetwork
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Or for development:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
git clone https://github.com/sanjiv856/pubnet.git
|
|
55
|
+
cd pubnet
|
|
56
|
+
pip install -e .
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Requires Python 3.10+.
|
|
60
|
+
|
|
61
|
+
## Quick start
|
|
62
|
+
|
|
63
|
+
### Demo (bundled profile)
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
pubnet demo
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Generates `sanjiv_kumar_pubnet.html` using the bundled Scholar profile.
|
|
70
|
+
|
|
71
|
+
### Analyse a Scholar profile
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
pubnet analyze --scholar-url "https://scholar.google.com/citations?user=ML7X29AAAAAJ"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Or by author ID:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
pubnet analyze --author-id ML7X29AAAAAJ
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Interactive GUI
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
pubnet gui
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Opens a Dash web app at `http://localhost:8050` with sidebar navigation, filters, and interactive charts.
|
|
90
|
+
|
|
91
|
+
## CLI options
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
pubnet analyze [OPTIONS]
|
|
95
|
+
|
|
96
|
+
--scholar-url TEXT Google Scholar profile URL
|
|
97
|
+
--author-id TEXT Google Scholar author ID
|
|
98
|
+
--builtin Use bundled demo profile
|
|
99
|
+
--format [apa|mla|bibtex|vancouver|chicago]
|
|
100
|
+
Reference format (default: apa)
|
|
101
|
+
--topics INTEGER Number of topic clusters (default: 5)
|
|
102
|
+
-o, --output PATH Output HTML file path
|
|
103
|
+
--no-cache Force fresh Scholar fetch
|
|
104
|
+
--crossref / --no-crossref Crossref venue correction (default: enabled)
|
|
105
|
+
-v, --verbose Debug logging
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Architecture
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
Fetch (scholarly) -> Clean/Dedup (rapidfuzz) -> Crossref Enrich -> Analyse -> Render
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Core library with pure-function analysis modules shared by both CLI and GUI:
|
|
115
|
+
|
|
116
|
+
| Module | Purpose |
|
|
117
|
+
|--------|---------|
|
|
118
|
+
| `fetch.py` | Scholar fetcher with JSON cache |
|
|
119
|
+
| `analyze.py` | Co-author graph, citation trends, topic clusters, stats |
|
|
120
|
+
| `formatters.py` | APA/MLA/BibTeX/Vancouver/Chicago references |
|
|
121
|
+
| `journal_if.py` | Scimago CSV + OpenAlex API impact factors |
|
|
122
|
+
| `crossref.py` | Free Crossref API for venue correction |
|
|
123
|
+
| `report.py` | Jinja2 HTML report renderer |
|
|
124
|
+
| `gui/` | Dash interactive app |
|
|
125
|
+
|
|
126
|
+
## Cache management
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
pubnet cache list # Show cached profiles
|
|
130
|
+
pubnet cache clear # Remove all cached data
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Profiles are cached to `~/.pubnet/cache/` to avoid repeated Scholar fetches.
|
|
134
|
+
|
|
135
|
+
## Tech stack
|
|
136
|
+
|
|
137
|
+
Python 3.10+ with scholarly, pydantic, networkx, dash, dash-cytoscape, plotly, scikit-learn, click, jinja2, rapidfuzz.
|
|
138
|
+
|
|
139
|
+
## Tests
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
pip install -e .
|
|
143
|
+
pytest tests/
|
|
144
|
+
```
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# PubNet
|
|
2
|
+
|
|
3
|
+
Publication network analyser for researchers. Given a Google Scholar profile, PubNet fetches your publications and generates interactive visualisations: co-author networks, citation trends, topic clusters, journal impact factors, and formatted references.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Co-author network graph** - interactive force-directed graph showing collaboration patterns
|
|
8
|
+
- **Citation trends** - yearly citation counts with rolling h-index overlay
|
|
9
|
+
- **Publications per year** - output volume over time
|
|
10
|
+
- **Topic clusters** - TF-IDF + k-means clustering of research themes
|
|
11
|
+
- **Journal impact factors** - Scimago CSV lookup with OpenAlex API fallback
|
|
12
|
+
- **Crossref enrichment** - corrects venue names and adds DOIs via free Crossref API
|
|
13
|
+
- **Reference formatting** - APA, MLA, BibTeX, Vancouver, Chicago with copy-to-clipboard
|
|
14
|
+
- **Two interfaces** - CLI (self-contained HTML report) and Dash GUI (live interactive exploration)
|
|
15
|
+
|
|
16
|
+
## Install
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pip install pubnetwork
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Or for development:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
git clone https://github.com/sanjiv856/pubnet.git
|
|
26
|
+
cd pubnet
|
|
27
|
+
pip install -e .
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Requires Python 3.10+.
|
|
31
|
+
|
|
32
|
+
## Quick start
|
|
33
|
+
|
|
34
|
+
### Demo (bundled profile)
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
pubnet demo
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Generates `sanjiv_kumar_pubnet.html` using the bundled Scholar profile.
|
|
41
|
+
|
|
42
|
+
### Analyse a Scholar profile
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pubnet analyze --scholar-url "https://scholar.google.com/citations?user=ML7X29AAAAAJ"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Or by author ID:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
pubnet analyze --author-id ML7X29AAAAAJ
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Interactive GUI
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pubnet gui
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Opens a Dash web app at `http://localhost:8050` with sidebar navigation, filters, and interactive charts.
|
|
61
|
+
|
|
62
|
+
## CLI options
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
pubnet analyze [OPTIONS]
|
|
66
|
+
|
|
67
|
+
--scholar-url TEXT Google Scholar profile URL
|
|
68
|
+
--author-id TEXT Google Scholar author ID
|
|
69
|
+
--builtin Use bundled demo profile
|
|
70
|
+
--format [apa|mla|bibtex|vancouver|chicago]
|
|
71
|
+
Reference format (default: apa)
|
|
72
|
+
--topics INTEGER Number of topic clusters (default: 5)
|
|
73
|
+
-o, --output PATH Output HTML file path
|
|
74
|
+
--no-cache Force fresh Scholar fetch
|
|
75
|
+
--crossref / --no-crossref Crossref venue correction (default: enabled)
|
|
76
|
+
-v, --verbose Debug logging
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Architecture
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
Fetch (scholarly) -> Clean/Dedup (rapidfuzz) -> Crossref Enrich -> Analyse -> Render
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Core library with pure-function analysis modules shared by both CLI and GUI:
|
|
86
|
+
|
|
87
|
+
| Module | Purpose |
|
|
88
|
+
|--------|---------|
|
|
89
|
+
| `fetch.py` | Scholar fetcher with JSON cache |
|
|
90
|
+
| `analyze.py` | Co-author graph, citation trends, topic clusters, stats |
|
|
91
|
+
| `formatters.py` | APA/MLA/BibTeX/Vancouver/Chicago references |
|
|
92
|
+
| `journal_if.py` | Scimago CSV + OpenAlex API impact factors |
|
|
93
|
+
| `crossref.py` | Free Crossref API for venue correction |
|
|
94
|
+
| `report.py` | Jinja2 HTML report renderer |
|
|
95
|
+
| `gui/` | Dash interactive app |
|
|
96
|
+
|
|
97
|
+
## Cache management
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
pubnet cache list # Show cached profiles
|
|
101
|
+
pubnet cache clear # Remove all cached data
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Profiles are cached to `~/.pubnet/cache/` to avoid repeated Scholar fetches.
|
|
105
|
+
|
|
106
|
+
## Tech stack
|
|
107
|
+
|
|
108
|
+
Python 3.10+ with scholarly, pydantic, networkx, dash, dash-cytoscape, plotly, scikit-learn, click, jinja2, rapidfuzz.
|
|
109
|
+
|
|
110
|
+
## Tests
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
pip install -e .
|
|
114
|
+
pytest tests/
|
|
115
|
+
```
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "pubnetwork"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Publication network analyser — co-author graphs, citation trends, topic clusters from Google Scholar"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "Sanjiv Kumar", email = "drsanjivk@gmail.com" },
|
|
14
|
+
]
|
|
15
|
+
dependencies = [
|
|
16
|
+
"scholarly>=1.7",
|
|
17
|
+
"pydantic>=2.0",
|
|
18
|
+
"rapidfuzz>=3.0",
|
|
19
|
+
"networkx>=3.0",
|
|
20
|
+
"pyvis>=0.3",
|
|
21
|
+
"plotly>=5.0",
|
|
22
|
+
"scikit-learn>=1.3",
|
|
23
|
+
"click>=8.0",
|
|
24
|
+
"jinja2>=3.0",
|
|
25
|
+
"dash>=2.14",
|
|
26
|
+
"dash-bootstrap-components>=1.5",
|
|
27
|
+
"dash-cytoscape>=1.0",
|
|
28
|
+
"requests>=2.28",
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
[project.optional-dependencies]
|
|
32
|
+
serpapi = ["google-search-results>=2.4"]
|
|
33
|
+
dev = ["pytest>=7.0", "pytest-cov", "ruff"]
|
|
34
|
+
|
|
35
|
+
[project.scripts]
|
|
36
|
+
pubnet = "pubnet.cli:main"
|
|
37
|
+
|
|
38
|
+
[tool.hatch.build.targets.wheel]
|
|
39
|
+
packages = ["src/pubnet"]
|
|
40
|
+
|
|
41
|
+
[tool.pytest.ini_options]
|
|
42
|
+
testpaths = ["tests"]
|
|
43
|
+
pythonpath = ["src"]
|
|
44
|
+
|
|
45
|
+
[tool.ruff]
|
|
46
|
+
target-version = "py310"
|
|
47
|
+
line-length = 100
|