Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cicd: do cleanup to make checks happy #338

Merged
merged 2 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install '.[docs]'
python3 -m pip install '.[docs,etl,pg]'

- name: Attempt docs build
working-directory: ./docs
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
gene.etl.exceptions
===================
gene.etl.update
===============

.. automodule:: gene.etl.exceptions
.. automodule:: gene.etl.update
:members:
:undoc-members:
:special-members: __init__
Expand Down
8 changes: 5 additions & 3 deletions docs/source/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,19 @@ Database connections
gene.database.dynamodb
gene.database.postgresql

Source ETL
----------
.. _data_updates_api:

Data updates
------------

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

gene.etl.update
gene.etl.base
gene.etl.ensembl
gene.etl.hgnc
gene.etl.ncbi
gene.etl.exceptions
gene.etl.merge
2 changes: 1 addition & 1 deletion docs/source/managing_data/dynamodb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The Gene Normalizer can store and retrieve gene records from a `local DynamoDB <

.. note::

See the :ref:`DynamoDB handler API reference<dynamodb_api>` for information on programmatic access.
See the :py:mod:`DynamoDB handler API reference <gene.database.dynamodb>` for information on programmatic access.

Local setup
-----------
Expand Down
2 changes: 1 addition & 1 deletion docs/source/managing_data/loading_and_updating_data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The Gene Normalizer defines a command line tool for data management. It includes

.. note::

See the :ref:`ETL API documentation<etl-api>` for information on programmatic access to the data loader classes.
See the :ref:`data updates API documentation <data_updates_api>` for information on programmatic access to the data loader classes.


.. click:: gene.cli:cli
Expand Down
2 changes: 1 addition & 1 deletion docs/source/managing_data/postgresql.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The Gene Normalizer can store and retrieve gene records from a `PostgreSQL <http

.. note::

See the :ref:`PostgreSQL handler API reference<postgres_api>` for information on programmatic access.
See the :py:mod:`PostgreSQL handler API reference <gene.database.postgresql>` for information on programmatic access.

Local setup
--------------
Expand Down
15 changes: 3 additions & 12 deletions docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The individual endpoints are:
Internal Python API
-------------------

Each search mode can be accessed directly within Python using the :ref:`query API<query-api>`:
Each search mode can be accessed directly within Python using the :py:class:`QueryHandler class <gene.query.QueryHandler>`:

.. code-block:: pycon

Expand Down Expand Up @@ -58,7 +58,7 @@ Users hoping for a more explicit connection declaration may instead call a datab
)
q = QueryHandler(pg_db)

See the API documentation for the :ref:`database <database_api>`, :ref:`DynamoDB <dynamodb_api>`, and :ref:`PostgreSQL <postgres_api>` modules for more details.
See the API documentation for the :py:mod:`database <gene.database.database>`, :py:mod:`DynamoDB <gene.database.dynamodb>`, and :py:mod:`PostgreSQL <gene.database.postgresql>` modules for more details.

Inputs
------
Expand All @@ -68,13 +68,4 @@ Gene symbols and aliases often contain only a handful of characters, raising a n
Match types
-----------

The **best match** for a search string is determined by which fields in a gene record that it matches against. The Gene Normalizer will first try to match a search string against known concept IDs and gene symbols, then check for matches against previous or deprecated symbols, then aliases, etc. Matches are case-insensitive but must otherwise be exact.

.. autoclass:: gene.schemas.MatchType
:members:
:undoc-members:
:show-inheritance:

.. note::

The `FUZZY_MATCH` Match Type is not currently used by the Gene Normalizer.
The **best match** for a search string is determined by which fields in a gene record that it matches against. The Gene Normalizer will first try to match a search string against known concept IDs and gene symbols, then check for matches against previous or deprecated symbols, then aliases, etc. Matches are case-insensitive but must otherwise be exact. See the :py:class:`MatchType enum description <gene.schemas.MatchType>` for further information.
5 changes: 4 additions & 1 deletion src/gene/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,10 @@ def _get_service_meta() -> ServiceMeta:

:return: Service Meta
"""
return ServiceMeta(version=__version__, response_datetime=str(datetime.now()))
return ServiceMeta(
version=__version__,
response_datetime=str(datetime.datetime.now(tz=datetime.timezone.utc)),
)

def search(
self,
Expand Down
7 changes: 6 additions & 1 deletion src/gene/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ class Chromosome(str, Enum):


class MatchType(IntEnum):
"""Define string constraints for use in Match Type attributes."""
"""Define string constraints for use in Match Type attributes.

.. note::

The `FUZZY_MATCH` Match Type is not currently used by the Gene Normalizer.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we just remove this in a separate issue?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@korikuzma yeah it feels a little optimistic at this point

"""

CONCEPT_ID = 100
SYMBOL = 100
Expand Down
Loading