courtbot-engine's People
courtbot-engine's Issues
Change to Mocha as test engine and add some tests
Unit tests = good.
Combine party names from multiple sources
getCaseParties should return the unique set of party names. Right now it will contain duplicates if multiple services return the same name.
Notifications when warrants are added to a case
Example case that has had a warrant dropped: CM-14-3319.
Cover all important code with unit tests
Handle invalid response to ask reminder, like we did for ask party.
Unit Tests Should Simulate Network Latency
The way they're written, unit tests do not currently simulate network latency. They should, if only to test for improperly handled race conditions in higher-level modules.
[Aside: Because the calls to the event handlers are synchronous/blocking, it's possible that poorly written data modules could stall execution of server code for an indeterminate amount of time.
As far as making sure data sources put Promises into return.promises, my instinct is to make that explicit in the unit testing for the data sources themselves, and have a soft assert that all data modules which handle retrieve-parties
and retrieve-party-events
must do this. Am I missing anything here?]
(Edited: the functions don't return promises, they put them into the result.promises Array. Updated to reflect that.)
Handle partial failures in getCaseParties/Events.
We should decide how to handle partial failures (one data service fails to retrieve but others succeed). We should, at minimum:
- Log all errors to log4js
- Continue with the partial data we DO have.
It might be nice to advise the user somehow that we can't retrieve data correctly? A status page would be nice to. Maybe collect failures and show some sort of health indicator?
Default messages should be provided by courtbot-engine
Move the default messaging out of courtbot into courtbot-engine. Add events to allow the user to hook in and change messages if they want to. This could allow us to create modules like
- courtbot-engine-messaging-spanish
etc.
Promise.all() Could Leave Cancel Message Sending Without Warning
#6 The Promise.all() calls inside module.exports.sendDueReminders() and module.exports.checkMissingCases() would cancel message sending without warning if one of the promises in the array fails before all the others complete.
Change routes to use express Router.
Use of the Router pattern will clean up some code and allow for better testability.
Switch to moment-timezone and use a timezone name instead of offset.
Right now DST is not handled. We need to handle it before March 11th (the 12th is DST)
scrubObject in utils.js does not fully sanitize objects
When scrubbing an object, scrubObject() still calls any getter functions that are attached to enumerable properties. This could include random code that was passed in earlier.
Given how the default options are used in the engine, is this worth addressing?
Add Travis CI config to run tests upon checkin.
CI = better.
Email, calendar, facebook type integrations
Courtbook issue on this: codefortulsa/courtbook#7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.