Saravanan666/pypi-org huggingface dataset:
Package: assep
ASSEPAPI desenvolvida para automatizar tarefas e obtensção de dados de softwares comumente utilizados em estudos de sistemas elétricos de potência.InstalaçãoVocê pode instalar a última versão do pacote via pip:pipinstallassepMódulosEste projeto contém os seguintes módulos:ImportSIGERMódulo base de todos os submódulos seguintes. É aqui que são definidos os códigos para download das informações do SIGER.Exemplo de uso:fromsigerimportImportSIGERoSIGER=ImportSIGER("https://siger.cepel.br/","XXX","XXX")# Relatório de Obrasdf_robras=oSIGER.get_robras()VerificaSIGERNeste módulo estão armazenadas todas as funções e comparações que realizamos para verificar a qualidade dos
decks carregados para o programa, assim como verificar possíveis erros após o carregamento.Exemplo de uso:fromsigerimportVerificaSIGERoSIGER=VerificaSIGER("https://siger.cepel.br/","XXX","XXX")# Verifica carregamentopath_decks=""# Opcionaldf_robras_original=""# Opcionalrelatorio_carregamento=oSIGER.verifica_carregamento(path_decks,df_robras_original)VisualizaSIGERNeste módulo é ampliada a visão de como os equipamentos estão relacionados dentro do SIGER e quais seus dependentes.Exemplo de uso:fromsigerimportVisualizaSIGERoSIGER=VisualizaSIGER("https://siger.cepel.br/","XXX","XXX")# Verifica carregamentodf_siger=oSIGER.get_base_siger()codigo_obra_para_visualizar=""relatorio_carregamento=oSIGER.verifica_carregamento(path_decks,df_robras_original)WebSIGERAqui estão as funcionalidades que permitem o carregamento de uma lista de decks para dentro do SIGER. É possível aqui, programar a execução do carregamento desde os 7 arquivos até o carregamento desde o início da base.Exemplo de uso:fromsigerimportWebSIGERimportpandasaspdoSIGER=WebSIGER("https://siger.cepel.br/","XXX","XXX")# Verifica carregamentodf_arquivos_carregar=pd.read_csv("ARQUIVO_CARGA",sep=";")chromedriver_path=r"D:\_APAGAR\_ChromeDriver\chromedriver.exe"flag_carregamento=oSIGER.carrega_siger(df_arquivos_carregar,chromedriver_path)LicençaEste projeto está licenciado sob a GNU GENERAL PUBLIC LICENSE. Isso significa que você pode copiar, distribuir e modificar o software, desde que você acompanhe quaisquer modificações com a mesma licença e que você disponibilize o código-fonte.Para mais detalhes, por favor veja o arquivo LICENSE no repositório ou visite o site oficial da GNU.
Package: assert-element
Simple TestCase assertion that finds element based on it’s path and check if it equals with given content.This is more useful than the default Django AssertContains
because it will find the element and show differences if something changed.
The test also tries to ignore differences in whitespaces as much as possible.Other similar projectsI released this package just to realize after few days, that there are some other very similar projects:https://pypi.org/project/django_html_assertions/https://django-with-asserts.readthedocs.io/en/latest/https://github.com/robjohncox/python-html-assertDocumentationThe full documentation is athttps://assert_element.readthedocs.io.QuickstartInstall by:pipinstallassert-elementUsage in tests:fromassert_elementimportAssertElementMixinclassMyTestCase(AssertElementMixin,TestCase):deftest_something(self):response=self.client.get(address)self.assertElementContains(response,'div[id="my-div"]','<div id="my-div">My div</div>',)The first attribute can be response or content itself.
Second attribute is the path to the element.
Third attribute is the expected content.Running TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxDevelopment commandspip install -r requirements_dev.txt
invoke -lCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.4.0 (2023-07-21)more readable output when assertion fails0.3.0 (2022-09-16)more tolerance in whitespace differences0.2.0 (2022-09-01)first attribute can be response or content itself0.1.0 (2022-08-21)First release on PyPI.
Package: assertEquals
assertEquals is an epic testing interface for Python.ScreenshotHere is assertEquals, barely functioning on Mac OS X:InstallationTo install the Python library and the executable:$ pip install assertEqualsTo also install the man page:$ make
$ sudo make installPlease consult the Makefile to confirm and/or change installation paths, etc.DocumentationYes, we’re hosting an old-school, unholy, Python-Perl, PDFLaTeX to HTML,
do-you-know-how-many-source-compiles-this-took monstrosity on Github Pages.http://whit537.github.com/assertEquals/What’s in a Name?assertEquals used to be called testosterone.Here’s why I changed it.
Package: assert-files
Assert-filesThis lib is a support assert to validate files content (txt, csv, pdf, docx, xlsx and etc.).FeaturesImplementedPDFForm ComparingNot ImplementePDF
*All text comparingTXTCSVDOCXXLSXInstallationFollow lib instructions onhttps://pypi.org/project/assert-files/pipinstallassert-filesHow to useYou are able to use assert_file.file.File object or just provide the path of local filefromassert_files.assert_filesimportassert_objectsfromassert_files.fileimportFilefields=['field1','field2']assert_objects(File(filepath='./tests/files/test_main.pdf'),File(filepath='./tests/files/test_main_copy.pdf'),fields=fields)fromassert_files.assert_filesimportassert_files_by_pathfields=['field1','field2']assert_files_by_path('./tests/files/test_main.pdf','./tests/files/test_main_copy.pdf',fields=fields)
Package: assert-info
Assert Info fixes up bare assert statements in your code so they include diagnostics when
they they’re hit.A problem that crops up when working in legacy code bases is the use ofassert X == Y,
when this fails you get minimal diagnostics.WhilstPytestsolves this by playing with AST at run
time, inserting diagnostics on the fly, you can’t just run all your code withPytest.The standard librariesunittestsolves
this problem with helper functions that include extra diagnostics by default, for instanceassertEqual.This package will inspect any file and replace assert statement which aren’t accompanied
by a message with aunitteststyle assertion so that when it fails you get diagnostics!To run the script:pipinstallassert-infoassert-info-h
Package: assertio
AssertioPseudo-functional Python api testing framework.Installationpip install assertioBasic UsageAssertio consists on create requests on a chain way, you can organize
this requests within a Runner class in order to define test cases.You can find below an example using thePokemon API# main.pyfromassertioimportRequest,RunnerclassMyRunner(Runner):deftest_get_pikachu(self):Request()\.to("/pokemon/pikachu")\.with_method("GET")\.perform()\.assert_http_ok()\.assert_response_field("name")\.equals("pikachu")MyRunner().start()This will run all the defined methods withinMyRunneras long as they start
withtest.Wait, where should I add my API URL?
Well you can export an enviromnent variable for that!$exportASSERTIO_BASE_URL=https://pokeapi.co/api/v2Once this environment variable is setup let's start the test!$pythonmain.pyShould do the trick!But that's not it!Assertio has many assertions defined and is flexible enough to let you define
your custom assertions and preconditions.You can chain as many assertions and preconditions as you want, just remember
to keep it simple, if your request chain is 15 lines long, maybe it's time
to consider to split it in smaller tests.Anyway, let's take a look to a more complex example using a POST to a custom
API.Remember to change theASSERTIO_BASE_URLenvironment variable$exportASSERTIO_BASE_URL=http://my-books-api-domain/api/v1And let's try to add a new resource.# main.pyfromassertioimportRequest,RunnerDEFAULT_HEADERS={"Content-Type":"application/json"}BOOK_PAYLOAD={"id":144,"title":"The Divine Comedy","author":{"id":12,"name":"Dante Alighieri","nationality":"Italian"},"year":1472}classMyRunner(Runner):deftest_create_book(self):Request()\.to("/books/")\.with_method("POST")\.with_headers(DEFAULT_HEADERS)\.with_body(BOOK_PAYLOAD)\.perform()\.assert_http_created()\.assert_response_field("author.nationality")\.equals("Italian")MyRunner().start()All the tests must start withtest!
Otherwisestart()method will not run it
Package: assertionchain
AssertionChain=============[![Build Status](https://travis-ci.org/justiniso/AssertionChain.svg)](https://travis-ci.org/justiniso/AssertionChain) [![Coverage Status](https://coveralls.io/repos/justiniso/AssertionChain/badge.svg?branch=master)](https://coveralls.io/r/justiniso/AssertionChain?branch=master)An AssertionChain is a wrapper for a group of commands that must happen in sequence.Installation:pip install assertionchainFeatures:- Control order of execution of a group of functions- Terminate execution of the rest of the chain if certain conditions are not metSimple example:AssertionChain()\.do(lambda: 1 + 1, 'Add two numbers together') \.expect(3, message='Step "{step}" did not result in expected value {expected}, value was: {actual}') \.perform()This is roughly equivalent to:val = 1 + 1assert val == 3The above example is certainly more readable, so why use an AssertionChain at all? For starters, the chainencourages the user to provide line-by-line detail about each step being executed. So if you want to understandwhy the above assertion failed, you would have to construct a detailed error message indicating the actual andexpected value along with the step that produced the actual value. That's not particularly hard:expected = 3val = 1 + 1message = 'Adding 1 + 1 did not result in expected value {expected}, value was: {actual}'.format(expected=expected,actual=val)assert val == expected, messageBut having to repeat this every time you run a command can become very, very tedious. AssertionChain provides thisAPI for performing incremental checks on each operation being executed in the chain, reducing the overhead of havingto type all of this out.It is a simple utility for grouping related actions and ensuring each step succeeds. For instance, assume we have asuite of functions that interact with files (get_contents, write_contents, delete_file). Their contract stipulatesthat each function will return True, False, or a value depending on whether or not they were successful. We can use anAssertionChain to make sure each step was successful:filename = '/tmp/sd9x0c2'new_contents = 'myfile'# Write the file, retrieve the contentscontents = AssertionChain()\.do(lambda: get_contents(filename), 'Retrieve file contents').expect(False, operator='is not')\.do(lambda: write_contents(filename, new_contents), 'Write file content').expect(True, operator='is')\.do(lambda: write_contents(filename, ''), 'Write empty file content').expect(True, operator='is')\.perform()# Delete the fileAssertionChain().do(lambda: delete_file(filename), 'Delete file').expect(True, operator='is').perform()
Package: assertive
Fluent AssertionsA DSL like assertion library that enables concise high quality assertions in your testsAssertionsAssertions follow a simple patternassert_that(subject).matches(comparison)# object or criteriaassert_that(subject).does_not_match(comparison)# object or criteria# Same as aboveassert_that(subject)==comparison# object or criteriaassert_that(subject)!=comparison# object or criteriaUsing matchers without criteria, just use classic assertsassert2==is_greater_than(1)Critera ObjectsCritera helps define complex assertions in a concise mannerSome examples of criteriaassert_that(5).matches(is_greater_than(4))assert_that(5).matches(is_greater_than_or_equal(5))assert_that(5).matches(is_odd())Logical criteria operationsassert_that(5).matches(is_odd()&is_greater_than(4))# Andassert_that(5).matches(is_odd()|is_greater_than(10))# Orassert_that(5).matches(~is_even())# InvertedMatchingBasicis_equal_toassert_that(5).matches(5)assert_that(5).matches(is_equal_to(5))assert_that("hello").matches("hello")assert_that("hello").matches(is_equal_to("hello"))is_greater_thanassert_that(5).matches(is_greater_than(3))assert_that(5)==is_greater_than(3)is_greater_than_or_equalassert_that(5).matches(is_greater_than_or_equal(5))is_less_thanassert_that(5).matches(is_less_than(10))is_less_than_or_equalassert_that(5).matches(is_less_than_or_equal(10))assert_that(5).matches(is_less_than_or_equal(5))is_betweenassert_that(5).matches(is_between(5,10))# passesassert_that(5).matches(is_between(5,10).exclusive)# failsassert_that(5).matches(is_between(5,10).inclusive)# passesis_same_instance_asx="hello"y=xassert_that(x).matches(is_same_instance_as(y))# passesas_string_matchesWhen the subject called with the str the subject matches the criteriaassert_that(5).matches(as_string_matches("5"))# passesassert_that(12345).matches(as_string_matches(ends_with("45")))# passesExceptionsExceptions can be tested in two different ways.As a callableassert_that(lambda:my_exception_raising_method(123)).matches(raises_exception(Exception))As a context managerwithraises_exception(Exception):my_exception_raising_method(123)
Package: asserto
Asserto:Asserto is a clean, fluent and powerful assertion library for python.  We recommend usingpytestas a test
runner but asserto will work well with any test runner.Asserto was developed using pytest as it's test runner and has apytest-assertoplugin that exposes asserto
through a fixture.  Asserto will work on any runner or even without one.  Note: It is common practice for a
test runner to apply assertion rewriting to change the behaviour of theassertkeyword under the hood.The main features of asserto are (and will be):Chainable and Fluent API.Ability for bothHardandSoftassertions.Rich diffs to highlight problems, reduce churn and improve efficiency and debug-ability.Dynamic assertions; check any obj attribute or invoke any of its function types.Robust set of methods out of the box for common types.Extensibility.  Bolt on your own assertions at runtime.Human error detection, elaborate warnings when something is amiss.Much more to come.Feature Set:Fluent API:Assertoexposes a fully fluent API for chaining assertions against a value.fromassertoimportassertodeftest_multiple_assert_fluency()->None:asserto("Hello").has_length(5).match(r"\w{5}$").ends_with("lo").starts_with("Hel")Soft Assertions:AssertoHassoftcapabilities; allowing multiple assertions to be performed before failing with a
summary of the failures.fromassertoimportassertodeftest_baz()->None:withasserto("Baz")ascontext:# asserto when used in a python context is run in 'soft' mode;# upon exiting the context; congregated errors are subsequently raised (if any)context.starts_with("B").ends_with("z").is_equal_to("Baz").has_length(2)# Ends in a failure.Will result in the following:deftest_foo(asserto)->None:
>withasserto("Bar")ascontext:
EAssertionError:1SoftAssertionFailures
E[AssertionError("Length of: 'Bar' was not equal to: 2")]Exception Handling:Assertohas the ability to assert exceptions are raised oncallablesusing a simple API.fromassertoimportassertoimporttypingdefsimple_callable(x:int)->typing.NoReturn:raiseValueError(x)deftest_exc_handling():asserto(simple_callable).should_raise(ValueError).when_called_with(25)Dynamic Lookups:Assertohas the ability to dynamically lookup attributes on any object type.  This is
handled using theattr_is(expected)syntax.fromassertoimportassertoclassFoo:def__init__(self,x)->None:self.x=xdefdouble_x(self)->int:returnself.x*2deftest_foo_dynamically()->None:# dynamically looking up `x` (attr) or `double_x` bound method & invoking it!asserto(Foo(10)).x_is(10).double_x_is(20)Dynamic assert registrationAssertoallows users to easily bolt on their assertion functions.fromassertoimportassertofromassertoimportregister_assert@register_assert# Option 1.defcustom_assert(self):ifself.actual!=5:self.check_should_raise(f"{self.actual}did not equal five!")register_assert(custom_assert)# Option 2deftest_user_defined_callables()->None:asserto(6).custom_assert()yields the following:E       AssertionError: 6 did not equal five!
Package: assertpy
Simple assertions library for unit testing in Python with a nice fluent API. Supports both Python 2 and 3.UsageJust import theassert_thatfunction, and away you go…:from assertpy import assert_that

def test_something():
    assert_that(1 + 2).is_equal_to(3)
    assert_that('foobar').is_length(6).starts_with('foo').ends_with('bar')
    assert_that(['a', 'b', 'c']).contains('a').does_not_contain('x')Of course, assertpy works best with a python test runner likepytest(our favorite) orNose.InstallThe assertpy library is available viaPyPI.
Just install with:pip install assertpyOr, if you are a big fan ofcondalike we are, there is anassertpy-feedstockforConda-Forgethat you can use:conda install assertpy --channel conda-forge
Package: asserts
Python AssertsStand-alone Assertions for PythonThis package provides a few advantages over the assertions provided by
unittest.TestCase:Can be used stand-alone, for example:In test cases, not derived from TestCase.In fake and mock classes.In implementations as rich alternative to the assert statement.PEP 8 compliance.Custom stand-alone assertions can be written easily.Arguably a better separation of concerns, since TestCase is responsible
for test running only, if assertion functions are used exclusively.There are a few regressions compared to assertions from TestCase:The default assertion class (AssertionError) can not be overwritten. This
is rarely a problem in practice.asserts does not support theaddTypeEqualityFunc()functionality.Usage:>>>fromassertsimportassert_true,assert_equal,assert_raises>>>my_var=13>>>assert_equal(13,my_var)>>>assert_true(True,msg="custom failure message")>>>withassert_raises(KeyError):...raiseKeyError()Failure messages can be customized:>>>assert_equal(13,14,msg_fmt="{got}is wrong, expected{expected}")Traceback(mostrecentcalllast):...AssertionError:14iswrong,expected13
Package: assertshape
assertshapePython library for asserting n-dim array shapes using Einstein notations.Examples:fromassertshapeimportassertshapeassertshape("nmk,mkn",[(1,2,3),(2,3,1)])assertshape("nmk,m_n",[(1,2,3),(2,42,1)])assertshape("nmk,mkn...",[(1,2,3),(2,3,1,4,5,6)])
Package: asserty
AssertyAssertyis a utility package that provides methods for better assertion in testing.InstallationThe package can be installed usingpip:$pipinstallassertyExamplesYou make assertions by importing theassert_thatfunction from theassertypackage:fromassertyimportassert_thatassert_that("str").not_equals("string")assert_that(5).is_in(range(10))defmyfunc(arg):ifnotisinstance(arg,str):raiseTypeError()returnarg+"yay"assert_that(myfunc).if_called_with(1).raises(TypeError)assert_that(myfunc).if_called_with("Hey-").returns("Hey-yay")Outside a test context that does not handleAssertionErroryou can import the equivalent function calledthat:fromassertyimportthatassertthat("str").not_equals("string")assertthat(5).is_in(range(10))
Package: asses-loopt-be
asses-loopt-beInstallpipinstallasses-loopt-beUsagefromAssesLooptBEimportAssesLooptBEasassesdf=pd.read_csv('./dfteste.csv')# input DataFrameasses_be=asses.AssesLooptBE(df)# instantiating classasses_be.help()# call functionsFunctionsacertos_medios_porcentagem()acertos_medios_pol()acertos_medios_porcentagem_embarques()acerto_variacao_porcentagem_fe_bookado()acerto_variacao_porcentagem_predict_bookado()acertos_medios_porcentagem_day()acertos_medios_porcentagem_embarque_day()matriz_confusao()distribuicoes()All functions you must pass a boolean parameter if you want it to return the value, otherwise it will just update its instantiated objectLast Version0.0.3
Package: assess
AssessAnalytical Solutions for the Stokes Equations in Spherical ShellsAssess is a python package that implements a number of analytical solutions to
the Stokes equations in cylindrical and spherical shell domains. The eight
different cases are described inlink to gmd-paper.InstallationAssess is a standard python package that can be installed from pypi:pip install assessDocumentationFor usage instructions and a complete API reference seehttps://assess.readthedocs.io
Package: assess-mozilla-aws-security-infrastructure
assess-mozilla-aws-security-infrastructureThis tool scans Mozilla AWS accounts checking for security infrastructure. It
reports accounts which are missing elements of that infrastructure.This includes any accounts either missing or with misconfiguredGuardDuty IAM Roles that the GuardDuty Multi Account Master uses to accept invitationsGuardDuty relationships between member and parentCloudTrailSecurity Audit IAM Roles and Incident Response IAM RolesMozilla Single Sign On (SSO)UsageRunassess-mozilla-aws-security-infrastructureFuture WorkCurrently, the tool just prints out information. This could be improved or turned
into machine-readable structured dataThe tool does not assess whether there are any IAM users with passwords defined
in an account that has SSO enabled (these IAM users should be removed in favor
of SSO)
Package: assess-pps
Time-Dependent Metrics to Assess Performance Prediction SystemsInstallationpip install assess_ppsGet started# Importing our libraryfromassess_ppsimportmetricsasm# for working with data we need pandasimportpandasaspd# implementing csv filesectel=pd.read_csv("D:/path")# put your link hereectelsys2=pd.read_csv("D:/path")# We use the file ectel.csv for testing.prediction_time=35# till which week we should search the overall stability valueectel_temp=ectel.loc[ectel.weeknumber<=prediction_time]# dataframe with all data till predicted timeS=ectel_temp['idUser'].unique()# list with student indexesY=[0,1,2]# list of classesx=10# x  earliest times of correct predictions# Stabilitystability=m.Stability(ectel_temp,S)print("Stability: ",stability)# Accuracyaccuracy=m.Accuracy(ectel_temp,S)print("Accuracy: ",accuracy)# Earlinessearliness=m.Earliness_Total(S,Y,x,ectel_temp)print("Earliness: ",earliness)# ESS# for ESS we need to know stability and earlinessESS=m.ESS(stability,earliness)print("ESS of average earliness: ",ESS)# EAS# for EAS we need to know accuracy and earlinessEAS=m.EAS(accuracy,earliness)print("EAS of average earliness: ",EAS)
Package: assesspy
AssessPyAssesspy is a software package for python developed by the Cook County Assessorâ€™s (CCAO)
Data Department. It contains many of the functions necessary to perform a standardsales ratio study.For assessors, we believe that this package will reduce the complexity of calculating
ratio statistics and detecting sales chasing. We also hope that reporters, taxpayers,
and members of academia will find this package helpful in monitoring the performance
of local assessors and conducting research.For detailed documentation on included functions and data,visit the
full reference list.For examples of specific tasks you can complete withassesspyfunctions, see thevignettes page.InstallationYou can install the released version ofassesspyusing pip.pipinstallassesspyOnce it's installed, you can use it just like any other package. Simply
callimport assesspyat the beginning of your script.