Skip to content

Commit

Permalink
Update version 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Jadson Ribeiro committed May 18, 2018
1 parent c78877b commit ee9f278
Show file tree
Hide file tree
Showing 114 changed files with 809 additions and 797 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ install:
- pip install flake8

script:
- flake8 pyjasper/
- chmod +x /home/travis/build/jadsonbr/pyreportjasper/pyjasper/jasperstarter/bin/jasperstarter
- flake8 pyreportjasper/
- chmod +x /home/travis/build/jadsonbr/pyreportjasper/pyreportjasper/jasperstarter/bin/jasperstarter
- coverage run setup.py test

after_success:
Expand Down
6 changes: 5 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ PyReport Changelog

Here you can see the full list of changes between each PyReportJasper release.

Version 0.1.8
Version 1.0.0
-------------
* Rename pyreport repository for pyreportjasper
* We change the way we import

Version 0.1.8
-------------
* Updated the jasperstarter and jasperreport libraries
* Added subreport examples
* Added tests for subreports
Expand Down
42 changes: 22 additions & 20 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Reports for Python, with JasperReports.

|Build Status| |Coverage Status| |Code Health| |PyPI|

.. warning:: As of version 1.0.0 we changed the way to import

**Is using Linux servers?**

Do not forget to grant permission 777 for the directory where is the
Expand Down Expand Up @@ -90,8 +92,8 @@ Note
~~~~

- The JDBC driver of your database should be place in the
``pyjasper/jasperstarter/jdbc/`` directory.
- Using **pyjasper**, you can also access different types of data
``pyreportjasper/jasperstarter/jdbc/`` directory.
- Using **pyreportjasper**, you can also access different types of data
sources, including CSV, JDBC, JSON, NoSQL, XML, or your own custom
data source.

Expand Down Expand Up @@ -199,12 +201,12 @@ Studio*. You can compile directly within the program.
# -*- coding: utf-8 -*-
import os
import pyjasper
from pyreportjasper import JasperPy
def compiling():
input_file = os.path.dirname(os.path.abspath(__file__)) + \
'/examples/hello_world.jrxml'
jasper = pyjasper.JasperPy()
jasper = JasperPy()
jasper.compile(input_file)
This commando will compile the ``hello_world.jrxml`` source file to a
Expand All @@ -219,21 +221,21 @@ Now lets process the report that we compile before:
# -*- coding: utf-8 -*-
import os
import pyjasper
from pyreportjasper import JasperPy
def processing():
input_file = os.path.dirname(os.path.abspath(__file__)) + \
'/examples/hello_world.jrxml'
output = os.path.dirname(os.path.abspath(__file__)) + '/output/examples'
jasper = pyjasper.JasperPy()
jasper = JasperPy()
jasper.process(
input_file, output_file=output, format_list=["pdf", "rtf"])
Now check the examples folder! :) Great right? You now have 2 files,
``hello_world.pdf`` and ``hello_world.rtf``.

Check the *API* of the ``compile`` and ``process`` functions in the file
``pyjasper/jasperpy.py`` file.
``pyreportjasper/jasperpy.py`` file.

