Skip to content

Commit ff802aa

Browse files
Add codespell: config, workflow (to alert when new typos added) and get typos fixed (#19)
* do not git ignore .github -- useful to keep under Git * Add github action to codespell main on push and PRs * Add rudimentary codespell config * [DATALAD RUNCMD] run codespell throughout but ignore fail === Do not change lines below === { "chain": [], "cmd": "codespell -w || :", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ * [DATALAD RUNCMD] Do interactive fixing of some ambigous typos === Do not change lines below === { "chain": [], "cmd": "codespell -w -i 3 -C 2", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ * Update app_utils.py * Update pyproject.toml --------- Co-authored-by: Mackenzie Mathis <[email protected]>
1 parent b3a37c2 commit ff802aa

File tree

9 files changed

+34
-7
lines changed

9 files changed

+34
-7
lines changed

.github/workflows/codespell.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Codespell
3+
4+
on:
5+
push:
6+
branches: [main]
7+
pull_request:
8+
branches: [main]
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
codespell:
15+
name: Check for spelling errors
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v3
21+
- name: Codespell
22+
uses: codespell-project/actions-codespell@v2

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ __pycache__
77
.env
88
.DS_Store
99
/examples
10-
.github
1110

1211
## gitignore for Python
1312
## Source: https://raw.githubusercontent.com/github/gitignore/master/Python.gitignore

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ make app
3434
- arXiv preprint version **[AmadeusGPT: a natural language interface for interactive animal behavioral analysis](https://arxiv.org/abs/2307.04858)** by [Shaokai Ye](https://github.com/yeshaokai), [Jessy Lauer](https://github.com/jeylau), [Mu Zhou](https://github.com/zhoumu53), [Alexander Mathis](https://github.com/AlexEMG) & [Mackenzie W. Mathis](https://github.com/MMathisLab).
3535

3636
### Install tips
37-
- *Make a new conda env: `conda create --name amadeusGPT python=3.9` then run `conda activate amadeusGPT` or you can also use our supplied conda if you git cloned the repo (navigate into the conda directory): `conda env create -f amadesuGPT.yml` then pip install amadeusGPT once created/lauched.
37+
- *Make a new conda env: `conda create --name amadeusGPT python=3.9` then run `conda activate amadeusGPT` or you can also use our supplied conda if you git cloned the repo (navigate into the conda directory): `conda env create -f amadesuGPT.yml` then pip install amadeusGPT once created/launched.
3838
- **Git clone this repo: so please open a terminal, we recommend to download into Documents (so type `cd Documents`) and run `git clone https://github.com/AdaptiveMotorControlLab/AmadeusGPT.git` Then go into the dir (`cd AmadeusGPT`)
3939
- If you want to use SAM, you need to download the weights. Otherwise you will see the following message in the app: `Cannot find SAM checkpoints. Skipping SAM`. Download them and add to "static" directory: wget https://dl.fbaipublicfiles.com/segment_anything/sam_vit_b_01ec64.pth
4040

amadeusgpt/app_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ def update_roi(result_json, ratios):
370370
count += 1
371371
AnimalBehaviorAnalysis.set_roi_objects(roi_objects)
372372

373-
AmadeusLogger.debug("User just drawed roi")
373+
AmadeusLogger.debug("User just drew an roi")
374374

375375

376376
def finish_drawing(canvas_result, ratio):

amadeusgpt/brains/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def connect_gpt(cls, messages, functions=None, function_call=None, **kwargs):
103103
if "gpt_model" in st.session_state:
104104
gpt_model = st.session_state["gpt_model"]
105105

106-
# allow kwargs to overrite gpt_model. This is to make sure child class of BaseBrain can use different option
106+
# allow kwargs to override gpt_model. This is to make sure child class of BaseBrain can use different option
107107
if "gpt_model" in kwargs:
108108
gpt_model = kwargs["gpt_model"]
109109

amadeusgpt/interface.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class AnimalBehaviorAnalysis:
115115
return the orientation vector of the vector connecting bodypart_name1 and bodypart_name2 for all animals
116116

117117
plot_ethogram(events: AnimalEvent) -> Tuple[plt.Figure, plt.Axes, plot_caption]
118-
get ethogram for correpsonding AnimalEvent
118+
get ethogram for corresponding AnimalEvent
119119

120120
animals_social_events(inter_individual_animal_state_query_list,
121121
inter_individual_animal_state_comparison_list,

amadeusgpt/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def magic_command(cls, user_input):
159159

160160
@classmethod
161161
def save_state(cls):
162-
# save the class attirbutes of all classes that are under state_list.
162+
# save the class attributes of all classes that are under state_list.
163163
def get_class_variables(_class):
164164
return {
165165
k: v

amadeusgpt/modules/implementation/visualization/occupancy_plot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def plot_occupancy_heatmap_per_animal(
3535
print("xmin,ymin, xmax,ymax")
3636
print(xmin, ymin, xmax, ymax)
3737

38-
# Peform the kernel density estimate
38+
# Perform the kernel density estimate
3939
bins = complex(bins)
4040
xx, yy = np.mgrid[xmin:xmax:bins, ymin:ymax:bins]
4141
pos = np.vstack([xx.ravel(), yy.ravel()])

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,9 @@ packages = ["amadeusgpt"]
1414

1515
[tool.setuptools.dynamic]
1616
dependencies = {file = ["setup.cfg"]}
17+
18+
[tool.codespell]
19+
skip = '.git,*.pdf,*.svg,go.sum,*.css,*.txt'
20+
check-hidden = true
21+
# ignore-regex = ''
22+
ignore-words-list = 'mabe,missings,nd,tread'

0 commit comments

Comments
 (0)