{"id":23065906,"url":"https://github.com/tidepool-org/platform","last_synced_at":"2025-06-16T11:03:29.904Z","repository":{"id":37978646,"uuid":"47368930","full_name":"tidepool-org/platform","owner":"tidepool-org","description":"The Tidepool Platform API","archived":false,"fork":false,"pushed_at":"2024-10-29T18:01:01.000Z","size":51329,"stargazers_count":28,"open_issues_count":20,"forks_count":10,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-10-29T19:17:21.287Z","etag":null,"topics":["golang"],"latest_commit_sha":null,"homepage":"https://developer.tidepool.org","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tidepool-org.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-12-04T00:06:19.000Z","updated_at":"2024-10-29T17:59:48.000Z","dependencies_parsed_at":"2023-12-20T11:46:47.872Z","dependency_job_id":"70de0cb3-1b60-49e3-a8e6-3fab9fbc5f45","html_url":"https://github.com/tidepool-org/platform","commit_stats":{"total_commits":1357,"total_committers":17,"mean_commits":79.82352941176471,"dds":0.7339719970523213,"last_synced_commit":"a7f22b596375a8ecbbc731675a2b155a62f2993d"},"previous_names":[],"tags_count":115,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidepool-org%2Fplatform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidepool-org%2Fplatform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidepool-org%2Fplatform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidepool-org%2Fplatform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tidepool-org","download_url":"https://codeload.github.com/tidepool-org/platform/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229911004,"owners_count":18143229,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang"],"created_at":"2024-12-16T05:10:25.973Z","updated_at":"2024-12-16T05:10:26.704Z","avatar_url":"https://github.com/tidepool-org.png","language":"Go","readme":"# Platform\n\nThe Tidepool Platform API.\n\n[![Build Status](https://app.travis-ci.com/tidepool-org/platform.svg\u0026branch=master)](https://app.travis-ci.com/tidepool-org/platform)\n[![Code Climate](https://codeclimate.com/github/tidepool-org/platform/badges/gpa.svg)](https://codeclimate.com/github/tidepool-org/platform)\n[![Issue Count](https://codeclimate.com/github/tidepool-org/platform/badges/issue_count.svg)](https://codeclimate.com/github/tidepool-org/platform)\n\n# Setup\n\n1. Install Go version 1.11.4 or later\n1. Install mongodb (if it is not already installed, or run it from Docker)\n\n    The tests assume that mongodb is listening on 127.0.0.1:27017.\n    1. Configure mongodb replica sets (required for tests to pass)\n\n        A single node is all that's required. It can be as simple as simple adding `--replSet rs0` when running mongd, or the equivalent config file change.\n1. Start mongodb (if it is not already running)\n    1. Initiate the replica set\n\n\t    Something like: `mongosh rs.initiate()`\n1. Clone this repo\n1. Change directory to the path you cloned the repo into\n1. Source the `env.sh` file\n1. Execute `make buildable` to install the various Go tools needed for building and editing the project\n\nFor example:\n\n```\nbrew install go\nbrew install mongo\nbrew services start mongodb\ngit clone https://github.com/tidepool-org/platform.git\ncd platform\n. ./env.sh\nmake buildable\n```\n\n# Execute\n\n1. Setup the environment, as above.\n1. Build the project.\n1. Execute a service.\n\nIn addition to the setup above, for example:\n\n```\nmake build\n_bin/services/data/data\n```\n\nUse `Ctrl-C` to stop the executable. It may take up to 60 seconds to stop.\n\n\u003e **Note:** For testing and development, services are generally run on a local Kubernetes cluster through the [development repo](https://github.com/tidepool-org/development#developing-tidepool-services).\n\n# Makefile\n\n* To setup your Go environment for building and editing the project:\n\n```\nmake buildable\n```\n\n* To build the executables:\n\n```\nmake build\n```\n\nAll executables are built to the `_bin` directory in a hierarchy that matches the locations of executable source files.\n\nThe environment variable `BUILD` indicates which executables to build. If not specified, then all executables are built. For example, to build just the executables found in the `services` directory:\n\n```\nBUILD=services make build\n```\n\n* To run all of the tests manually:\n\n```\nmake test\n```\n\nThe environment variable `TEST` indicates which package hierarchy to test. If not specified, then all packages are tested. For example,\n\n```\nTEST=user make test\n```\n\n* To run all of the tests automatically after any changes are made, in a separate terminal window:\n\n```\nmake test-watch\n```\n\nThe environment variable `WATCH` indicates which package hierarchy to test. If not specified, then all packages are tested. For example,\n\n```\nWATCH=user make test-watch\n```\n\n* To run `gofmt`, `goimports`, `go vet`, and `golint`:\n\n```\nmake pre-commit\n```\n\n* To clean the project of all build files:\n\n```\nmake clean\n```\n\n# Sublime Text\n\nIf you use the Sublime Text editor with the GoSublime plugin, open the `platform.sublime-project` project to ensure the `GOPATH` and `PATH` environment variables are set correctly within Sublime Text. In addition, the recommended user settings are:\n\n```\n{\n  \"autocomplete_builtins\": true,\n  \"autocomplete_closures\": true,\n  \"autoinst\": false,\n  \"fmt_cmd\": [\n    \"goimports\"\n  ],\n  \"fmt_enabled\": true,\n  \"fmt_tab_width\": 4,\n  \"use_named_imports\": true\n}\n```\n\n# Upgrade Golang Version\n\n## Prepare\n\n**Before** you update this repository to use a newer version of Golang, please perform these checks:\n\n- Review the release notes for **all** Golang versions, major and minor, from the current Golang version to the target Golang version. The entire Golang release history can be found at https://golang.org/doc/devel/release.html.\n  - For major revisions, if any change described in the release notes could have a negative impact upon this repository, follow up and review any associated issues and the updated code. Make note of this change in order to explicitly test after upgrading.\n  - For minor revisions, review all issues included in the associated GitHub milestone issue tracker. These can be found in the minor revision release notes. If any issue could have a negative impact upon this repository, review the updated code. Make note of this issue in order to explicitly test after upgrading.\n- Install `gimme`(https://github.com/travis-ci/gimme) via `brew`. Execute `gimme -k`. Ensure that the target Golang version is listed. The `gimme` tool is used by Travis CI to manage Golang versions. If the version is not listed, then the Travis CI build will not succeed.\n- Browse to https://hub.docker.com/_/golang and ensure the target Golang version in an Alpine Linux image is available. For example, if the target version is `1.11.4`, then ensure that the `1.11.4-alpine` image tag is available. If the image tag is not avaiable, then the Travis CI build will not succeed.\n\n## Upgrade\n\nEnsure you are using the target Golang version locally.\n\nChange the version in `.travis.yml` and all `Dockerfile.*` files.\n\nAdd an entry in `CHANGELOG.md` and commit.\n\n## Test\n\nEnsure the `ci-build` and `ci-test` Makefile targets pass using the target Golang version.\n\nIf you previously noted any changes or issues of concern, perform any explicit tests necessary.\n\n# Upgrade Dependencies\n\n## Upgrade\n\n```\ngo get -u \u003cdependacy\u003e   # e.g. go get -u github.com/onsi/gomega\ngo mod tidy\ngo mod vendor\n```\n\n## Review\n\nReview all pending changes to all dependencies. If any changes could have a negative impact upon this repository, make note of this change to explicitly test afterwards.\n\n## Test\n\nEnsure the `ci-build` and `ci-test` Makefile targets pass using the target Golang version.\n\nIf you previously noted any changes or issues of concern, perform any explicit tests necessary.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftidepool-org%2Fplatform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftidepool-org%2Fplatform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftidepool-org%2Fplatform/lists"}