Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ Additionally, if you are interesting in contributing to the codebase, submit a p
3. Make sure the unit tests pass before raising a PR. For all the unit tests to pass, you typically need to setup a premium proxy service such as `ScraperAPI` or `Luminati` (`Bright Data`). If you do not have an account, you may try to use `FreeProxy`. Without a proxy, 6 out of 17 test cases will be skipped.
4. Check that the documentatation is consistent with the code. Check that the documentation builds successfully.
5. Submit a PR, with `develop` as your base branch.
6. After an initial code review by the maintainers, the unit tests will be run with the `ScraperAPI` key stored in the Github repository. Passing all tests cases is necessary before merging your PR.
6. Run `pre-commit run --all-files` and ensure that all tests pass.
7. After an initial code review by the maintainers, the unit tests will be run with the `ScraperAPI` key stored in the Github repository. Passing all tests cases is necessary before merging your PR.


## Build Docs
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# https://pre-commit.com
# This GitHub Action assumes that the repo contains a valid .pre-commit-config.yaml file.
---
name: pre-commit
on:
pull_request:
push:
branches: [master]

permissions:
contents: read

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- run: pip install pre-commit
- run: pre-commit --version
- run: pre-commit install
- run: pre-commit run --all-files
59 changes: 59 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
repos:
- repo: https://github.com/python/black
rev: 22.8.0
hooks:
- id: black
- repo: https://github.com/codespell-project/codespell
rev: v2.2.1
hooks:
- id: codespell
args:
- --skip=*.css,*.js,*.map,*.scss,*svg
- repo: https://gitlab.com/PyCQA/flake8
rev: 5.0.4
hooks:
- id: flake8
args:
- --extend-ignore=E203
- --max-complexity=205
- --max-line-length=300
- --show-source
- --statistics
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/asottile/pyupgrade
rev: v2.38.0
hooks:
- id: pyupgrade
# TODO: remove `--keep-runtime-typing` option
args: ["--py37-plus", "--keep-runtime-typing"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: mixed-line-ending
args: ["--fix=lf"]
- repo: https://github.com/pycqa/pydocstyle
rev: 6.1.1
hooks:
- id: pydocstyle
args:
- --source
- --explain
- --convention=google
- --count
- --add-ignore=D100,D107
exclude: "__init__.py$|^docs"
additional_dependencies: ["toml"]
# - repo: local
# hooks:
# - id: pyright
# name: pyright
# entry: pyright
# language: node
# pass_filenames: false
# types: [python]
# additional_dependencies: ["pyright"]
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
### Bugfixes
- Fix pprint failures on Windows #413.
- Thoroughly handle 1000 or more publications that are available (or not) according to public access mandates #414.
- Fix errors in `download_mandates_csv` that may occassionally occur for agencies without a policy link #413.
- Fix errors in `download_mandates_csv` that may occasionally occur for agencies without a policy link #413.

## Changes in v1.6.3

Expand All @@ -35,7 +35,7 @@

### Features
- Download table of funding agencies as a CSV file with URL to the funding mandates included
- Downlad top-ranking journals in general, under sub-categories and in different languages as a CSV file
- Download top-ranking journals in general, under sub-categories and in different languages as a CSV file

### Bugfixes
- #392
Expand All @@ -58,7 +58,7 @@
## Changes in v1.5.0
### Features
- Fetch the public access mandates information from a Scholar profile and mark the publications whether or not they satisfy the open-access mandate.
- Fetch an author's organization identifer from their Scholar profile
- Fetch an author's organization identifier from their Scholar profile
- Search for all authors affiliated with an organization
- Fetch homepage URL from a Scholar profile
### Enhancements
Expand Down
Loading