Skip to main content

APICURON Client

Tests Cookiecutter template from @cthoyt PyPI PyPI - Python Version PyPI - License Documentation Status DOI Code style: black

An unofficial client for interacting with the APICURON curation metadatabase.

💪 Getting Started

The following example shows how you can prepare a submission of a new resource to APICURON. Because apicuron_client uses PyDantic under the hood, the JSON is validated and automatically converted into programmatic models. The Description.update_remote() function takes care of interacting with the API and loading the APICURON_TOKEN from the environment or a config file with pystow.

from apicuron_client import Description

payload = {
   "resource_id": "Biomappings",
   "resource_name": "Biomappings",
   "resource_uri": "https://biomappings.github.io/biomappings/",
   "resource_url": "https://biomappings.github.io/biomappings/",
   "resource_long_name": "Biomappings",
   "resource_description": "Community curated and predicted equivalences and related mappings between named biological entities that are not available from primary sources.",
   "terms_def": [
      {
         "activity_term": "novel_curation",
         "activity_name": "Curated novel mapping",
         "activity_category": "generation",
         "score": 50,
         "description": "Curated a novel mapping between two entities"
      },
      {
         "activity_term": "validate_prediction",
         "activity_name": "Validate predicted mapping",
         "activity_category": "generation",
         "score": 50,
         "description": "Affirmed the correctness of a predicted mapping"
      },
      {
         "activity_term": "invalidate_prediction",
         "activity_name": "Invalidate predicted mapping",
         "activity_category": "generation",
         "score": 50,
         "description": "Affirmed the incorrectness of a predicted mapping"
      }
   ],
   "achievements_def": [
      {
         "category": "1",
         "name": "Newbie curator",
         "count_threshold": 10,
         "type": "badge",
         "list_terms": [
            "novel_curation",
            "validate_prediction",
            "invalidate_prediction"
         ],
         "color_code": "#055701"
      }
   ]
}
description = Description(**payload)
description.update_remote()

The results can then be seen on the APICURON website at https://apicuron.org/database?resource_uri=https:%2F%2Fbiomappings.github.io%2Fbiomappings%2F.

🚀 Installation

The most recent release can be installed from PyPI with:

$ pip install apicuron_client

The most recent code and data can be installed directly from GitHub with:

$ pip install git+https://github.com/cthoyt/apicuron-client.git

To install in development mode, use the following:

$ git clone git+https://github.com/cthoyt/apicuron-client.git
$ cd apicuron-client
$ pip install -e .

👐 Contributing

Contributions, whether filing an issue, making a pull request, or forking, are appreciated. See CONTRIBUTING.rst for more information on getting involved.

👀 Attribution

⚖️ License

The code in this package is licensed under the MIT License.

📖 Citation

This project isn't officially from the APICURON team, but if you like it, please cite their paper:

@article{Hatos2021,
   author = {Hatos, Andr{\'{a}}s and Quaglia, Federica and Piovesan, Damiano and Tosatto, Silvio C E},
   doi = {10.1093/database/baab019},
   issn = {1758-0463},
   journal = {Database},
   month = {apr},
   title = {{APICURON: a database to credit and acknowledge the work of biocurators}},
   url = {https://academic.oup.com/database/article/doi/10.1093/database/baab019/6244733},
   volume = {2021},
   year = {2021}
}

Acknowledgements

🍪 Cookiecutter

This package was created with @audreyfeldroy's cookiecutter package using @cthoyt's cookiecutter-snekpack template.

🛠️ For Developers

The final section of the README is for if you want to get involved by making a code contribution.

❓ Testing

After cloning the repository and installing tox with pip install tox, the unit tests in the tests/ folder can be run reproducibly with:

$ tox

Additionally, these tests are automatically re-run with each commit in a GitHub Action.

📦 Making a Release

After installing the package in development mode and installing tox with pip install tox, the commands for making a new release are contained within the finish environment in tox.ini. Run the following from the shell:

$ tox -e finish

This script does the following:

  1. Uses BumpVersion to switch the version number in the setup.cfg and src/apicuron_client/version.py to not have the -dev suffix
  2. Packages the code in both a tar archive and a wheel
  3. Uploads to PyPI using twine. Be sure to have a .pypirc file configured to avoid the need for manual input at this step
  4. Push to GitHub. You'll need to make a release going with the commit where the version was bumped.
  5. Bump the version to the next patch. If you made big changes and want to bump the version by minor, you can use tox -e bumpversion minor after.

Metadata

Release files for apicuron-client 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apicuron-client 0.1.3
File Size Uploaded Provenance Actions
apicuron_client-0.1.3.tar.gz 15.2 kB Without provenance Details for apicuron_client-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for apicuron-client 0.1.3
File Interpreter ABI Platform Actions
apicuron_client-0.1.3-py3-none-any.whl Python 3 none any Details for apicuron_client-0.1.3-py3-none-any.whl

Total release size: 24.3 kB

Release files / apicuron_client-0.1.3.tar.gz

Download URL apicuron_client-0.1.3.tar.gz
Size 15.2 kB
Tags Source
SHA-256 checksum
How to use checksums
228e3223cc858a428b0fb1ab65b171e93ad1c3ef9ee7d7f6314c9ac88683d8d1
BLAKE2b-256 checksum
How to use checksums
66d5a956240b945007d4082fbb218b0704edcbe254acedb2f61232262c3a55f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release files / apicuron_client-0.1.3-py3-none-any.whl

Download URL apicuron_client-0.1.3-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7885c45190249b6b2e726e40181d9f4cd06760e07a06cec91aabf3ba5a478f9a
BLAKE2b-256 checksum
How to use checksums
96ad517f9077149c1408f70df151b9d309d6413230cec9105e35fba905e186cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Security for apicuron-client 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page