Skip to content

Commit cac2db2

Browse files
timo282mo374zCopilot
authored
Chore/update cicd process (#48)
* Refactor release note structure * Update release procedure in CICD workflow * Update CICD trigger and add workflow protections * Update docs/release-notes/v1.3.0.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update docs/release-notes/vX.X.X.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Moritz Schlager <87517800+mo374z@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 6e47cd1 commit cac2db2

File tree

18 files changed

+222
-177
lines changed

18 files changed

+222
-177
lines changed

.github/workflows/cicd.yml

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
11
name: CICD
22

33
on:
4-
push:
5-
branches:
6-
- main
74
workflow_dispatch:
85

96
jobs:
107
build:
118
name: Run Tests, Pre-Commits, and Build Python package
129
uses: ./.github/workflows/ci.yml
1310

14-
check-version:
11+
check-branch:
1512
needs: build
13+
name: Check Branch
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Fail if branch is not main
17+
run: |
18+
if [[ "${{ github.ref }}" != "refs/heads/main" ]]; then
19+
echo "This workflow can only be run on the main branch."
20+
exit 1
21+
fi
22+
23+
check-version:
24+
needs: check-branch
1625
runs-on: ubuntu-latest
1726
permissions:
1827
contents: read
@@ -64,16 +73,34 @@ jobs:
6473
git tag -a v${{ needs.check-version.outputs.version }} -m "Release v${{ needs.check-version.outputs.version }}"
6574
git push origin v${{ needs.check-version.outputs.version }}
6675
76+
- name: Set release notes file path
77+
id: release-notes
78+
run: echo "RELEASE_NOTES_PATH=./docs/release-notes/v${{ needs.check-version.outputs.version }}.md" >> $GITHUB_ENV
79+
80+
- name: Check if release notes file exists
81+
id: check-release-notes
82+
run: |
83+
if [ ! -f "$RELEASE_NOTES_PATH" ]; then
84+
echo "Error: Release notes file does not exist at path: $RELEASE_NOTES_PATH"
85+
exit 1
86+
fi
87+
6788
- name: Create GitHub Release
6889
uses: actions/create-release@v1
6990
env:
7091
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7192
with:
7293
tag_name: v${{ needs.check-version.outputs.version }}
7394
release_name: Release v${{ needs.check-version.outputs.version }}
95+
body_path: ${{ env.RELEASE_NOTES_PATH }}
7496
draft: false
7597
prerelease: false
7698

99+
create-docs:
100+
needs: create-release
101+
name: Create and Deploy Documentation
102+
uses: ./.github/workflows/docs.yml
103+
77104
publish-to-pypi:
78105
needs: [build, check-version, create-release]
79106
name: Publish Python package to PyPI

.github/workflows/docs.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
name: Docs
22

33
on:
4-
push:
5-
branches:
6-
- main
74
workflow_call:
5+
workflow_dispatch:
86

97
permissions:
108
contents: write
@@ -15,6 +13,13 @@ jobs:
1513
runs-on: ubuntu-latest
1614

1715
steps:
16+
- name: Fail if branch is not main
17+
run: |
18+
if [[ "${{ github.ref }}" != "refs/heads/main" ]]; then
19+
echo "This workflow can only be run on the main branch."
20+
exit 1
21+
fi
22+
1823
- name: Checkout
1924
uses: actions/checkout@v3
2025

docs/release-notes.md

Lines changed: 1 addition & 169 deletions
Original file line numberDiff line numberDiff line change
@@ -1,170 +1,2 @@
1-
# Release Notes
2-
3-
## Release v1.4.0
4-
### What's changed
5-
#### Added features
6-
* Reworked APILLM to allow for calls to any API that follows the OpenAI API format
7-
* Added graceful failing in optimization runs, allowing to obtain results after an error
8-
* Reworked configs to ExperimentConfig, allowing to parse any attributes
9-
10-
### Further Changes:
11-
* Reworked getting started notebook
12-
* Added tests for the entire package, covering roughly 80% of the codebase
13-
* Reworked dependency and import structure to allow the usage of a subset of the package
14-
15-
**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v1.3.2...v1.4.0)
16-
17-
## Release v1.3.2
18-
### What's changed
19-
#### Added features
20-
* Allow for configuration and evaluation of system prompts in all LLM-Classes
21-
* CSV Callback is now FileOutputCallback and able to write Parquet files
22-
* Fixed LLM-Call templates in VLLM
23-
* refined OPRO-implementation to be closer to the paper
24-
25-
**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v1.3.1...v1.3.2)
26-
27-
## Release v1.3.1
28-
### What's changed
29-
#### Added features
30-
* new features for the VLLM Wrapper (accept seeding to ensure reproducibility)
31-
* fixes in the "MarkerBasedClassificator"
32-
* fixes in prompt creation and task description handling
33-
* generalize the Classificator
34-
* add verbosity and callback handling in EvoPromptGA
35-
* add timestamp to the callback
36-
* removed datasets from repo
37-
* changed task creation (now by default with a dataset)
38-
39-
**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v1.3.0...v1.3.1)
40-
41-
## Release v1.3.0
42-
### What's changed
43-
#### Added features
44-
* new features for the VLLM Wrapper (automatic batch size determination, accepting kwargs)
45-
* allow callbacks to terminate optimization run
46-
* add token count functionality
47-
* renamed "Classificator"-Predictor to "FirstOccurenceClassificator"
48-
* introduced "MarkerBasedClassifcator"
49-
* automatic task description creation
50-
* use task description in prompt creation
51-
* implement CSV callbacks
52-
53-
**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v1.2.0...v1.3.0)
54-
55-
## Release v1.2.0
56-
### What's changed
57-
#### Added features
58-
* New LLM wrapper: VLLM for local inference with batches
59-
60-
**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v1.1.1...v1.2.0)
61-
62-
## Release v1.1.1
63-
### What's Changed
64-
#### Further Changes:
65-
- deleted poetry.lock
66-
- updated transformers dependency: bumped from 4.46.3 to 4.48.0
67-
68-
**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v1.1.0...v1.1.1)
69-
70-
## Release v1.1.0
71-
### What's changed
72-
#### Added features
73-
* Enable reading tasks from a pandas dataframe
74-
75-
#### Further Changes:
76-
* deleted experiment files from the repo folders (logs, configs, etc.)
77-
* improved opros meta-prompt
78-
* added support for python versions from 3.9 onwards (previously 3.11)
79-
80-
**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v1.0.1...v1.1.0)
81-
82-
## Release v1.0.1
83-
### What's changed
84-
#### Added features
85-
-
86-
87-
#### Further Changes:
88-
* fixed release notes
89-
90-
**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v1.0.0...v1.0.1)
91-
92-
## Release v1.0.0
93-
### What's changed
94-
#### Added Features:
95-
* exemplar selection module, classes for exemplar selection (Random and RandomSearch)
96-
* helper functions: run_experiment, run_optimization and run_evaluation
97-
98-
#### Further Changes:
99-
* removed deepinfra helper functions as langchain-community libary is now working as intended
100-
* added license
101-
* added release notes :)
102-
103-
**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v0.2.0...v1.0.0)
104-
105-
## Release v0.2.0
106-
107-
### What's Changed
108-
#### Added Features:
109-
* Prompt creation utility function
110-
* Prompt variation utility function
111-
* New optimizer: OPro (see [arXiv paper](https://arxiv.org/abs/2309.03409))
112-
113-
#### Further Changes:
114-
* Workflows for automated build, deployment & release
115-
* New documentation page appearance
116-
* Additional Docstrings & Formatting
117-
118-
**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v0.1.1...v0.2.0)
119-
120-
## Release v0.1.1 (2)
121-
122-
### What's Changed
123-
124-
#### Added features:
125-
\-
126-
127-
#### Further changes:
128-
* Added workflows for automated build, deployment, release and doc creation
129-
* Updated pre-commits
130-
* Added docstrings and formatting
131-
* Updated readme
132-
* Updated docs
133-
134-
**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/0.1.1...v0.1.1)
135-
136-
## Release v0.1.1
137-
138-
### What's Changed
139-
140-
#### Features added:
141-
\-
142-
143-
#### Further changes:
144-
* Loosen restrictive python version requirements (^3.11 instead of ~3.11)
145-
* Add documentation pages
146-
* Update README
147-
148-
**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/0.1.0...0.1.1)
149-
150-
## Release v0.1.0
151-
152-
*First release*
153-
154-
### What's Changed
155-
156-
#### Added Features:
157-
* Base classes for tasks, LLMs, predictors, and optimizers
158-
* Classification task
159-
* API LLMs from OpenAI, Anthropic, and DeepInfra
160-
* Local LLM
161-
* optimizer EvoPrompt GA and EvoPrompt DE (see [arXiv paper](https://arxiv.org/abs/2309.08532))
162-
163-
#### Further changes:
164-
* Added example classification datasets used in the [EvoPrompt paper](https://arxiv.org/abs/2309.08532)
165-
* Added dummy classes for testing
166-
* Added example scripts and configs for experiments
167-
* Added experiment results and evaluation notebooks
168-
169-
**Full Changelog**: [here](https://github.com/finitearth/promptolution/commits/0.1.0)
1+
Welcome to the release notes of Promptolution! Please find the release notes for the corresponding versions of the library in the menu to your left.
1702

docs/release-notes/v0.1.0.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## Release v0.1.0
2+
3+
*First release*
4+
5+
### What's Changed
6+
7+
#### Added Features:
8+
* Base classes for tasks, LLMs, predictors, and optimizers
9+
* Classification task
10+
* API LLMs from OpenAI, Anthropic, and DeepInfra
11+
* Local LLM
12+
* optimizer EvoPrompt GA and EvoPrompt DE (see [arXiv paper](https://arxiv.org/abs/2309.08532))
13+
14+
#### Further changes:
15+
* Added example classification datasets used in the [EvoPrompt paper](https://arxiv.org/abs/2309.08532)
16+
* Added dummy classes for testing
17+
* Added example scripts and configs for experiments
18+
* Added experiment results and evaluation notebooks
19+
20+
**Full Changelog**: [here](https://github.com/finitearth/promptolution/commits/0.1.0)

docs/release-notes/v0.1.1.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## Release v0.1.1
2+
3+
### What's Changed
4+
5+
#### Features added:
6+
\-
7+
8+
#### Further changes:
9+
* Loosen restrictive python version requirements (^3.11 instead of ~3.11)
10+
* Add documentation pages
11+
* Update README
12+
13+
**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/0.1.0...0.1.1)

docs/release-notes/v0.1.1b.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## Release v0.1.1 (2)
2+
3+
### What's Changed
4+
5+
#### Added features:
6+
\-
7+
8+
#### Further changes:
9+
* Added workflows for automated build, deployment, release and doc creation
10+
* Updated pre-commits
11+
* Added docstrings and formatting
12+
* Updated readme
13+
* Updated docs
14+
15+
**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/0.1.1...v0.1.1)

docs/release-notes/v0.2.0.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Release v0.2.0
2+
3+
### What's Changed
4+
#### Added Features:
5+
* Prompt creation utility function
6+
* Prompt variation utility function
7+
* New optimizer: OPro (see [arXiv paper](https://arxiv.org/abs/2309.03409))
8+
9+
#### Further Changes:
10+
* Workflows for automated build, deployment & release
11+
* New documentation page appearance
12+
* Additional Docstrings & Formatting
13+
14+
**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v0.1.1...v0.2.0)

docs/release-notes/v1.0.0.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## Release v1.0.0
2+
### What's changed
3+
#### Added Features:
4+
* exemplar selection module, classes for exemplar selection (Random and RandomSearch)
5+
* helper functions: run_experiment, run_optimization and run_evaluation
6+
7+
#### Further Changes:
8+
* removed deepinfra helper functions as langchain-community libary is now working as intended
9+
* added license
10+
* added release notes :)
11+
12+
**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v0.2.0...v1.0.0)

docs/release-notes/v1.0.1.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## Release v1.0.1
2+
### What's changed
3+
#### Added features
4+
-
5+
6+
#### Further Changes:
7+
* fixed release notes
8+
9+
**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v1.0.0...v1.0.1)

docs/release-notes/v1.1.0.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## Release v1.1.0
2+
### What's changed
3+
#### Added features
4+
* Enable reading tasks from a pandas dataframe
5+
6+
#### Further Changes:
7+
* deleted experiment files from the repo folders (logs, configs, etc.)
8+
* improved opros meta-prompt
9+
* added support for python versions from 3.9 onwards (previously 3.11)
10+
11+
**Full Changelog**: [here](https://github.com/finitearth/promptolution/compare/v1.0.1...v1.1.0)

0 commit comments

Comments
 (0)