@(userName: String,studyNo: Int, types: List[(String, Int, Int)])
Please wait, study is being created


About Us
Founded in 2014, the Techno Wolves is a student run FIRST Robotics Competition team based in Raleigh, North Carolina.
Although having recently transitioned into a community-based organization, our 50-student club still maintains a strong relationship with Wake STEM (Science, Technology, Engineering, and Math) Early College High School.
We not only plan on building an awesome robot, but also aim to build a better future by enriching our community through the STEM
fields and the core values of FIRST, such as Coopertition® and Gracious Professionalism®.


Your Order
{{item.title}}
{{item.price|currency}}
{{item.price * item.quantity|currency}}
Remove
Total:{{totalCart()|currency}}
Discount:{{bill.discount|currency}}
Subtotal:{{subtotal()|currency}}


|
About Me
Amanda DePasquale<EMAIL_ADDRESS>|
|---|
|
My name is Amanda DePasquale. I am in my early 20's and I am a student at the School of Visual Arts. I live in Queens New York. I am Italian who can't eat bread. I love the stuff, but my body doesn't. |
|---|


| 1 | package fr.sii.ogham.testing.assertion; | |
| 2 | ||
| 3 | import fr.sii.ogham.testing.assertion.email.FluentEmailsAssert; | |
| 4 | import fr.sii.ogham.testing.assertion.email.FluentReceivedEmailsAssert; | |
| 5 | import fr.sii.ogham.testing.assertion.sms.FluentReceivedSmsAssert; | |
| 6 | import fr.sii.ogham.testing.assertion.sms.FluentSmsListAssert; | |
| 7 | import fr.sii.ogham.testing.assertion.util.AssertionRegistry; | |
| 8 | import fr.sii.ogham.testing.assertion.util.FailAtEndRegistry; | |
| 9 | import fr.sii.ogham.testing.assertion.util.FailImmediatelyRegistry; | |
| 10 | import fr.sii.ogham.testing.extension.junit.sms.SmppServerExtension; | |
| 11 | import fr.sii.ogham.testing.extension.junit.sms.SmppServerRule; | |
| 12 | import fr.sii.ogham.testing.sms.simulator.SmppServerSimulator; | |
| 13 | import fr.sii.ogham.testing.sms.simulator.bean.SubmitSm; | |
| 14 | import fr.sii.ogham.testing.sms.simulator.jsmpp.SubmitSmAdapter; | |
| 15 | import ogham.testing.com.icegreen.greenmail.junit4.GreenMailRule; | |
| 16 | import ogham.testing.com.icegreen.greenmail.junit5.GreenMailExtension; | |
| 17 | import ogham.testing.com.icegreen.greenmail.util.GreenMail; | |
| 18 | import ogham.testing.jakarta.mail.internet.MimeMessage; | |
| 19 | ||
| 20 | import java.util.List; | |
| 21 | import java.util.function.Consumer; | |
| 22 | import java.util.stream.Collectors; | |
| 23 | ||
| 24 | import static java.util.Arrays.asList; | |
| 25 | ||
| 26 | /** | |
| 27 | * Utility class that helps writing message assertions. For emails, you can | |
| 28 | * write something like this: | |
| 29 | * | |
| 30 | * <pre> | |
| 31 | * {@code | |
| 32 | * assertThat(greenMail) | |
| 33 | * .receivedMessages() | |
| 34 | * .count(is(1)) | |
| 35 | * .message(0) | |
| 36 | * .subject(is("Test")) | |
| 37 | * .from() | |
| 38 | * .address(hasItems("test.sender@sii.fr")) | |
| 39 | * .and() | |
| 40 | * .to() | |
| 41 | * .address(hasItems("recipient@sii.fr")) | |
| 42 | * .and() | |
| 43 | * .body() | |
| 44 | * .contentAsString(is("body")) | |
| 45 | * .contentType(startsWith("text/plain")) | |
| 46 | * .and() | |
| 47 | * .alternative(nullValue()) | |
| 48 | * .attachments(hasSize(1)) | |
| 49 | * .attachment("04-Java-OOP-Basics.pdf") | |
| 50 | * .content(is(resource("/attachment/04-Java-OOP-Basics.pdf"))) | |
| 51 | * .contentType(startsWith("application/pdf")) | |
| 52 | * .filename(is("04-Java-OOP-Basics.pdf")) | |
| 53 | * .disposition(is(ATTACHMENT_DISPOSITION)); | |
| 54 | * } | |
| 55 | * </pre> | |
| 56 | * | |
| 57 | * For sms, you can write something like this: | |
| 58 | * | |
| 59 | * <pre> | |
| 60 | * {@code | |
| 61 | * assertThat(smppServer) | |
| 62 | * .receivedMessages() | |
| 63 | * .count(is(1)) | |
| 64 | * .message(0) | |
| 65 | * .content(is("sms content")) | |
| 66 | * .from() | |
| 67 | * .number(is(INTERNATIONAL_PHONE_NUMBER)) | |
| 68 | * .typeOfNumber(is(TypeOfNumber.INTERNATIONAL)) | |
| 69 | * .numberPlanIndicator(is(NumberingPlanIndicator.ISDN)) | |
| 70 | * .and() | |
| 71 | * .to() | |
| 72 | * .number(is(NATIONAL_PHONE_NUMBER)) | |
| 73 | * .typeOfNumber(is(TypeOfNumber.UNKNOWN)) | |
| 74 | * .numberPlanIndicator(is(NumberingPlanIndicator.ISDN)); | |
| 75 | * } | |
| 76 | * </pre> | |
| 77 | * | |
| 78 | * | |
| 79 | * @author Aurélien Baudet | |
| 80 | * | |
| 81 | */ | |
| 82 | public final class OghamAssertions { | |
| 83 | ||
| 84 | /** | |
| 85 | * Helper method to write assertions on mails using fluent API. For example: | |
| 86 | * | |
| 87 | * <pre> | |
| 88 | * {@code | |
| 89 | * assertThat(greenMail).receivedMessages() | |
| 90 | * .count(is(1)) | |
| 91 | * .message(0) | |
| 92 | * .subject(is("Test")) | |
| 93 | * .from().address(hasItems("test.sender@sii.fr")).and() | |
| 94 | * .to().address(hasItems("recipient@sii.fr")).and() | |
| 95 | * .body() | |
| 96 | * .contentAsString(is("body")) | |
| 97 | * .contentType(startsWith("text/plain")).and() | |
| 98 | * .alternative(nullValue()) | |
| 99 | * .attachments(hasSize(1)) | |
| 100 | * .attachment("04-Java-OOP-Basics.pdf") | |
| 101 | * .content(is(resource("/attachment/04-Java-OOP-Basics.pdf"))) | |
| 102 | * .contentType(startsWith("application/pdf")) | |
| 103 | * .filename(is("04-Java-OOP-Basics.pdf")) | |
| 104 | * .disposition(is(ATTACHMENT_DISPOSITION)); | |
| 105 | * } | |
| 106 | * </pre> | |
| 107 | * | |
| 108 | * @param greenMail | |
| 109 | * email server that stores received messages | |
| 110 | * @return builder for fluent assertions on received messages | |
| 111 | */ | |
| 112 | public static FluentReceivedEmailsAssert assertThat(GreenMailExtension greenMail) { | |
| 113 |
1
1. assertThat : replaced return value with null for fr/sii/ogham/testing/assertion/OghamAssertions::assertThat → NO_COVERAGE |
return assertThat(greenMail, new FailImmediatelyRegistry()); |
| 114 | } | |
| 115 | ||
| 116 | /** | |
| 117 | * Helper method to write assertions on mails using fluent API. For example: | |
| 118 | * | |
| 119 | * <pre> | |
| 120 | * {@code | |
| 121 | * assertAll(registry -> | |
| 122 | * assertThat(greenMail, registry).receivedMessages() | |
| 123 | * .count(is(1)) | |
| 124 | * .message(0) | |
| 125 | * .subject(is("Test")) | |
| 126 | * .from().address(hasItems("test.sender@sii.fr")).and() | |
| 127 | * .to().address(hasItems("recipient@sii.fr")).and() | |
| 128 | * .body() | |
| 129 | * .contentAsString(is("body")) | |
| 130 | * .contentType(startsWith("text/plain")).and() | |
| 131 | * .alternative(nullValue()) | |
| 132 | * .attachments(hasSize(1)) | |
| 133 | * .attachment("04-Java-OOP-Basics.pdf") | |
| 134 | * .content(is(resource("/attachment/04-Java-OOP-Basics.pdf"))) | |
| 135 | * .contentType(startsWith("application/pdf")) | |
| 136 | * .filename(is("04-Java-OOP-Basics.pdf")) | |
| 137 | * .disposition(is(ATTACHMENT_DISPOSITION))); | |
| 138 | * } | |
| 139 | * </pre> | |
| 140 | * | |
| 141 | * <p> | |
| 142 | * This method is used in combination of {@link #assertAll(Consumer...)} in | |
| 143 | * order to report all exceptions/assertion failures at the end instead of | |
| 144 | * stopping at the first failure. | |
| 145 | * | |
| 146 | * @param greenMail | |
| 147 | * email server that stores received messages | |
| 148 | * @param registry | |
| 149 | * the registry used to register assertions | |
| 150 | * @return builder for fluent assertions on received messages | |
| 151 | */ | |
| 152 | public static FluentReceivedEmailsAssert assertThat(GreenMailExtension greenMail, AssertionRegistry registry) { | |
| 153 |
1
1. assertThat : replaced return value with null for fr/sii/ogham/testing/assertion/OghamAssertions::assertThat → NO_COVERAGE |
return new FluentReceivedEmailsAssert(asList(greenMail.getReceivedMessages()), registry); |
| 154 | } | |
| 155 | ||
| 156 | ||
| 157 | /** | |
| 158 | * Helper method to write assertions on mails using fluent API. For example: | |
| 159 | * | |
| 160 | * <pre> | |
| 161 | * {@code | |
| 162 | * assertThat(greenMail).receivedMessages() | |
| 163 | * .count(is(1)) | |
| 164 | * .message(0) | |
| 165 | * .subject(is("Test")) | |
| 166 | * .from().address(hasItems("test.sender@sii.fr")).and() | |
| 167 | * .to().address(hasItems("recipient@sii.fr")).and() | |
| 168 | * .body() | |
| 169 | * .contentAsString(is("body")) | |
| 170 | * .contentType(startsWith("text/plain")).and() | |
| 171 | * .alternative(nullValue()) | |
| 172 | * .attachments(hasSize(1)) | |
| 173 | * .attachment("04-Java-OOP-Basics.pdf") | |
| 174 | * .content(is(resource("/attachment/04-Java-OOP-Basics.pdf"))) | |
| 175 | * .contentType(startsWith("application/pdf")) | |
| 176 | * .filename(is("04-Java-OOP-Basics.pdf")) | |
| 177 | * .disposition(is(ATTACHMENT_DISPOSITION)); | |
| 178 | * } | |
| 179 | * </pre> | |
| 180 | * | |
| 181 | * @param greenMail | |
| 182 | * email server that stores received messages | |
| 183 | * @return builder for fluent assertions on received messages | |
| 184 | */ | |
| 185 | public static FluentReceivedEmailsAssert assertThat(GreenMailRule greenMail) { | |
| 186 |
1
1. assertThat : replaced return value with null for fr/sii/ogham/testing/assertion/OghamAssertions::assertThat → NO_COVERAGE |
return assertThat(greenMail, new FailImmediatelyRegistry()); |
| 187 | } | |
| 188 | ||
| 189 | /** | |
| 190 | * Helper method to write assertions on mails using fluent API. For example: | |
| 191 | * | |
| 192 | * <pre> | |
| 193 | * {@code | |
| 194 | * assertAll(registry -> | |
| 195 | * assertThat(greenMail, registry).receivedMessages() | |
| 196 | * .count(is(1)) | |
| 197 | * .message(0) | |
| 198 | * .subject(is("Test")) | |
| 199 | * .from().address(hasItems("test.sender@sii.fr")).and() | |
| 200 | * .to().address(hasItems("recipient@sii.fr")).and() | |
| 201 | * .body() | |
| 202 | * .contentAsString(is("body")) | |
| 203 | * .contentType(startsWith("text/plain")).and() | |
| 204 | * .alternative(nullValue()) | |
| 205 | * .attachments(hasSize(1)) | |
| 206 | * .attachment("04-Java-OOP-Basics.pdf") | |
| 207 | * .content(is(resource("/attachment/04-Java-OOP-Basics.pdf"))) | |
| 208 | * .contentType(startsWith("application/pdf")) | |
| 209 | * .filename(is("04-Java-OOP-Basics.pdf")) | |
| 210 | * .disposition(is(ATTACHMENT_DISPOSITION))); | |
| 211 | * } | |
| 212 | * </pre> | |
| 213 | * | |
| 214 | * <p> | |
| 215 | * This method is used in combination of {@link #assertAll(Consumer...)} in | |
| 216 | * order to report all exceptions/assertion failures at the end instead of | |
| 217 | * stopping at the first failure. | |
| 218 | * | |
| 219 | * @param greenMail | |
| 220 | * email server that stores received messages | |
| 221 | * @param registry | |
| 222 | * the registry used to register assertions | |
| 223 | * @return builder for fluent assertions on received messages | |
| 224 | */ | |
| 225 | public static FluentReceivedEmailsAssert assertThat(GreenMailRule greenMail, AssertionRegistry registry) { | |
| 226 |
1
1. assertThat : replaced return value with null for fr/sii/ogham/testing/assertion/OghamAssertions::assertThat → NO_COVERAGE |
return new FluentReceivedEmailsAssert(asList(greenMail.getReceivedMessages()), registry); |
| 227 | } | |
| 228 | ||
| 229 | /** | |
| 230 | * Helper method to write assertions on mails using fluent API. For example: | |
| 231 | * | |
| 232 | * <pre> | |
| 233 | * {@code | |
| 234 | * assertThat(greenMail).receivedMessages() | |
| 235 | * .count(is(1)) | |
| 236 | * .message(0) | |
| 237 | * .subject(is("Test")) | |
| 238 | * .from().address(hasItems("test.sender@sii.fr")).and() | |
| 239 | * .to().address(hasItems("recipient@sii.fr")).and() | |
| 240 | * .body() | |
| 241 | * .contentAsString(is("body")) | |
| 242 | * .contentType(startsWith("text/plain")).and() | |
| 243 | * .alternative(nullValue()) | |
| 244 | * .attachments(hasSize(1)) | |
| 245 | * .attachment("04-Java-OOP-Basics.pdf") | |
| 246 | * .content(is(resource("/attachment/04-Java-OOP-Basics.pdf"))) | |
| 247 | * .contentType(startsWith("application/pdf")) | |
| 248 | * .filename(is("04-Java-OOP-Basics.pdf")) | |
| 249 | * .disposition(is(ATTACHMENT_DISPOSITION)); | |
| 250 | * } | |
| 251 | * </pre> | |
| 252 | * | |
| 253 | * @param greenMail | |
| 254 | * email server that stores received messages | |
| 255 | * @return builder for fluent assertions on received messages | |
| 256 | */ | |
| 257 | public static FluentReceivedEmailsAssert assertThat(GreenMail greenMail) { | |
| 258 |
1
1. assertThat : replaced return value with null for fr/sii/ogham/testing/assertion/OghamAssertions::assertThat → NO_COVERAGE |
return assertThat(greenMail, new FailImmediatelyRegistry()); |
| 259 | } | |
| 260 | ||
| 261 | /** | |
| 262 | * Helper method to write assertions on mails using fluent API. For example: | |
| 263 | * | |
| 264 | * <pre> | |
| 265 | * {@code | |
| 266 | * assertAll(registry -> | |
| 267 | * assertThat(greenMail, registry).receivedMessages() | |
| 268 | * .count(is(1)) | |
| 269 | * .message(0) | |
| 270 | * .subject(is("Test")) | |
| 271 | * .from().address(hasItems("test.sender@sii.fr")).and() | |
| 272 | * .to().address(hasItems("recipient@sii.fr")).and() | |
| 273 | * .body() | |
| 274 | * .contentAsString(is("body")) | |
| 275 | * .contentType(startsWith("text/plain")).and() | |
| 276 | * .alternative(nullValue()) | |
| 277 | * .attachments(hasSize(1)) | |
| 278 | * .attachment("04-Java-OOP-Basics.pdf") | |
| 279 | * .content(is(resource("/attachment/04-Java-OOP-Basics.pdf"))) | |
| 280 | * .contentType(startsWith("application/pdf")) | |
| 281 | * .filename(is("04-Java-OOP-Basics.pdf")) | |
| 282 | * .disposition(is(ATTACHMENT_DISPOSITION))); | |
| 283 | * } | |
| 284 | * </pre> | |
| 285 | * | |
| 286 | * <p> | |
| 287 | * This method is used in combination of {@link #assertAll(Consumer...)} in | |
| 288 | * order to report all exceptions/assertion failures at the end instead of | |
| 289 | * stopping at the first failure. | |
| 290 | * | |
| 291 | * @param greenMail | |
| 292 | * email server that stores received messages | |
| 293 | * @param registry | |
| 294 | * the registry used to register assertions | |
| 295 | * @return builder for fluent assertions on received messages | |
| 296 | */ | |
| 297 | public static FluentReceivedEmailsAssert assertThat(GreenMail greenMail, AssertionRegistry registry) { | |
| 298 |
1
1. assertThat : replaced return value with null for fr/sii/ogham/testing/assertion/OghamAssertions::assertThat → NO_COVERAGE |
return new FluentReceivedEmailsAssert(asList(greenMail.getReceivedMessages()), registry); |
| 299 | } | |
| 300 | ||
| 301 | /** | |
| 302 | * Helper method to write assertions on mails using fluent API. For example: | |
| 303 | * | |
| 304 | * <pre> | |
| 305 | * {@code | |
| 306 | * assertThat(greenMail.getReceivedMessages()) | |
| 307 | * .count(is(1)) | |
| 308 | * .message(0) | |
| 309 | * .subject(is("Test")) | |
| 310 | * .from().address(hasItems("test.sender@sii.fr")).and() | |
| 311 | * .to().address(hasItems("recipient@sii.fr")).and() | |
| 312 | * .body() | |
| 313 | * .contentAsString(is("body")) | |
| 314 | * .contentType(startsWith("text/plain")).and() | |
| 315 | * .alternative(nullValue()) | |
| 316 | * .attachments(hasSize(1)) | |
| 317 | * .attachment("04-Java-OOP-Basics.pdf") | |
| 318 | * .content(is(resource("/attachment/04-Java-OOP-Basics.pdf"))) | |
| 319 | * .contentType(startsWith("application/pdf")) | |
| 320 | * .filename(is("04-Java-OOP-Basics.pdf")) | |
| 321 | * .disposition(is(ATTACHMENT_DISPOSITION)); | |
| 322 | * } | |
| 323 | * </pre> | |
| 324 | * | |
| 325 | * @param receivedEmails | |
| 326 | * list of messages received by the email server | |
| 327 | * @return builder for fluent assertions on received messages | |
| 328 | */ | |
| 329 | public static FluentEmailsAssert<Void> assertThat(MimeMessage[] receivedEmails) { | |
| 330 |
1
1. assertThat : replaced return value with null for fr/sii/ogham/testing/assertion/OghamAssertions::assertThat → NO_COVERAGE |
return assertThat(receivedEmails, new FailImmediatelyRegistry()); |
| 331 | } | |
| 332 | ||
| 333 | /** | |
| 334 | * Helper method to write assertions on mails using fluent API. For example: | |
| 335 | * | |
| 336 | * <pre> | |
| 337 | * {@code | |
| 338 | * assertAll(registry -> | |
| 339 | * assertThat(greenMail.getReceivedMessages(), registry) | |
| 340 | * .count(is(1)) | |
| 341 | * .message(0) | |
| 342 | * .subject(is("Test")) | |
| 343 | * .from().address(hasItems("test.sender@sii.fr")).and() | |
| 344 | * .to().address(hasItems("recipient@sii.fr")).and() | |
| 345 | * .body() | |
| 346 | * .contentAsString(is("body")) | |
| 347 | * .contentType(startsWith("text/plain")).and() | |
| 348 | * .alternative(nullValue()) | |
| 349 | * .attachments(hasSize(1)) | |
| 350 | * .attachment("04-Java-OOP-Basics.pdf") | |
| 351 | * .content(is(resource("/attachment/04-Java-OOP-Basics.pdf"))) | |
| 352 | * .contentType(startsWith("application/pdf")) | |
| 353 | * .filename(is("04-Java-OOP-Basics.pdf")) | |
| 354 | * .disposition(is(ATTACHMENT_DISPOSITION))); | |
| 355 | * } | |
| 356 | * </pre> | |
| 357 | * | |
| 358 | * <p> | |
| 359 | * This method is used in combination of {@link #assertAll(Consumer...)} in | |
| 360 | * order to report all exceptions/assertion failures at the end instead of | |
| 361 | * stopping at the first failure. | |
| 362 | * | |
| 363 | * @param receivedEmails | |
| 364 | * list of messages received by the email server | |
| 365 | * @param registry | |
| 366 | * the registry used to register assertions | |
| 367 | * @return builder for fluent assertions on received messages | |
| 368 | */ | |
| 369 | public static FluentEmailsAssert<Void> assertThat(MimeMessage[] receivedEmails, AssertionRegistry registry) { | |
| 370 |
1
1. assertThat : replaced return value with null for fr/sii/ogham/testing/assertion/OghamAssertions::assertThat → NO_COVERAGE |
return new FluentEmailsAssert<>(asList(receivedEmails), null, registry); |
| 371 | } | |
| 372 | ||
| 373 | /** | |
| 374 | * Helper method to write assertions on sms using fluent API. For example: | |
| 375 | * | |
| 376 | * <pre> | |
| 377 | * {@code | |
| 378 | * assertThat(smppServer).receivedMessages() | |
| 379 | * .count(is(1)) | |
| 380 | * .message(0) | |
| 381 | * .content(is("sms content")) | |
| 382 | * .from() | |
| 383 | * .number(is(INTERNATIONAL_PHONE_NUMBER)) | |
| 384 | * .typeOfNumber(is(TypeOfNumber.INTERNATIONAL)) | |
| 385 | * .numberPlanIndicator(is(NumberingPlanIndicator.ISDN)).and() | |
| 386 | * .to() | |
| 387 | * .number(is(NATIONAL_PHONE_NUMBER)) | |
| 388 | * .typeOfNumber(is(TypeOfNumber.UNKNOWN)) | |
| 389 | * .numberPlanIndicator(is(NumberingPlanIndicator.ISDN)); | |
| 390 | * } | |
| 391 | * </pre> | |
| 392 | * | |
| 393 | * @param smsServer | |
| 394 | * SMS server that stores received messages | |
| 395 | * @param <M> | |
| 396 | * the type of messages handled by the server | |
| 397 | * @return builder for fluent assertions on received messages | |
| 398 | */ | |
| 399 | public static <M> FluentReceivedSmsAssert<SubmitSm> assertThat(SmppServerExtension<M> smsServer) { | |
| 400 |
1
1. assertThat : replaced return value with null for fr/sii/ogham/testing/assertion/OghamAssertions::assertThat → NO_COVERAGE |
return assertThat(smsServer, new FailImmediatelyRegistry()); |
| 401 | } | |
| 402 | ||
| 403 | ||
| 404 | /** | |
| 405 | * Helper method to write assertions on sms using fluent API. For example: | |
| 406 | * | |
| 407 | * <pre> | |
| 408 | * {@code | |
| 409 | * assertAll(registry -> | |
| 410 | * assertThat(smppServer, registry).receivedMessages() | |
| 411 | * .count(is(1)) | |
| 412 | * .message(0) | |
| 413 | * .content(is("sms content")) | |
| 414 | * .from() | |
| 415 | * .number(is(INTERNATIONAL_PHONE_NUMBER)) | |
| 416 | * .typeOfNumber(is(TypeOfNumber.INTERNATIONAL)) | |
| 417 | * .numberPlanIndicator(is(NumberingPlanIndicator.ISDN)).and() | |
| 418 | * .to() | |
| 419 | * .number(is(NATIONAL_PHONE_NUMBER)) | |
| 420 | * .typeOfNumber(is(TypeOfNumber.UNKNOWN)) | |
| 421 | * .numberPlanIndicator(is(NumberingPlanIndicator.ISDN))); | |
| 422 | * } | |
| 423 | * </pre> | |
| 424 | * | |
| 425 | * <p> | |
| 426 | * This method is used in combination of {@link #assertAll(Consumer...)} in | |
| 427 | * order to report all exceptions/assertion failures at the end instead of | |
| 428 | * stopping at the first failure. | |
| 429 | * | |
| 430 | * @param smsServer | |
| 431 | * SMS server that stores received messages | |
| 432 | * @param registry | |
| 433 | * the registry used to register assertions | |
| 434 | * @param <M> | |
| 435 | * the type of messages handled by the server | |
| 436 | * @return builder for fluent assertions on received messages | |
| 437 | */ | |
| 438 | public static <M> FluentReceivedSmsAssert<SubmitSm> assertThat(SmppServerExtension<M> smsServer, AssertionRegistry registry) { | |
| 439 |
1
1. assertThat : replaced return value with null for fr/sii/ogham/testing/assertion/OghamAssertions::assertThat → NO_COVERAGE |
return new FluentReceivedSmsAssert<>(smsServer.getReceivedMessages(), registry); |
| 440 | } | |
| 441 | ||
| 442 | /** | |
| 443 | * Helper method to write assertions on sms using fluent API. For example: | |
| 444 | * | |
| 445 | * <pre> | |
| 446 | * {@code | |
| 447 | * assertThat(smppServer).receivedMessages() | |
| 448 | * .count(is(1)) | |
| 449 | * .message(0) | |
| 450 | * .content(is("sms content")) | |
| 451 | * .from() | |
| 452 | * .number(is(INTERNATIONAL_PHONE_NUMBER)) | |
| 453 | * .typeOfNumber(is(TypeOfNumber.INTERNATIONAL)) | |
| 454 | * .numberPlanIndicator(is(NumberingPlanIndicator.ISDN)).and() | |
| 455 | * .to() | |
| 456 | * .number(is(NATIONAL_PHONE_NUMBER)) | |
| 457 | * .typeOfNumber(is(TypeOfNumber.UNKNOWN)) | |
| 458 | * .numberPlanIndicator(is(NumberingPlanIndicator.ISDN)); | |
| 459 | * } | |
| 460 | * </pre> | |
| 461 | * | |
| 462 | * @param smsServer | |
| 463 | * SMS server that stores received messages | |
| 464 | * @param <M> | |
| 465 | * the type of messages handled by the server | |
| 466 | * @return builder for fluent assertions on received messages | |
| 467 | */ | |
| 468 | public static <M> FluentReceivedSmsAssert<SubmitSm> assertThat(SmppServerRule<M> smsServer) { | |
| 469 |
1
1. assertThat : replaced return value with null for fr/sii/ogham/testing/assertion/OghamAssertions::assertThat → NO_COVERAGE |
return assertThat(smsServer, new FailImmediatelyRegistry()); |
| 470 | } | |
| 471 | ||
| 472 | /** | |
| 473 | * Helper method to write assertions on sms using fluent API. For example: | |
| 474 | * | |
| 475 | * <pre> | |
| 476 | * {@code | |
| 477 | * assertAll(registry -> | |
| 478 | * assertThat(smppServer, registry).receivedMessages() | |
| 479 | * .count(is(1)) | |
| 480 | * .message(0) | |
| 481 | * .content(is("sms content")) | |
| 482 | * .from() | |
| 483 | * .number(is(INTERNATIONAL_PHONE_NUMBER)) | |
| 484 | * .typeOfNumber(is(TypeOfNumber.INTERNATIONAL)) | |
| 485 | * .numberPlanIndicator(is(NumberingPlanIndicator.ISDN)).and() | |
| 486 | * .to() | |
| 487 | * .number(is(NATIONAL_PHONE_NUMBER)) | |
| 488 | * .typeOfNumber(is(TypeOfNumber.UNKNOWN)) | |
| 489 | * .numberPlanIndicator(is(NumberingPlanIndicator.ISDN))); | |
| 490 | * } | |
| 491 | * </pre> | |
| 492 | * | |
| 493 | * <p> | |
| 494 | * This method is used in combination of {@link #assertAll(Consumer...)} in | |
| 495 | * order to report all exceptions/assertion failures at the end instead of | |
| 496 | * stopping at the first failure. | |
| 497 | * | |
| 498 | * @param smsServer | |
| 499 | * SMS server that stores received messages | |
| 500 | * @param registry | |
| 501 | * the registry used to register assertions | |
| 502 | * @param <M> | |
| 503 | * the type of messages handled by the server | |
| 504 | * @return builder for fluent assertions on received messages | |
| 505 | */ | |
| 506 | public static <M> FluentReceivedSmsAssert<SubmitSm> assertThat(SmppServerRule<M> smsServer, AssertionRegistry registry) { | |
| 507 |
1
1. assertThat : replaced return value with null for fr/sii/ogham/testing/assertion/OghamAssertions::assertThat → NO_COVERAGE |
return new FluentReceivedSmsAssert<>(smsServer.getReceivedMessages(), registry); |
| 508 | } | |
| 509 | ||
| 510 | /** | |
| 511 | * Helper method to write assertions on sms using fluent API. For example: | |
| 512 | * | |
| 513 | * <pre> | |
| 514 | * {@code | |
| 515 | * assertThat(smppServer).receivedMessages() | |
| 516 | * .count(is(1)) | |
| 517 | * .message(0) | |
| 518 | * .content(is("sms content")) | |
| 519 | * .from() | |
| 520 | * .number(is(INTERNATIONAL_PHONE_NUMBER)) | |
| 521 | * .typeOfNumber(is(TypeOfNumber.INTERNATIONAL)) | |
| 522 | * .numberPlanIndicator(is(NumberingPlanIndicator.ISDN)).and() | |
| 523 | * .to() | |
| 524 | * .number(is(NATIONAL_PHONE_NUMBER)) | |
| 525 | * .typeOfNumber(is(TypeOfNumber.UNKNOWN)) | |
| 526 | * .numberPlanIndicator(is(NumberingPlanIndicator.ISDN)); | |
| 527 | * } | |
| 528 | * </pre> | |
| 529 | * | |
| 530 | * @param smsServer | |
| 531 | * SMS server that stores received messages | |
| 532 | * @return builder for fluent assertions on received messages | |
| 533 | */ | |
| 534 | public static FluentReceivedSmsAssert<SubmitSm> assertThat(SmppServerSimulator<ogham.testing.org.jsmpp.bean.SubmitSm> smsServer) { | |
| 535 |
1
1. assertThat : replaced return value with null for fr/sii/ogham/testing/assertion/OghamAssertions::assertThat → NO_COVERAGE |
return assertThat(smsServer, new FailImmediatelyRegistry()); |
| 536 | } | |
| 537 | ||
| 538 | ||
| 539 | /** | |
| 540 | * Helper method to write assertions on sms using fluent API. For example: | |
| 541 | * | |
| 542 | * <pre> | |
| 543 | * {@code | |
| 544 | * assertAll(registry -> | |
| 545 | * assertThat(smppServer, registry).receivedMessages() | |
| 546 | * .count(is(1)) | |
| 547 | * .message(0) | |
| 548 | * .content(is("sms content")) | |
| 549 | * .from() | |
| 550 | * .number(is(INTERNATIONAL_PHONE_NUMBER)) | |
| 551 | * .typeOfNumber(is(TypeOfNumber.INTERNATIONAL)) | |
| 552 | * .numberPlanIndicator(is(NumberingPlanIndicator.ISDN)).and() | |
| 553 | * .to() | |
| 554 | * .number(is(NATIONAL_PHONE_NUMBER)) | |
| 555 | * .typeOfNumber(is(TypeOfNumber.UNKNOWN)) | |
| 556 | * .numberPlanIndicator(is(NumberingPlanIndicator.ISDN))); | |
| 557 | * } | |
| 558 | * </pre> | |
| 559 | * | |
| 560 | * <p> | |
| 561 | * This method is used in combination of {@link #assertAll(Consumer...)} in | |
| 562 | * order to report all exceptions/assertion failures at the end instead of | |
| 563 | * stopping at the first failure. | |
| 564 | * | |
| 565 | * @param smsServer | |
| 566 | * SMS server that stores received messages | |
| 567 | * @param registry | |
| 568 | * the registry used to register assertions | |
| 569 | * @return builder for fluent assertions on received messages | |
| 570 | */ | |
| 571 | public static FluentReceivedSmsAssert<SubmitSm> assertThat(SmppServerSimulator<ogham.testing.org.jsmpp.bean.SubmitSm> smsServer, AssertionRegistry registry) { | |
| 572 | List<SubmitSm> receivedMessages = smsServer.getReceivedMessages().stream() | |
| 573 | .map(SubmitSmAdapter::new) | |
| 574 | .collect(Collectors.toList()); | |
| 575 |
1
1. assertThat : replaced return value with null for fr/sii/ogham/testing/assertion/OghamAssertions::assertThat → NO_COVERAGE |
return new FluentReceivedSmsAssert<>(receivedMessages, registry); |
| 576 | } | |
| 577 | ||
| 578 | /** | |
| 579 | * Helper method to write assertions on sms using fluent API. For example: | |
| 580 | * | |
| 581 | * <pre> | |
| 582 | * {@code | |
| 583 | * assertThat(smppServer.getReceivedMessages()) | |
| 584 | * .count(is(1)) | |
| 585 | * .message(0) | |
| 586 | * .content(is("sms content")) | |
| 587 | * .from() | |
| 588 | * .number(is(INTERNATIONAL_PHONE_NUMBER)) | |
| 589 | * .typeOfNumber(is(TypeOfNumber.INTERNATIONAL)) | |
| 590 | * .numberPlanIndicator(is(NumberingPlanIndicator.ISDN)).and() | |
| 591 | * .to() | |
| 592 | * .number(is(NATIONAL_PHONE_NUMBER)) | |
| 593 | * .typeOfNumber(is(TypeOfNumber.UNKNOWN)) | |
| 594 | * .numberPlanIndicator(is(NumberingPlanIndicator.ISDN)); | |
| 595 | * } | |
| 596 | * </pre> | |
| 597 | * | |
| 598 | * @param receivedSms | |
| 599 | * The list of messages received by the SMS server | |
| 600 | * @return builder for fluent assertions on received messages | |
| 601 | */ | |
| 602 | public static FluentSmsListAssert<Void, SubmitSm> assertThat(List<SubmitSm> receivedSms) { | |
| 603 |
1
1. assertThat : replaced return value with null for fr/sii/ogham/testing/assertion/OghamAssertions::assertThat → NO_COVERAGE |
return assertThat(receivedSms, new FailImmediatelyRegistry()); |
| 604 | } | |
| 605 | ||
| 606 | /** | |
| 607 | * Helper method to write assertions on sms using fluent API. For example: | |
| 608 | * | |
| 609 | * <pre> | |
| 610 | * {@code | |
| 611 | * assertAll(registry -> | |
| 612 | * assertThat(smppServer.getReceivedMessages(), registry) | |
| 613 | * .count(is(1)) | |
| 614 | * .message(0) | |
| 615 | * .content(is("sms content")) | |
| 616 | * .from() | |
| 617 | * .number(is(INTERNATIONAL_PHONE_NUMBER)) | |
| 618 | * .typeOfNumber(is(TypeOfNumber.INTERNATIONAL)) | |
| 619 | * .numberPlanIndicator(is(NumberingPlanIndicator.ISDN)).and() | |
| 620 | * .to() | |
| 621 | * .number(is(NATIONAL_PHONE_NUMBER)) | |
| 622 | * .typeOfNumber(is(TypeOfNumber.UNKNOWN)) | |
| 623 | * .numberPlanIndicator(is(NumberingPlanIndicator.ISDN))); | |
| 624 | * } | |
| 625 | * </pre> | |
| 626 | * | |
| 627 | * <p> | |
| 628 | * This method is used in combination of {@link #assertAll(Consumer...)} in | |
| 629 | * order to report all exceptions/assertion failures at the end instead of | |
| 630 | * stopping at the first failure. | |
| 631 | * | |
| 632 | * @param receivedSms | |
| 633 | * The list of messages received by the SMS server | |
| 634 | * @param registry | |
| 635 | * the registry used to register assertions | |
| 636 | * @return builder for fluent assertions on received messages | |
| 637 | */ | |
| 638 | public static FluentSmsListAssert<Void, SubmitSm> assertThat(List<SubmitSm> receivedSms, AssertionRegistry registry) { | |
| 639 |
1
1. assertThat : replaced return value with null for fr/sii/ogham/testing/assertion/OghamAssertions::assertThat → NO_COVERAGE |
return new FluentSmsListAssert<>(receivedSms, null, registry); |
| 640 | } | |
| 641 | ||
| 642 | /** | |
| 643 | * Register all assertions in order to report all failures/failed assertions | |
| 644 | * at once instead of reporting error one by one. | |
| 645 | * | |
| 646 | * <pre> | |
| 647 | * {@code | |
| 648 | * assertAll(registry -> | |
| 649 | * assertThat(smppServer.getReceivedMessages(), registry) | |
| 650 | * .count(is(1)) | |
| 651 | * .message(0) | |
| 652 | * .content(is("sms content")) | |
| 653 | * .from() | |
| 654 | * .number(is(INTERNATIONAL_PHONE_NUMBER)) | |
| 655 | * .typeOfNumber(is(TypeOfNumber.INTERNATIONAL)) | |
| 656 | * .numberPlanIndicator(is(NumberingPlanIndicator.ISDN)).and() | |
| 657 | * .to() | |
| 658 | * .number(is(NATIONAL_PHONE_NUMBER)) | |
| 659 | * .typeOfNumber(is(TypeOfNumber.UNKNOWN)) | |
| 660 | * .numberPlanIndicator(is(NumberingPlanIndicator.ISDN))); | |
| 661 | * } | |
| 662 | * </pre> | |
| 663 | * | |
| 664 | * | |
| 665 | * @param executables | |
| 666 | * the list of functions to register | |
| 667 | */ | |
| 668 | @SafeVarargs | |
| 669 | public static void assertAll(Consumer<AssertionRegistry>... executables) { | |
| 670 | AssertionRegistry registry = new FailAtEndRegistry(); | |
| 671 | for (Consumer<AssertionRegistry> executable : executables) { | |
| 672 |
1
1. assertAll : removed call to java/util/function/Consumer::accept → NO_COVERAGE |
executable.accept(registry); |
| 673 | } | |
| 674 |
1
1. assertAll : removed call to fr/sii/ogham/testing/assertion/util/AssertionRegistry::execute → NO_COVERAGE |
registry.execute(); |
| 675 | } | |
| 676 | ||
| 677 | private OghamAssertions() { | |
| 678 | super(); | |
| 679 | } | |
| 680 | ||
| 681 | } | |
Mutations | ||
| 113 |
1.1 |
|
| 153 |
1.1 |
|
| 186 |
1.1 |
|
| 226 |
1.1 |
|
| 258 |
1.1 |
|
| 298 |
1.1 |
|
| 330 |
1.1 |
|
| 370 |
1.1 |
|
| 400 |
1.1 |
|
| 439 |
1.1 |
|
| 469 |
1.1 |
|
| 507 |
1.1 |
|
| 535 |
1.1 |
|
| 575 |
1.1 |
|
| 603 |
1.1 |
|
| 639 |
1.1 |
|
| 672 |
1.1 |
|
| 674 |
1.1 |


