From a2bc571fa6dfb27cca2201957d6ddf1ed332f5a6 Mon Sep 17 00:00:00 2001 From: James McKinney <26463+jpmckinney@users.noreply.github.com> Date: Thu, 22 Aug 2024 16:30:03 -0400 Subject: [PATCH] docs: Use typer role --- app/models.py | 20 ++++++++++---------- app/settings.py | 8 ++++---- docs/contributing/index.rst | 4 ++-- docs/deployment/index.rst | 6 +++--- docs/requirements.txt | 2 +- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/app/models.py b/app/models.py index 7f1e623f..66725f86 100644 --- a/app/models.py +++ b/app/models.py @@ -154,7 +154,7 @@ class ApplicationStatus(StrEnum): #: Credere sends an invitation to the borrower. #: - #: (:doc:`fetch-awards`) + #: (:typer:`python-m-app-fetch-awards`) PENDING = "PENDING" #: Borrower declines the invitation. #: @@ -183,7 +183,7 @@ class ApplicationStatus(StrEnum): INFORMATION_REQUESTED = "INFORMATION_REQUESTED" #: Borrower doesn't accept, or doesn't submit the application or information requested. #: - #: (:doc:`update-applications-to-lapsed`) + #: (:typer:`python-m-app-update-applications-to-lapsed`) LAPSED = "LAPSED" #: Lender pre-approves the application, and Credere asks the borrower to upload its contract. #: @@ -207,11 +207,11 @@ class BorrowerStatus(StrEnum): class MessageType(StrEnum): - #: PENDING (:doc:`fetch-awards`) + #: PENDING (:typer:`python-m-app-fetch-awards`) BORROWER_INVITATION = "BORROWER_INVITATION" - #: PENDING (:doc:`send-reminders`) + #: PENDING (:typer:`python-m-app-send-reminders`) BORROWER_PENDING_APPLICATION_REMINDER = "BORROWER_PENDING_APPLICATION_REMINDER" - #: ACCEPTED (:doc:`send-reminders`) + #: ACCEPTED (:typer:`python-m-app-send-reminders`) BORROWER_PENDING_SUBMIT_REMINDER = "BORROWER_PENDING_SUBMIT_REMINDER" #: ACCEPTED → SUBMITTED (``/applications/submit``) SUBMISSION_COMPLETED = "SUBMISSION_COMPLETED" @@ -235,7 +235,7 @@ class MessageType(StrEnum): CONTRACT_UPLOAD_CONFIRMATION_TO_FI = "CONTRACT_UPLOAD_CONFIRMATION_TO_FI" #: CONTRACT_UPLOADED → COMPLETED (``/applications/{id}/complete-application``) CREDIT_DISBURSED = "CREDIT_DISBURSED" - #: STARTED | CONTRACT_UPLOADED (:doc:`sla-overdue-applications`) + #: STARTED | CONTRACT_UPLOADED (:typer:`python-m-app-sla-overdue-applications`) OVERDUE_APPLICATION = "OVERDUE_APPLICATION" #: ACCEPTED (``/applications/find-alternative-credit-option``) APPLICATION_COPIED = "APPLICATION_COPIED" @@ -645,7 +645,7 @@ def pending_introduction_reminder(cls, session: Session) -> "Query[Self]": :attr:`~app.settings.Settings.reminder_days_before_expiration` days from now, and whose borrower hasn't already received a reminder to accept and may receive Credere invitations. - .. seealso:: :doc:`send-reminders` + .. seealso:: :typer:`python-m-app-send-reminders` """ return ( session.query(cls) @@ -666,7 +666,7 @@ def pending_submission_reminder(cls, session: Session) -> "Query[Self]": :attr:`~app.settings.Settings.reminder_days_before_lapsed` days from now, and whose borrower hasn't already received a reminder to submit. - .. seealso:: :doc:`send-reminders` + .. seealso:: :typer:`python-m-app-send-reminders` """ lapsed_at = col(cls.borrower_accepted_at) + timedelta(days=app_settings.days_to_change_to_lapsed) @@ -684,7 +684,7 @@ def lapseable(cls, session: Session) -> "Query[Self]": borrower to respond (PENDING, ACCEPTED, INFORMATION_REQUESTED) for :attr:`~app.settings.Settings.days_to_change_to_lapsed` days. - .. seealso:: :doc:`update-applications-to-lapsed` + .. seealso:: :typer:`python-m-app-update-applications-to-lapsed` """ delta = timedelta(days=app_settings.days_to_change_to_lapsed) @@ -739,7 +739,7 @@ def archivable(cls, session: Session) -> "Query[Self]": (DECLINED, REJECTED, COMPLETED, LAPSED) for :attr:`~app.settings.Settings.days_to_erase_borrowers_data` days. - .. seealso:: :doc:`remove-dated-application-data` + .. seealso:: :typer:`python-m-app-remove-dated-application-data` """ delta = timedelta(days=app_settings.days_to_erase_borrowers_data) diff --git a/app/settings.py b/app/settings.py index b13fbd1b..b65d144c 100644 --- a/app/settings.py +++ b/app/settings.py @@ -62,7 +62,7 @@ class Settings(BaseSettings): #: .. seealso:: #: #: - :attr:`~app.settings.Settings.reminder_days_before_expiration` - #: - :doc:`fetch-awards` + #: - :typer:`python-m-app-fetch-awards` application_expiration_days: int = 7 #: The number of days before a PENDING application's expiration date, past which the borrower is sent a reminder. #: @@ -89,7 +89,7 @@ class Settings(BaseSettings): #: #: .. seealso:: #: - #: - :doc:`sla-overdue-applications` + #: - :typer:`python-m-app-sla-overdue-applications` #: - :meth:`app.models.Application.days_waiting_for_lender` progress_to_remind_started_applications: float = 0.7 #: The number of days for which to wait for the borrower to respond, after which an application becomes LAPSED. @@ -105,9 +105,9 @@ class Settings(BaseSettings): #: The application token to the `SECOP API `__. colombia_secop_app_token: str = "" - #: The number of items to retrieve at once in :doc:`fetch-awards`. + #: The number of items to retrieve at once in :typer:`python-m-app-fetch-awards`. secop_pagination_limit: int = 5 - #: The number of days of past items to retrieve the first time :doc:`fetch-awards` runs. + #: The number of days of past items to retrieve the first time :typer:`python-m-app-fetch-awards` runs. secop_default_days_from_ultima_actualizacion: int = 365 # Email addresses diff --git a/docs/contributing/index.rst b/docs/contributing/index.rst index 87058770..0cfecf43 100644 --- a/docs/contributing/index.rst +++ b/docs/contributing/index.rst @@ -209,11 +209,11 @@ Update translations .. note:: - The ``babel.cfg`` file indicates from which ``StrEnum`` classes to extract messages. If Credere is deployed in English, we must add an ``en`` locale to translate these. Otherwise, the translations will be the database values, like "MICRO" instead of "0 to 10". + The ``babel.cfg`` file lists from which ``StrEnum`` classes to extract messages. If Credere is deployed in English, we need to add an ``en`` locale to translate these. Otherwise, the translations will be database values like "MICRO", not "0 to 10". .. admonition:: Reference - ``pybabel`` commands in `Translate with Transifex `__ + The ``pybabel`` commands are from `Translate with Transifex `__. Update API ~~~~~~~~~~ diff --git a/docs/deployment/index.rst b/docs/deployment/index.rst index 8c82589c..79624713 100644 --- a/docs/deployment/index.rst +++ b/docs/deployment/index.rst @@ -14,8 +14,8 @@ Issues and `performance `__ \ No newline at end of file +.. seealso:: `Performance Metrics `__ diff --git a/docs/requirements.txt b/docs/requirements.txt index 6e178dc0..599b55f4 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,4 +1,4 @@ -r ../requirements.txt furo sphinx-design -sphinxcontrib-typer>=0.4 +sphinxcontrib-typer>=0.4.1