Coder Social home page Coder Social logo

centerforopenscience / django-elasticsearch-metrics Goto Github PK

View Code? Open in Web Editor NEW
11.0 11.0 8.0 177 KB

Django app for storing time-series metrics in Elasticsearch.

License: MIT License

Python 99.76% Dockerfile 0.24%
analytics django elastic elasticsearch metrics statistics time-series

django-elasticsearch-metrics's People

Contributors

aaxelb avatar dependabot-support avatar dependabot[bot] avatar erinspace avatar pattisdr avatar sloria avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

django-elasticsearch-metrics's Issues

Travis is running not lint env in tox

Running tox -e lint currently fails locally:

GLOB sdist-make: /Users/sloria/projects/cos-projects/django-elasticsearch-metrics/setup.py
lint installed: aspy.yaml==1.1.1,cached-property==1.4.3,cfgv==1.1.0,identify==1.1.3,nodeenv==1.3.2,pre-commit==1.10.4,PyYAML==3.13,six==1.11.0,toml==0.9.4,virtualenv==16.0.0
lint runtests: PYTHONHASHSEED='3872058292'
lint runtests: commands[0] | pre-commit run --all-files --verbose
[black] black............................................................Passed
hookid: black

All done! ✨ 🍰 ✨
13 files left unchanged.

[flake8] Flake8..........................................................Failed
hookid: flake8

elasticsearch_metrics/management/commands/sync_metrics.py:1:1: F401 'django.core.management.base.CommandError' imported but unused

But Travis is still passing.

Add check_metrics command

Add a command to check if ES templates exist for all templates. It should exit with an error if ES templates are not in sync.

We'll need this to prevent our app servers from deploying before metrics have been synced.

factory_boy integration?

Might be nice to have optional factory_boy integration, to make it easier to generate fake data in tests.

import factory

from elasticsearch_metrics.factory import MetricFactory

class PreprintDownloadFactory(MetricFactory):
    user_id = factory.Faker("lexify", "?????")

PreprintDownloadFactory()  # indexes a test metric

Curator integration

Integrate with curator for cleaning out metrics' indices:

python manage.py clean_metrics osf --time-unit days --older-than 45

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.