Skip to content

Commit

Permalink
docs: incorporate latest template elements
Browse files Browse the repository at this point in the history
  • Loading branch information
jsstevenson committed Mar 22, 2024
1 parent 547f4a1 commit c2450ea
Show file tree
Hide file tree
Showing 26 changed files with 166 additions and 124 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Gene Normalizer
</h1>

![PyPI - Python Version](https://img.shields.io/pypi/pyversions/gene-normalizer?color=gr) [![tests](https://github.com/cancervariants/gene-normalization/actions/workflows/github-actions.yml/badge.svg)](https://github.com/cancervariants/gene-normalization/actions/workflows/github-actions.yml) [![DOI](https://zenodo.org/badge/309797998.svg)](https://zenodo.org/badge/latestdoi/309797998)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/gene-normalizer?color=gr) [![image](https://img.shields.io/pypi/l/gene-normalizer.svg)](https://pypi.python.org/pypi/gene-normalizer) [![image](https://img.shields.io/pypi/pyversions/gene-normalizer.svg)](https://pypi.python.org/pypi/gene-normalizer) [![Actions status](https://github.com/cancervariants/gene-normalization/actions/workflows/github-actions.yml/badge.svg)](https://github.com/cancervariants/gene-normalization/actions/workflows/github-actions.yml) [![DOI](https://zenodo.org/badge/309797998.svg)](https://zenodo.org/badge/latestdoi/309797998)

## Overview
<!-- description -->
Expand All @@ -12,7 +12,7 @@ The Gene Normalizer provides tools for resolving ambiguous human gene references

**[Live service](https://normalize.cancervariants.org/gene)**

**[Documentation](https://gene-normalizer.readthedocs.io/en/latest/)** · [Installation](https://gene-normalizer.readthedocs.io/en/latest/install.html) · [Usage](https://gene-normalizer.readthedocs.io/en/latest/usage.html) · [API reference](https://gene-normalizer.readthedocs.io/en/latest/api/api.html)
**[Documentation](https://gene-normalizer.readthedocs.io/latest/)** · [Installation](https://gene-normalizer.readthedocs.io/latest/install.html) · [Usage](https://gene-normalizer.readthedocs.io/latest/usage.html) · [API reference](https://gene-normalizer.readthedocs.io/latest/api/api.html)

---

Expand All @@ -24,7 +24,7 @@ The Gene Normalizer is available on [PyPI](https://pypi.org/project/gene-normali
python3 -m pip install gene-normalizer
```

See [installation instruction](https://gene-normalizer.readthedocs.io/en/latest/install.html) in the documentation for a description of installation options and data setup requirements.
See [installation instruction](https://gene-normalizer.readthedocs.io/latest/install.html) in the documentation for a description of installation options and data setup requirements.

## Examples

Expand Down Expand Up @@ -54,7 +54,7 @@ $ curl 'https://normalize.cancervariants.org/gene/normalize?q=BRAF' | python -m
}
```

Or utilize the [Python API](https://gene-normalizer.readthedocs.io/en/latest/api/query_api.html) for fast access:
Or utilize the [Python API](https://gene-normalizer.readthedocs.io/latest/api/query_api.html) for fast access:

```python
>>> from gene.database import create_db
Expand All @@ -65,8 +65,8 @@ Or utilize the [Python API](https://gene-normalizer.readthedocs.io/en/latest/api
'hgnc:6407'
```

See the [usage](https://gene-normalizer.readthedocs.io/en/latest/usage.html) and [normalization](https://gene-normalizer.readthedocs.io/en/latest/normalizing_data/normalization.html) entries in the documentation for more.
See the [usage](https://gene-normalizer.readthedocs.io/latest/usage.html) and [normalization](https://gene-normalizer.readthedocs.io/latest/normalizing_data/normalization.html) entries in the documentation for more.

## Feedback and contributing

We welcome bug reports, feature requests, and code contributions from users and interested collaborators. The [documentation](https://gene-normalizer.readthedocs.io/en/latest/contributing.html) contains guidance for submitting feedback and contributing new code.
We welcome bug reports, feature requests, and code contributions from users and interested collaborators. The [documentation](https://gene-normalizer.readthedocs.io/latest/contributing.html) contains guidance for submitting feedback and contributing new code.
7 changes: 7 additions & 0 deletions docs/source/_templates/module_summary.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{{ fullname | underline }}

.. automodule:: {{ fullname }}
:members:
:undoc-members:
:special-members: __init__
:exclude-members: model_fields, model_config
10 changes: 0 additions & 10 deletions docs/source/api/api.rst

This file was deleted.

8 changes: 8 additions & 0 deletions docs/source/api/api/gene.database.database.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
gene.database.database
======================

.. automodule:: gene.database.database
:members:
:undoc-members:
:special-members: __init__
:exclude-members: model_fields, model_config
8 changes: 8 additions & 0 deletions docs/source/api/api/gene.database.dynamodb.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
gene.database.dynamodb
======================

.. automodule:: gene.database.dynamodb
:members:
:undoc-members:
:special-members: __init__
:exclude-members: model_fields, model_config
8 changes: 8 additions & 0 deletions docs/source/api/api/gene.database.postgresql.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
gene.database.postgresql
========================

.. automodule:: gene.database.postgresql
:members:
:undoc-members:
:special-members: __init__
:exclude-members: model_fields, model_config
8 changes: 8 additions & 0 deletions docs/source/api/api/gene.etl.base.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
gene.etl.base
=============

.. automodule:: gene.etl.base
:members:
:undoc-members:
:special-members: __init__
:exclude-members: model_fields, model_config
8 changes: 8 additions & 0 deletions docs/source/api/api/gene.etl.ensembl.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
gene.etl.ensembl
================

.. automodule:: gene.etl.ensembl
:members:
:undoc-members:
:special-members: __init__
:exclude-members: model_fields, model_config
8 changes: 8 additions & 0 deletions docs/source/api/api/gene.etl.exceptions.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
gene.etl.exceptions
===================

.. automodule:: gene.etl.exceptions
:members:
:undoc-members:
:special-members: __init__
:exclude-members: model_fields, model_config
8 changes: 8 additions & 0 deletions docs/source/api/api/gene.etl.hgnc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
gene.etl.hgnc
=============

.. automodule:: gene.etl.hgnc
:members:
:undoc-members:
:special-members: __init__
:exclude-members: model_fields, model_config
8 changes: 8 additions & 0 deletions docs/source/api/api/gene.etl.merge.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
gene.etl.merge
==============

.. automodule:: gene.etl.merge
:members:
:undoc-members:
:special-members: __init__
:exclude-members: model_fields, model_config
8 changes: 8 additions & 0 deletions docs/source/api/api/gene.etl.ncbi.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
gene.etl.ncbi
=============

.. automodule:: gene.etl.ncbi
:members:
:undoc-members:
:special-members: __init__
:exclude-members: model_fields, model_config
8 changes: 8 additions & 0 deletions docs/source/api/api/gene.query.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
gene.query
==========

.. automodule:: gene.query
:members:
:undoc-members:
:special-members: __init__
:exclude-members: model_fields, model_config
8 changes: 8 additions & 0 deletions docs/source/api/api/gene.schemas.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
gene.schemas
============

.. automodule:: gene.schemas
:members:
:undoc-members:
:special-members: __init__
:exclude-members: model_fields, model_config
10 changes: 0 additions & 10 deletions docs/source/api/database_api.rst

This file was deleted.

11 changes: 0 additions & 11 deletions docs/source/api/dynamodb_api.rst

This file was deleted.

58 changes: 0 additions & 58 deletions docs/source/api/etl_api.rst

This file was deleted.

40 changes: 40 additions & 0 deletions docs/source/api/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
API Reference
=============

Core functions
--------------

.. autosummary::
:nosignatures:
:toctree: api/
:template: module_summary.rst

gene.query
gene.schemas

Database connections
--------------------

.. autosummary::
:nosignatures:
:toctree: api/
:template: module_summary.rst

gene.database.database
gene.database.dynamodb
gene.database.postgresql

Source ETL
----------

.. autosummary::
:nosignatures:
:toctree: api/
:template: module_summary.rst

gene.etl.base
gene.etl.ensembl
gene.etl.hgnc
gene.etl.ncbi
gene.etl.exceptions
gene.etl.merge
10 changes: 0 additions & 10 deletions docs/source/api/postgres_api.rst

This file was deleted.

15 changes: 0 additions & 15 deletions docs/source/api/query_api.rst

This file was deleted.

7 changes: 7 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Changelog
---------

.. changelog::
:changelog-url: https://gene-normalizer.readthedocs.io/latest/#changelog
:github: https://github.com/cancervariants/gene-normalization/releases/
:pypi: https://pypi.org/project/gene-normalizer/
4 changes: 3 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "Gene Normalizer"
copyright = "2023, VICC"
copyright = "2023-2024, VICC"
author = "VICC"
html_title = "Gene Normalizer"

Expand All @@ -19,6 +19,8 @@
"sphinx_autodoc_typehints",
"sphinx.ext.linkcode",
"sphinx_copybutton",
"sphinx.ext.autosummary",
"sphinx_github_changelog",
]

templates_path = ["_templates"]
Expand Down
2 changes: 1 addition & 1 deletion docs/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ When running the web server, enable hot-reloading on new code changes: ::
Style
-----

Code style is managed by `Ruff <https://github.com/astral-sh/ruff>`_ and `Black <https://github.com/psf/black>`_, and should be checked via pre-commit hook before commits. Final QC is applied with GitHub Actions to every pull request.
Code style is managed by `Ruff <https://github.com/astral-sh/ruff>`_, and should be checked via pre-commit hook before commits. Final QC is applied with GitHub Actions to every pull request.

Tests
-----
Expand Down
11 changes: 10 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ Gene Normalizer |version|

.. image:: https://img.shields.io/pypi/pyversions/gene-normalizer?color=gr
:alt: PyPI - Python Version
:target: https://pypi.python.org/pypi/gene-normalizer

.. image:: https://img.shields.io/pypi/l/gene-normalizer.svg
:alt: License
:target: https://github.com/cancervariants/gene-normalization/blob/main/LICENSE

.. image:: https://img.shields.io/pypi/pyversions/gene-normalizer?color=gr
:alt: PyPI - supported Python versions

.. image:: https://github.com/cancervariants/gene-normalization/actions/workflows/github-actions.yml/badge.svg
:alt: tests status
Expand Down Expand Up @@ -48,6 +56,7 @@ The Gene Normalizer was created to support the `Knowledgebase Integration Projec
Usage<usage>
Normalizing data<normalizing_data/index>
Managing data<managing_data/index>
API<api/api>
API Reference<api/index>
Changelog<changelog>
Contributing<contributing>
License<license>
2 changes: 2 additions & 0 deletions docs/source/normalizing_data/normalization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ The ``gene.etl`` package contains classes for extracting relevant data for each
:members:
:undoc-members:
:show-inheritance:
:noindex:
:exclude-members: model_config, model_fields

.. _build_normalization:
Expand Down Expand Up @@ -52,6 +53,7 @@ After grouping is complete, a concept ID for each normalized concept is selected
:members:
:undoc-members:
:show-inheritance:
:noindex:

Normalized gene records are constructed by merging known data from all associated gene records. For array-like fields (e.g. aliases, cross-references to entries in other data sources), data from all sources are simply combined. For scalar-like fields (e.g. the gene's symbol), the value is selected from an individual source record according to the priority assigned to the source.

Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ docs = [
"sphinx-copybutton==0.5.2",
"sphinxext-opengraph==0.8.2",
"furo==2023.3.27",
"gravis==0.1.0"
"gravis==0.1.0",
"sphinx-github-changelog==1.2.1",
]

[project.urls]
Expand Down

0 comments on commit c2450ea

Please sign in to comment.