Listing Parameters
^^^^^^^^^^^^^^^^^^
Expand All @@ -245,12 +247,12 @@ jasper report file:
# -*- coding: utf-8 -*-
import os
import pyjasper
from pyreportjasper import JasperPy
def listing_parameters():
input_file = os.path.dirname(os.path.abspath(__file__)) + \
'/examples/hello_world_params.jrxml'
jasper = pyjasper.JasperPy()
jasper = JasperPy()
output = jasper.list_parameters(input_file)
print(output)
Expand All @@ -264,7 +266,7 @@ We can also specify parameters for connecting to database:
# -*- coding: utf-8 -*-
import os
from platform import python_version
import pyjasper
from pyreportjasper import JasperPy
def advanced_example_using_database():
input_file = os.path.dirname(os.path.abspath(__file__)) + \
Expand All @@ -279,7 +281,7 @@ We can also specify parameters for connecting to database:
'schema': 'DB_SCHEMA',
'port': '5432'
}
jasper = pyjasper.JasperPy()
jasper = JasperPy()
jasper.process(
input_file,
output_file=output,
Expand All @@ -303,7 +305,7 @@ See how easy it is to generate a report with a source an XML file:
# -*- coding: utf-8 -*-
import os
import pyjasper
from pyreportjasper import JasperPy
def xml_to_pdf():
input_file = os.path.dirname(os.path.abspath(__file__)) + \
Expand All @@ -314,7 +316,7 @@ See how easy it is to generate a report with a source an XML file:
data_file = os.path.dirname(os.path.abspath(__file__)) + \
'/examples/CancelAck.xml'
jasper = pyjasper.JasperPy()
jasper = JasperPy()
jasper.process(
input_file,
Expand Down Expand Up @@ -342,7 +344,7 @@ See how easy it is to generate a report with a source an JSON file:
# -*- coding: utf-8 -*-
import os
import pyjasper
from pyreportjasper import JasperPy
def json_to_pdf():
input_file = os.path.dirname(os.path.abspath(__file__)) + \
Expand All @@ -354,7 +356,7 @@ See how easy it is to generate a report with a source an JSON file:
data_file = os.path.dirname(os.path.abspath(__file__)) + \
'/examples/contacts.json'
jasper = pyjasper.JasperPy()
jasper = JasperPy()
jasper.process(
input_file,
output_file=output,
Expand All @@ -378,7 +380,7 @@ Subreport Example
# -*- coding: utf-8 -*-
import os
import pyjasper
from pyreportjasper import JasperPy
def subreport_example():
Expand All @@ -399,7 +401,7 @@ Subreport Example
output = os.path.dirname(os.path.abspath(__file__)) + '/output/examples/subreports/'
jasper = pyjasper.JasperPy()
jasper = JasperPy()
jasper.compile(input_file_header)
jasper.compile(input_file_details)
Expand Down Expand Up @@ -432,7 +434,7 @@ http://localhost:5000/?myString=My%20Beautiful%20String&myInt=1&myDate=2017-01-0
# -*- coding: utf-8 -*-
import os
from pyjasper.jasperpy import JasperPy
from pyreportjasper import JasperPy
from flask import Flask, request, make_response
Expand Down Expand Up @@ -492,7 +494,7 @@ page <http://jasperstarter.cenote.de/usage.html#Reports_with_resources>`__.
# -*- coding: utf-8 -*-
import os
from platform import python_version
import pyjasper
from pyreportjasper import JasperPy
def advanced_example_using_database():
input_file = os.path.dirname(os.path.abspath(__file__)) + \
Expand All @@ -507,7 +509,7 @@ page <http://jasperstarter.cenote.de/usage.html#Reports_with_resources>`__.
'schema': 'DB_SCHEMA',
'port': '5432'
}
jasper = pyjasper.JasperPy()
jasper = JasperPy()
jasper.process(
input_file,
output_file=output,
Expand Down
Binary file modified examples/hello_world.jasper
Binary file not shown.
Binary file modified examples/hello_world.odt
Binary file not shown.
Binary file modified examples/hello_world.pdf
Binary file not shown.
Binary file modified examples/hello_world.xls
Binary file not shown.
Binary file modified examples/subreports/details.jasper
Binary file not shown.
Binary file modified examples/subreports/header.jasper
Binary file not shown.
Binary file modified examples/subreports/main.jasper
Binary file not shown.
Binary file modified examples/subreports/main.pdf
Binary file not shown.
8 changes: 7 additions & 1 deletion pyjasper/__init__.py → pyreportjasper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,18 @@
#
# Copyright (c) 2017 Jadson Bonfim Ribeiro <contato@jadsonbr.com.br>
#
from .jasperpy import JasperPy

__title__ = 'PyReportJasper'
__version__ = '0.1.8'
__version__ = '1.0.0'
__author__ = 'Jadson Bonfim Ribeiro'
__license__ = 'MIT'
__copyright__ = 'Copyright 2017 Jadson Bonfim Ribeiro'
__name__ = 'pyreportjasper'

__all__ = [
"JasperPy",
]

# Version synonym
VERSION = __version__
File renamed without changes.

0 comments on commit ee9f278

Please sign in to comment.