Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Codespell

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Codespell
uses: codespell-project/actions-codespell@v2
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ __pycache__
.env
.DS_Store
/examples
.github

## gitignore for Python
## Source: https://raw.githubusercontent.com/github/gitignore/master/Python.gitignore
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ make app
- 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).

### Install tips
- *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.
- *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.
- **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`)
- 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

Expand Down
2 changes: 1 addition & 1 deletion amadeusgpt/app_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def update_roi(result_json, ratios):
count += 1
AnimalBehaviorAnalysis.set_roi_objects(roi_objects)

AmadeusLogger.debug("User just drawed roi")
AmadeusLogger.debug("User just drew an roi")


def finish_drawing(canvas_result, ratio):
Expand Down
2 changes: 1 addition & 1 deletion amadeusgpt/brains/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def connect_gpt(cls, messages, functions=None, function_call=None, **kwargs):
if "gpt_model" in st.session_state:
gpt_model = st.session_state["gpt_model"]

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

Expand Down
2 changes: 1 addition & 1 deletion amadeusgpt/interface.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class AnimalBehaviorAnalysis:
return the orientation vector of the vector connecting bodypart_name1 and bodypart_name2 for all animals

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

animals_social_events(inter_individual_animal_state_query_list,
inter_individual_animal_state_comparison_list,
Expand Down
2 changes: 1 addition & 1 deletion amadeusgpt/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def magic_command(cls, user_input):

@classmethod
def save_state(cls):
# save the class attirbutes of all classes that are under state_list.
# save the class attributes of all classes that are under state_list.
def get_class_variables(_class):
return {
k: v
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def plot_occupancy_heatmap_per_animal(
print("xmin,ymin, xmax,ymax")
print(xmin, ymin, xmax, ymax)

# Peform the kernel density estimate
# Perform the kernel density estimate
bins = complex(bins)
xx, yy = np.mgrid[xmin:xmax:bins, ymin:ymax:bins]
pos = np.vstack([xx.ravel(), yy.ravel()])
Expand Down
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@ packages = ["amadeusgpt"]

[tool.setuptools.dynamic]
dependencies = {file = ["setup.cfg"]}

[tool.codespell]
skip = '.git,*.pdf,*.svg,go.sum,*.css,*.txt'
check-hidden = true
# ignore-regex = ''
ignore-words-list = 'mabe,missings,nd,tread'