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

Fix warnings when generating ReadTheDocs #1509

Merged
merged 3 commits into from
Nov 23, 2021
Merged
Show file tree
Hide file tree
Changes from 2 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
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def __init__(
] = None, # aries message: ..._dict for historic compat on all aries msgs
credential_offer_dict: Union[Mapping, CredentialOffer] = None, # aries message
credential_offer: Union[Mapping, IndyCredAbstract] = None, # indy artifact
credential_request: [Mapping, IndyCredRequest] = None, # indy artifact
credential_request: Union[Mapping, IndyCredRequest] = None, # indy artifact
credential_request_metadata: Mapping = None,
credential_id: str = None,
raw_credential: Union[Mapping, IndyCredential] = None, # indy cred as received
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from ......storage.vc_holder.base import VCHolder
from ......storage.vc_holder.vc_record import VCRecord
from ......vc.vc_ld import (
issue,
issue_vc as issue,
verify_credential,
VerifiableCredentialSchema,
LDProof,
Expand Down
2 changes: 1 addition & 1 deletion aries_cloudagent/protocols/present_proof/dif/pres_exch.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
StrOrDictField,
StrOrNumberField,
)
from ....vc.vc_ld.models import LinkedDataProofSchema
from ....vc.vc_ld import LinkedDataProofSchema


class ClaimFormat(BaseModel):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
UUID4,
StrOrDictField,
)
from ....vc.vc_ld.models import LinkedDataProofSchema
from ....vc.vc_ld import LinkedDataProofSchema

from .pres_exch import PresentationSubmissionSchema

