How to use default_method method in avocado

Best Python code snippet using avocado_python

sum_configs.py

Source:sum_configs.py Github

copy

Full Screen

1# Qt linestyles, linecolors etc2# http://pyqt.sourceforge.net/Docs/PyQt4/qpen.html3# QColor constructed from the given CMYK color values:4# c (cyan), m (magenta), y (yellow), k (black), and a (alpha-channel,5# i.e. transparency (0=totally transparant)).6# all numbers are integers between 0-2567fill_transp = "," + str(150)8pen_transp = "," + str(180)9fill_transp_vol_change = "," + str(0)10serie_settings = [11 {12 "name": "show all",13 "remnant_fill_color": "50,50,255" + fill_transp,14 "remnant_method": "gross",15 "items": [16 {17 "name": "2D flow",18 "default_method": "gross",19 "order": 1,20 "def_fill_color": "63,81,181" + fill_transp,21 "def_pen_color": "63,81,181" + pen_transp,22 "series": ["2d_in", "2d_out"],23 },24 {25 "name": "2D boundary flow",26 "default_method": "gross",27 "order": 2,28 "def_fill_color": "156,39,176" + fill_transp,29 "def_pen_color": "156,39,176" + pen_transp,30 "series": ["2d_bound_in", "2d_bound_out"],31 },32 {33 "name": "1D flow",34 "default_method": "gross",35 "order": 3,36 "def_fill_color": "0,188,212" + fill_transp,37 "def_pen_color": "0,188,212" + pen_transp,38 "series": ["1d_in", "1d_out"],39 },40 {41 "name": "1D boundary flow",42 "default_method": "gross",43 "order": 4,44 "def_fill_color": "156,39,176" + fill_transp,45 "def_pen_color": "156,39,176" + pen_transp,46 "series": ["1d_bound_in", "1d_bound_out"],47 },48 {49 "name": "2D flow to 1D (domain exchange)",50 "default_method": "gross",51 "order": 5,52 "def_fill_color": "240,210,50" + fill_transp,53 "def_pen_color": "240,210,50" + pen_transp,54 "series": ["1d__1d_2d_exch_in", "1d__1d_2d_exch_out"],55 },56 {57 "name": "2D flow to 1D",58 "default_method": "gross",59 "order": 5,60 "def_fill_color": "100,220,5" + fill_transp,61 "def_pen_color": "100,220,5" + pen_transp,62 "series": [63 "1d__1d_2d_flow_in",64 "1d__1d_2d_flow_out",65 "2d__1d_2d_flow_in",66 "2d__1d_2d_flow_out",67 ],68 },69 {70 "name": "pumps",71 "default_method": "gross",72 "order": 6,73 "def_fill_color": "255,235,59" + fill_transp,74 "def_pen_color": "255,235,59" + pen_transp,75 "series": ["pump_in", "pump_out"],76 },77 {78 "name": "rain on 2D",79 "default_method": "net",80 "order": 7,81 "def_fill_color": "0,150,136" + fill_transp,82 "def_pen_color": "0,150,136" + pen_transp,83 "series": ["rain"],84 },85 {86 "name": "lateral flow to 1D",87 "default_method": "net",88 "order": 8,89 "def_fill_color": "76,175,80" + fill_transp,90 "def_pen_color": "76,175,80" + pen_transp,91 "series": ["lat_1d"],92 },93 {94 "name": "lateral flow to 2D",95 "default_method": "net",96 "order": 9,97 "def_fill_color": "176,175,80" + fill_transp,98 "def_pen_color": "176,175,80" + pen_transp,99 "series": ["lat_2d"],100 },101 {102 "name": "constant infiltration",103 "default_method": "net",104 "order": 10,105 "def_fill_color": "121,85,72" + fill_transp,106 "def_pen_color": "121,85,72" + pen_transp,107 "series": ["infiltration_rate_simple"],108 },109 {110 "name": "volume change 2D",111 "default_method": "net",112 "order": 11,113 "def_fill_color": "244,67,54" + fill_transp_vol_change,114 "def_pen_color": "244,67,54" + pen_transp,115 "series": ["d_2d_vol"],116 },117 {118 "name": "volume change 1D",119 "default_method": "net",120 "order": 12,121 "def_fill_color": "255,152,0" + fill_transp_vol_change,122 "def_pen_color": "255,152,0" + pen_transp,123 "series": ["d_1d_vol"],124 },125 {126 "name": "groundwater flow",127 "default_method": "gross",128 "order": 2.5,129 "def_fill_color": "0,0,128" + fill_transp,130 "def_pen_color": "0,0,128" + pen_transp,131 "series": ["2d_groundwater_in", "2d_groundwater_out"],132 },133 {134 "name": "volume change groundwater",135 "default_method": "net",136 "order": 11.5,137 "def_fill_color": "100,149,237" + fill_transp_vol_change,138 "def_pen_color": "100,149,237" + pen_transp,139 "series": ["d_2d_groundwater_vol"],140 },141 {142 "name": "leakage",143 "default_method": "net",144 "order": 10.5,145 "def_fill_color": "221,160,221" + fill_transp,146 "def_pen_color": "221,160,221" + pen_transp,147 "series": ["leak"],148 },149 {150 "name": "in/exfiltration (domain exchange)",151 "default_method": "gross",152 "order": 10.6,153 "def_fill_color": "121,160,191" + fill_transp,154 "def_pen_color": "121,160,191" + pen_transp,155 "series": [156 "2d_vertical_infiltration_pos",157 "2d_vertical_infiltration_neg",158 ],159 },160 {161 "name": "interception",162 "default_method": "net",163 "order": 10.7,164 "def_fill_color": "181,60,221" + fill_transp,165 "def_pen_color": "181,60,221" + pen_transp,166 "series": ["intercepted_volume"],167 },168 {169 "name": "0D rainfall runoff on 1D",170 "default_method": "net",171 "order": 7.1,172 "def_fill_color": "50,130,136" + fill_transp,173 "def_pen_color": "50,130,136" + pen_transp,174 "series": ["inflow"],175 },176 {177 "name": "surface sources and sinks",178 "default_method": "net",179 "order": 7.2,180 "def_fill_color": "204,255,51" + fill_transp,181 "def_pen_color": "204,255,51" + pen_transp,182 "series": ["q_sss"],183 },184 ],185 },186 {187 "name": "show main flow",188 "remnant_fill_color": "50,50,255" + fill_transp,189 "remnant_method": "net",190 "items": [191 {192 "name": "2D flow",193 "default_method": "gross",194 "order": 1,195 "def_fill_color": "63,81,181" + fill_transp,196 "def_pen_color": "63,81,181" + pen_transp,197 "series": ["2d_in", "2d_out"],198 },199 {200 "name": "1D flow",201 "default_method": "gross",202 "order": 2,203 "def_fill_color": "0,188,212" + fill_transp,204 "def_pen_color": "0,188,212" + pen_transp,205 "series": ["1d_in", "1d_out"],206 },207 {208 "name": "external (rain and laterals)",209 "default_method": "net",210 "order": 3,211 "def_fill_color": "0,150,136" + fill_transp,212 "def_pen_color": "0,150,136" + pen_transp,213 "series": ["rain", "lat_1d", "lat_2d", "inflow"],214 # TODO: Add leakage?215 },216 {217 "name": "constant infiltration",218 "default_method": "net",219 "order": 3,220 "def_fill_color": "50,150,136" + fill_transp,221 "def_pen_color": "50,150,136" + pen_transp,222 "series": ["infiltration_rate_simple"],223 },224 {225 "name": "2D flow to 1D (domain exchange)",226 "default_method": "gross",227 "order": 5,228 "def_fill_color": "240,210,50" + fill_transp,229 "def_pen_color": "240,210,50" + pen_transp,230 "series": ["1d__1d_2d_exch_in", "1d__1d_2d_exch_out"],231 },232 {233 "name": "2D flow to 1D",234 "default_method": "gross",235 "order": 5.1,236 "def_fill_color": "100,220,5" + fill_transp,237 "def_pen_color": "100,220,5" + pen_transp,238 "series": [239 "1d__1d_2d_flow_in",240 "1d__1d_2d_flow_out",241 "2d__1d_2d_flow_in",242 "2d__1d_2d_flow_out",243 ],244 },245 {246 "name": "volume change",247 "default_method": "net",248 "order": 5.2,249 "def_fill_color": "255,152,0" + fill_transp_vol_change,250 "def_pen_color": "255,152,0" + pen_transp,251 "series": ["d_2d_vol", "d_1d_vol", "d_2d_groundwater_vol"],252 },253 {254 "name": "groundwater flow",255 "default_method": "gross",256 "order": 1.5,257 "def_fill_color": "0,0,128" + fill_transp,258 "def_pen_color": "0,0,128" + pen_transp,259 "series": ["2d_groundwater_in", "2d_groundwater_out"],260 },261 {262 "name": "interception",263 "default_method": "net",264 "order": 1.6,265 "def_fill_color": "181,60,221" + fill_transp,266 "def_pen_color": "181,60,221" + pen_transp,267 "series": ["intercepted_volume"],268 },269 {270 "name": "leakage",271 "default_method": "net",272 "order": 3.5,273 "def_fill_color": "221,160,221" + fill_transp,274 "def_pen_color": "221,160,221" + pen_transp,275 "series": ["leak"],276 },277 {278 "name": "surface sources and sinks",279 "default_method": "net",280 "order": 7.2,281 "def_fill_color": "204,255,51" + fill_transp,282 "def_pen_color": "204,255,51" + pen_transp,283 "series": ["q_sss"],284 },285 ],286 },...

