Skip to content

Commit 21836cf

Browse files
authored
👔 Replace {mrn}_P IDs with r_id IDs (#22)
2 parents 5e79e91 + 09e1bba commit 21836cf

56 files changed

Lines changed: 8289 additions & 3754 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Terraform Tests
2+
on:
3+
pull_request:
4+
paths:
5+
- 'infrastructure/**'
6+
push:
7+
branches:
8+
- main
9+
- fix-alerts-more
10+
paths:
11+
- 'infrastructure/**'
12+
jobs:
13+
terraform-tests:
14+
runs-on: ubuntu-latest
15+
defaults:
16+
run:
17+
working-directory: infrastructure
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Setup Terraform
23+
uses: hashicorp/setup-terraform@v3
24+
with:
25+
terraform_version: 1.9.0
26+
27+
- name: Setup Python
28+
uses: actions/setup-python@v5
29+
with:
30+
python-version: '3.11'
31+
32+
- name: Install testing tools
33+
run: |
34+
pip install checkov
35+
curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash
36+
37+
- name: Make test script executable
38+
run: chmod +x tests/test-terraform.sh
39+
40+
- name: Run tests
41+
run: ./tests/test-terraform.sh
42+
43+
- name: Terraform Plan
44+
run: |
45+
terraform init -backend=false
46+
terraform plan -no-color
47+
continue-on-error: true

‎.gitignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ terraform.rc
2626
# Generated files
2727
generated_*
2828
**/generated_*
29+
.generated_*
30+
**/.generated_*
2931

3032
# Keep backups in git (they're important!)
3133
!backups/

‎.pre-commit-config.yaml‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@ repos:
2828
- id: terraform_tflint
2929
args:
3030
- --init
31-
- --config=__GIT_WORKING_DIR__/.tflint.hcl
31+
- --config=__GIT_WORKING_DIR__/infrastructure/tests/.tflint.hcl
3232
files: ^infrastructure/
3333
- id: terraform_validate
3434
files: ^infrastructure/
3535
- id: terraform_checkov
36+
args:
37+
- --args=--config-file __GIT_WORKING_DIR__/infrastructure/tests/.checkov.yaml
3638
files: ^infrastructure/
3739
- repo: https://github.com/DavidAnson/markdownlint-cli2
3840
rev: v0.22.0
@@ -44,7 +46,7 @@ repos:
4446
- id: uv-sort
4547
files: pyproject.toml
4648
- repo: https://github.com/astral-sh/uv-pre-commit
47-
rev: "0.11.6"
49+
rev: "0.11.7"
4850
hooks:
4951
- id: uv-lock
5052
files: ^python_jobs/pyproject\.toml$

‎CHANGELOG.md‎

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,80 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## 1.10.6
9+
10+
### Added
11+
12+
- Protection against log injection attacks.
13+
14+
### Fixed
15+
16+
- Column misalignment in Ripple-to-REDCap.
17+
18+
## 1.10.5
19+
20+
### Fixed
21+
22+
- Convert float values to int for `redcap_repeat_instance`.
23+
24+
## 1.10.4
25+
26+
### Changed
27+
28+
- Updating caching logic to incorporate full state, not just record ID.
29+
30+
### Fixed
31+
32+
- Convert "parent_involvement" from a set to a list before JSON serializing.
33+
34+
## 1.10.3
35+
36+
### Fixed
37+
38+
- Checking for fields we know don't exist in REDCap.
39+
40+
## 1.10.2
41+
42+
### Changed
43+
44+
- Restored minute-by-minute jobs pending AWS permission update.
45+
46+
## 1.10.1
47+
48+
### Added
49+
50+
- Endpoints to recieve REDCap Data Entry Triggers.
51+
52+
### Changed
53+
54+
- Updated `curious_account_created` tracking.
55+
56+
### Fixed
57+
58+
- Websocket now gets a new token when the one it's trying expires.
59+
- Bug in creating new Curious users after splitting REDCap and Curious projects.
60+
61+
## 1.10.0
62+
63+
### Added
64+
65+
- REDCap «HBN - Responder Tracking (PID 879)» authentication.
66+
- Fields "r_id", "curious_email_child" and "curious_password_child" for PID 625 to Curious.
67+
68+
### Changed
69+
70+
- REDCap-to-Curious data now comes from PID 625.
71+
- Temporarily disabled connection to PID 879 in favor of manual `r_id` field in PID 625.
72+
- Handle more datetime options in `mindlogger-autoexport`.
73+
74+
### Fixed
75+
76+
- Send timestamps to Curious API in UTC.
77+
78+
### Deprecated
79+
80+
- `hbnmigration.from_redcap.config.Fields.export_247`
81+
882
## 1.9.4
983

1084
### Fixed

‎VERSION‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.9.4
1+
1.10.6

‎infrastructure/.terraform.lock.hcl‎

Lines changed: 13 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎infrastructure/Makefile‎

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
.PHONY: help test init plan apply destroy fmt validate lint security clean install-tools
2+
3+
help:
4+
@echo "Available targets:"
5+
@echo " test - Run all tests"
6+
@echo " install-tools - Install testing dependencies"
7+
@echo " init - Initialize Terraform"
8+
@echo " plan - Show execution plan"
9+
@echo " apply - Apply infrastructure changes"
10+
@echo " destroy - Destroy infrastructure"
11+
@echo " fmt - Format Terraform files"
12+
@echo " validate - Validate configuration"
13+
@echo " lint - Run tflint"
14+
@echo " security - Run security scan"
15+
@echo " clean - Clean up generated files"
16+
17+
test:
18+
@./tests/test-terraform.sh
19+
20+
install-tools:
21+
@chmod +x tests/install-tools.sh
22+
@./tests/install-tools.sh
23+
24+
init:
25+
terraform init
26+
27+
plan: init
28+
terraform plan
29+
30+
apply: test
31+
./safe-apply.sh
32+
33+
destroy:
34+
terraform destroy
35+
36+
fmt:
37+
terraform fmt -recursive
38+
39+
validate: init
40+
terraform validate
41+
42+
lint:
43+
@if command -v tflint >/dev/null 2>&1; then \
44+
tflint --config tests/.tflint.hcl --init; \
45+
tflint --config tests/.tflint.hcl; \
46+
else \
47+
echo "tflint not installed. Run: make install-tools"; \
48+
exit 1; \
49+
fi
50+
51+
security:
52+
@if command -v checkov >/dev/null 2>&1; then \
53+
checkov -d . --config-file tests/.checkov.yaml; \
54+
else \
55+
echo "checkov not installed. Run: make install-tools"; \
56+
exit 1; \
57+
fi
58+
59+
clean:
60+
rm -rf .terraform
61+
rm -f .terraform.lock.hcl
62+
rm -f terraform.tfstate
63+
rm -f terraform.tfstate.backup
64+
rm -f plan.tfplan
65+
rm -rf generated/

0 commit comments

Comments
 (0)