Best Python code snippet using pandera_python
github_link.py
Source: github_link.py
...21def setup(app):22 app.add_config_value('github_user', None, 'env')23 app.add_config_value('github_project', None, 'env')24 app.connect('html-page-context', add_doc_link)25 def linkcode_resolve(domain, info):26 """ Resolves provided object to corresponding github URL27 """28 # TODO: js?29 if domain != 'py':30 return None31 if not (app.config.github_user and app.config.github_project):32 return None33 module, fullname = info['module'], info['fullname']34 # TODO: attributes/properties don't have modules, maybe try to look35 # them up based on their cached host object?36 if not module:37 return None38 obj = importlib.import_module(module)39 for item in fullname.split('.'):...
linkcode.py
Source: linkcode.py
1# -*- coding: utf-8 -*-2"""3 sphinx.ext.linkcode4 ~~~~~~~~~~~~~~~~~~~5 Add external links to module code in Python object descriptions.6 :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.7 :license: BSD, see LICENSE for details.8"""9from docutils import nodes10import sphinx11from sphinx import addnodes12from sphinx.errors import SphinxError13from sphinx.locale import _14if False:15 # For type annotation16 from typing import Any, Dict, Set # NOQA17 from sphinx.application import Sphinx # NOQA18class LinkcodeError(SphinxError):19 category = "linkcode error"20def doctree_read(app, doctree):21 # type: (Sphinx, nodes.Node) -> None22 env = app.builder.env23 resolve_target = getattr(env.config, 'linkcode_resolve', None)24 if not callable(env.config.linkcode_resolve):25 raise LinkcodeError(26 "Function `linkcode_resolve` is not given in conf.py")27 domain_keys = dict(28 py=['module', 'fullname'],29 c=['names'],30 cpp=['names'],31 js=['object', 'fullname'],32 )33 for objnode in doctree.traverse(addnodes.desc):34 domain = objnode.get('domain')35 uris = set() # type: Set[unicode]36 for signode in objnode:37 if not isinstance(signode, addnodes.desc_signature):38 continue39 # Convert signode to a specified format40 info = {}41 for key in domain_keys.get(domain, []):42 value = signode.get(key)43 if not value:44 value = ''45 info[key] = value46 if not info:47 continue48 # Call user code to resolve the link49 uri = resolve_target(domain, info)50 if not uri:51 # no source52 continue53 if uri in uris or not uri:54 # only one link per name, please55 continue56 uris.add(uri)57 onlynode = addnodes.only(expr='html')58 onlynode += nodes.reference('', '', internal=False, refuri=uri)59 onlynode[0] += nodes.inline('', _('[source]'),60 classes=['viewcode-link'])61 signode += onlynode62def setup(app):63 # type: (Sphinx) -> Dict[unicode, Any]64 app.connect('doctree-read', doctree_read)65 app.add_config_value('linkcode_resolve', None, '')...
Check out the latest blogs from LambdaTest on this topic:
I routinely come across test strategy documents when working with customers. They are lengthy—100 pages or more—and packed with monotonous text that is routinely reused from one project to another. Yawn once more— the test halt and resume circumstances, the defect management procedure, entrance and exit criteria, unnecessary generic risks, and in fact, one often-used model replicates the requirements of textbook testing, from stress to systems integration.
When I started writing tests with Cypress, I was always going to use the user interface to interact and change the application’s state when running tests.
Pair testing can help you complete your testing tasks faster and with higher quality. But who can do pair testing, and when should it be done? And what form of pair testing is best for your circumstance? Check out this blog for more information on how to conduct pair testing to optimize its benefits.
People love to watch, read and interact with quality content — especially video content. Whether it is sports, news, TV shows, or videos captured on smartphones, people crave digital content. The emergence of OTT platforms has already shaped the way people consume content. Viewers can now enjoy their favorite shows whenever they want rather than at pre-set times. Thus, the OTT platform’s concept of viewing anything, anytime, anywhere has hit the right chord.
Have you ever visited a website that only has plain text and images? Most probably, no. It’s because such websites do not exist now. But there was a time when websites only had plain text and images with almost no styling. For the longest time, websites did not focus on user experience. For instance, this is how eBay’s homepage looked in 1999.
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!