Saravanan666/pypi-org huggingface dataset:
Package: buildbot-phorge
Buildbot-PhorgeintegrationBuildbotis a wonderful automation framework,Phorgeis a community fork ofPhabricator, a wonderful
review and CVS hosting tool.Sadly they don't talk too well to eachother. This aims to fix that.Setting upBuildbotInstall this package from pypi into the same environment that your
buildbot-master runs on.Change HookThis component is required in order to tellBuildbotabout a new
changeset.Similarly to otherBuildbotChange Hooks, we
configure it inc["www"].To set up the hook, we need thePhorgehost, a secret to authenticate
such host againstBuildbotand a Conduit API token to authenticateBuildbotagainstPhorgein order to fetch additional data.Example# We use this to fetch additional data form Phorge's Conduit APIphorge_host:str="we.phorge.it"# Phorge uses HTTP Basic Authentication, the value of phorge_host will be# username and the value of bb_token (may be a secret) will be the password# This has to be set up in Phorgebb_token:Union[str,Secret]=util.Secret("we.phorge.it.bb_token")# Phorge doesn't send us all necessary data for the build, so we have to fetch# it using the Conduit API, for which we need this token. It may be a secretconduit_api_token:Union[str,Secret]=util.Secret("we.phorge.it.api_token")# And the actual bits, when setting up the 'www' plugin, change_hook_dialects# must be set up in a similar fashion to this.c["www"]=dict([...]change_hook_dialects=dict(phorge={"credentials":{phorge_host:(bb_token,conduit_api_token)}),[...])ReporterIn order to notifyPhorgeabout the result of builds, we need aReporter.Currently due to Conduit API limitations, no information other thanPASSandFAILEDcan be sent.Example# Import the necessary classfrombuildbot_phorgeimportPhorgeReporter# Here we only need phorge_host and conduit_api_token, as for the hook# Remember conduit_api_token may be a Secret.c["services"].append(PhorgeReporter(token=conduit_api_token,host=phorge_host))Setting upPhorgeInPhorgeyou have to setup a Build Plan for Harbormaster.
Depending on your setup, you may only need one Build Step that triggers
buildbot, asBuildbotis much better at automation.This isBuild Stepof typeMake HTTP Request.As far as we can see, there is no option to pass arguments overPOSTrequests, so we pick HTTP MethodGET.Add some secureCredentialswhich will be checked onBuildbot.Remember that theUsermust match yourPhorgehostname!SetupWhen CompleteasWait For Message,Buildbotshould
tellPhorgeabout the result of the build afterwards.The tricky bit is theURIsetting, we have to pass all the information
thatBuildbotwill need to trigger the build and letPhorgeknow about its result.The URI should look like this (change${CI_HOST}for yourBuildbothostname)# Set this Build Step URI on Phorge
https://${CI_HOST}/change_hook/phorge?id=${build.id}&t=${target.phid}&ts=${step.timestamp}&u=${repository.uri}Future workThis can still be improved but it works wonderfully as-is for us.Still, there are some things that you can hack / improve.Use the${buildable.diff}to trigger builds on Reviews / DiffsUse the${buildable.revision}to trigger builds on Revisions / Audits
Package: buildbot-pipeline
Buildbot Pipeline is a missing piece to make Buildbot (an excellent CI
framework) usable for mere mortals.Define steps in VCS using YAML.Scripted includes allow to use favorite language to define dynamic steps and
bring more flexibility than build matrix.Trigger filters. Automatic trigger if step file is changed.Parallel steps.Ability to skip already passed jobs for same commit (can be helpful to rerun flaky tests).Fixed concurrency. You can run multiple builds of the same job on single
worker.Native support for JUnit (XUnit) XML reports.Artifacts storage on leader node.Artifacts and test reports are attached to step. You can easily find cause of
failure in UI.Gerrit integration:Buildbot pipeline tracks all builds started from the same commit and setsVerifylabel based on all succeeded jobs.You can rebuild one of failed jobs from buildset andVerifywould
be correctly updated.Do not trigger build for WIP patches.Example:# buildbot/unit-tests.yamlfilter:files:-app/*-unit-tests/*steps:-name:prepareshell-fail:pip install -r requirements.txt-name:testshell:python -m pytest --junitxml=junit.xml --cov-report html:htmlcov unit-testsjunit:junit.xmlupload:label:coverage reportsrc:htmlcovlink:htmlcov/Environment variablesBUILD_ID: id of a root job, it’s uniq accross a build jobWORKSPACE: path to a shared storage for a buid job. Can be used for caches,
node_modules, virtual environments and so on.BUILD_STATUS: status of a current build so far.Codes.STDOUT markupBuildbot pipeline supports special stdout markup to enrich builds with custom
information.__PIPELINE_LINK__ name url: adds a user provided link to a current step.__PIPELINE_PROP__ name value: adds a user provided property to a current build.
You can access property value in following steps.For example:steps:-name:testshell:|build_id=$(build-package.sh)echo __PIPELINE_LINK__ artifacts http://build.corp.com/artifacts/$build_id
Package: buildbot-profiler
This plugin implements a profiler for buildbot master.It uses statistical profiling loosely based on plophttps://github.com/bdarnell/plopSuitable for prod as statistical profiling is very low overheadProfiles all threads including main thread and db threadsRemoves noise samples when the threads are actually in the main loopIn-browser UI based on nvd3 and d3-flame-graphShow cpu and memory percent over timeflame graph can be restricted to a subset of the traceDetailed caller/callee are displayed when clicking on a functionUsageinstallation:pipinstallbuildbot_profilerthen in master.cfg:c['www']['plugins']['profiler']=TrueAlternatively, you can install it in service mode, without the UIc['services']=[util.ProfilerService()]ProfilerService takes following arguments:ProfilerService(frequency=100,gatherperiod=30*60,mode='virtual',basepath=None,wantBuilds=100)frequency: the profiling frequency in HZ. Not that if there is no activity during a profiling timer, no data will be recorded.gatherperiod: the period during which the profiler works on one file. By default a new json file is created every 30min with the profile of the last 30min. Note that if there is no activity the gather period might be longer.mode: profiling timer to use. Can be:prof: useSIG_PROFtimer,virtual: useSIGVTALRMtimer,real: useSIGALRMtimer,basepath: the base path where to store the json files. (defaults to(master'sbasedir)/prof_)wantBuilds: if this is > 0 then the last N builds are stored along side the profile data, for debug purpose.Standalone ViewerA standalone viewer is provided for offline browse of user submitted profiles.bbprofilerThen you can open your browser onhttp://localhost:8080ScreenshotChangeLog1.3.1 Upgrade build to webpack, Fix argument parsing for record duration and sample rate1.2.3 Fixes for python21.2.2 Fixes for python31.2.1 Fix issues with load calculation1.2.0 Fold the flames so that you can explore larger traces.Fix the service so that the trace is reset between run.1.1.0 add a service to use the profiler without bother the users with a profiler UI.1.0.0 initial version
Package: buildbot-prometheus
buildbot-prometheusis a Python package providing a Prometheus metrics
exporter for a buildbot master. The package works on Python 3.Installation$pipinstallbuildbot_prometheusThesetup.pyfile includes anentry_pointsdirective that configures
it as a Buildbotreportersplugin which simplifies its use in the Buildbot
configuration file.To use the Prometheus reporter plugin add the following to your buildbotmaster.cfgfile and (re)start the master.c['services'].append(reporters.Prometheus(port=9100))The buildbot master should now be exposing metrics to Prometheus. You can
check the metrics service using the simple command line toolcurl:$curl-slocalhost:9100/metrics|grep-v"#"|sortbuildbot_build_requests_duration_seconds{builder_id="1"} 2.0
buildbot_build_requests_success{builder_id="1"} 1.0
buildbot_builders_running_total 1.0
buildbot_builders_running{builder_id="1",builder_name="runtests"} 1.0
buildbot_builds_duration_seconds{builder_id="1",worker_id="2"} 2.571184
buildbot_builds_success{builder_id="1",worker_id="2"} 1.0
buildbot_buildsets_duration_seconds{buildset_id="8"} 2.0
buildbot_buildsets_success{buildset_id="8"} 1.0
buildbot_steps_duration_seconds{builder_id="1",step_name="git",step_number="0",worker_id="2"} 1.742647
buildbot_steps_duration_seconds{builder_id="1",step_name="shell",step_number="1",worker_id="2"} 0.334757
buildbot_steps_success{builder_id="1",step_name="git",step_number="0",worker_id="2"} 1.0
buildbot_steps_success{builder_id="1",step_name="shell",step_number="1",worker_id="2"} 1.0
buildbot_workers_running_total 1.0
buildbot_workers_running{worker_id="2",worker_name="worker1"} 1.0A configuration block such as the following example should be added to
the Prometheus configuration file to instruct it to scrape the buildbot
metrics exporter.scrape_configs:-job_name:'buildbot'target_groups:-targets:['localhost:9100']Prometheus will then automatically associate ajoblabel ofbuildbotwith metrics from this exporter. Prometheus will also automatically associate
aninstancelabel (e.g. ‘localhost:9100’) too.All metrics exposed by this exporter are prefixed with thebuildbot_string as a namespace strategy to isolate them from other Prometheus exporters.
This makes them easier to find in metrics consumer and visualisation tools
such as Grafana.All duration metrics use seconds as the unit of measure.
Package: buildbot-sitenav
IntroductionA very simple buildbot UI plugin providing a menu-item with configurable
links. This plugin is intended to help integrate the buildbot master web
interface with some larger site structure. For example, you can add links to
your code review / code hosting service, bug tracker, discussion page, etc.Screenshot of the buildbot UI menu including the sitnav plugin.InstallationInstall thebuildbot-sitenavpackage into the python environment you use
for executing the buildbot master. That probably means something like this:pip install buildbot-sitenavAdd the plugin to the‘www’config section ofmaster.cfgfor your
buildmaster. e.g.:c['www'] = {
    "plugins": {
        "waterfall_view": {},
        "console_view": {},
        "grid_view": {},
        "sitenav": {
          "label" : "Navigation",
          "links" : [
            ["home", "/"],
            ["gerrit", "/gerrit"],
            ["forum", "/forum"]
          ]
        }
    },
}The config dictionary for thesitenavplugin includes two keys:‘label’:optional, specifies the text to use for the button label in the
menu. The default is “Site Nav”.‘links’:required, specifies a list of links to add in the submenu. Each
item in the list is a pair (a list of two elements), composed of[“<label>”, “<url>”].NotesThe author of this plugin actually knows practically nothing about angularJS so
this plugin is probably implemented in a dumb way. Hopefully you find it useful
anyway.
Package: buildbot-slack
Buildbot plugin to publish status on SlackThis Buildbot plugin sends messages to a Slack channel when each build starts / finishes with a handy link to the build results.This plugin is based on many other reporter plugins made for SlackContributions are welcome!Installvia pippip install buildbot-slackSetupCreate a new incoming webhook in your slack account. (seehttps://api.slack.com/tutorials/slack-apps-hello-world)Then in your master.cfg, add the following:from buildbot import reporters
c['services'].append(reporters.SlackStatusPush(
    endpoint=<YOUR_WEBHOOK_ENDPOINT>,
))Additional Options:channel = None
  username = None
  attachments = TrueHave fun!
Package: buildbot_status_logentries
This plugin sends a subset of status updates to the Logentries service.First install the plugin:pip install buildbot_status_logentriesThen in your master.cfg file you can do:from buildbot.plugins import *
c['status'].append(status.LogentriesStatusPush(api_token="c1481e42-75b3-4772-bb7a-db92691d74e9", endpoint="data.logentries.com", port=10000))To use SSL:from buildbot.plugins import *
c['status'].append(status.LogentriesStatusPush(api_token="c1481e42-75b3-4772-bb7a-db92691d74e9", endpoint="data.logentries.com", port=20000, tls=True))
Package: buildbot-tags-section-plugin
Buildbot tags section pluginThe plugin adds a section to the side menu with pre-prepared builders filters by tags.UsageInstall python packagebuildbot-tags-section-plugindirectoryConfigure plugin in themaster/master.pyfile:c['www']=dict(...plugins=dict(...tags_section_plugin={"sections":[{"name":"MDBE","filters":[{"name":"Only build","tags":["+build","-test"]},{"name":"Only test","tags":["-build","+test"]}],},{"name":"MaxScale","filters":[{"name":"Only build","tags":["+build","-test"]},{"name":"Only test","tags":["-build","+test"]}],}],}))Reconfigure BuildBotBuild and distributionGet more information athttps://packaging.python.org/tutorials/packaging-projects/python3 -m pip install --user --upgrade setuptools wheelpython3 setup.py sdist bdist_wheelpython3 -m pip install --user --upgrade twinepython3 -m twine upload --repository pypi dist/*
Package: build-capi
Build and distribute C/C++ static libraries via Python packages.Getting StartedYou can have asetup.pysimilar tofromos.pathimportjoinfromsetuptoolsimportsetupdefget_lib():frombuild_capiimportCApiLibmylib=CApiLib('pkg_name.lib.nmylib',sources=[join('pkg_name','sources','example.c')],include_dirs=[join('pkg_name','include')])setup(name='pkg_name',# ...setup_requires=['build_capi'],capi_libs=[get_lib],include_package_data=True,data_files=[(join('pkg_name','include'),join('pkg_name','include','example.h'))],package_data={'':[join('pkg_name','lib','*.*')]})and then have apkg_name/__init__.pydefget_include():importpkg_namefromos.pathimportjoin,dirnamereturnjoin(dirname(pkg_name.__file__),'include')defget_lib():importpkg_namefromos.pathimportjoin,dirnamereturnjoin(dirname(pkg_name.__file__),'lib')Please, refer tobuild_capi/example/prj_namefor a
minimal example of project usingbuild_capi.InstallThe recommended way of installing it is viacondacondainstall-cconda-forgebuild-capiAn alternative way would be via pippipinstallbuild-capiAuthorsDanilo Horta-https://github.com/HortaLicenseThis project is licensed under the MIT License - see theLICENSEfile for details
Package: buildcatrust
buildcatrustbuildcatrust is a tool for turning trust stores into other trust stores.In particular, it's intended for use withinNixOS, for
turning the Mozilla NSS cert store into a format that can be used by various
downstream systems (see below).WhyThe original author (lukegb) was not particularly happy with any of the
existing options: they tend to lose some of the semantic meaning of the input
NSS store, and this is undesirable.In particular, there's awell
documentedthat Linux distributions have in general with distrusting certificates. This package
does not itself solve this 100% (because the nuancestillisn't readily encodable),
but the goal is to not make things worse. That is, running Firefox on a system
configured to use a buildcatrust-built certificate store should not drop
distrust dates. Other software may vary, depending on support for
distrust-after.GoalsHave no runtime dependencies outside of the Python standard libraryThis is because this complicates packaging, particularly on NixOS, where
buildcatrust is part of the bootstrap path for building everything else.Have decent test coverageConvey as many trust bits from the source system to downstream systems as
possibleIn some cases, this means using software-specific hacks (such as for
OpenSSL)Contributing & DevelopingUsers are expected to abide bythe Contributor Covenant, version
2.1.The best answer for developing this software is to use Nix, which will provide
dependencies for you automatically (at least on Linux-based distributions).You should be able to runnix-shellin the root of this repo to get a working
shell containing a Python interpreter withruff,pytest,pytype, and so
on.It is also suggested to runpre-commitwhen making changes; you can install
its hook usingpre-commit installwhich will ensure that things are correctly
formatted before permitting a commit.However, because this software aims to have no dependencies outside of the
Python stdlib, it should be possible to at least make changes and run the
software without needing Nix or any other software installed. I do suggest that
you installpytestandruffthough, because then you can ensure a baseline
level of correctness before letting GitHub Actions judge your PR.
Package: build_commands
build_commandsThis package provides common setuptools command utilities if you
need to initialize your package withnpm,bowerorgulpcommands.UsageYou are supposed to create in your own package aYeomanlike
project folder (for example:your_package/templates).Add thebuild_commandsdependency to your pretendyour_package.Update yoursetup.cfgadding the following:[aliases]
npm = npm -i your_package/templates
bower = bower
gulp = gulp -i your_package/templates -g gulpfile.babel.jsIf you are using bower you can add a.bowerrcfile to your
package root (where yoursetup.cfgfile lives) with the
following (seehttp://bower.io/docs/config/#cwd):{
  "directory": "bower_components",
  "cwd": "./your_package/templates/"
}And update your setup.py entry points distutils commands:entry_points="""\
[distutils.commands]
npm = build_commands:NpmCommand
bower = build_commands:BowerCommand
gulp = build_commands:GulpCommand
""",This way once installed youryour_packageyou can initialize your
Yeoman project with:$ python setup.py install/develop
$ python setup.py npm
$ python setup.py bower
$ python setup.py gulpAnd all your frontend stuff will be processed automatically (SASS, minification,
uglyfication, etc).AuthorsDavide Moro <https://twitter.com/davidemoro>0.0.1 (2015-08-12)Initial version
Package: build-compiler
build - Simple build System for C & C++You need a simple build system for C or C++? Try build!What is build?build is a build system for C and C++. It can be easily installed via pip:pip install build-compilerHow to install build?As mentioned, with pip. See aboveHow does the Build Compiler work?To compile successfully with Build, you need a Makefile (Our ismake.py)
Offical Example:frombuild.compilerimportcreate_executeableclassConfig:sources="main.c var.h print.c print.h"output="hello"compiler="gcc"flags="-Wall"ifflags=="":flags="None"create_executeable(Config.compiler,Config.sources,Config.output,Config.flags)
Package: build-dashboard
Site:https://github.com/ReverentEngineer/build-dashboardOriginal author:Jeff Hill <jeff@reverentengineer.com>RequirementsHow to runConfiguration filebuild-dashboard is an open-source client for Buildbot that allows for reviewing builds in the terminal.RequirementsRequired packages include: aiohttp, toml, asciimaticsHow to runbuild_dashboard--protocolhttps--hostbuildbot.example.comConfiguration filebuild_dashboard looks for a TOML-based.buildbotrcin the users home directory. If it finds one it, it will use the parameters in the file. Any arguments passed on the command line will override the configuration file.Example configuration file:protocol="http"host="localhost"unix="/var/run/buildbot.sock"
Package: builddevenv
BuildDevEnvPurposeThis package has been designed to create easily, with minimalists template files, a development environment in Docker.
Note that is has been tested on Windows 10 only with Docker Desktop.RequirementsThe following components are required to execute the package:Python 3.6 or +pip installerDocker DesktopInstallThis package is available from Pypi. In order to install it, execute the following command:pip install builddevenvUsageBefore using the libray, the execution policy of PowerShell must be changed to authorized Python to use Docker API. In PowerShell, execute the following command:Set-ExecutionPolicy Unrestricted -ForceOnce the Powershell execution policy changed, it is then possible to execute the package using the following command line:python -m builddevenv <template file>Replacetemplate-fileby the full name of the file containing the containers configuration.You can find some samples in the package installation folder, under the directory namedsampleUnit testsIn development mode of this package, it is mandatory to implement unit tests when a feature is added.
The unit tests are written in the foldertest.
In order to run the unit tests, set the current directory to the root folder of the project. Then execute the command:python -m pytest
Package: build-django
build-djangoCommand line utility to build Django projectsFeaturesAsyncFlexibleInstallationpipinstallbuild-djangoUsagebuild-djangomy_project--dirmy_project_path--debug--hostslocalhost,127.0.0.1,example.com--pythonpython3--migrate--git--commit--commit-message"My first commit!"--packagesbjclidjangorestframeworkArgumentDescriptionRequiredDefaultType--versionShow version and exitFalseFalsebool--dirDjango project directoryFalse./str--debugShould initialize env with DEBUG=TrueFalseFalsebool--no-compilepip: Do not compile Python source files to bytecodeFalseFalsebool--hostsList of comma sperated Django ALLOWED_HOSTS valuesFalse''str--pythonPython command for initializing virtual environment. If not set, the Python used to run the program will be usedFalseNonestr--migrateShould apply initial migrations after project builtFalseFalsebool--gitShould initialize git repositoryFalseFalsebool--commitShould create initial commit after project built and git initializedFalseFalsebool--commit-messageInitial commit messageFalse'Initial commit'str--packagesList of additional pip packages to be installedFalse[][str]--use-sslEnable SSL support for reverse proxy (production only)FalseFalsebool
Package: builddriver
Build DriverPossible integration into build:Building project-foo, this may take a while
Compiling failed for compilation unit 'lib-bar'
Error: ‘stderr’ undeclared (first use in this function) in function qux.c line 23
The complete build log is available at '/tmp/build-392193.log'A simple GCC/LLVM (clang) output parser. It reads lines from compiler and
makefile runs, parse, split them and provides parsed information in a
harmonized format.It is possible to configure what you want: access to the pased information?
Counters? Affected files?InstallationSimple install this module via pip (pip for Python 2 is also supported)pip3 install --user builddriverUsageAs Python Moduleimport builddriver

result = builddriver.execute('make -C path/to/makfile')
# now wait until make finished, after that the following
# function can be used:
result.returncode()
result.errors_no()
result.warnings_no()
result.taillog()
result.build_duration()
result.build_duration_human()
result.log()
result.tmp_name()
result.tmp_file_rm()
list(result.errors())
list(result.warnings())As Python ExecutableCompiling the Linux Kernel (not a "good" example, because there is usually no
warning in the build, except you increase the warning level somehow):$python3-mbuilddrivermake-j16V=2O=../linux-build
builddriverexecuting:'make -j16 V=2 O=../linux-build'CompilationSUCCEEDin297.833702seconds
Numberofwarnings:0
Package: builddsl
builddslA superset of the Python programming language with support for closures and multi-line lambdas.BuildDSL is an "almost superset" of Python 3; adding a lot of syntactical features that make it more
convenient to describe build configurations at the cost of some other syntax features of the native Python
language (like set literals).Installation$ pip install builddslThebuilddslpackage requires at least Python 3.8.Projects using BuildDSLNovella
Package: build-duck
build_duckAdd a duck marker to Matplotlib.Examplefrom build_duck import get_markerimport numpy as npimport matplotlib.pyplot as pltmarker_duck = get_marker()x = np.linspace(0,100,20)y = 10*np.sin(x)plt.figure(dpi=100)plt.plot(x,y, marker=marker_duck, ms=20)plt.show()plt.clf()