Skip to content

Commit 286498a

Browse files
committed
Added new issue workflow
1 parent 6ef3adb commit 286498a

File tree

5 files changed

+254
-0
lines changed

5 files changed

+254
-0
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
blank_issues_enabled: false
2+
contact_links: []
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: "Release Request"
2+
description: "Request a deployment by specifying the evaluation function, changes, target commit/branch, and test confirmation."
3+
title: "Release Request"
4+
labels:
5+
- release
6+
- deployment
7+
assignees: []
8+
body:
9+
- type: textarea
10+
id: description_of_changes
11+
attributes:
12+
label: Description of changes
13+
description: "Summarize what is changing and why. Include links to PRs, issues, or changelogs."
14+
placeholder: |
15+
- What changed:
16+
- Why:
17+
- Related PRs/Issues: #123, #456
18+
render: markdown
19+
validations:
20+
required: true
21+
22+
- type: input
23+
id: branch_to_deploy
24+
attributes:
25+
label: Branch to deploy
26+
description: |
27+
Specify Branch name to deploy.
28+
placeholder: "e.g., release/2025-09-29"
29+
validations:
30+
required: true
31+
32+
- type: dropdown
33+
id: version-bump
34+
attributes:
35+
label: "🚀 What kind of update is this?"
36+
description: "Tell us how significant this change is. This helps us set the correct new version number."
37+
options:
38+
- "Patch: A small fix for a bug. It won't break anything for existing users. (e.g., 1.2.3 ➔ 1.2.4)"
39+
- "Minor: Adds a new feature, but doesn't change how existing ones work. A safe update. (e.g., 1.2.3 ➔ 1.3.0)"
40+
- "Major: A big change that alters existing features. Users may need to update their work to adapt. (e.g., 1.2.3 ➔ 2.0.0)"
41+
default: 0
42+
validations:
43+
required: true
44+
45+
- type: markdown
46+
attributes:
47+
value: |
48+
---
49+
### ⚡ Click the Link Below to Run the Workflow
50+
51+
Clicking the link will take you to the Actions page. You will need to click the **"Run workflow"** button there to start the process.
52+
53+
## [➡️ Go to Workflow Run Page](../actions/workflows/production-deploy.yml)
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: Deploy Production Version to Lambda Feedback
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version-bump:
7+
description: 'Version bump type'
8+
required: true
9+
type: choice
10+
options:
11+
- patch
12+
- minor
13+
- major
14+
default: patch
15+
branch:
16+
description: 'Branch to release from'
17+
required: true
18+
type: string
19+
default: 'main'
20+
jobs:
21+
test:
22+
name: Test
23+
runs-on: ubuntu-latest
24+
permissions:
25+
contents: read
26+
actions: read
27+
checks: write
28+
pull-requests: write
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
python-version: [ "3.12" ]
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
with:
37+
fetch-depth: 0
38+
39+
- name: Set up Python ${{ matrix.python-version }}
40+
id: python-setup
41+
uses: actions/setup-python@v5
42+
with:
43+
python-version: ${{ matrix.python-version }}
44+
45+
- name: Load cached Poetry installation
46+
id: poetry-cache
47+
uses: actions/cache@v4
48+
with:
49+
path: ~/.local
50+
key: poetry-0
51+
52+
- name: Install and configure Poetry
53+
if: steps.poetry-cache.outputs.cache-hit != 'true'
54+
uses: snok/install-poetry@v1
55+
with:
56+
virtualenvs-in-project: true
57+
58+
- name: Load cached venv
59+
id: dependencies-cache
60+
uses: actions/cache@v3
61+
with:
62+
path: .venv
63+
key: venv-${{ runner.os }}-${{ steps.python-setup.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
64+
65+
- name: Install dependencies
66+
if: steps.dependencies-cache.outputs.cache-hit != 'true'
67+
run: |
68+
poetry install --no-interaction --no-root
69+
70+
# TODO: add linting / black / flake8
71+
# - name: Lint with flake8
72+
# run: |
73+
# source .venv/bin/activate
74+
# # stop the build if there are Python syntax errors or undefined names
75+
# flake8 ./evaluation_function --count --select=E9,F63,F7,F82 --show-source --statistics
76+
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
77+
# flake8 ./evaluation_function --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
78+
79+
- name: Run tests
80+
if: always()
81+
run: |
82+
source .venv/bin/activate
83+
pytest --junit-xml=./reports/pytest.xml --tb=auto -v
84+
85+
- name: Upload test results
86+
uses: actions/upload-artifact@v4
87+
if: always()
88+
with:
89+
name: test-results
90+
path: ./reports/pytest.xml
91+
if-no-files-found: warn
92+
deploy:
93+
uses: lambda-feedback/evaluation-function-workflows/.github/workflows/deploy.yml@deploy-request
94+
with:
95+
template-repository-name: "lambda-feedback/evaluation-function-boilerplate-python"
96+
build-platforms: 'aws'
97+
environment: "eval-production"
98+
version-bump: ${{ inputs.version-bump }}
99+
branch: ${{ inputs.branch }}
100+
secrets:
101+
aws-key-id: ${{ secrets.LAMBDA_CONTAINER_PIPELINE_AWS_ID }}
102+
aws-secret-key: ${{ secrets.LAMBDA_CONTAINER_PIPELINE_AWS_SECRET}}
103+
function-admin-api-key: ${{ secrets.FUNCTION_ADMIN_API_KEY}}
104+
gcp_credentials: ${{ secrets.GCP_DEPLOY }}
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: Deploy to Lambda Feedback
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
workflow_dispatch:
9+
10+
jobs:
11+
test:
12+
name: Test
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
actions: read
17+
checks: write
18+
pull-requests: write
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
python-version: [ "3.12" ]
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
29+
- name: Set up Python ${{ matrix.python-version }}
30+
id: python-setup
31+
uses: actions/setup-python@v5
32+
with:
33+
python-version: ${{ matrix.python-version }}
34+
35+
- name: Load cached Poetry installation
36+
id: poetry-cache
37+
uses: actions/cache@v4
38+
with:
39+
path: ~/.local
40+
key: poetry-0
41+
42+
- name: Install and configure Poetry
43+
if: steps.poetry-cache.outputs.cache-hit != 'true'
44+
uses: snok/install-poetry@v1
45+
with:
46+
virtualenvs-in-project: true
47+
48+
- name: Load cached venv
49+
id: dependencies-cache
50+
uses: actions/cache@v3
51+
with:
52+
path: .venv
53+
key: venv-${{ runner.os }}-${{ steps.python-setup.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
54+
55+
- name: Install dependencies
56+
if: steps.dependencies-cache.outputs.cache-hit != 'true'
57+
run: |
58+
poetry install --no-interaction --no-root
59+
60+
# TODO: add linting / black / flake8
61+
# - name: Lint with flake8
62+
# run: |
63+
# source .venv/bin/activate
64+
# # stop the build if there are Python syntax errors or undefined names
65+
# flake8 ./evaluation_function --count --select=E9,F63,F7,F82 --show-source --statistics
66+
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
67+
# flake8 ./evaluation_function --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
68+
69+
- name: Run tests
70+
if: always()
71+
run: |
72+
source .venv/bin/activate
73+
pytest --junit-xml=./reports/pytest.xml --tb=auto -v
74+
75+
- name: Upload test results
76+
uses: actions/upload-artifact@v4
77+
if: always()
78+
with:
79+
name: test-results
80+
path: ./reports/pytest.xml
81+
if-no-files-found: warn
82+
deploy:
83+
uses: lambda-feedback/evaluation-function-workflows/.github/workflows/deploy.yml@deploy-request
84+
with:
85+
template-repository-name: "lambda-feedback/evaluation-function-boilerplate-python"
86+
build-platforms: 'aws'
87+
environment: "staging"
88+
secrets:
89+
aws-key-id: ${{ secrets.LAMBDA_CONTAINER_PIPELINE_AWS_ID }}
90+
aws-secret-key: ${{ secrets.LAMBDA_CONTAINER_PIPELINE_AWS_SECRET}}
91+
function-admin-api-key: ${{ secrets.FUNCTION_ADMIN_API_KEY}}
92+
gcp_credentials: ${{ secrets.GCP_DEPLOY }}

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ A collection of small Language Models, leading up to LLM-like behaviour and then
55
Code is free to use or adapt, but all liability is with the user and I would appreciate being given credit (Peter B. Johnson, Imperial College London).
66

77
For more information on the function, see the `/docs` folder. The remainder of this README is generic guidance, from the boilderplate, about running the function locally when developing.
8+
## Development
9+
[![Create Release Request](https://img.shields.io/badge/Create%20Release%20Request-blue?style=for-the-badge)](https://github.com/lambda-feedback/langModels/issues/new?template=release-request.yml)
10+
811

912
## Usage
1013

0 commit comments

Comments
 (0)