https://github.com/codingfabi/retraction_check
A python package to check whether a paper in your .bib file has been listed on retraction watch
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (16.1%) to scientific vocabulary
Repository
A python package to check whether a paper in your .bib file has been listed on retraction watch
Basic Info
- Host: GitHub
- Owner: codingfabi
- Language: Python
- Default Branch: main
- Size: 47.9 KB
Statistics
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 1
- Releases: 0
Metadata Files
README.md
retraction_check
A Python package to check whether papers in your .bib file or a specific bibtex entry have been listed on Retraction Watch.
Features
- Parse .bib files and extract paper information
- Query the Retraction Watch dataset for retracted papers
- Support both exact DOI matching and fuzzy title matching
- Robust error handling for various edge cases
Installation
```bash
Install from PyPI (when published)
pip install retraction-check
Or install from source
git clone https://github.com/codingfabi/retractioncheck.git cd retractioncheck pipenv install
Install development dependencies
pipenv install --dev ```
Usage
Command line
```bash
Using the installed command
retraction-check yourfile.bib
Or using the module
python -m retractioncheck.checkbib yourfile.bib ```
Development
Running tests
```bash
Run all tests
pipenv run test
Run tests with coverage
pipenv run test-cov
Run tests in watch mode
pipenv run test-watch
Run tests directly with Python
python tests/run_tests.py ```
Code quality
```bash
Format code
pipenv run format
Lint code
pipenv run lint
Type checking
pipenv run type-check
Run all checks
pipenv run check-all ```
Available test commands
test- Run all tests with verbose outputtest-cov- Run tests with coverage report (HTML and terminal)test-watch- Run tests in watch mode with short tracebacklint- Run flake8 lintingformat- Format code with blackformat-check- Check if code is properly formattedtype-check- Run mypy type checkingcheck-all- Run all quality checks (format, lint, type-check, test-cov)
Requirements
- Python 3.8+
- bibtexparser
- requests
Example: Automated Retraction Check with GitHub Actions
You can automate retraction checks for your bibliography file using GitHub Actions. The following workflow runs the check on demand, on a schedule, or on every commit to a specific branch. If any retractions are found, it will open a GitHub issue listing the findings.
```yaml name: Retraction Check
on: workflow_dispatch: # Allows manual trigger schedule: - cron: '0 8 * * 1' # Runs every Monday at 08:00 UTC push: paths: - yourfile.bib # Change this to your personal bib file to make sure the workflow runs every time the bibfile changes
jobs: retraction_check: runs-on: ubuntu-latest permissions: issues: write steps: - name: Checkout repository uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
- name: Run retraction check
id: retraction
run: |
python -m retraction_check.check_bib path/to/your/bibfileyourfile.bib > findings.txt
grep -v "No retracted papers found." findings.txt > findings_only.txt || true
- name: Create issue if retractions found
if: success() && hashFiles('findings_only.txt') != ''
uses: peter-evans/create-issue-from-file@v5
with:
title: "Retraction Watch: Retracted Papers Detected in Bibliography"
content-filepath: findings_only.txt
labels: retraction, automated-check
```
- Replace
yourfile.bibwith the path to your bibliography file. - The workflow will create an issue only if retractions are found.
- You can trigger the workflow manually, on a schedule, or on every commit to the specified branch.
Example: Automated Retraction Check with GitLab CI
You can also automate retraction checks for your bibliography file using GitLab CI/CD. The following example runs the check on every push to the default branch and creates an issue if retractions are found (requires a GitLab personal access token with API scope stored as GITLAB_TOKEN).
yaml
retraction_check:
image: python:3.11
stage: test
script:
- pip install .
- python -m retraction_check.check_bib path/to/yourfile.bib > findings.txt
- grep -v "No retracted papers found." findings.txt > findings_only.txt || true
# Only create an issue if findings_only.txt is not empty
- |
if [ -s findings_only.txt ]; then
curl --header "PRIVATE-TOKEN: $GITLAB_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"title": "Retraction Watch: Retracted Papers Detected in Bibliography",
"description": "$(cat findings_only.txt)",
"labels": "retraction, automated-check"
}' \
--request POST "https://gitlab.com/api/v4/projects/$CI_PROJECT_ID/issues"
fi
only:
- main # or your default branch
rules:
- changes:
- path/to/yourfile.bib
- Replace
path/to/yourfile.bibwith the path to your bibliography file. - Store a GitLab personal access token with API scope as a CI/CD variable named
GITLAB_TOKEN. - The job will create an issue only if retractions are found and the
.bibfile changes.
Owner
- Login: codingfabi
- Kind: user
- Repositories: 4
- Profile: https://github.com/codingfabi
🤙
GitHub Events
Total
- Issues event: 1
- Watch event: 2
- Delete event: 1
- Push event: 5
- Public event: 1
- Pull request event: 1
Last Year
- Issues event: 1
- Watch event: 2
- Delete event: 1
- Push event: 5
- Public event: 1
- Pull request event: 1
Packages
- Total packages: 1
-
Total downloads:
- pypi 118 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 1
- Total maintainers: 1
pypi.org: retraction-check
A Python package to check whether papers in your .bib file have been listed on Retraction Watch
- Homepage: https://github.com/codingfabi/retraction_check
- Documentation: https://retraction-check.readthedocs.io/
- License: MIT
-
Latest release: 0.1.0
published 11 months ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v4 composite
- actions/download-artifact v4 composite
- actions/setup-python v4 composite
- actions/upload-artifact v4 composite
- pypa/gh-action-pypi-publish release/v1 composite
- actions/checkout v4 composite
- actions/setup-python v4 composite
- actions/checkout v4 composite
- actions/setup-python v5 composite
- peter-evans/create-issue-from-file v5 composite
- actions/checkout v4 composite
- actions/setup-python v4 composite
- codecov/codecov-action v3 composite
- black * develop
- flake8 * develop
- mypy * develop
- pytest * develop
- pytest-cov * develop
- pytest-mock * develop
- types-requests * develop
- bibtexparser *
- requests *
- black ==25.1.0 develop
- click ==8.2.1 develop
- coverage ==7.10.5 develop
- flake8 ==7.3.0 develop
- iniconfig ==2.1.0 develop
- mccabe ==0.7.0 develop
- mypy ==1.17.1 develop
- mypy-extensions ==1.1.0 develop
- packaging ==25.0 develop
- pathspec ==0.12.1 develop
- platformdirs ==4.3.8 develop
- pluggy ==1.6.0 develop
- pycodestyle ==2.14.0 develop
- pyflakes ==3.4.0 develop
- pygments ==2.19.2 develop
- pytest ==8.4.1 develop
- pytest-cov ==6.2.1 develop
- pytest-mock ==3.14.1 develop
- types-requests ==2.32.4.20250809 develop
- typing-extensions ==4.14.1 develop
- urllib3 ==2.5.0 develop
- bibtexparser ==1.4.3
- certifi ==2025.8.3
- charset-normalizer ==3.4.3
- idna ==3.10
- pyparsing ==3.2.3
- requests ==2.32.5
- urllib3 ==2.5.0
- bibtexparser *
- requests *
- bibtexparser *
- requests *