GithubHelp home page GithubHelp logo

critocrito / sugarcube Goto Github PK

View Code? Open in Web Editor NEW
32.0 3.0 5.0 4.85 MB

Monoidal data processes.

Home Page: https://sugarcubetools.net

License: GNU General Public License v3.0

JavaScript 97.69% PLpgSQL 2.25% Shell 0.07%
data data-mining data-team human-rights javascript data-preservation sugarcube

sugarcube's Issues

Define a SQL schema for Queries

The schema has to work both with SQLite and PostgreSQL. The schema also has to support annotations and annotation templates.

Instrument new and existing units by source

The elastic_export plugin increments new and existing metrics for itself. It would be interesting to break those down by the source of the unit, and set appropriate counters.

  • <plugin>.[new|existing]

Failing tests

Just getting up and running here. I thought I'd mention the following test failures with the latest code:

  1) maybeDate
       parses string in German format:
     Error: Failed after 1 tests and 0 shrinks. rngState: 83152e9af3b47d086c; Counterexample: "2014-05-17T00:00:00.000Z"; 
      at /media/kratib/data/src/meedan/sugarcube/node_modules/jsverify/lib/jsverify.js:360:15
      at Object.map (node_modules/jsverify/lib/functor.js:35:12)
      at checkThrow (node_modules/jsverify/lib/jsverify.js:354:30)
      at Context.<anonymous> (node_modules/jsverify/lib/jsverify.js:400:14)

  2) maybeDate
       parses string in US format:
     Error: Failed after 1 tests and 0 shrinks. rngState: 8d481cf3d6ea705b29; Counterexample: "2014-12-06T00:00:00.000Z"; 
      at /media/kratib/data/src/meedan/sugarcube/node_modules/jsverify/lib/jsverify.js:360:15
      at Object.map (node_modules/jsverify/lib/functor.js:35:12)
      at checkThrow (node_modules/jsverify/lib/jsverify.js:354:30)
      at Context.<anonymous> (node_modules/jsverify/lib/jsverify.js:400:14)

  3) maybeDate
       parses string in ISO8601 format:
     Error: Failed after 1 tests and 0 shrinks. rngState: 89d64c78afbe295031; Counterexample: "2014-11-28T00:00:00.000Z"; 
      at /media/kratib/data/src/meedan/sugarcube/node_modules/jsverify/lib/jsverify.js:360:15
      at Object.map (node_modules/jsverify/lib/functor.js:35:12)
      at checkThrow (node_modules/jsverify/lib/jsverify.js:354:30)
      at Context.<anonymous> (node_modules/jsverify/lib/jsverify.js:400:14)

  4) maybeDate
       parses string in little endian hyphened format:
     Error: Failed after 1 tests and 0 shrinks. rngState: 82bfdc39e08271a564; Counterexample: "2014-10-02T00:00:00.000Z"; 
      at /media/kratib/data/src/meedan/sugarcube/node_modules/jsverify/lib/jsverify.js:360:15
      at Object.map (node_modules/jsverify/lib/functor.js:35:12)
      at checkThrow (node_modules/jsverify/lib/jsverify.js:354:30)
      at Context.<anonymous> (node_modules/jsverify/lib/jsverify.js:400:14)

Thanks!

Support Elasticsearch 6 and 7

Version 7 of Elasticsearch deprecated some things, especially related to the way mappings are handled. Not sure if the current implementation works on the new version. This relates to #3 to use the new @elastic/elasticsearch NodeJS library.

Store metrics in SQL

InfluxDB is the only database currently that can persist Sugarcube instrumentation. This is operationally complex and prevents the use of metrics for local-first deploys of Sugarcube.

Deprecate broken plugins, move others to sugarcube-contrib.

There are a whole bunch of plugins that are either broken (e.g. instagram) or it is unclear if they are still working.

Plugins that are known to be broken:

  • instagram_feed
  • facebook_api_user
  • facebook_api_page
  • facebook_api_feed

Plugins that haven't been tested in a long time:

  • aqicn_station
  • google_reverse_images_files
  • google_images
  • google_search
  • guardian_search
  • http_wget
  • regex_match
  • sec_search

Change Tika version on install

@sugarcube/utils/install.js file is set to download an old version of Tika (1.22) from a broken link and fails. Should change to latest Tika version.

Improve reporting on Takedown Content

Currently failing stats are tracked as they are discovered in statsd and reports are sent as failing stats. This obfuscates takedown reports for end users. It would be great to have a single stat that gives the number and percentage of takedown content and to produce dedicated reports of those stats per month.

Provide Typescript typings

Not sure yet if I want to convert the whole codebase to Typescript, but providing typings for core would be great.

Distinguish beteen source plugin and data source type

Sugarcube sets the _sc_source field, which is as a default set to the plugin name. This can lead to situations where I have two tweets, one has the source set to twitter_feed and the other to twitter_tweets. But both units are actually tweets. Add a new field, e.g. _sc_data_source, that can identify the data source across different plugins.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.