Full Screen

Full Screen

misc.py

Source:misc.py Github

copy

Full Screen

1# This program is free software: you can redistribute it and/or modify2# it under the terms of the GNU General Public License as published by3# the Free Software Foundation, either version 3 of the License, or4# (at your option) any later version.5# This program is distributed in the hope that it will be useful,6# but WITHOUT ANY WARRANTY; without even the implied warranty of7# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the8# GNU General Public License for more details.9# You should have received a copy of the GNU General Public License10# along with this program. If not, see <https://www.gnu.org/licenses/>.11from apiron import JsonEndpoint, StreamingEndpoint, Endpoint, Service12__all__ = ["OrthancServer"]13class OrthancServer(Service):14 """Server-related endpoints"""15 changes = JsonEndpoint(path="changes/")16 del_changes = JsonEndpoint(path="changes/", default_method="DELETE")17 exports = JsonEndpoint(path="exports/")18 del_exports = JsonEndpoint(path="exports/", default_method="DELETE")19 jobs = JsonEndpoint(path="jobs/")20 job = JsonEndpoint(path="jobs/{id_}/")21 cancel_job = JsonEndpoint(path="jobs/{id_}/cancel/", default_method="POST")22 pause_job = JsonEndpoint(path="jobs/{id_}/pause/", default_method="POST")23 resubmit_job = JsonEndpoint(path="jobs/{id_}/resubmit/", default_method="POST")24 resume_job = JsonEndpoint(path="jobs/{id_}/resume/", default_method="POST")25 job_output = JsonEndpoint(path="jobs/{id_}/{key}/")26 peers = JsonEndpoint(path="peers/")27 peer = JsonEndpoint(path="peers/{peer}/")28 del_peer = JsonEndpoint(path="peers/{peer}/", default_method="DELETE")29 put_peer = JsonEndpoint(path="peers/{peer}/", default_method="PUT")30 store_peer = JsonEndpoint(path="peers/{peer}/store/", default_method="POST")31 plugins = JsonEndpoint(path="plugins/")32 plugin = JsonEndpoint(path="plugins/{id_}/")33 plugins_js = Endpoint(path="plugins/explorer.js/")34 statistics = JsonEndpoint(path="statistics/")35 system = JsonEndpoint(path="system/")36 tools_create_archive = StreamingEndpoint(37 path="tools/create-archive/", default_method="POST"38 )39 tools_create_dicom = StreamingEndpoint(40 path="tools/create-dicom/", default_method="POST"41 )42 tools_create_media = StreamingEndpoint(43 path="tools/create-media/", default_method="POST"44 )45 tools_create_media_extended = StreamingEndpoint(46 path="tools/create-media-extended/", default_method="POST"47 )48 tools_default_encoding = Endpoint(path="tools/default-encoding/")49 tools_change_default_encoding = Endpoint(50 path="tools/default-encoding/", default_method="PUT"51 )52 tools_post_default_encoding = JsonEndpoint(53 path="tools/default-encoding/", default_method="POST"54 )55 tools_dicom_conformance = Endpoint(path="tools/dicom-conformance/")56 tools_execute_script = JsonEndpoint(57 path="tools/execute-script/", default_method="POST"58 )59 tools_find = JsonEndpoint(path="tools/find/", default_method="POST")60 tools_generate_uid = Endpoint(path="tools/generate-uid/")61 tools_invalidate_tags = JsonEndpoint(62 path="tools/invalidate-tags/", default_method="POST"63 )64 tools_lookup = JsonEndpoint(path="tools/lookup/", default_method="POST")65 tools_metrics = JsonEndpoint(path="tools/metrics/")66 tools_change_metrics = JsonEndpoint(path="tools/metrics/", default_method="PUT")67 tools_metrics_prometheus = JsonEndpoint(path="tools/metrics-prometheus/")68 tools_now = Endpoint(path="tools/now/")69 tools_now_local = Endpoint(path="tools/now-local/")70 tools_reconstruct = Endpoint(path="tools/reconstruct/", default_method="POST")71 tools_reset = JsonEndpoint(path="tools/reset/", default_method="POST")...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run avocado automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful