From 4831a14ef964bd63496f17790cb36f8b6016898c Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 12 Jul 2023 11:00:41 -0400 Subject: [PATCH 1/7] do not git ignore .github -- useful to keep under Git --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2ca4223..206f287 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,6 @@ __pycache__ .env .DS_Store /examples -.github ## gitignore for Python ## Source: https://raw.githubusercontent.com/github/gitignore/master/Python.gitignore From 38482475e8764f52451fa8f12696439cdf7ab70e Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 18 Dec 2023 09:56:18 -0500 Subject: [PATCH 2/7] Add github action to codespell main on push and PRs --- .github/workflows/codespell.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/codespell.yml diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 0000000..3ebbf55 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -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 From fd5850df86606e0a6a942811a1894544db3d5fc5 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 18 Dec 2023 09:56:18 -0500 Subject: [PATCH 3/7] Add rudimentary codespell config --- pyproject.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 02633af..028444c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,3 +14,9 @@ packages = ["amadeusgpt"] [tool.setuptools.dynamic] dependencies = {file = ["setup.cfg"]} + +[tool.codespell] +skip = '.git,*.pdf,*.svg,go.sum,*.css' +check-hidden = true +# ignore-regex = '' +ignore-words-list = 'mabe,missings,nd,tread' From 410f1770ffaf34d12b1f8d2fab7dc0cc1dee7dfc Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 18 Dec 2023 09:58:00 -0500 Subject: [PATCH 4/7] [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 ^^^ --- README.md | 2 +- amadeusgpt/interface.txt | 2 +- amadeusgpt/main.py | 2 +- .../modules/implementation/visualization/occupancy_plot.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bf5e537..f18af99 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/amadeusgpt/interface.txt b/amadeusgpt/interface.txt index 3c5d076..901720c 100644 --- a/amadeusgpt/interface.txt +++ b/amadeusgpt/interface.txt @@ -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, diff --git a/amadeusgpt/main.py b/amadeusgpt/main.py index 2e27ccd..7c611a0 100644 --- a/amadeusgpt/main.py +++ b/amadeusgpt/main.py @@ -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 diff --git a/amadeusgpt/modules/implementation/visualization/occupancy_plot.py b/amadeusgpt/modules/implementation/visualization/occupancy_plot.py index f02507e..37f4a90 100644 --- a/amadeusgpt/modules/implementation/visualization/occupancy_plot.py +++ b/amadeusgpt/modules/implementation/visualization/occupancy_plot.py @@ -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()]) From c9d838ff31061c3a3de5cb5fcd2cd7a5af8bc825 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 18 Dec 2023 09:58:14 -0500 Subject: [PATCH 5/7] [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 ^^^ --- amadeusgpt/app_utils.py | 2 +- amadeusgpt/brains/base.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/amadeusgpt/app_utils.py b/amadeusgpt/app_utils.py index 92085a9..035c0e3 100644 --- a/amadeusgpt/app_utils.py +++ b/amadeusgpt/app_utils.py @@ -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 drawn roi") def finish_drawing(canvas_result, ratio): diff --git a/amadeusgpt/brains/base.py b/amadeusgpt/brains/base.py index dcb9116..477deeb 100644 --- a/amadeusgpt/brains/base.py +++ b/amadeusgpt/brains/base.py @@ -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"] From a7ba53707c268091c8adcafca8499f6571905380 Mon Sep 17 00:00:00 2001 From: Mackenzie Mathis Date: Mon, 18 Dec 2023 13:18:52 -0800 Subject: [PATCH 6/7] Update app_utils.py --- amadeusgpt/app_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/amadeusgpt/app_utils.py b/amadeusgpt/app_utils.py index 051f929..0c22380 100644 --- a/amadeusgpt/app_utils.py +++ b/amadeusgpt/app_utils.py @@ -370,7 +370,7 @@ def update_roi(result_json, ratios): count += 1 AnimalBehaviorAnalysis.set_roi_objects(roi_objects) - AmadeusLogger.debug("User just drawn roi") + AmadeusLogger.debug("User just drew an roi") def finish_drawing(canvas_result, ratio): From fdd8ef19d955f5cc47dfcbd8bf3e9bea07ef2ae8 Mon Sep 17 00:00:00 2001 From: Mackenzie Mathis Date: Mon, 18 Dec 2023 13:19:48 -0800 Subject: [PATCH 7/7] Update pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 028444c..3f96838 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ packages = ["amadeusgpt"] dependencies = {file = ["setup.cfg"]} [tool.codespell] -skip = '.git,*.pdf,*.svg,go.sum,*.css' +skip = '.git,*.pdf,*.svg,go.sum,*.css,*.txt' check-hidden = true # ignore-regex = '' ignore-words-list = 'mabe,missings,nd,tread'