Skip to content

Commit

Permalink
Merge branch 'dev' into pazaan/tidepool-plugin
Browse files Browse the repository at this point in the history
* dev: (33 commits)
  Language Matters: change "Normal" to "In Range" in glucose distribution reports
  Don't use dynamic scale unless entries in database (nightscout#5195)
  Language Update: added missing German Translations (nightscout#5172)
  Rename xdrip-js to xdripjs (nightscout#4959)
  Fix the check for environments without the units setting
  Move the units configuration detection to a place where it's guaranteed to catch all invocations
  GitHub actions build (nightscout#5168)
  Wording tweaks to go with nightscout#4810 (nightscout#4866)
  Extra info (delta and last measurement time) on clock view.  (nightscout#5151)
  Adding to nightscout#5121 (nightscout#5126)
  Fix falsely suspended timeago alarms (nightscout#5170)
  Turkish language updates (nightscout#5192)
  fix devicestatus retro merge (nightscout#5193)
  Update node pushover library to fix crash in case Pushover service is down
  Fix forecast behaviour (nightscout#5160)
  Stop Focus Circles from Eating Entries (nightscout#5145)
  Fix forecast time randomly resetting to 30 minutes for openaps users
  Fix initial forecast point display
  fix forecast time max to client focusRangeMS instead of 30 min (nightscout#5143)
  D3 Upgrade Residual Cleanup (nightscout#5140)
  ...
  • Loading branch information
pazaan committed May 9, 2020
2 parents cf4a003 + 628059f commit d49562a
Show file tree
Hide file tree
Showing 62 changed files with 1,863 additions and 967 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI test

on: [push]

jobs:
build:

runs-on: ubuntu-16.04

strategy:
matrix:
node-version: [10.x, 12.x]

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
- name: Install MongoDB
run: |
wget -qO - https://www.mongodb.org/static/pgp/server-3.6.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
sudo apt-get update
sudo apt-get install -y mongodb-org
sudo apt-get install -y --allow-downgrades mongodb-org=3.6.14 mongodb-org-server=3.6.14 mongodb-org-shell=3.6.14 mongodb-org-mongos=3.6.14 mongodb-org-tools=3.6.14
- name: Start MongoDB
run: sudo systemctl start mongod
- name: Run tests
run: npm run-script test-ci
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ bundle/bundle.out.js
.idea/
*.iml
my.env
my.*.env

*.env
static/bower_components/
.*.sw?
.DS_Store
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ matrix:
include:
- node_js: "10"
<<: *node_js-steps
- node_js: "node" # Latest Node is not supported, and recommend, but we'll test it to know incompatibility issues
- node_js: "12" # Latest Node is not supported, and recommend, but we'll test it to know incompatibility issues
<<: *node_js-steps
37 changes: 13 additions & 24 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,16 @@
[![Build Status][build-img]][build-url]
[![Dependency Status][dependency-img]][dependency-url]
[![Coverage Status][coverage-img]][coverage-url]
[![Gitter chat][gitter-img]][gitter-url]
[![Stories in Ready][ready-img]][waffle]
[![Stories in Progress][progress-img]][waffle]
[![Discord chat][discord-img]][discord-url]

[build-img]: https://img.shields.io/travis/nightscout/cgm-remote-monitor.svg
[build-url]: https://travis-ci.org/nightscout/cgm-remote-monitor
[dependency-img]: https://img.shields.io/david/nightscout/cgm-remote-monitor.svg
[dependency-url]: https://david-dm.org/nightscout/cgm-remote-monitor
[coverage-img]: https://img.shields.io/coveralls/nightscout/cgm-remote-monitor/master.svg
[coverage-url]: https://coveralls.io/r/nightscout/cgm-remote-monitor?branch=master
[gitter-img]: https://img.shields.io/badge/Gitter-Join%20Chat%20%E2%86%92-1dce73.svg
[gitter-url]: https://gitter.im/nightscout/public
[ready-img]: https://badge.waffle.io/nightscout/cgm-remote-monitor.svg?label=ready&title=Ready
[waffle]: https://waffle.io/nightscout/cgm-remote-monitor
[progress-img]: https://badge.waffle.io/nightscout/cgm-remote-monitor.svg?label=in+progress&title=In+Progress
[discord-img]: https://img.shields.io/discord/629952586895851530?label=discord%20chat
[discord-url]: https://discordapp.com/channels/629952586895851530/629952669967974410

## Installation for development

Expand Down Expand Up @@ -67,13 +62,9 @@ If you want to additionaly test the site in production mode, create a file calle

## REST API

Nightscout implements a REST API for data syncronization. The API is documented using Swagger. To access the documentation
for the API, run Nightscout locally and load the documentation from /api-docs (or read the associated swagger.json and swagger.yaml
files locally).
Nightscout implements a REST API for data syncronization. The API is documented using Swagger. To access the documentation for the API, run Nightscout locally and load the documentation from /api-docs (or read the associated swagger.json and swagger.yaml files locally).

Note all dates used to access the API and dates stored in the objects are expected to comply with the ISO-8601 format and
be deserializable by the Javascript Date class. Of note here is the dates can contain a plus sign which has a special meaning in URL encoding, so when issuing requests that place dates to the URL, take special care to ensure the data is properly URL
encoded.
Note all dates used to access the API and dates stored in the objects are expected to comply with the ISO-8601 format and be deserializable by the Javascript Date class. Of note here is the dates can contain a plus sign which has a special meaning in URL encoding, so when issuing requests that place dates to the URL, take special care to ensure the data is properly URL encoded.

## Design & new features

Expand Down Expand Up @@ -104,7 +95,7 @@ If in doubt, format your code with `js-beautify --indent-size 2 --comma-first -

## Create a prototype

Fork cgm-remote-monitor and create a branch. You can create a branch using `git checkout -b wip/add-my-widget`. This creates a new branch called `wip/add-my-widget`. The `wip` stands for work in progress and is a common prefix so that when know what to expect when reviewing many branches.
Fork cgm-remote-monitor and create a branch. You can create a branch using `git checkout -b wip/add-my-widget`. This creates a new branch called `wip/add-my-widget`. The "`wip`" stands for work-in-progress and is a common prefix so that we know what to expect when reviewing many branches.

## Submit a pull request

Expand All @@ -114,11 +105,9 @@ This can be done by checking your code `git commit -avm 'my improvements are her

Now that the commits are available on github, you can click on the compare buttons on your fork to create a pull request. Make sure to select [Nightscout's `dev` branch](https://github.com/nightscout/cgm-remote-monitor/tree/dev).

We assume all new Pull Requests are at least smoke tested by the author and all code in the PR actually works.
Please include a description of what the features do and rationalize why the changes are needed.
We assume all new Pull Requests are at least smoke tested by the author and all code in the PR actually works. Please include a description of what the features do and rationalize why the changes are needed.

If you add any new NPM module dependencies, you have to rationalize why they are needed - we prefer pull requests that reduce dependencies, not add them.
Before releasing a a new version, we check with `npm audit` if our dependencies don't have known security issues.
If you add any new NPM module dependencies, you have to rationalize why they are needed - we prefer pull requests that reduce dependencies, not add them. Before releasing a a new version, we check with `npm audit` if our dependencies don't have known security issues.

When adding new features that add configuration options, please ensure the `README` document is amended with information on the new configuration.

Expand All @@ -141,7 +130,7 @@ We encourage liberal use of the comments, including images where appropriate.

## Co-ordination

Most cgm-remote-monitor hackers use github's ticketing system, along with Facebook cgm-in-the-cloud, and gitter.
We primarily use GitHub's ticketing system for discussing PRs and bugs, and [Discord][discord-url] for general development chatter.

We use git-flow, with `master` as our production, stable branch, and `dev` is used to queue up for upcoming releases. Everything else is done on branches, hopefully with names that indicate what to expect.

Expand All @@ -151,7 +140,7 @@ Every commit is tested by travis. We encourage adding tests to validate your de

## Other Dev Tips

* Join the [Gitter chat][gitter-url]
* Join the [Discord chat][discord-url].
* Get a local dev environment setup if you haven't already.
* Try breaking up big features/improvements into small parts. It's much easier to accept small PR's.
* Create tests for your new code as well as the old code. We are aiming for a full test coverage.
Expand Down Expand Up @@ -202,7 +191,7 @@ Also if you can't code, it's possible to contribute by improving the documentati
| Release coordination 0.11.x: | [@PieterGit] |
| Issue/Pull request coordination: | Please volunteer |
| Cleaning up git fork spam: | Please volunteer |
| Documentation writers: | [@andrew-warrington][@unsoluble] [@tynbendad] [@danamlewis] [@rarneson] |
| Documentation writers: | [@andrew-warrington] [@unsoluble] [@tynbendad] [@danamlewis] [@rarneson] |

### Plugin contributors

Expand Down Expand Up @@ -257,7 +246,7 @@ Languages with less than 90% coverage will be removed in a future Nightscout ver
| Suomi (`fi`)|[@sulkaharo] |OK|
| Français (`fr`)|Please volunteer|OK|
| עברית (`he`)|Please volunteer|OK|
| Hrvatski (`hr`)|[@OpossumGit]|Needs attention: 47.8% - committed 100% to dev|
| Hrvatski (`hr`)|[@OpossumGit]|OK|
| Italiano (`it`)|Please volunteer|OK|
| 日本語 (`ja`)|[@LuminaryXion]|Working on this|
| 한국어 (`ko`)|Please volunteer|Needs attention: 80.6%|
Expand All @@ -278,7 +267,7 @@ Languages with less than 90% coverage will be removed in a future Nightscout ver
### List of all contributors
| Contribution area | List of contributors |
| ------------------------------------- | -------------------- |
| All active developers: | [@jasoncalabrese] [@jpcunningh] [@jweismann] [@komarserjio] [@mdomox] [@MilosKozak] [@PieterGit] [@rickfriele] [@sulkaharo]
| All active developers: | [@jasoncalabrese] [@jpcunningh] [@jweismann] [@komarserjio] [@mdomox] [@MilosKozak] [@PieterGit] [@rickfriele] [@sulkaharo] [@unsoluble]
| All active testers/documentors: | [@danamlewis] [@jamieowendexcom] [@mcdafydd] [@oteroos] [@rarneson] [@tynbendad] [@unsoluble]
| All active translators: | [@apanasef] [@jizhongwen] [@viderehh] [@herzogmedia] [@LuminaryXion] [@OpossumGit]

4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ report:

test_onebyone:
python -c 'import os,sys,fcntl; flags = fcntl.fcntl(sys.stdout, fcntl.F_GETFL); fcntl.fcntl(sys.stdout, fcntl.F_SETFL, flags&~os.O_NONBLOCK);'
$(foreach var,$(wildcard tests/*.js),${MONGO_SETTINGS} ${MOCHA} --timeout 30000 --exit --bail -R tap $(var);)
for var in tests/*.js; do ${MONGO_SETTINGS} ${MOCHA} --timeout 30000 --exit --bail -R tap $$var; done | tap-set-exit

test:
${MONGO_SETTINGS} ${MOCHA} --timeout 30000 --exit --bail -R tap ${TESTS}
Expand All @@ -52,7 +52,7 @@ travis:
python -c 'import os,sys,fcntl; flags = fcntl.fcntl(sys.stdout, fcntl.F_GETFL); fcntl.fcntl(sys.stdout, fcntl.F_SETFL, flags&~os.O_NONBLOCK);'
# NODE_ENV=test ${MONGO_SETTINGS} \
# ${ISTANBUL} cover ${MOCHA} --report lcovonly -- --timeout 5000 -R tap ${TESTS}
$(foreach var,$(wildcard tests/*.js),${MONGO_SETTINGS} ${MOCHA} --timeout 30000 --exit --bail -R tap $(var);)
for var in tests/*.js; do ${MONGO_SETTINGS} ${MOCHA} --timeout 30000 --exit --bail -R tap $$var; done

docker_release:
# Get the version from the package.json file
Expand Down
Loading

0 comments on commit d49562a

Please sign in to comment.