scholarimpact 0.0.1.dev1__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.
- scholarimpact-0.0.1.dev1/.github/workflows/cleanup-prereleases.yml +77 -0
- scholarimpact-0.0.1.dev1/.github/workflows/release.yml +218 -0
- scholarimpact-0.0.1.dev1/.github/workflows/test.yml +34 -0
- scholarimpact-0.0.1.dev1/.gitignore +213 -0
- scholarimpact-0.0.1.dev1/CITATION.cff +10 -0
- scholarimpact-0.0.1.dev1/LICENSE +21 -0
- scholarimpact-0.0.1.dev1/Makefile +68 -0
- scholarimpact-0.0.1.dev1/PKG-INFO +436 -0
- scholarimpact-0.0.1.dev1/README.md +386 -0
- scholarimpact-0.0.1.dev1/example-dashboard.png +0 -0
- scholarimpact-0.0.1.dev1/pyproject.toml +87 -0
- scholarimpact-0.0.1.dev1/requirements-dev.txt +19 -0
- scholarimpact-0.0.1.dev1/requirements.txt +29 -0
- scholarimpact-0.0.1.dev1/research-domains.png +0 -0
- scholarimpact-0.0.1.dev1/setup.cfg +4 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact/__init__.py +80 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact/_version.py +21 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact/assets/README.md +36 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact/assets/__init__.py +136 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact/assets/fonts/OFL-SpaceGrotesk.txt +93 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact/assets/fonts/OFL-SpaceMono.txt +93 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact/assets/fonts/SpaceGrotesk-SemiBold.ttf +0 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact/assets/fonts/SpaceGrotesk-VariableFont_wght.ttf +0 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact/assets/fonts/SpaceMono-Bold.ttf +0 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact/assets/fonts/SpaceMono-BoldItalic.ttf +0 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact/assets/fonts/SpaceMono-Italic.ttf +0 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact/assets/fonts/SpaceMono-Regular.ttf +0 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact/assets/streamlit/config.toml +55 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact/cli/__init__.py +5 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact/cli/commands/__init__.py +5 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact/cli/commands/crawl.py +115 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact/cli/commands/dashboard.py +49 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact/cli/commands/extract.py +45 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact/cli/commands/generate.py +126 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact/cli/main.py +78 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact/core/__init__.py +6 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact/core/crawler.py +1455 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact/core/extractor.py +173 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact/core/utils.py +429 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact/dashboard/__init__.py +6 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact/dashboard/app.py +298 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact/dashboard/components/__init__.py +17 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact/dashboard/components/base.py +121 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact/dashboard/components/config.py +142 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact/dashboard/components/layout.py +178 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact/dashboard/components/streamlit_app.py +1280 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact.egg-info/PKG-INFO +436 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact.egg-info/SOURCES.txt +52 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact.egg-info/dependency_links.txt +1 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact.egg-info/entry_points.txt +2 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact.egg-info/requires.txt +26 -0
- scholarimpact-0.0.1.dev1/src/scholarimpact.egg-info/top_level.txt +1 -0
- scholarimpact-0.0.1.dev1/tests/.gitkeep +0 -0
- scholarimpact-0.0.1.dev1/tests/test_basic.py +54 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
name: Cleanup Pre-releases
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
# Run daily at 2 AM UTC
|
|
6
|
+
- cron: '0 2 * * *'
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
inputs:
|
|
9
|
+
days_to_keep:
|
|
10
|
+
description: 'Number of days to keep pre-releases'
|
|
11
|
+
required: false
|
|
12
|
+
default: '7'
|
|
13
|
+
type: string
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
cleanup:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
permissions:
|
|
19
|
+
contents: write
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v4
|
|
23
|
+
|
|
24
|
+
- name: Clean up old pre-releases
|
|
25
|
+
uses: actions/github-script@v7
|
|
26
|
+
with:
|
|
27
|
+
script: |
|
|
28
|
+
const daysToKeep = parseInt('${{ github.event.inputs.days_to_keep || '7' }}');
|
|
29
|
+
const cutoffDate = new Date();
|
|
30
|
+
cutoffDate.setDate(cutoffDate.getDate() - daysToKeep);
|
|
31
|
+
|
|
32
|
+
console.log(`Cleaning up pre-releases older than ${daysToKeep} days (before ${cutoffDate.toISOString()})`);
|
|
33
|
+
|
|
34
|
+
// Get all releases
|
|
35
|
+
const releases = await github.rest.repos.listReleases({
|
|
36
|
+
owner: context.repo.owner,
|
|
37
|
+
repo: context.repo.repo,
|
|
38
|
+
per_page: 100
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
let deletedCount = 0;
|
|
42
|
+
|
|
43
|
+
for (const release of releases.data) {
|
|
44
|
+
// Only process pre-releases with PR tags
|
|
45
|
+
if (release.prerelease && release.tag_name.includes('-pr')) {
|
|
46
|
+
const releaseDate = new Date(release.created_at);
|
|
47
|
+
|
|
48
|
+
if (releaseDate < cutoffDate) {
|
|
49
|
+
console.log(`Deleting pre-release: ${release.tag_name} (created: ${releaseDate.toISOString()})`);
|
|
50
|
+
|
|
51
|
+
try {
|
|
52
|
+
// Delete the release
|
|
53
|
+
await github.rest.repos.deleteRelease({
|
|
54
|
+
owner: context.repo.owner,
|
|
55
|
+
repo: context.repo.repo,
|
|
56
|
+
release_id: release.id
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
// Delete the tag
|
|
60
|
+
await github.rest.git.deleteRef({
|
|
61
|
+
owner: context.repo.owner,
|
|
62
|
+
repo: context.repo.repo,
|
|
63
|
+
ref: `tags/${release.tag_name}`
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
deletedCount++;
|
|
67
|
+
console.log(`✓ Deleted: ${release.tag_name}`);
|
|
68
|
+
} catch (error) {
|
|
69
|
+
console.error(`✗ Failed to delete ${release.tag_name}:`, error.message);
|
|
70
|
+
}
|
|
71
|
+
} else {
|
|
72
|
+
console.log(`Keeping: ${release.tag_name} (created: ${releaseDate.toISOString()})`);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
console.log(`Cleanup complete. Deleted ${deletedCount} pre-releases.`);
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
name: Build and Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [opened, synchronize, reopened]
|
|
6
|
+
branches: [ main ]
|
|
7
|
+
workflow_run:
|
|
8
|
+
workflows: ["Tests"]
|
|
9
|
+
types:
|
|
10
|
+
- completed
|
|
11
|
+
branches: [ main ]
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
generate-version:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
# Skip if Tests workflow failed
|
|
17
|
+
if: ${{ github.event_name == 'pull_request' || github.event.workflow_run.conclusion == 'success' }}
|
|
18
|
+
outputs:
|
|
19
|
+
version: ${{ steps.generate_version.outputs.version }}
|
|
20
|
+
version_tag: ${{ steps.generate_version.outputs.version_tag }}
|
|
21
|
+
github_tag: ${{ steps.generate_version.outputs.github_tag }}
|
|
22
|
+
is_prerelease: ${{ steps.generate_version.outputs.is_prerelease }}
|
|
23
|
+
pr_number: ${{ github.event.number }}
|
|
24
|
+
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v4
|
|
27
|
+
with:
|
|
28
|
+
fetch-depth: 0
|
|
29
|
+
|
|
30
|
+
- name: Generate version for PR
|
|
31
|
+
if: github.event_name == 'pull_request'
|
|
32
|
+
id: generate_pr_version
|
|
33
|
+
run: |
|
|
34
|
+
# Get base version from latest tag or default to 0.0.0
|
|
35
|
+
BASE_VERSION=$(git describe --tags --abbrev=0 2>/dev/null | sed 's/^v//' || true)
|
|
36
|
+
if [ -z "$BASE_VERSION" ]; then
|
|
37
|
+
BASE_VERSION="0.0.0"
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
# Generate PEP 440 compatible pre-release version
|
|
41
|
+
SHORT_SHA=$(git rev-parse --short HEAD)
|
|
42
|
+
PR_NUMBER=${{ github.event.number }}
|
|
43
|
+
|
|
44
|
+
# Use PEP 440 compatible format
|
|
45
|
+
PRERELEASE_VERSION="${BASE_VERSION}.dev${PR_NUMBER}+${SHORT_SHA}"
|
|
46
|
+
PRERELEASE_TAG="v${PRERELEASE_VERSION}"
|
|
47
|
+
|
|
48
|
+
# GitHub tag for releases (without +sha)
|
|
49
|
+
GITHUB_TAG="v${BASE_VERSION}-pr${PR_NUMBER}.${SHORT_SHA}"
|
|
50
|
+
|
|
51
|
+
echo "version=$PRERELEASE_VERSION" >> $GITHUB_OUTPUT
|
|
52
|
+
echo "version_tag=$PRERELEASE_TAG" >> $GITHUB_OUTPUT
|
|
53
|
+
echo "github_tag=$GITHUB_TAG" >> $GITHUB_OUTPUT
|
|
54
|
+
echo "is_prerelease=true" >> $GITHUB_OUTPUT
|
|
55
|
+
|
|
56
|
+
- name: Generate version for release
|
|
57
|
+
if: github.event_name == 'workflow_run'
|
|
58
|
+
id: generate_release_version
|
|
59
|
+
uses: paulhatch/semantic-version@v5.4.0
|
|
60
|
+
with:
|
|
61
|
+
tag_prefix: "v"
|
|
62
|
+
major_pattern: "(MAJOR)"
|
|
63
|
+
minor_pattern: "(MINOR)"
|
|
64
|
+
version_format: "${major}.${minor}.${patch}"
|
|
65
|
+
bump_each_commit: true
|
|
66
|
+
|
|
67
|
+
- name: Set outputs
|
|
68
|
+
id: generate_version
|
|
69
|
+
run: |
|
|
70
|
+
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
|
71
|
+
echo "version=${{ steps.generate_pr_version.outputs.version }}" >> $GITHUB_OUTPUT
|
|
72
|
+
echo "version_tag=${{ steps.generate_pr_version.outputs.version_tag }}" >> $GITHUB_OUTPUT
|
|
73
|
+
echo "github_tag=${{ steps.generate_pr_version.outputs.github_tag }}" >> $GITHUB_OUTPUT
|
|
74
|
+
echo "is_prerelease=true" >> $GITHUB_OUTPUT
|
|
75
|
+
else
|
|
76
|
+
echo "version=${{ steps.generate_release_version.outputs.version }}" >> $GITHUB_OUTPUT
|
|
77
|
+
echo "version_tag=${{ steps.generate_release_version.outputs.version_tag }}" >> $GITHUB_OUTPUT
|
|
78
|
+
echo "github_tag=${{ steps.generate_release_version.outputs.version_tag }}" >> $GITHUB_OUTPUT
|
|
79
|
+
echo "is_prerelease=false" >> $GITHUB_OUTPUT
|
|
80
|
+
fi
|
|
81
|
+
|
|
82
|
+
build-python:
|
|
83
|
+
needs: generate-version
|
|
84
|
+
runs-on: ubuntu-latest
|
|
85
|
+
permissions:
|
|
86
|
+
id-token: write
|
|
87
|
+
contents: read
|
|
88
|
+
attestations: write
|
|
89
|
+
|
|
90
|
+
steps:
|
|
91
|
+
- uses: actions/checkout@v4
|
|
92
|
+
with:
|
|
93
|
+
fetch-depth: 0
|
|
94
|
+
|
|
95
|
+
- name: Set up Python
|
|
96
|
+
uses: actions/setup-python@v4
|
|
97
|
+
with:
|
|
98
|
+
python-version: '3.11'
|
|
99
|
+
|
|
100
|
+
- name: Install dependencies
|
|
101
|
+
run: |
|
|
102
|
+
python -m pip install --upgrade pip
|
|
103
|
+
pip install -r requirements-dev.txt
|
|
104
|
+
pip install -e .
|
|
105
|
+
|
|
106
|
+
- name: Set version for setuptools-scm
|
|
107
|
+
run: |
|
|
108
|
+
git config user.name "GitHub Actions"
|
|
109
|
+
git config user.email "actions@github.com"
|
|
110
|
+
echo "About to create tag: ${{ needs.generate-version.outputs.version_tag }}"
|
|
111
|
+
git tag -a "${{ needs.generate-version.outputs.version_tag }}" -m "Release ${{ needs.generate-version.outputs.version_tag }}"
|
|
112
|
+
echo "Created tag: ${{ needs.generate-version.outputs.version_tag }}"
|
|
113
|
+
|
|
114
|
+
- name: Build package
|
|
115
|
+
run: make build
|
|
116
|
+
|
|
117
|
+
- name: Upload build artifacts
|
|
118
|
+
uses: actions/upload-artifact@v4
|
|
119
|
+
with:
|
|
120
|
+
name: python-artifacts
|
|
121
|
+
path: dist/*
|
|
122
|
+
retention-days: 30
|
|
123
|
+
|
|
124
|
+
- name: Publish to PyPI
|
|
125
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
126
|
+
with:
|
|
127
|
+
attestations: true
|
|
128
|
+
skip-existing: true
|
|
129
|
+
|
|
130
|
+
create-release:
|
|
131
|
+
needs: [generate-version, build-python]
|
|
132
|
+
runs-on: ubuntu-latest
|
|
133
|
+
permissions:
|
|
134
|
+
contents: write
|
|
135
|
+
pull-requests: write
|
|
136
|
+
|
|
137
|
+
steps:
|
|
138
|
+
- name: Download Python artifacts
|
|
139
|
+
uses: actions/download-artifact@v4
|
|
140
|
+
with:
|
|
141
|
+
name: python-artifacts
|
|
142
|
+
path: dist/
|
|
143
|
+
|
|
144
|
+
- name: List all artifacts
|
|
145
|
+
run: |
|
|
146
|
+
echo "Contents of dist directory:"
|
|
147
|
+
find dist -type f -ls
|
|
148
|
+
|
|
149
|
+
- name: Create Release
|
|
150
|
+
uses: softprops/action-gh-release@v2
|
|
151
|
+
with:
|
|
152
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
153
|
+
files: dist/**/*
|
|
154
|
+
tag_name: ${{ needs.generate-version.outputs.github_tag }}
|
|
155
|
+
name: ${{ needs.generate-version.outputs.is_prerelease == 'true' && 'Pre-release' || 'Release' }} ${{ needs.generate-version.outputs.github_tag }}
|
|
156
|
+
body: |
|
|
157
|
+
${{ needs.generate-version.outputs.is_prerelease == 'true' && format('🚧 **Pre-release build for PR #{0}**', needs.generate-version.outputs.pr_number) || '🎉 **New Release**' }}
|
|
158
|
+
|
|
159
|
+
${{ needs.generate-version.outputs.is_prerelease == 'true' && 'This is an automated pre-release build. Use for testing purposes only.' || github.event.head_commit.message }}
|
|
160
|
+
|
|
161
|
+
## Available Downloads
|
|
162
|
+
|
|
163
|
+
### Python Package
|
|
164
|
+
- Wheel: `scholarimpact-${{ needs.generate-version.outputs.version }}-py3-none-any.whl`
|
|
165
|
+
- Source: `scholarimpact-${{ needs.generate-version.outputs.version }}.tar.gz`
|
|
166
|
+
|
|
167
|
+
## Installation
|
|
168
|
+
|
|
169
|
+
**PIP:**
|
|
170
|
+
```bash
|
|
171
|
+
pip install https://github.com/${{ github.repository }}/releases/download/${{ needs.generate-version.outputs.github_tag }}/scholarimpact-${{ needs.generate-version.outputs.version }}-py3-none-any.whl
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
**PyPI:**
|
|
175
|
+
```bash
|
|
176
|
+
pip install scholarimpact${{ needs.generate-version.outputs.is_prerelease == 'true' && '==' || '' }}${{ needs.generate-version.outputs.is_prerelease == 'true' && needs.generate-version.outputs.version || '' }}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
prerelease: ${{ needs.generate-version.outputs.is_prerelease == 'true' }}
|
|
180
|
+
draft: false
|
|
181
|
+
|
|
182
|
+
- name: Comment on PR
|
|
183
|
+
if: needs.generate-version.outputs.is_prerelease == 'true'
|
|
184
|
+
uses: actions/github-script@v7
|
|
185
|
+
with:
|
|
186
|
+
script: |
|
|
187
|
+
const prNumber = ${{ needs.generate-version.outputs.pr_number }};
|
|
188
|
+
const tag = '${{ needs.generate-version.outputs.github_tag }}';
|
|
189
|
+
const version = '${{ needs.generate-version.outputs.version }}';
|
|
190
|
+
|
|
191
|
+
const comment = `## 🚧 Pre-release Ready
|
|
192
|
+
|
|
193
|
+
A pre-release has been created for this PR: **${tag}**
|
|
194
|
+
|
|
195
|
+
### Quick Install
|
|
196
|
+
|
|
197
|
+
**From PyPI (recommended):**
|
|
198
|
+
\`\`\`bash
|
|
199
|
+
pip install scholarimpact==${version}
|
|
200
|
+
\`\`\`
|
|
201
|
+
|
|
202
|
+
**From GitHub Release:**
|
|
203
|
+
\`\`\`bash
|
|
204
|
+
pip install https://github.com/${{ github.repository }}/releases/download/${tag}/scholarimpact-${version}-py3-none-any.whl
|
|
205
|
+
\`\`\`
|
|
206
|
+
|
|
207
|
+
### Available Artifacts
|
|
208
|
+
- **Python**: wheel and source distribution
|
|
209
|
+
|
|
210
|
+
View all artifacts at: https://github.com/${{ github.repository }}/releases/tag/${tag}
|
|
211
|
+
`;
|
|
212
|
+
|
|
213
|
+
github.rest.issues.createComment({
|
|
214
|
+
issue_number: prNumber,
|
|
215
|
+
owner: context.repo.owner,
|
|
216
|
+
repo: context.repo.repo,
|
|
217
|
+
body: comment
|
|
218
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
20
|
+
uses: actions/setup-python@v4
|
|
21
|
+
with:
|
|
22
|
+
python-version: ${{ matrix.python-version }}
|
|
23
|
+
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: |
|
|
26
|
+
python -m pip install --upgrade pip
|
|
27
|
+
pip install -r requirements-dev.txt
|
|
28
|
+
pip install -e .
|
|
29
|
+
|
|
30
|
+
- name: Format code
|
|
31
|
+
run: make format
|
|
32
|
+
|
|
33
|
+
- name: Run tests
|
|
34
|
+
run: make test
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
#uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
#poetry.lock
|
|
109
|
+
#poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
#pdm.lock
|
|
116
|
+
#pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
#pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# SageMath parsed files
|
|
135
|
+
*.sage.py
|
|
136
|
+
|
|
137
|
+
# Environments
|
|
138
|
+
.env
|
|
139
|
+
.envrc
|
|
140
|
+
.venv
|
|
141
|
+
env/
|
|
142
|
+
venv/
|
|
143
|
+
ENV/
|
|
144
|
+
env.bak/
|
|
145
|
+
venv.bak/
|
|
146
|
+
|
|
147
|
+
# Spyder project settings
|
|
148
|
+
.spyderproject
|
|
149
|
+
.spyproject
|
|
150
|
+
|
|
151
|
+
# Rope project settings
|
|
152
|
+
.ropeproject
|
|
153
|
+
|
|
154
|
+
# mkdocs documentation
|
|
155
|
+
/site
|
|
156
|
+
|
|
157
|
+
# mypy
|
|
158
|
+
.mypy_cache/
|
|
159
|
+
.dmypy.json
|
|
160
|
+
dmypy.json
|
|
161
|
+
|
|
162
|
+
# Pyre type checker
|
|
163
|
+
.pyre/
|
|
164
|
+
|
|
165
|
+
# pytype static type analyzer
|
|
166
|
+
.pytype/
|
|
167
|
+
|
|
168
|
+
# Cython debug symbols
|
|
169
|
+
cython_debug/
|
|
170
|
+
|
|
171
|
+
# PyCharm
|
|
172
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
173
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
174
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
175
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
176
|
+
#.idea/
|
|
177
|
+
|
|
178
|
+
# Abstra
|
|
179
|
+
# Abstra is an AI-powered process automation framework.
|
|
180
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
181
|
+
# Learn more at https://abstra.io/docs
|
|
182
|
+
.abstra/
|
|
183
|
+
|
|
184
|
+
# Visual Studio Code
|
|
185
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
186
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
187
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
188
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
189
|
+
# .vscode/
|
|
190
|
+
|
|
191
|
+
# Ruff stuff:
|
|
192
|
+
.ruff_cache/
|
|
193
|
+
|
|
194
|
+
# PyPI configuration file
|
|
195
|
+
.pypirc
|
|
196
|
+
|
|
197
|
+
# Marimo
|
|
198
|
+
marimo/_static/
|
|
199
|
+
marimo/_lsp/
|
|
200
|
+
__marimo__/
|
|
201
|
+
|
|
202
|
+
# Streamlit
|
|
203
|
+
.streamlit/secrets.toml
|
|
204
|
+
|
|
205
|
+
# Custom additions
|
|
206
|
+
example-dashboard
|
|
207
|
+
my-research-dashboard
|
|
208
|
+
.DS_Store
|
|
209
|
+
.claude
|
|
210
|
+
data
|
|
211
|
+
|
|
212
|
+
# setuptools-scm generated version file
|
|
213
|
+
src/scholarimpact/_version.py
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use this software, please cite it as below."
|
|
3
|
+
authors:
|
|
4
|
+
- family-names: "Tiwari"
|
|
5
|
+
given-names: "Abhishek"
|
|
6
|
+
orcid: "https://orcid.org/0000-0003-2222-2395"
|
|
7
|
+
title: "ScholarImpact: A bibliometric tool to analyse, visualise, and share your research impact, output and scholarly influence using Google Scholar and OpenAlex data."
|
|
8
|
+
version: 0.0.1
|
|
9
|
+
date-released: 2025-08-13
|
|
10
|
+
url: "https://github.com/abhishektiwari/scholarimpact"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Abhishek Tiwari
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# ScholarImpact Makefile
|
|
2
|
+
|
|
3
|
+
.PHONY: help format lint test install clean build publish
|
|
4
|
+
|
|
5
|
+
help:
|
|
6
|
+
@echo "Available commands:"
|
|
7
|
+
@echo " make format - Format Python code with black and isort"
|
|
8
|
+
@echo " make lint - Run linting checks with flake8 and mypy"
|
|
9
|
+
@echo " make test - Run tests with pytest"
|
|
10
|
+
@echo " make install - Install package in development mode"
|
|
11
|
+
@echo " make clean - Remove build artifacts and cache files"
|
|
12
|
+
@echo " make build - Build distribution packages"
|
|
13
|
+
@echo " make publish - Upload package to PyPI"
|
|
14
|
+
|
|
15
|
+
format:
|
|
16
|
+
@echo "Formatting Python code..."
|
|
17
|
+
@black src/ tests/ --line-length 100
|
|
18
|
+
@isort src/ tests/ --profile black --line-length 100
|
|
19
|
+
@echo "Code formatting complete!"
|
|
20
|
+
|
|
21
|
+
lint:
|
|
22
|
+
@echo "Running linting checks..."
|
|
23
|
+
@flake8 src/ tests/ --max-line-length 100 --extend-ignore E203,W503
|
|
24
|
+
@mypy src/ --ignore-missing-imports
|
|
25
|
+
@echo "Linting complete!"
|
|
26
|
+
|
|
27
|
+
test:
|
|
28
|
+
@echo "Running tests..."
|
|
29
|
+
@pytest tests/ -v --cov=src/scholarimpact --cov-report=term-missing
|
|
30
|
+
@echo "Tests complete!"
|
|
31
|
+
|
|
32
|
+
install:
|
|
33
|
+
@echo "Installing package in development mode..."
|
|
34
|
+
@pip install -e .
|
|
35
|
+
@echo "Installation complete!"
|
|
36
|
+
|
|
37
|
+
clean:
|
|
38
|
+
@echo "Cleaning build artifacts..."
|
|
39
|
+
@rm -rf build/
|
|
40
|
+
@rm -rf dist/
|
|
41
|
+
@rm -rf *.egg-info
|
|
42
|
+
@rm -rf src/*.egg-info
|
|
43
|
+
@find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
|
|
44
|
+
@find . -type f -name "*.pyc" -delete
|
|
45
|
+
@find . -type f -name "*.pyo" -delete
|
|
46
|
+
@find . -type f -name ".coverage" -delete
|
|
47
|
+
@find . -type d -name ".pytest_cache" -exec rm -rf {} + 2>/dev/null || true
|
|
48
|
+
@find . -type d -name ".mypy_cache" -exec rm -rf {} + 2>/dev/null || true
|
|
49
|
+
@echo "Clean complete!"
|
|
50
|
+
|
|
51
|
+
build: clean
|
|
52
|
+
@echo "Building distribution packages..."
|
|
53
|
+
@python -m build
|
|
54
|
+
@echo "Build complete! Check dist/ directory"
|
|
55
|
+
|
|
56
|
+
publish: build
|
|
57
|
+
@echo "Uploading to PyPI..."
|
|
58
|
+
@python -m twine upload dist/*
|
|
59
|
+
@echo "Package published to PyPI!"
|
|
60
|
+
|
|
61
|
+
# Development helpers
|
|
62
|
+
dev-install:
|
|
63
|
+
@echo "Installing development dependencies..."
|
|
64
|
+
@pip install -e ".[dev]"
|
|
65
|
+
@echo "Development dependencies installed!"
|
|
66
|
+
|
|
67
|
+
check: format lint test
|
|
68
|
+
@echo "All checks passed!"
|