<commit_before>from pycoin.coins.groestlcoin.hash import groestlHash
from pycoin.coins.groestlcoin.parse import GRSParseAPI
from pycoin.coins.groestlcoin.uiclass import GroestlcoinUI
from pycoin.coins.groestlcoin.Block import Block as GrsBlock
from pycoin.coins.groestlcoin.Tx import Tx as GrsTx
from pycoin.networks.bitcoinish import create_bitcoinish_network


network = create_bitcoinish_network(
    symbol="GRS", network_name="Groestlcoin", subnet_name="mainnet", tx=GrsTx, block=GrsBlock,
    wif_prefix_hex="80", sec_prefix="GRSSEC:", address_prefix_hex="24", pay_to_script_prefix_hex="05",
    bip32_prv_prefix_hex="0488ade4", bip32_pub_prefix_hex="0488B21E", bech32_hrp="grs",
    magic_header_hex="F9BEB4D9", default_port=1331,
    ui_class=GroestlcoinUI,
    parse_api_class=GRSParseAPI,
    dns_bootstrap=[
        "groestlcoin.org", "electrum1.groestlcoin.org", "electrum2.groestlcoin.org",
        "jswallet.groestlcoin.org", "groestlsight.groestlcoin.org"
    ]
)
<commit_msg>GRS: Disable parsing attempts and tests when groestlcoin_hash isn't installed<commit_after>from pycoin.coins.groestlcoin.hash import groestlHash
from pycoin.coins.groestlcoin.parse import GRSParseAPI
from pycoin.coins.groestlcoin.uiclass import GroestlcoinUI
from pycoin.coins.groestlcoin.Block import Block as GrsBlock
from pycoin.coins.groestlcoin.Tx import Tx as GrsTx
from pycoin.networks.bitcoinish import create_bitcoinish_network


network = create_bitcoinish_network(
    symbol="GRS", network_name="Groestlcoin", subnet_name="mainnet", tx=GrsTx, block=GrsBlock,
    wif_prefix_hex="80", sec_prefix="GRSSEC:", address_prefix_hex="24", pay_to_script_prefix_hex="05",
    bip32_prv_prefix_hex="0488ade4", bip32_pub_prefix_hex="0488B21E", bech32_hrp="grs",
    magic_header_hex="F9BEB4D9", default_port=1331,
    ui_class=GroestlcoinUI,
    parse_api_class=GRSParseAPI,
    dns_bootstrap=[
        "groestlcoin.org", "electrum1.groestlcoin.org", "electrum2.groestlcoin.org",
        "jswallet.groestlcoin.org", "groestlsight.groestlcoin.org"
    ]
)

# Cause parsing to fail and tests to skip.
try:
    import groestlcoin_hash
except ImportError:
    network.Key = None
    none_parser = lambda *args, **kwargs: None
    for attr in "hierarchical_key private_key public_key address".split():
        setattr(network.parse, attr, none_parser)

{'fraction_non_alphanumeric': 0.09965782720273739, 'fraction_numerical': 0.02737382378100941, 'mean_word_length': 6.002994011976048, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4505472', 'n_tokens_mistral': 902, 'n_tokens_neox': 855, 'n_words': 143}