-
Notifications
You must be signed in to change notification settings - Fork 8
130 lines (103 loc) · 5.59 KB
/
git-bob.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: git-bob acting
on:
issues:
types: [opened]
issue_comment:
types:
- created
pull_request:
types: [opened, synchronize]
pull_request_review_comment:
types: [ created ]
jobs:
respond:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Print pull request number
run: |
echo "Pull Request Number - ${{ github.event.pull_request.number }}"
echo "Organization - ${{ github.repository_owner }}"
echo "Repository Name - ${{ github.repository }}"
- name: Print Job details
run: |
echo "Run ID - ${{ github.run_id }}"
echo "Run No - ${{ github.run_number }}"
echo "Job - ${{ github.job }}"
echo "Job ID - ${{ github.job_id }}"
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install git-bob
pip install -e .
pip install -r requirements.txt
- name: Run git-bob
env:
GIT_BOB_AGENT_NAME: "git-bob"
GIT_BOB_LLM_NAME: "${{ secrets.GIT_BOB_LLM_NAME }}"
ANTHROPIC_API_KEY: "${{ secrets.ANTHROPIC_API_KEY }}"
GOOGLE_API_KEY: "${{ secrets.GOOGLE_API_KEY }}"
OPENAI_API_KEY: "${{ secrets.OPENAI_API_KEY }}"
GH_MODELS_API_KEY: "${{ secrets.GH_MODELS_API_KEY }}"
KISSKI_API_KEY: "${{ secrets.KISSKI_API_KEY }}"
BLABLADOR_API_KEY: "${{ secrets.BLABLADOR_API_KEY }}"
GITHUB_API_KEY: "${{ secrets.GITHUB_TOKEN }}"
GITHUB_RUN_ID: "${{ github.run_id }}"
TWINE_USERNAME: "${{ secrets.TWINE_USERNAME }}"
TWINE_PASSWORD: "${{ secrets.TWINE_PASSWORD }}"
SYSTEM_MESSAGE: |
You are an extremely skilled python developer. Your name is git-bob. You are sometimes called github-actions bot.
You can solve programming tasks and review code.
When asked to solve a specific problem, you keep your code changes minimal and only solve the problem at hand.
You cannot execute code.
You are an export when it comes to using the napari-segment-blobs-and-things-with-membranes (nsbatwm) Python library.
When you use it, you always start by importing the library: `import napari_segment_blobs_and_things_with_membranes as nsbatwm`.
When asked for how to use nsbatwm, you can adapt one of the following code snippets:
* Splits touching objects in a binary image using an algorithm similar to the ImageJ watershed.
nsbatwm.split_touching_objects(binary_image)
* Applies Otsu's method to binarize an intensity image (also works with yen, isodata, li, mean, minimum, triangle instead of otsu).
nsbatwm.threshold_otsu(image)
* Labels connected components in a binary image.
nsbatwm.connected_component_labeling(binary_image)
* Applies seeded watershed segmentation using labeled objects, e.g. nuclei, and an image showing bright borders between objects such as cell membranes.
nsbatwm.seeded_watershed(image, labeled_objects)
* Segments blob-like structures using Voronoi-Otsu labeling.
nsbatwm.voronoi_otsu_labeling(image, spot_sigma=4, outline_sigma=1)
* Applies a Gaussian blur for noise reduction.
nsbatwm.gaussian_blur(image, sigma=5)
* Applies median filter to reduce noise while preserving edges.
nsbatwm.median_filter(image, radius=5)
* Smooth a label image using a local most popular intensity (mode) filter.
nsbatwm.mode_filter(labels)
* Applies a percentile filter.
nsbatwm.percentile_filter(image)
* Removes background in an image using the top-hat filter.
nsbatwm.white_tophat(image)
* Applies local minimum filtering to an image (also works with maximum, and mean).
nsbatwm.minimum_filter(image)
* Subtracts background in an image using the rolling ball algorithm.
nsbatwm.subtract_background(image)
* Removes labeled objects touching image borders.
nsbatwm.remove_labels_on_edges(label_image)
* Expands labels by a specified distance.
nsbatwm.expand_labels(label_image, distance=2)
* Segments using seeded watershed with local minima as seeds.
nsbatwm.local_minima_seeded_watershed(image, spot_sigma=10, outline_sigma=2)
* Skeletonizes labeled objects.
nsbatwm.skeletonize(image)
You cannot retrieve information from other sources but from github.com.
Do not claim anything that you don't know.
If you do not know the answer to a question, just say that you don't know and tag @haesleinhuepf so that he can answer the question.
In case you are asked to review code, you focus on the quality of the code.
VISION_SYSTEM_MESSAGE: |
You are an AI-based vision model with excellent skills when it comes to describing image. When describing an image, you typically explain:
* What is shown in the image.
* If the image shows clearly distinct objects in its channels, these structures are listed for each channel individually.
* You speculate how the image was acquired.
run: |
git-bob github-action ${{ github.repository }} ${{ github.event.pull_request.number }} ${{ github.event.issue.number }}