Skip to content

Commit

Permalink
Python versions (#48)
Browse files Browse the repository at this point in the history
* doc: Update links

* ci: Check higher python versions

* ci: add coverage

* ci: lower coverage report bandwidth

* ci: remove python 3.7 support

* chore: Highlight python version support

* ci: codecov token
  • Loading branch information
jannisborn authored Jun 26, 2024
1 parent 5928ca0 commit 86f7bcb
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 23 deletions.
33 changes: 23 additions & 10 deletions .github/workflows/test_tip.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,46 @@
---
name: Source
on:
push:
branches:
- main
pull_request:
branches:
- '*'
on: [push, release]

jobs:
test-source-install:
runs-on: ubuntu-latest
strategy:
max-parallel: 3
matrix:
python-version:
- 3.8
- 3.9
- "3.10"
- "3.11"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python 3.8
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install coverage pytest-cov
- name: Install package from source
run: pip install -e .
- name: Test package from source
run: |
python -c "import paperscraper"
python -m pytest -sv paperscraper
coverage run -m pytest -sv paperscraper
coverage report
coverage xml -o coverage.xml
- name: Upload to Codecov
if: matrix.python-version == '3.9'
uses: codecov/codecov-action@v2
with:
files: coverage.xml
token: ${{ secrets.CODECOV_TOKEN }} # Use the token here
fail_ci_if_error: true

test-potential-wheel-install:
runs-on: ubuntu-latest
steps:
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@

[![build](https://github.com/PhosphorylatedRabbits/paperscraper/actions/workflows/test_tip.yml/badge.svg?branch=main)](https://github.com/PhosphorylatedRabbits/paperscraper/actions/workflows/test_tip.yml?query=branch%3Amain)
[![build](https://github.com/PhosphorylatedRabbits/paperscraper/actions/workflows/test_pypi.yml/badge.svg?branch=main)](https://github.com/PhosphorylatedRabbits/paperscraper/actions/workflows/test_pypi.yml?query=branch%3Amain)
[![build](https://github.com/jannisborn/paperscraper/actions/workflows/test_tip.yml/badge.svg?branch=main)](https://github.com/jannisborn/paperscraper/actions/workflows/test_tip.yml?query=branch%3Amain)
[![build](https://github.com/jannisborn/paperscraper/actions/workflows/test_pypi.yml/badge.svg?branch=main)](https://github.com/jannisborn/paperscraper/actions/workflows/test_pypi.yml?query=branch%3Amain)
[![License:
MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![PyPI version](https://badge.fury.io/py/paperscraper.svg)](https://badge.fury.io/py/paperscraper)
[![Downloads](https://static.pepy.tech/badge/paperscraper)](https://pepy.tech/project/paperscraper)
[![Downloads](https://static.pepy.tech/badge/paperscraper/month)](https://pepy.tech/project/paperscraper)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![codecov](https://codecov.io/github/jannisborn/paperscraper/graph/badge.svg?token=Clwi0pu61a)](https://codecov.io/github/jannisborn/paperscraper)

# paperscraper

## Overview

`paperscraper` is a `python` package that ships via `pypi` and facilitates scraping
publication metadata as well as full PDF files from **PubMed** or from preprint servers such as **arXiv**,
**medRxiv**, **bioRxiv** and **chemRxiv**. It provides a streamlined interface to scrape metadata and comes
with simple postprocessing functions and plotting routines for meta-analysis.
`paperscraper` is a `python` package for scraping publication metadata or full PDF files from
**PubMed** or preprint servers such as **arXiv**, **medRxiv**, **bioRxiv** and **chemRxiv**.
It provides a streamlined interface to scrape metadata, allows to retrieve citation counts
from Google Scholar, impact factors from journals and comes with simple postprocessing functions
and plotting routines for meta-analysis.


## Getting started
Expand Down Expand Up @@ -246,7 +246,7 @@ plot_comparison(
)
```

![molreps](https://github.com/PhosphorylatedRabbits/paperscraper/blob/master/assets/molreps.png "MolReps")
![molreps](https://github.com/jannisborn/paperscraper/blob/master/assets/molreps.png "MolReps")


#### Venn Diagrams
Expand All @@ -264,7 +264,7 @@ labels_2019 = ['Medical Imaging', 'Artificial\nIntelligence']
plot_venn_two(sizes_2019, labels_2019, title='2019', figname='ai_imaging')
```

![2019](https://github.com/PhosphorylatedRabbits/paperscraper/blob/master/assets/ai_imaging.png "2019")
![2019](https://github.com/jannisborn/paperscraper/blob/master/assets/ai_imaging.png "2019")


```py
Expand All @@ -273,7 +273,7 @@ plot_venn_three(
)
```

![2020](https://github.com/PhosphorylatedRabbits/paperscraper/blob/master/assets/ai_imaging_covid.png "2020"))
![2020](https://github.com/jannisborn/paperscraper/blob/master/assets/ai_imaging_covid.png "2020"))

Or plot both together:

Expand All @@ -286,7 +286,7 @@ plot_multiple_venn(
)
```

![both](https://github.com/PhosphorylatedRabbits/paperscraper/blob/master/assets/both.png "Both")
![both](https://github.com/jannisborn/paperscraper/blob/master/assets/both.png "Both")



Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Software Development :: Libraries :: Python Modules",
],
)

0 comments on commit 86f7bcb

Please sign in to comment.