{%extends "base.html"%} {%block title%}Home{%endblock%} {%block body%} {% include 'home_brand.html' %} {{home_text_rotating}} {% if session.get('is_authenticated') %} {% elif 'www.ci-connect.net' in request.host %} {% else %} Login Sign Up {% endif %} {% if 'www.ci-connect.net' in request.host %} About CI Connect CI Connect provides hosted job submission services for distributed, high-throughput computing. {% for collab in collaborations %} {% endfor %} {% endif %} {%include 'contributions.html'%} {%include 'footer.html'%} {%endblock%}


To-do list!
Enter a task that you need to do.
The name of the task/errin/chore
When do you need to have this completed?
Add to to-do list!
Below is your to-do list:
Below is a list of things you've accomplished:


{% extends "templates/base.html" %} {% block content %}
This is not the droid page you're looking for


I`m a Front-end developer, now I live in Wroclaw, Poland.
Computer sciense, bachelor
2015-till now
Infromation technology, bachelor
2017-till now
Basic course
2010-2013


Python function - pass by value or by reference?
Let’s look at below examples to change int number and list in function variables.
Changing an int number in function variable
def changeNumber(num):
num = 2
print ('Changing num to %s',num)
num = 1
print ('Before change, num is %s',num)
changeNumber(num)
print ('After change, num is %s',num)
Result:
('Before change, num is %s', 1)
('Changing num to %s', 2)
('After change, num is %s', 1)
Changing an list in function variable
def changeList(lst):
lst.append(50)
newlst = [1,2,3,4,5,6,7,8,9,10]
lst = newlst
lst = [1,2,3,4]
print ('Before change, list is ',lst)
changeList(lst)
print ('After change, list is ',lst)
Result:
('Before change, list is ', [1, 2, 3, 4])
('After change, list is ', [1, 2, 3, 4, 50])
int value is not changed while list is changed.. What’s happening?
In Python, all variables can be seen as the reference to an object in memory (like a tag on an object). When changing the num (type: int), because int is a immutable data type in Python, so in changeNumber(num) method an local variable (also named “num”) is created locally with in the function, and it is assigned as int value 2. However, the original parameter num, is still pointing to 1, thus num is not changed after calling function changeNumber(num).
When changing the lst (type: list), the parameter lst is passed into the function. In the function it is calling append method, which is to change the content of the list (list is mutable, which means the content of it can be changed). But when we reassign the lst to a new list(newlst), it is the same case as changeNumber again - lst is assigned to a new list but it is a local variable assignment without impacting the external variable. So in this case, the variable itself is not changed externally outside of function, but the content already changed.


III. Setting up the properties file¶
The properties file is a plain text file that contains the configuration information necessary for CPA to access your data and images. This file can be stored anywhere on your computer. It is selected and loaded upon startup of CPA.
If you use CellProfiler to produce the data to be analyzed in CPA, you can automatically generate a nearly complete properties file with, using the ExportToDatabase module. Otherwise, you can create one manually, referring to the Properties_README or the example provided below as a template.
Each setting in the properties file is stored on a separate line in the form field = value(s), and the order of the settings is not important. Lines that begin with a # are ignored by CPA and may be used for comments. Settings that require a file path may be specified either as absolute or relative to the directory that the properties file is found in.
Note: When editing the properties file, it is important to use an editor that is capable of saving plain text. CPA cannot read files of type .doc, .rtf, etc. We suggest using Notepad on Windows, TextEdit on Mac OS, and Emacs on Linux.
Note: CPA 2.0 is not compatible with properties files from CellProfiler Analyst version 1.0, but the two formats may be easily converted by hand. Contact us on the CellProfiler forums if you need help with this.
Note: All fields described in the sections below (after the properties file example) are required unless explicitly described as “optional.” In your own properties file, you would replace values surrounded with <> with the relevant information.
III.A Properies file example¶
==== CPA 2.0 properties file for example dataset ====
# ==== Database Info ====
db_type = sqlite
db_sql_file = example_SETUP.SQL
# ==== Table info ====
image_table = per_image
object_table = per_object
# ==== Column info ====
image_id = ImageNumber
object_id = ObjectNumber
plate_id = plate
well_id = well
cell_x_loc = Nuclei_Location_CenterX
cell_y_loc = Nuclei_Location_CenterY
# ==== Image access info ====
image_url_prepend =
# ==== Image Path and Filename Columns ====
image_path_cols = Image_Pathnames_Path_Origdna,
Image_Pathnames_Path_Origdna, Image_Pathnames_Path_Origdna
image_file_cols = Image_Filenames_Filename_origActin,
Image_Filenames_Filename_origpH3, Image_Filenames_Filename_origdna
image_names = Actin, pH3, DNA
image_channel_colors = red, green, blue
# ==== Global Meta data ====
object_name = cell, cells
plate_type = 96
# ==== Classify ====
classifier_ignore_columns = Nuclei_Location.*, Meta.*,
# ==== Other ====
image_tile_size = 40
III.B Database access values¶
These settings tell CPA how to access your database. One of the 4 modes below may be used. Include only the settings listed for that mode of storage in your properties file.
To connect to a MySQL database¶
A MySQL database is recommended for storing extremely large data that may need to be accessed from different computers. CellProfiler can readily create a MySQL database if a database server is available; see the instructions for the ExportToDatabase module for details.
db_type = mysql
db_port = 3306
db_host = your host name
db_name = your database name
db_user = your user name
db_passwd = your password
To connect to an SQLite database¶
SQLite is another mode of data storage, in which tables are stored in a large, database-like file on your local computer rather than a database server. This is easier to set up than a full- featured MySQL database and is at least as fast, but it is not a good choice of storage if the data is to be accessed by multiple concurrent connections. This mode of storage also puts a limitation on the number of rules used in the FastGentleBoosting Algorithm in Classifier (see section III.B.5). CellProfiler is able to export data in this format using the ExportToDatabase module.
db_type = sqlite
db_sqlite_file = path and filename of SQLite db file
To access multiple comma-separated value (.csv) files produced by CellProfiler¶
This mode tells CPA to find your image and object tables in several CSV files produced using CellProfiler’s ExportToDatabase module. In this mode of data storage, you specify the path to the xxx_SETUP.SQL file written by CellProfiler’s ExportToDatabase module (the “xxx” will be the prefix you specified in the ExportToDatabase module settings). CPA will then use this file to find the CSV files produced by ExportToDatabase to create an SQLite database file in your home directory. This could take a long time for larger databases, but only needs to be done once. Note: This feature expects the CSV files to be in the same directory as the SQL file. If they are renamed or moved apart from the SQL file, CPA will not find them and won’t be able to construct your database.
db_type = sqlite
db_sql_file = path and filename of .SQL file from ExportToDatabase
To access data stored in two CSV files
This mode tells CPA to find your image and object tables in two CSV files. When you run CPA with these settings, it looks for column headers in the first row of each file and inserts the data into an SQLite database file in your home directory. Again, this could take a long time for larger databases, but only needs to be done once.
db_type = sqlite
image_csv_file = path and filename of image csv
object_csv_file = path and filename of object csv
III.C Database Structure Values¶
Database table names¶
The following fields identify the image and object tables:
image_table = name of the table with one row per image
object_table = name of the table with one row per object
Database column names¶
The following fields identify the columns that specify unique image and object numbers:
image_id = image_number key column from the image & object table
object_id = object_number key column from the object table
The following field (optional) identifies the columns that specify a table number, which is useful in cases where multiple image tables have been manually merged and the image number column is no longer unique:
table_id = table_number key column from the image & object tables
The following fields identify the columns in the object table that specify the x and y location of each object within the original image:
cell_x_loc = object x-location column from the object table
cell_y_loc = object y-location column from the object table
The following fields (optional) identify plate and well columns in your image table and are only required by the PlateMapBrowser tool:
plate_id = plate_id column from the image table
well_id = well_id column from the image table
III.D Image access values¶
The following fields specify the columns in the image table that contain the image paths and file names. CPA can access images stored locally or via HTTP. In either case, the URLs (locations) of images must be specified in the image table. You can specify any number of image channels, separated by commas:
image_path_cols = 1st channel image path column, 2nd channel image path column,...
image_file_cols = 1st channel image file column, 2nd channel image file column,...
The following fields (optional) allow you to provide a common name for each of the above channels and to specify a default display color for each. If you don’t assign these, channels will appear as Channel0, Channel1, etc. in CPA and they will be assigned default colors. Channel colors can later be changed while using CPA (section III.D.1). Valid colors are red, green, blue, magenta, cyan, yellow, gray, none. Follow the same order of channels as for image_path_cols and image_file_cols:
image_names = Actin, pH3, DNA, ...
image_channel_colors = red, green, blue, ...
The following field (optional) specifies how to combine each channel when displaying an image. Valid blend mode values are add and subtract. By default, additive blending is used, which is best for combining channels from fluorescent images. However, subtractive blending may be desirable when you wish to display outlines over a brightfield image. In this case, the brightfield channel is added while the outline channel is subtracted. The result would be the normal brightfield image with black outlines created from subtracting the white outline values from the white background of the brightfield image.
image_channel_blend_modes = add, add, add, ...
The following field allows you to specify how many channels should be read from each image file specified by image_path_cols and image_file_cols. By default, CPA will expect to find 1 channel per image. If you wish to read 3 channels from a single RGB image, you would set: channels_per_image = 3. Remember that image_names, image_channel_colors, and image_channel_blend_modes will then each need 3 values specified instead of just 1.
channels_per_image = 1, 1, 1, ...
The following field allows you to specify a URL prefix to add to all image paths. That is, CPA will place the contents of this field in front of the path and filename values extracted from image_path_cols and image_file_cols. This is especially useful if you wish to move your images to another location without having to change the image_path_cols column in the database, or when the images are stored remotely and need to be accessed through HTTP. For example, if you set image_url_prepend = http://yourserver.com/images and the path and file name in the database for a given image are yourpath and file.png, then CPA will open http://yourserver.com/images/yourpath/file.png.
image_url_prepend = http://yourserver.com/images
The following field specifies the crop size of the object tiles, that is, the pixel size of the square “window” that shows an individual object in certain tools within CPA. A good rule of thumb is to set this value to be slightly larger than the approximate diameter of the objects:
image_tile_size = tile size in pixels
III.F Other optional settings¶
Metadata¶
object_name = singular name, plural name
The following field tells PlateMapBrowser what size plates were used. Supported types are 96, 384, 1536, or 5600 (for cell microarrays)
plate_type = number of wells
Columns ignored by Classifier¶
The following field (optional) specifies columns in the per-object table that you want Classifier to ignore when finding rules for classifying objects. Classifier automatically ignores columns defined by the table_id, image_id, and object_id fields, as well as any columns that contain non-numeric data. When using this field to specify additional columns to ignore, note that your column names cannot contain commas because commas are used to separate each column name. You can also use regular expressions to refer to a set of column names for Classifier to ignore:
classifier_ignore_columns = column name or regular expression A,
column name or regular expression B
For example, the following statement will ignore the column named WellID, any columns whose name contains the text Red (case-sensitive), and any columns that end in _Position.
classifier_ignore_columns = WellID, .*Red.*, .*_Position
Classifier default training set¶
The following field (optional) specifies the full path and file name for a training set that Classifier should automatically load when it is launched:
training_set = your directory/your subdirectory/your file
Area-based scoring¶
The following field (optional) specifies a column in your per-object table that will be summed and reported when scoring with Classifier. You can use this, for example, to report the total area of objects in each class, in addition to the number of objects in each class (which is Classifier’s default output):
area_scoring_column = your alternate column name
Outputting per-object classes¶
The following field (optional) specifies a MySQL table name for Classifier to create in your database when Score All is used. The class name of each object will be written to this table along with image and object IDs so it may be linked back into your existing tables. Warning: If this table name already exists, it will be overwritten:
class_table = your class table name
Checking your tables¶
The following field (optional) tells Classifier whether to check your tables at startup for anomalies such as missing column indices (an index is a database structure that greatly improves the speed of data retrieval) or orphaned objects (objects that do not correspond to an image in the image table). The operation can take up to a minute if your object table is extremely large.
check_tables = yes or no
Different tumbnail size for Image Gallery¶
The following field (optional) tells Image Gallery, how large the thumbnail of the field of view should be. If nothing is set, image_size = image_tile_size
image_size = 200
III.G Advanced settings¶
These more advanced settings require some knowledge of SQL.
ImageFilter¶
The following fields (optional) specify a subset of the images in your experiment from which to fetch and score objects in Classifier. Multiple filters can be created by using the format below and replacing ‘XXX’ with a name for the filter. Names can include alphanumeric characters and underscores.
filter_SQL_XXX = SQL select statement that returns image-keys for image you want to include
For example, here is a filter that returns only images from plate 1:
filter_SQL_Plate_1 = SELECT ImageNumber FROM per_image WHERE plate="1"
This example returns only images from with a gene column that starts with CDK:
filter_SQL_CDKs = SELECT ImageNumber FROM per_image WHERE gene REGEXP 'CDK.*'
This example does the same for a database that includes a table_id column TableNumber:
filter_SQL_CDKs = SELECT ImageNumber, TableNumber FROM per_image WHERE gene REGEXP 'CDK.*'
Filters may be created from within CPA by choosing the option “create new filter”. A dialog box will appear that allows you to define filters on the fly. First choose a name for your filter, then choose the column you would like to filter and specify the constraints. For example, below we select lonely those images from well A07:
You may select more than one column for your filter. For example if you would like only those images from well A07 which have more than 10 cells, you would click ‘Add Column’ and specify the filter as such:
When you have completed your filter, click OK. The filter will now be available to you to use in the CPA tools for the remainder of your session.
Groups¶
You can define ways of grouping your image data (for example, when several images represent the same experimental sample), by linking column(s) that identify unique images (the image- key) to another set of columns (the group-key, which may reside in other tables, provided the tables have a common key). Grouping is useful, for example, when you want to aggregate counts for each class of object and their scores on a per-group basis (e.g.: per-well) instead of on a per-image basis when scoring with Classifier. It will also provide new options in the Classifier fetch “from” menu so you can fetch objects from images with specific values for the group columns. Multiple groups can be created by replacing ‘XXX’ with the desired group name:
group_SQL_XXX = MySQL SELECT statement that returns image-key columns followed by group-key columns
For example, if you wanted to be able to group your data by unique plate names, you could define a group called SQL_Plate as follows:
group_SQL_Plate = SELECT ImageNumber, plate FROM per_image
As another example, you could define a way to group unique wells:
group_SQL_Well+Plate = SELECT ImageNumber, plate, well FROM per_image
The previous example, but for a database including a table_id column TableNumber:
group_SQL_Well+Plate = SELECT TableNumber, ImageNumber, plate, well FROM per_image
Image Classification¶
CellProfiler Analyst 2.2 also supports classification directly from image features. To allow this, the biologist has to set the classification type flag to image
classification_type = image


{% extends 'ecosystem/base.html' %} {% from "ecosystem/macros.html" import video_display with context %} {% block bodyclass %}landing developer-hub{% endblock %} {% block devhub_categories %}{% endblock %} {% block content %}
{%- trans %} Learn how to design apps that provide a user experience optimized for Firefox OS & Mobile {% endtrans -%}
{%- trans %} All the tools, docs and references you'll need for development and testing of your app {% endtrans -%}
{% trans %} Find out how to distribute your apps on an open marketplace that puts users and developers first {% endtrans %}
{{ _("Look who's already here") }}
{%- trans %} Building apps for the Web provides developers with full control over content, functionality and how apps are distributed, including access to hundreds of millions of Firefox users through the Firefox Marketplace. {% endtrans -%}
{%- trans %} Using open Web standards and Mozilla-designed APIs, great app experiences can be delivered across multiple platforms, devices and operating systems — closing the gap between Web and native apps for the first time. {% endtrans -%}
{%- trans %} The Firefox Marketplace gives users the opportunity to find, try and buy apps and content that matters most to them. This means exciting, useful and high-quality Apps relevant to local markets across all categories that users can use to get the most out of their daily lives. {% endtrans -%}
{%- trans %} Mozilla's global reach extends to hundreds of millions of Firefox users worldwide. Through intelligent Marketplace curation and effective use of Mozilla’s marketing channels, Mozilla can help developers can get their app into the hands of their target users around the world. {% endtrans -%}
{%- trans %} The Firefox Marketplace is now open and accepting apps. Submit your app to: {% endtrans -%}


--- layout: default title: Using the O-FISH Sandbox nav_order: 70 ---
Building the foundation behind the O-FISH mobile and web applications against can take a long time. The O-FISH sandbox is an already-built foundation where developers can easily get a login to try the mobile and web applications, and build code against an existing environment to test code contributions.
To get your own login to the sandbox, go to https://wildaidsandbox-mxgfy.mongodbstitch.com/#/users/new_dev_user.
You will see this page:
All the fields are required. Make sure to note down the email and password you used, as this will be how you login to the mobile and web applications.
Email and Agency name must be unique across the entire sandbox - we suggest using your github username as an agency name as that will be unique.
Website is required but can be any text, even a twitter handle! It does not need to be unique.
Once you click "Create User", an agency will be created with one user, who has the role of Agency Administrator. You will be automatically logged into the web application. You can create another user, for example a Field Officer, from the web interface.
When building your code against the sandbox environment, use the realm-app-id:
wildaidsandbox-mxgfy
Once the app is built, you can login to the app using your email and password. You can also use the login on the Sandbox Web Site.
If you have any questions, check out the MongoDB Community Forum posts with the O-FISH tag or create a new post.