Skip to content

Commit

Permalink
Minor curations and code updates (#1178)
Browse files Browse the repository at this point in the history
* Add pattern and URI format to CRediT

* Add wikidata link for Publons Researcher ID

* Add Mastodon prefix

* Update bioregistry.json

* Use UV for tests

* Update mypy
  • Loading branch information
cthoyt authored Sep 3, 2024
1 parent dd2d282 commit f2faef4
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 16 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --upgrade pip setuptools wheel
pip install tox
pip install tox tox-uv
- name: Check manifest
run: tox -e manifest
- name: Check code quality with flake8
Expand All @@ -36,7 +35,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.10" ]
python-version: [ "3.12" ]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -45,8 +44,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --upgrade pip setuptools wheel
pip install tox
pip install tox tox-uv
- name: Check RST conformity with doc8
run: tox -e doc8
- name: Check docstring coverage
Expand All @@ -59,7 +57,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
python-version: [ "3.11", "3.8" ]
python-version: [ "3.12", "3.8" ]
pydantic: [ "pydantic1", "pydantic2" ]
steps:
- uses: actions/checkout@v2
Expand All @@ -69,8 +67,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --upgrade pip setuptools wheel
pip install tox
pip install tox tox-uv
- name: Test with pytest
run:
tox -e py-${{ matrix.pydantic }}
Expand Down
4 changes: 2 additions & 2 deletions src/bioregistry/analysis/paper_ranking.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,8 @@ def main(bioregistry_file, start_date, end_date):
click.echo(f"Writing evaluation to {evaluation_path}")
evaluation_df.to_csv(evaluation_path, sep="\t", index=False)

random_forest_clf: RandomForestClassifier = classifiers[0][1]
lr_clf: LogisticRegression = classifiers[1][1]
random_forest_clf = classifiers[0][1]
lr_clf = classifiers[1][1]
importances_df = (
pd.DataFrame(
list(
Expand Down
57 changes: 52 additions & 5 deletions src/bioregistry/data/bioregistry.json
Original file line number Diff line number Diff line change
Expand Up @@ -22123,14 +22123,19 @@
"uri_format": "https://crates.io/crates/$1"
},
"credit": {
"contact": {
"email": "liz.allen@f1000.com",
"name": "Liz Allen",
"orcid": "0000-0002-9298-3168"
},
"contributor": {
"email": "cthoyt@gmail.com",
"github": "cthoyt",
"name": "Charles Tapley Hoyt",
"orcid": "0000-0003-4423-4370"
},
"description": "CRediT (Contributor Roles Taxonomy) is high-level taxonomy, including 14 roles, that can be used to represent the roles typically played by contributors to scientific scholarly output. The roles describe each contributor’s specific contribution to the scholarly output.",
"example": "Software",
"example": "software",
"fairsharing": {
"abbreviation": "CRediT",
"contact": {
Expand Down Expand Up @@ -22183,11 +22188,12 @@
],
"twitter": "contrib_roles"
},
"homepage": "https://casrai.org/credit/",
"homepage": "https://credit.niso.org/",
"mappings": {
"fairsharing": "FAIRsharing.fe4816"
},
"name": "CASRAI Contributor Roles Taxonomy",
"pattern": "^(conceptualization|data-curation|formal-analysis|funding-acquisition|investigation|methodology|project-administration|resources|software|supervision|validation|visualization|writing-original-draft|writing-review-editing)$",
"publications": [
{
"doi": "10.1038/d41586-019-01715-4",
Expand Down Expand Up @@ -22215,7 +22221,11 @@
"title": "How can we ensure visibility and diversity in research contributions? How the Contributor Role Taxonomy (CRediT) is helping the shift from authorship to contributorship",
"year": 2019
}
]
],
"references": [
"https://casrai.org/credit/"
],
"uri_format": "https://credit.niso.org/contributor-roles/$1"
},
"crisprdb": {
"biocontext": {
Expand Down Expand Up @@ -63630,6 +63640,30 @@
"uri_format": "https://massive.ucsd.edu/ProteoSAFe/protein_explorer.jsp?libraries=2&protein_name=$1"
}
},
"mastodon": {
"contributor": {
"email": "cthoyt@gmail.com",
"github": "cthoyt",
"name": "Charles Tapley Hoyt",
"orcid": "0000-0003-4423-4370"
},
"homepage": "https://mastodon.social",
"mappings": {
"wikidata": "P4033"
},
"name": "Mastodon",
"wikidata": {
"description": "address on the Mastodon decentralized social network (the form is 'user@server.domain' without a leading '@')",
"example": [
"jz@mamot.fr",
"libreoffice@fosstodon.org"
],
"name": "Mastodon address",
"pattern": "^[A-Za-z0-9_]+([A-Za-z0-9_\\.]+[A-Za-z0-9_]+)?@[\\d\\w\\.\\-]+[0-9a-z]+$",
"prefix": "P4033",
"uri_format": "https://fedirect.toolforge.org/?id=$1"
}
},
"mat": {
"aberowl": {
"description": "Minimal set of terms for anatomy",
Expand Down Expand Up @@ -94174,11 +94208,24 @@
"example": "1981638",
"homepage": "https://publons.com/researcher",
"mappings": {
"biolink": "ResearchID"
"biolink": "ResearchID",
"wikidata": "P3829"
},
"name": "Publons Researcher",
"pattern": "^\\d+$",
"uri_format": "https://publons.com/researcher/$1"
"uri_format": "https://publons.com/researcher/$1",
"wikidata": {
"description": "identifier of an author or reviewer, in Publons that redirects, along with P1053, to an ID in Clarivate's Web of Science",
"example": [
"2388520",
"2544783",
"654601"
],
"name": "Publons author ID",
"pattern": "^\\d+$",
"prefix": "P3829",
"uri_format": "https://publons.com/researcher/$1/"
}
},
"pubmed": {
"biocontext": {
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@ deps =
types-Markdown
types-tabulate
types-requests
types-python-dateutil
skip_install = true
commands = mypy --install-types --non-interactive --ignore-missing-imports src/bioregistry/
commands = mypy --ignore-missing-imports src/bioregistry/
description = Run the mypy tool to check static typing on the project.

[testenv:pyroma]
Expand Down

0 comments on commit f2faef4

Please sign in to comment.