Expand Down
26 changes: 13 additions & 13 deletions aries_cloudagent/vc/ld_proofs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
from .ld_proofs import sign, verify, derive
from .proof_set import ProofSet
from .purposes import (
ProofPurpose,
ControllerProofPurpose,
AuthenticationProofPurpose,
CredentialIssuancePurpose,
AssertionProofPurpose,
_ProofPurpose as ProofPurpose,
_ControllerProofPurpose as ControllerProofPurpose,
_AuthenticationProofPurpose as AuthenticationProofPurpose,
_CredentialIssuancePurpose as CredentialIssuancePurpose,
_AssertionProofPurpose as AssertionProofPurpose,
)
from .suites import (
LinkedDataProof,
LinkedDataSignature,
JwsLinkedDataSignature,
Ed25519Signature2018,
BbsBlsSignature2020,
BbsBlsSignatureProof2020,
_LinkedDataProof as LinkedDataProof,
_LinkedDataSignature as LinkedDataSignature,
_JwsLinkedDataSignature as JwsLinkedDataSignature,
_Ed25519Signature2018 as Ed25519Signature2018,
_BbsBlsSignature2020 as BbsBlsSignature2020,
_BbsBlsSignatureProof2020 as BbsBlsSignatureProof2020,
)
from .crypto import (
KeyPair,
WalletKeyPair,
_KeyPair as KeyPair,
_WalletKeyPair as WalletKeyPair,
)
from .document_loader import (
DocumentLoader,
Expand Down
6 changes: 3 additions & 3 deletions aries_cloudagent/vc/ld_proofs/crypto/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .key_pair import KeyPair
from .wallet_key_pair import WalletKeyPair
from .key_pair import KeyPair as _KeyPair
from .wallet_key_pair import WalletKeyPair as _WalletKeyPair

__all__ = ["KeyPair", "WalletKeyPair"]
__all__ = ["_KeyPair", "_WalletKeyPair"]
4 changes: 2 additions & 2 deletions aries_cloudagent/vc/ld_proofs/ld_proofs.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

from .document_loader import DocumentLoaderMethod
from .proof_set import ProofSet
from .purposes import ProofPurpose
from .suites import LinkedDataProof
from .purposes import _ProofPurpose as ProofPurpose
from .suites import _LinkedDataProof as LinkedDataProof
from .validation_result import DocumentVerificationResult


Expand Down
2 changes: 1 addition & 1 deletion aries_cloudagent/vc/ld_proofs/proof_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from .document_loader import DocumentLoaderMethod
from .error import LinkedDataProofException
from .purposes.proof_purpose import ProofPurpose
from .suites import LinkedDataProof
from .suites import _LinkedDataProof as LinkedDataProof
from .validation_result import DocumentVerificationResult, ProofResult


Expand Down
25 changes: 14 additions & 11 deletions aries_cloudagent/vc/ld_proofs/purposes/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
from .proof_purpose import ProofPurpose

from .assertion_proof_purpose import AssertionProofPurpose
from .authentication_proof_purpose import AuthenticationProofPurpose
from .controller_proof_purpose import ControllerProofPurpose
from .credential_issuance_purpose import CredentialIssuancePurpose
from .proof_purpose import ProofPurpose as _ProofPurpose
from .assertion_proof_purpose import AssertionProofPurpose as _AssertionProofPurpose
from .authentication_proof_purpose import (
AuthenticationProofPurpose as _AuthenticationProofPurpose,
)
from .controller_proof_purpose import ControllerProofPurpose as _ControllerProofPurpose
from .credential_issuance_purpose import (
CredentialIssuancePurpose as _CredentialIssuancePurpose,
)

__all__ = [
"ProofPurpose",
"ControllerProofPurpose",
"AssertionProofPurpose",
"AuthenticationProofPurpose",
"CredentialIssuancePurpose",
"_ProofPurpose",
"_ControllerProofPurpose",
"_AssertionProofPurpose",
"_AuthenticationProofPurpose",
"_CredentialIssuancePurpose",
]
26 changes: 14 additions & 12 deletions aries_cloudagent/vc/ld_proofs/suites/__init__.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
from .linked_data_proof import LinkedDataProof
from .linked_data_signature import LinkedDataSignature
from .jws_linked_data_signature import JwsLinkedDataSignature
from .ed25519_signature_2018 import Ed25519Signature2018
from .bbs_bls_signature_2020 import BbsBlsSignature2020
from .bbs_bls_signature_proof_2020 import BbsBlsSignatureProof2020
from .linked_data_proof import LinkedDataProof as _LinkedDataProof
from .linked_data_signature import LinkedDataSignature as _LinkedDataSignature
from .jws_linked_data_signature import JwsLinkedDataSignature as _JwsLinkedDataSignature
from .ed25519_signature_2018 import Ed25519Signature2018 as _Ed25519Signature2018
from .bbs_bls_signature_2020 import BbsBlsSignature2020 as _BbsBlsSignature2020
from .bbs_bls_signature_proof_2020 import (
BbsBlsSignatureProof2020 as _BbsBlsSignatureProof2020,
)

__all__ = [
"LinkedDataProof",
"LinkedDataSignature",
"JwsLinkedDataSignature",
"Ed25519Signature2018",
"BbsBlsSignature2020",
"BbsBlsSignatureProof2020",
"_LinkedDataProof",
"_LinkedDataSignature",
"_JwsLinkedDataSignature",
"_Ed25519Signature2018",
"_BbsBlsSignature2020",
"_BbsBlsSignatureProof2020",
]
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

from ....wallet.util import b64_to_bytes, bytes_to_b64

from ..crypto import KeyPair
from ..crypto import _KeyPair as KeyPair
from ..document_loader import DocumentLoaderMethod
from ..error import LinkedDataProofException
from ..purposes import ProofPurpose
from ..purposes import _ProofPurpose as ProofPurpose
from ..validation_result import ProofResult

from .bbs_bls_signature_2020_base import BbsBlsSignature2020Base
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
from ....utils.dependencies import assert_ursa_bbs_signatures_installed
from ....wallet.util import b64_to_bytes, bytes_to_b64

from ..crypto import KeyPair
from ..crypto import _KeyPair as KeyPair
from ..error import LinkedDataProofException
from ..validation_result import ProofResult
from ..document_loader import DocumentLoaderMethod
from ..purposes import ProofPurpose
from ..purposes import _ProofPurpose as ProofPurpose

from .bbs_bls_signature_2020 import BbsBlsSignature2020
from .linked_data_proof import DeriveProofResult
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from datetime import datetime
from typing import Union

from ..crypto import KeyPair
from ..crypto import _KeyPair as KeyPair

from .jws_linked_data_signature import JwsLinkedDataSignature

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from ....wallet.util import b64_to_bytes, bytes_to_b64, str_to_b64, b64_to_str

from ..crypto import KeyPair
from ..crypto import _KeyPair as KeyPair
from ..document_loader import DocumentLoaderMethod
from ..error import LinkedDataProofException

Expand Down
2 changes: 1 addition & 1 deletion aries_cloudagent/vc/ld_proofs/suites/linked_data_proof.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from ..constants import SECURITY_CONTEXT_URL
from ..document_loader import DocumentLoaderMethod
from ..error import LinkedDataProofException
from ..purposes import ProofPurpose
from ..purposes import _ProofPurpose as ProofPurpose
from ..validation_result import ProofResult


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from ..constants import SECURITY_CONTEXT_URL
from ..document_loader import DocumentLoaderMethod
from ..error import LinkedDataProofException
from ..purposes import ProofPurpose
from ..purposes import _ProofPurpose as ProofPurpose
from ..validation_result import ProofResult

from .linked_data_proof import LinkedDataProof
Expand Down
14 changes: 7 additions & 7 deletions aries_cloudagent/vc/vc_ld/__init__.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
from .issue import issue
from .issue import issue as issue_vc
from .verify import verify_presentation, verify_credential
from .prove import create_presentation, sign_presentation, derive_credential
from .validation_result import PresentationVerificationResult
from .models import (
VerifiableCredential,
LDProof,
LinkedDataProofSchema,
VerifiableCredentialSchema,
CredentialSchema,
_VerifiableCredential as VerifiableCredential,
_LDProof as LDProof,
_LinkedDataProofSchema as LinkedDataProofSchema,
_VerifiableCredentialSchema as VerifiableCredentialSchema,
_CredentialSchema as CredentialSchema,
)

__all__ = [
"issue",
"issue_vc",
"verify_presentation",
"verify_credential",
"create_presentation",
Expand Down
20 changes: 10 additions & 10 deletions aries_cloudagent/vc/vc_ld/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
from .credential import (
VerifiableCredential,
VerifiableCredentialSchema,
CredentialSchema,
VerifiableCredential as _VerifiableCredential,
VerifiableCredentialSchema as _VerifiableCredentialSchema,
CredentialSchema as _CredentialSchema,
)
from .linked_data_proof import (
LDProof,
LinkedDataProofSchema,
LDProof as _LDProof,
LinkedDataProofSchema as _LinkedDataProofSchema,
)

__all__ = [
"VerifiableCredential",
"CredentialSchema",
"VerifiableCredentialSchema",
"LDProof",
"LinkedDataProofSchema",
"_VerifiableCredential",
"_CredentialSchema",
"_VerifiableCredentialSchema",
"_LDProof",
"_LinkedDataProofSchema",
]
2 changes: 1 addition & 1 deletion aries_cloudagent/vc/vc_ld/tests/test_vc_ld.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from ....core.in_memory import InMemoryProfile
from ...ld_proofs import Ed25519Signature2018, WalletKeyPair, BbsBlsSignature2020
from ...vc_ld import (
issue,
issue_vc as issue,
verify_credential,
create_presentation,
sign_presentation,
Expand Down
17 changes: 16 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
import os
import sys

from sphinx.domains.python import PythonDomain

sys.path.insert(0, os.path.abspath(".."))

autodoc_mock_imports = [
Expand Down Expand Up @@ -41,7 +43,6 @@
"dateutil",
"jsonpath_ng",
"unflatten",
"aries_cloudagent.vc",
]

# "aries_cloudagent.tests.test_conductor",
Expand Down Expand Up @@ -236,3 +237,17 @@

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {"https://docs.python.org/": None}

# To supress cross-reference warnings
# https://github.com/sphinx-doc/sphinx/issues/3866#issuecomment-768167824
class PatchedPythonDomain(PythonDomain):
def resolve_xref(self, env, fromdocname, builder, typ, target, node, contnode):
if "refspecific" in node:
del node["refspecific"]
return super(PatchedPythonDomain, self).resolve_xref(
env, fromdocname, builder, typ, target, node, contnode
)


def setup(sphinx):
sphinx.add_domain(PatchedPythonDomain, override=True)