Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TIDE Pagination #117

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
1ab8f58
update travis and golang version
Roukoswarf Aug 11, 2023
91eaa44
add offset periods to client and server
Roukoswarf Aug 14, 2023
0d5fa4a
fix circular import while keeping simpler casting
Roukoswarf Aug 14, 2023
eb75322
cleanup some pointer casting
Roukoswarf Aug 15, 2023
898acf7
inital TIDE api rigging
Roukoswarf Aug 16, 2023
390932a
TIDE API draft
Roukoswarf Aug 16, 2023
7b5357f
revert some build tweaks
Roukoswarf Aug 17, 2023
5cf874f
more build changes
Roukoswarf Aug 17, 2023
b048dfc
add tide_report to policy
Roukoswarf Aug 17, 2023
49e2f9c
pass pointer to decode
Roukoswarf Aug 17, 2023
3865b6f
update deps, remove key requirements from summary update api
Roukoswarf Aug 17, 2023
d4ba27a
add meetingTargets
Roukoswarf Aug 17, 2023
23a59ac
update vendor
Roukoswarf Aug 17, 2023
1f4d9a7
replace Decode with All on tide query
Roukoswarf Aug 17, 2023
808fe51
fix length of category slice
Roukoswarf Aug 17, 2023
320243f
add some query debug for sort/match on patient list and TIDE
Roukoswarf Aug 21, 2023
b8fd5cb
add bson tags to summaries again
Roukoswarf Aug 21, 2023
3124cad
add debug to TIDE report
Roukoswarf Aug 21, 2023
09e2d83
handle clinic and tag objectId query correctly
Roukoswarf Aug 21, 2023
ceaec4b
clean up date range query for TIDE
Roukoswarf Aug 21, 2023
449f924
add query logging
Roukoswarf Aug 21, 2023
dbed41a
fix category query types
Roukoswarf Aug 21, 2023
f22732e
change dropInTimeInTargetPercent condition to <-0.15
Roukoswarf Aug 21, 2023
4a9b3be
make tags $all instead of $in
Roukoswarf Aug 21, 2023
66d1fdb
reuse existing code for tag query
Roukoswarf Aug 21, 2023
89557c1
fix patient specific tags
Roukoswarf Aug 21, 2023
5366e94
add more timestamp checks to TIDE params
Roukoswarf Aug 23, 2023
1b76577
partial handling of TIDE pagination, unfinished API
Roukoswarf Sep 14, 2023
12cb1b4
add tide pagination
Roukoswarf Sep 18, 2023
5fd9f12
fix some pointers in sprintf
Roukoswarf Sep 18, 2023
7a2586e
reorg for easier testing and add partial unit testing
Roukoswarf Sep 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 10 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
sudo: false

dist: bionic
dist: jammy

language: go

go:
- 1.19
- 1.20

env:
global:
- MONGODB=5.3.2
- MONGODB=6.0.8
- MONGOSH=1.10.4
- DIST=jammy

before_install:
- sudo apt-get remove -y mongodb-org mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools
- wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1804-${MONGODB}.tgz -O /tmp/mongodb.tgz
- tar -xf /tmp/mongodb.tgz
- wget -nv https://repo.mongodb.org/apt/ubuntu/dists/${DIST}/mongodb-org/6.0/multiverse/binary-amd64/mongodb-org-server_${MONGODB}_amd64.deb -O /tmp/mongodb.deb
- wget -nv https://downloads.mongodb.com/compass/mongodb-mongosh_${MONGOSH}_amd64.deb -O /tmp/mongosh.deb
- sudo apt install /tmp/mongodb.deb /tmp/mongosh.deb
- mkdir /tmp/data
- ${PWD}/mongodb-linux-x86_64-ubuntu1804-${MONGODB}/bin/mongod --dbpath /tmp/data --bind_ip 127.0.0.1 --replSet rs0 --logpath ${PWD}/mongod.log &> /dev/null &
- /usr/bin/mongod --replSet rs0 --dbpath /tmp/data --bind_ip 127.0.0.1 --logpath ${PWD}/mongod.log &> /dev/null &
- until nc -z localhost 27017; do echo Waiting for MongoDB; sleep 1; done
- ${PWD}/mongodb-linux-x86_64-ubuntu1804-${MONGODB}/bin/mongo --eval 'rs.initiate(); while (rs.status().startupStatus || (rs.status().hasOwnProperty("myState") && rs.status().myState != 1)) { printjson( rs.status() ); sleep(1000); }; printjson( rs.status() );'
- /usr/bin/mongosh --host 127.0.0.1 --port 27017 --eval 'rs.initiate(); while (rs.status().startupStatus || (rs.status().hasOwnProperty("myState") && rs.status().myState != 1)) { printjson( rs.status() ); sleep(1000); }; printjson( rs.status() );'

addons:
artifacts:
Expand Down
15 changes: 11 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Development
FROM golang:1.19-alpine AS development
FROM golang:1.21-alpine AS development
WORKDIR /go/src/github.com/tidepool-org/clinic
RUN adduser -D tidepool && \
RUN apk --no-cache update && \
apk --no-cache upgrade && \
apk --no-cache add make ca-certificates tzdata && \
adduser -D tidepool && \
chown -R tidepool /go/src/github.com/tidepool-org/clinic
USER tidepool
RUN go install github.com/cosmtrek/air@latest
Expand All @@ -10,11 +13,15 @@ RUN ./build.sh
CMD ["air"]

# Production
FROM golang:1.19-alpine AS production
FROM golang:1.21-alpine AS production
WORKDIR /go/src/github.com/tidepool-org/clinic
RUN adduser -D tidepool && \
RUN apk --no-cache update && \
apk --no-cache upgrade && \
apk --no-cache add ca-certificates tzdata && \
adduser -D tidepool && \
chown -R tidepool /go/src/github.com/tidepool-org/clinic
USER tidepool
COPY --chown=tidepool . .
RUN ./build.sh
CMD ["./dist/clinic"]

Loading