Skip to content

Commit be8cb2c

Browse files
committed
merge from main
1 parent 73b3947 commit be8cb2c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+31717
-907
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
"ms-python.flake8",
3333
"eamodio.gitlens",
3434
"github.vscode-pull-request-github",
35-
"orta.vscode-jest",
3635
"42crunch.vscode-openapi",
3736
"mermade.openapi-lint",
3837
"dbaeumer.vscode-eslint",
@@ -51,10 +50,7 @@
5150
"python.analysis.autoSearchPaths": true,
5251
"python.analysis.extraPaths": [],
5352
"python.testing.unittestEnabled": false,
54-
"python.testing.pytestEnabled": true,
55-
"python.testing.pytestArgs": [
56-
"packages/slackBotFunction",
57-
],
53+
"python.testing.pytestEnabled": false,
5854
"python.linting.pylintEnabled": false,
5955
"python.linting.flake8Enabled": true,
6056
"python.linting.enabled": true, // required to format on save

.gitallowed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ token = slack_event_data\["bot_token"\]
3131
client = WebClient\(token=token\)
3232
client = WebClient\(token=slack_event_data\["bot_token"\]\)
3333
context accountId=123456789012
34+
.*:sample_docs/.*

.github/workflows/cdk_package_code.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@ jobs:
6161
6262
- name: Build Python Lambda Functions
6363
run: |
64-
pip3 install -r packages/slackBotFunction/requirements.txt -t packages/slackBotFunction
65-
pip3 install -r packages/syncKnowledgeBaseFunction/requirements.txt -t packages/syncKnowledgeBaseFunction
64+
poetry export --without-hashes --format=requirements.txt --with slackBotFunction > requirements_slackBotFunction
65+
poetry export --without-hashes --format=requirements.txt --with syncKnowledgeBaseFunction > requirements_syncKnowledgeBaseFunction
66+
pip3 install -r requirements_slackBotFunction -t packages/slackBotFunction
67+
pip3 install -r requirements_syncKnowledgeBaseFunction -t packages/syncKnowledgeBaseFunction
6668
6769
- name: 'Tar files'
6870
run: |

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ env:
99

1010
jobs:
1111
quality_checks:
12-
uses: NHSDigital/eps-workflow-quality-checks/.github/workflows/quality-checks.yml@v4.1.0
12+
uses: NHSDigital/eps-workflow-quality-checks/.github/workflows/quality-checks.yml@v4.1.1
1313
secrets:
1414
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
1515

.github/workflows/pull_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ env:
99

1010
jobs:
1111
quality_checks:
12-
uses: NHSDigital/eps-workflow-quality-checks/.github/workflows/quality-checks.yml@v4.1.0
12+
uses: NHSDigital/eps-workflow-quality-checks/.github/workflows/quality-checks.yml@v4.1.1
1313
secrets:
1414
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
1515

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ env:
88

99
jobs:
1010
quality_checks:
11-
uses: NHSDigital/eps-workflow-quality-checks/.github/workflows/quality-checks.yml@v4.1.0
11+
uses: NHSDigital/eps-workflow-quality-checks/.github/workflows/quality-checks.yml@v4.1.1
1212
secrets:
1313
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
1414

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
nodejs 22.12.0
22
python 3.13.3
3-
poetry 1.8.3
3+
poetry 2.1.4
44
shellcheck 0.10.0
55
direnv 2.32.2
66
actionlint 1.7.3

.vscode/eps-assist-me.code-workspace

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"folders": [
33
{
4-
"name": "eps-assist-me-monorepo",
4+
"name": "eps-assist-me",
55
"path": ".."
66
},
77
{
@@ -19,7 +19,10 @@
1919
],
2020
"settings": {
2121
"jest.disabledWorkspaceFolders": [
22-
"eps-assist-me"
22+
"eps-assist-me",
23+
"packages/cdk",
24+
"packages/slackBotFunction",
25+
"packages/syncKnowledgeBaseFunction"
2326
],
2427
"files.exclude": {
2528
"packages/": true
@@ -103,7 +106,8 @@
103106
"jest.jestCommandLine": "NODE_OPTIONS=--experimental-vm-modules node_modules/.bin/jest --no-cache",
104107
"jest.nodeEnv": {
105108
"POWERTOOLS_DEV": true
106-
}
109+
},
110+
"python.defaultInterpreterPath": "/workspaces/eps-assist-me/.venv/bin/python"
107111
},
108112
"extensions": {
109113
"recommendations": [

Makefile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ guard-%:
99
install: install-python install-hooks install-node
1010

1111
install-python:
12-
poetry install
13-
cd packages/slackBotFunction && pip install -r requirements.txt && pip install -r requirements-test.txt
14-
cd packages/syncKnowledgeBaseFunction && pip install -r requirements.txt && pip install -r requirements-test.txt
12+
poetry sync --all-groups
1513

1614
install-hooks: install-python
1715
poetry run pre-commit install --install-hooks --overwrite
@@ -48,8 +46,8 @@ lint-flake8:
4846
poetry run flake8 .
4947

5048
test:
51-
cd packages/slackBotFunction && PYTHONPATH=. COVERAGE_FILE=coverage/.coverage python -m pytest
52-
cd packages/syncKnowledgeBaseFunction && PYTHONPATH=. COVERAGE_FILE=coverage/.coverage python -m pytest
49+
cd packages/slackBotFunction && PYTHONPATH=. COVERAGE_FILE=coverage/.coverage poetry run python -m pytest
50+
cd packages/syncKnowledgeBaseFunction && PYTHONPATH=. COVERAGE_FILE=coverage/.coverage poetry run python -m pytest
5351

5452
clean:
5553
rm -rf packages/cdk/coverage
@@ -60,6 +58,7 @@ clean:
6058
rm -rf packages/syncKnowledgeBaseFunction/.coverage
6159
rm -rf cdk.out
6260
rm -rf .build
61+
find . -name '.pytest_cache' -type d -prune -exec rm -rf '{}' +
6362

6463
deep-clean: clean
6564
rm -rf .venv
@@ -137,3 +136,6 @@ cdk-watch: guard-STACK_NAME
137136
--context logRetentionInDays=$$LOG_RETENTION_IN_DAYS \
138137
--context slackBotToken=$$SLACK_BOT_TOKEN \
139138
--context slackSigningSecret=$$SLACK_SIGNING_SECRET
139+
140+
sync-docs:
141+
./scripts/sync_docs.sh

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ packages/
2828
│ │ └── RestApiGateway/ # API Gateway specific constructs
2929
│ ├── resources/ # AWS resource definitions
3030
│ └── stacks/ # CDK stack definitions
31+
├── sample_docs/ # Contains sample docs for testing purposes. These should not be used for real usage
3132
├── slackBotFunction/ # Lambda function for Slack bot integration
3233
│ ├── app/ # Application code
3334
│ │ ├── config/ # Configuration and environment variables
@@ -171,6 +172,7 @@ These are used to do common commands related to cdk
171172
- `git-secrets-docker-setup` Sets up git-secrets Docker container.
172173
- `pre-commit` Runs pre-commit hooks on all files.
173174
- `test` Runs unit tests for Lambda functions.
175+
- `sync-docs` Runs a script to sync sample docs to s3 bucket for a pull request. Useful for setting up a stack for testing
174176

175177
#### Compiling
176178

0 commit comments

Comments
 (0)