Questions tagged [pybuilder]

PyBuilder is a multi-purpose software build tool with a strong focus on Python.

PyBuilder provides a powerful and extensible way for building and testing software and mainly targets Python applications.

It allows you to use Python to write build files and is highly pluggable.

Some of the capabilities are:

  • execution of unit and integration tests
  • generation of distutils script setup.py
  • analysis of the code coverage
  • execution and result interpretation of analysis tools, such as flake8

PyBuilder is based on the concept of dependency based programming but also comes along with powerful plugin mechanism that allows the construction of build life cycles similar to those known from other famous build tools like Apache Maven.

48 questions
2
votes
1 answer

How to update coverage (that is inclued in pybuilder) to igrore run.py module?

Problem: Flask app being built with Pybuilder needs Coverage to exclude run.py during the build to get rid of the warn message and impact on coverage percentage [WARN] Module 'run' was not imported by the covered tests and [WARN] Test coverage…
uzla
  • 515
  • 1
  • 4
  • 20
2
votes
2 answers

XMLRunner - "unicode object has no attribute 'write'" when building

I have a project being built with Pybuilder. I cloned it onto a new computer, and when I ran pyb, my unit tests complained that there was no module named xmlrunner. So after I did pip install xmlrunner, I get a build error from Pybuilder…
1
vote
0 answers

After initiating a pybuilder project I receive an error that the executable is not functioning and that virtualenv is not compatible

I'm following the following helloworld tutuorial for pybuilder: https://pybuilder.io/documentation/tutorial I'm using a mac. I've installed python with brew. I'm able to run the following commands: $ virtualenv venv $ source venv/bin/activate $ pip…
Brod
  • 1,377
  • 12
  • 14
1
vote
0 answers

How to use pytest using pybuilder?

Following this tutorial for the build tool for my project, except pytest was used instead of mockito as given there. The pytest is working fine individually, but when pybuider is running it throws an error. Coverage.py warning: Module __init__ was…
1
vote
1 answer

Pybuilder Unit test unable to find module

Running the unit tests normally works and passes all the tests, but when trying to build using pybuilder it gives me a Build Error: BUILD FAILED - There were 1 error(s) and 0 failure(s) in unit tests…
Kyle Cintron
  • 316
  • 2
  • 6
1
vote
1 answer

How to include datasets in packages generated by PyBuilder and make them available

I'm experimenting with PyBuilder because I'm looking for a more organised and production-oriented way of developing data science projects. So far, I've created a PyBuilder project with the following structure (folder are uppercased for…
Stefano Bragaglia
  • 622
  • 1
  • 8
  • 25
1
vote
1 answer

pylint \ flake8 plugins won't run from pyBuilder

No linter plugins seem to run from my pyBuild run. I can use either use_plugin("python.distutils") or use_plugin("python.flake8") but when the pyBuilder run is finished, it says: Tasks: prepare [2073 ms] compile_sources [0 ms] run_unit_tests [504…
Alexy Grabov
  • 151
  • 1
  • 13
1
vote
1 answer

How do I get VS code to work with a Pybuilder python project?

Pybuilder, around since 2013. The VS Code Python Plugin, developed by Don Jayamanne in 2016 and now an official plugin! The default PyBuilder layout looks like this: build.py \ src \ main \ python \ \…
Marco
  • 8,958
  • 1
  • 36
  • 56
1
vote
3 answers

How do you activate a virtual environment from Gradle?

I have the following exec commands in my gradle.build file. exec { workingDir System.getProperty("user.dir") commandLine 'python3.6', 'buildscript.py' } exec { workingDir System.getProperty("user.dir") commandLine…
CrizR
  • 688
  • 1
  • 6
  • 26
1
vote
1 answer

Check for prerequisite "no uncommitted changes" when deploying to GCloud with PyBuilder

I'm trying to write a task to deploy a Docker image to Kubernetes which checks for the presence of the prerequisites (such as the presence of docker, gcloud and git) and that there are no uncommitted changes. Here is what I put together so…
Stefano Bragaglia
  • 622
  • 1
  • 8
  • 25
1
vote
1 answer

How to configure PyBuilder to look locally for certain files needed for testing?

My tests use two CSV files as a large part of my program involves interpreting and then posting data to elasticsearch. When running PyBuilder, it can't find these files since it's running from a different directory. For example, one of the errors I…
CrizR
  • 688
  • 1
  • 6
  • 26
1
vote
0 answers

Is there any way to separate py and pyc files while building Django project using pybuilder

I was trying to build a Django project using pybuilder where I need to separate the pyc files and resource files. This is regarding protecting the source code, I know we can achieve this by the licencing mechanism. Our requirement is distributed the…
bSr
  • 1,410
  • 3
  • 16
  • 30
1
vote
2 answers

AssertionError: Exception not raised

I have a unittest that test that a custom exception is raised properly. But I got get a AssertionError: InvalidLength not raised Below is my unit test @patch('services.class_entity.validate') @patch('services.class_entity.jsonify') def…
MadzQuestioning
  • 3,341
  • 8
  • 45
  • 76
1
vote
0 answers

How link two Python Modules

Warning: Python newbie. I have two Python projects A and B. A depends on B. I'm using PyBuilder to build both projects and I am struggling to link B into A. My thoughts are I somehow need to install project B via pip or some-other method in the same…
JARC
  • 5,288
  • 8
  • 38
  • 43
1
vote
1 answer

Pybuilder - Non-python files are not packaged

My current project is in python. For build package generation + unit test running, I'm using Pybuilder utility and it is pretty cool. I used the wheel distribution to install the module in other systems. There exist a config file from which certain…
appu
  • 538
  • 10
  • 24