Skip to content

V22.2 #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 44 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
0de1b8f
add start and end delimiter options to Resource
aakashkcx Sep 12, 2021
7d4add3
add watermark settings
aakashkcx Sep 13, 2021
ee60d8a
add server verify_template_hash(hash) method
aakashkcx Sep 13, 2021
79dd054
update watermark opacity and size to ints
aakashkcx Sep 15, 2021
ef5e927
update watermark docs
aakashkcx Sep 16, 2021
a11d097
add ipp check server endpoint
aakashkcx Sep 21, 2021
f7dd004
update get_ipp_check > check_ipp
aakashkcx Sep 21, 2021
7f622cc
add pdf signing
aakashkcx Sep 21, 2021
2146c90
refactor
aakashkcx Sep 21, 2021
7b94cfc
add freeze tag
aakashkcx Sep 21, 2021
39e28d7
add remove last page to pdf options
aakashkcx Sep 21, 2021
458ae77
update sign to accept Resource
aakashkcx Sep 21, 2021
18ff79a
add link & target element class
aakashkcx Sep 22, 2021
490aaba
refactor:
aakashkcx Sep 24, 2021
d0fa388
add template class
aakashkcx Sep 24, 2021
f3c3214
add docs to template, update resource docs
aakashkcx Sep 24, 2021
3ed52de
refactor and add Template class:
aakashkcx Sep 24, 2021
937653b
update template hash on printjob execute
aakashkcx Sep 24, 2021
c10a20d
fix circular import
aakashkcx Sep 24, 2021
4726f5a
add Template to cop exports
aakashkcx Sep 24, 2021
00a9be2
update to not add None properties
aakashkcx Sep 25, 2021
50f1b36
add tests for template
aakashkcx Sep 25, 2021
0aba91e
update printjob:
aakashkcx Sep 25, 2021
6b66b5a
add new options to pdf test
aakashkcx Sep 25, 2021
ee63f8e
add server endpoint tests
aakashkcx Sep 25, 2021
bad41df
update examples
aakashkcx Sep 27, 2021
c8dfa57
remove API key
aakashkcx Sep 27, 2021
47984b4
refactor example
aakashkcx Sep 27, 2021
445685d
update docs
aakashkcx Sep 27, 2021
c659034
make py consistent with js
aakashkcx Sep 27, 2021
18e856f
changed how parameters are passed
ramchandra-kc Feb 17, 2022
de1f88d
added pandas, we need it to run COP
ramchandra-kc Nov 18, 2022
c006503
added test for excel protect sheet, insert tag and embed tag
ramchandra-kc Nov 18, 2022
008d77b
added otput_polling, prepend_per_page, secret key and request option …
ramchandra-kc Nov 18, 2022
125d0dd
added insert, embed and sheet protection tag.
ramchandra-kc Nov 18, 2022
4c87744
added test for request option
ramchandra-kc Nov 18, 2022
310dbe2
added reqest option
ramchandra-kc Nov 18, 2022
b5f5c50
u AOP makes a call to the given option with response/output of the cu…
ramchandra-kc Nov 18, 2022
5f520ec
removed ispreview option from excel insert and generated docs
ramchandra-kc Nov 23, 2022
8383ce1
Merge remote-tracking branch 'origin/feature' into v22.2
ramchandra-kc Dec 13, 2022
a6e25eb
generated documentation
ramchandra-kc Dec 13, 2022
b089bab
added cell validation
ramchandra-kc Mar 8, 2023
60eeaf8
updated docs
ramchandra-kc Mar 8, 2023
386ad25
added test
ramchandra-kc Mar 8, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
240 changes: 120 additions & 120 deletions BeginerGuide/UsingCharts/usingChart.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,213 +5,213 @@

