centerforopenscience / django-elasticsearch-metrics Goto Github PK
View Code? Open in Web Editor NEWDjango app for storing time-series metrics in Elasticsearch.
License: MIT License
Django app for storing time-series metrics in Elasticsearch.
License: MIT License
...for symmetry with pre_index_template_create
cc @mfraezz who will need this for the impact notifications feature.
*sync_metrics
? sync_metrics_templates
?
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.
See #5 (comment)
Any test marked with es
should automatically trigger cleaning up the ES environment.
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.
Add a mgmt command, show_metrics
to pretty-print a list of all registered metrics.
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
Date
subclass?Integrate with curator for cleaning out metrics' indices:
python manage.py clean_metrics osf --time-unit days --older-than 45
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.