# ---------------line_chart
line1 = cop.elements.LineSeries(
x=('a', 'b', 'c'),
y=(1, 2, 3),
name='line1',
smooth=True,
symbol='diamond',
symbol_size=10,
color='red',
line_width='0.2cm',
line_style='sysDashDotDot'
('a', 'b', 'c'),
(1, 2, 3),
'line1',
True,
'diamond',
10,
'red',
'0.2cm',
'sysDashDotDot'
)
line2 = cop.elements.LineSeries(
x=('a', 'b', 'c'),
y=(4, 5, 6),
name='line2',
smooth=True,
symbol='square',
symbol_size=12,
color='blue',
line_width='2px',
line_style='sysDash'
('a', 'b', 'c'),
(4, 5, 6),
'line2',
True,
'square',
12,
'blue',
'2px',
'sysDash'
)
line_chart = cop.elements.LineChart(
name='line_chart_name',
lines=(line1, line2)
'line_chart_name',
(line1, line2)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

48% of developers fix this issue

Incompatible parameter type: In call cop.elements.charts.LineChart.__init__, for 2nd positional argument, expected Tuple[Union[LineSeries, XYSeries]] but got Tuple[LineSeries, LineSeries].

❗❗ 32 similar findings have been found in this PR

🔎 Expand here to view all instances of this finding
File Path Line Number
BeginerGuide/UsingCharts/usingChart.py 51
BeginerGuide/UsingCharts/usingChart.py 60
BeginerGuide/UsingCharts/usingChart.py 66
BeginerGuide/UsingCharts/usingChart.py 70
BeginerGuide/UsingCharts/usingChart.py 91
BeginerGuide/UsingCharts/usingChart.py 112
BeginerGuide/UsingCharts/usingChart.py 137
BeginerGuide/UsingCharts/usingChart.py 155
BeginerGuide/UsingCharts/usingChart.py 161
BeginerGuide/UsingCharts/usingChart.py 167

Showing 10 of 32 findings. Visit the Lift Web Console to see all.


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Help us improve LIFT! (Sonatype LiftBot external survey)

Was this a good recommendation for you? Answering this survey will not impact your Lift settings.

[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

)

collection.add(line_chart)

# --------------------bar_chart-----------
bars1 = cop.elements.BarSeries(
x=('a', 'b', 'c'),
y=(1, 2, 3),
name='bars1',
color='red'
('a', 'b', 'c'),
(1, 2, 3),
'bars1',
'red'
)
bars2 = cop.elements.BarSeries(
x=('a', 'b', 'c'),
y=(4, 5, 6),
name='bars2',
color='blue'
('a', 'b', 'c'),
(4, 5, 6),
'bars2',
'blue'
)
bar_chart = cop.elements.BarChart(
name='bar_chart_name',
bars=(bars1, bars2)
'bar_chart_name',
(bars1, bars2)
)
collection.add(bar_chart)

# -------------pie_chart----------
pies1 = cop.elements.PieSeries(
x=('a', 'b', 'c'),
y=(1, 2, 3),
name='pies1',
colors=('red', None, 'blue')
('a', 'b', 'c'),
(1, 2, 3),
'pies1',
('red', None, 'blue')
)
pies2 = cop.elements.PieSeries(
x=('a', 'b', 'c'),
y=(4, 5, 6),
name='pies2',
colors=('green', 'blue', None)
('a', 'b', 'c'),
(4, 5, 6),
'pies2',
('green', 'blue', None)
)
pies_chart = cop.elements.PieChart(
name='pie_chart_name',
pies=(pies1, pies2)
'pie_chart_name',
(pies1, pies2)
)
collection.add(pies_chart)

# ---------------area_chart------------
area1 = cop.elements.AreaSeries(
x=('a', 'b', 'c'),
y=(1, 2, 3),
name='area1',
color='red',
opacity=50
('a', 'b', 'c'),
(1, 2, 3),
'area1',
'red',
50
)
area2 = cop.elements.AreaSeries(
x=('a', 'b', 'c'),
y=(4, 5, 6),
name='area2',
color='blue',
opacity=80
('a', 'b', 'c'),
(4, 5, 6),
'area2',
'blue',
80
)
area_chart = cop.elements.AreaChart(
name='area_chart_name',
areas=(area1, area2)
'area_chart_name',
(area1, area2)
)
collection.add(area_chart)

# -----------------bubble_chart----------
bubble1 = cop.elements.BubbleSeries(
x=('a', 'b', 'c'),
y=(1, 2, 3),
sizes=(5, 6, 2),
name='bubble1',
color='red'
('a', 'b', 'c'),
(1, 2, 3),
(5, 6, 2),
'bubble1',
'red'
)
bubble2 = cop.elements.BubbleSeries(
x=('a', 'b', 'c'),
y=(4, 5, 6),
sizes=(5, 6, 2),
name='bubble2',
color='blue'
('a', 'b', 'c'),
(4, 5, 6),
(5, 6, 2),
'bubble2',
'blue'
)
bubble_chart = cop.elements.BubbleChart(
name='bubble_chart_name',
bubbles=(bubble1, bubble2)
'bubble_chart_name',
(bubble1, bubble2)
)
collection.add(bubble_chart)

# ---------------stock_chart
stock1 = cop.elements.StockSeries(
x=(1, 2, 3),
high=(4, 5, 6),
low=(7, 8, 9),
close=(10, 11, 12),
open_=(13, 14, 15),
volume=(16, 17, 18),
name='stock1'
(1, 2, 3),
(4, 5, 6),
(7, 8, 9),
(10, 11, 12),
(13, 14, 15),
(16, 17, 18),
'stock1'
)
stock2 = cop.elements.StockSeries(
x=(1, 2, 3),
high=(4, 5, 6),
low=(7, 8, 9),
close=(10, 11, 12),
open_=(13, 14, 15),
volume=(16, 17, 18),
name='stock2'
(1, 2, 3),
(4, 5, 6),
(7, 8, 9),
(10, 11, 12),
(13, 14, 15),
(16, 17, 18),
'stock2'
)
stock_chart = cop.elements.StockChart(
name='stock_chart_name',
stocks=(stock1, stock2)
'stock_chart_name',
(stock1, stock2)
)
# collection.add(stock_chart)

# ----------------combined_chart-------
axis = cop.elements.ChartAxisOptions()
column1 = cop.elements.ColumnSeries(
x=('a', 'b', 'c'),
y=(1, 2, 3),
name='column1'
('a', 'b', 'c'),
(1, 2, 3),
'column1'
)
column2 = cop.elements.ColumnSeries(
x=('a', 'b', 'c'),
y=(4, 5, 6),
name='column2'
('a', 'b', 'c'),
(4, 5, 6),
'column2'
)
column_chart = cop.elements.ColumnChart(
name='column_chart',
columns=(column1, column2)
'column_chart',
(column1, column2)
)
line1 = cop.elements.LineSeries(
x=('a', 'b', 'c'),
y=(1, 2, 3),
name='line1',
symbol='square'
('a', 'b', 'c'),
(1, 2, 3),
'line1',
'square'
)
line2 = cop.elements.LineSeries(
x=('a', 'b', 'c'),
y=(4, 5, 6),
name='line2',
symbol='square'
('a', 'b', 'c'),
(4, 5, 6),
'line2',
'square'
)
line_chart_options = cop.elements.ChartOptions(
x_axis=axis,
y_axis=axis,
width=50,
background_color='gray',
background_opacity=50
axis,
axis,
50,
'gray',
50
)
line_chart = cop.elements.LineChart(
name='line_chart',
lines=(line1, line2),
options=line_chart_options
'line_chart',
(line1, line2),
line_chart_options
)
bar1 = cop.elements.BarSeries(
x=('a', 'b', 'c'),
y=(1, 2, 3),
name='bar1'
('a', 'b', 'c'),
(1, 2, 3),
'bar1'
)
bar2 = cop.elements.BarSeries(
x=('a', 'b', 'c'),
y=(4, 5, 6),
name='bar2'
('a', 'b', 'c'),
(4, 5, 6),
'bar2'
)
bar_chart_options = cop.elements.ChartOptions(
x_axis=axis,
y_axis=axis,
width=100,
axis,
axis,
100,
height=100,
rounded_corners=False
)
bar_chart = cop.elements.BarChart(
name='bar_chart',
bars=(bar1, bar2),
options=bar_chart_options
'bar_chart',
(bar1, bar2),
bar_chart_options
)
combined_chart = cop.elements.CombinedChart(
name='combined_chart_name',
charts=(column_chart, line_chart),
secondaryCharts=(bar_chart,)
'combined_chart_name',
(column_chart, line_chart),
(bar_chart,)
)
collection.add(combined_chart)

# configure server
# For running on localhost you do not need api_key else replace below "YOUR_API_KEY" with your api key.
server = cop.config.Server(
"http://localhost:8010/",
cop.config.ServerConfig(api_key="YOUR_API_KEY")
cop.config.ServerConfig("YOUR_API_KEY")
)
# Create print job
# PrintJob combines template, data, server and an optional output configuration
Expand Down
4 changes: 3 additions & 1 deletion cloudofficeprint/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@

from .printjob import PrintJob
from .resource import Resource
from .template import Template
from .response import Response

# specify what is imported on "from cloudofficeprint import *"
Expand All @@ -106,5 +107,6 @@
"own_utils",
"PrintJob",
"Resource",
"Response"
"Template",
"Response",
]
1 change: 1 addition & 0 deletions cloudofficeprint/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
from .output import *
from .pdf import *
from .server import *
from .request_option import *
Loading