Skip to content

Commit 44f63b5

Browse files
Merge pull request #35 from MilagrosMarin/main
update: fix links in README and udpate `docs`
2 parents 047e06f + 37c89e5 commit 44f63b5

File tree

9 files changed

+48
-40
lines changed

9 files changed

+48
-40
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
44
[Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention.
55

6+
## [0.2.1] - 2024-05-12
7+
+ Fix - Links in README
8+
+ Update - README and docs
9+
610
## [0.2.0] - 2023-11-29
711

812
+ Add - Inference module as `facemap_inference.py`

README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
1-
# DataJoint Element - Facemap
1+
# DataJoint Element for orofacial motion tracking with Facemap
22

3-
DataJoint Element for modeling neural activity based on orofacial tracking using [Facemap](https://github.com/MouseLand/facemap). This Element supports facemap analysis using distinct keypoints on the mouse face, and computing the singular value decomposition and pupil tracking. DataJoint Elements collectively standardize and automate data collection and analysis for neuroscience experiments. Each Element is a modular pipeline for data storage and processing with corresponding database tables that can be combined with other Elements to assemble a fully functional pipeline. This repository also provides a tutorial environment and notebooks to learn the pipeline.
3+
DataJoint Element for modeling neural activity based on orofacial tracking using [Facemap](https://github.com/MouseLand/facemap). This Element supports facemap analysis using distinct keypoints on the mouse face, and computing the singular value decomposition and pupil tracking.
4+
5+
DataJoint Elements collectively standardize and automate data collection and analysis for neuroscience experiments. Each Element is a modular pipeline for data storage and processing with corresponding database tables that can be combined with other Elements to assemble a fully functional pipeline. This repository also provides a tutorial environment and notebooks to learn the pipeline.
46

57
## Experiment Flowchart
68

7-
![flowchart](https://raw.githubusercontent.com/datajoint/element-facemap/main/images/diagram_flowchart.svg)
9+
![flowchart](https://raw.githubusercontent.com/datajoint/element-facemap/main/images/flowchart.svg)
810

911
## Data Pipeline Diagram
1012

11-
![pipeline](https://raw.githubusercontent.com/datajoint/element-facemap/main/images/pipline_facemap_inference.svg)
13+
![pipeline](https://raw.githubusercontent.com/datajoint/element-facemap/main/images/pipeline_facemap_inference.svg)
1214

13-
+ We have designed two variations of the pipline for different use cases. Displayed above is the pipeline for the `facemap_inference` schema. Details on the pipeline for `facial_behavior_estimation` can be found in the [Data Pipeline](https://datajoint.com/docs/elements/element-facemap/latest/pipeline/)
15+
+ We have designed two variations of the pipeline for different use cases. Displayed above is the pipeline for the `facemap_inference` schema. Details on the pipeline for `facial_behavior_estimation` can be found in the [Data Pipeline](https://datajoint.com/docs/elements/element-facemap/latest/pipeline/)
1416

1517
## Getting Started
1618

1719
+ Please fork this repository.
20+
1821
+ Clone the repository to your computer
1922

2023
```bash
@@ -27,7 +30,8 @@ DataJoint Element for modeling neural activity based on orofacial tracking using
2730
pip install -e .
2831
```
2932

30-
+ [Interactive tutorial on GitHub Codespaces](#interactive-tutorial)
33+
+ [Interactive tutorial on GitHub Codespaces](https://github.com/datajoint/element-facemap#interactive-tutorial)
34+
3135
+ [Documentation](https://datajoint.com/docs/elements/element-facemap)
3236

3337
## Support
@@ -67,6 +71,6 @@ MYSQL_VER=8.0 docker compose -f docker-compose-db.yaml up --build -d
6771
6872
### Instructions
6973
70-
1. We recommend you start by navigating to the `notebooks` directory on the left panel and go through the `tutorial.ipynb` Jupyter notebook. Execute the cells in the notebook to begin your walk through of the tutorial.
74+
1. We recommend you start by navigating to the `notebooks` directory on the left panel and go through the `tutorial.ipynb` Jupyter notebook. Execute the cells in the notebook to begin your walkthrough of the tutorial.
7175
72-
2. Once you are done, see the options available to you in the menu in the bottom-left corner. For example, in Codespace you will have an option to `Stop Current Codespace` but when running Dev Container on your own machine the equivalent option is `Reopen folder locally`. By default, GitHub will also automatically stop the Codespace after 30 minutes of inactivity. Once the Codespace is no longer being used, we recommend deleting the Codespace.
76+
2. Once you are done, see the options available to you in the menu in the bottom-left corner. For example, in Codespace you will have an option to `Stop Current Codespace` but when running Dev Container on your own machine the equivalent option is `Reopen folder locally`. By default, GitHub will also automatically stop the Codespace after 30 minutes of inactivity. Once the Codespace is no longer being used, we recommend deleting the Codespace.

docs/docker-compose.yaml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# MODE="LIVE|QA|BUILD" PACKAGE=element_facemap UPSTREAM_REPO=https://github.com/datajoint/element-facemap.git HOST_UID=$(id -u) docker compose -f docs/docker-compose.yaml up --build
1+
# MODE="LIVE|QA|PUSH" PACKAGE=element_facemap UPSTREAM_REPO=https://github.com/datajoint/element-facemap.git HOST_UID=$(id -u) docker compose -f docs/docker-compose.yaml up --build
22
version: "2.4"
33
services:
44
docs:
@@ -13,10 +13,10 @@ services:
1313
- UPSTREAM_REPO
1414
- MODE
1515
- PATCH_VERSION
16+
- JUPYTER_PLATFORM_DIRS=1
1617
volumes:
1718
- ../docs:/main/docs
1819
- ../${PACKAGE}:/main/${PACKAGE}
19-
- ../notebooks:/main/notebooks
2020
user: ${HOST_UID}:anaconda
2121
ports:
2222
- 80:80
@@ -26,12 +26,14 @@ services:
2626
- |
2727
git config --global --add safe.directory /main
2828
set -e
29-
export ELEMENT_UNDERSCORE=$$(echo $${PACKAGE} | sed 's/element_//g')
30-
export ELEMENT_HYPHEN=$$(echo $${ELEMENT_UNDERSCORE} | sed 's/_/-/g')
29+
export ELEMENT_NAME=$$(echo $${PACKAGE} | sed 's/element_//g')
3130
export PATCH_VERSION=$$(cat /main/$${PACKAGE}/version.py | grep -oE '\d+\.\d+\.[a-z0-9]+')
32-
33-
cp /main/notebooks/inference_tutorial.ipynb /main/docs/src/tutorials/
34-
31+
git clone https://github.com/datajoint/workflow-$${ELEMENT_NAME}.git /main/delete || true
32+
if [ -d /main/delete/ ]; then
33+
mv /main/delete/workflow_$${ELEMENT_NAME} /main/
34+
mv /main/delete/notebooks/*ipynb /main/docs/src/tutorials/
35+
rm -fR /main/delete
36+
fi
3537
if echo "$${MODE}" | grep -i live &>/dev/null; then
3638
mkdocs serve --config-file ./docs/mkdocs.yaml -a 0.0.0.0:80
3739
elif echo "$${MODE}" | grep -iE "qa|push" &>/dev/null; then
@@ -51,4 +53,4 @@ services:
5153
else
5254
echo "Unexpected mode..."
5355
exit 1
54-
fi
56+
fi

docs/mkdocs.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ nav:
2828
# 02. Instead of designating codeblocks with bash, use console. For example..
2929
# ```console
3030
# cd ../my_dir
31-
# ```
31+
# ```
3232
# 03. Links across docs should ...
3333
# A. Not involve line breaks.
3434
# B. Use relative paths to docs in the same repo
@@ -48,15 +48,15 @@ nav:
4848
# HOST_UID=$(id -u) docker compose -f docs/docker-compose.yaml up --build
4949
# ```
5050
# 02. The API section will pull docstrings.
51-
# A. Follow google styleguide e.g.,
51+
# A. Follow google styleguide e.g.,
5252
# https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html
5353
# With typing suggestions: https://docs.python.org/3/library/typing.html
5454
# B. To pull a specific workflow fork, change ./docs/src/api/make_pages.py#L19
5555
# 03. To see your fork of the workflow-{element} in this render, change the
5656
# URL in ./docs/src/api/make_pages.py#L19 to your fork.
57-
# 04. To deploy this site on your fork,
57+
# 04. To deploy this site on your fork,
5858
# A. declare a branch called gh-pages
59-
# B. go to the your fork > settings > pages
59+
# B. go to the your fork > settings > pages
6060
# C. direct pages to render from the gh-pages branch at root
6161
# D. push a tag to your fork with the format test*.*.*
6262
#
@@ -94,12 +94,12 @@ plugins:
9494
handlers:
9595
python:
9696
options:
97-
members_order: source
97+
members_order: source
9898
group_by_category: false
9999
line_length: 88
100100
- gen-files:
101101
scripts:
102-
- ./src/api/make_pages.py
102+
- ./src/api/make_pages.py
103103
- literate-nav:
104104
nav_file: navigation.md
105105
- exclude-search:
@@ -135,9 +135,9 @@ markdown_extensions:
135135
generic: true
136136
- pymdownx.magiclink # Displays bare URLs as links
137137
- pymdownx.tasklist: # Renders check boxes in tasks lists
138-
custom_checkbox: true
138+
custom_checkbox: true
139139
extra:
140-
PATCH_VERSION: !ENV PATCH_VERSION
140+
PATCH_VERSION: !ENV PATCH_VERSION
141141
generator: false # Disable watermark
142142
version:
143143
provider: mike
@@ -173,7 +173,7 @@ extra_css:
173173
- assets/stylesheets/extra.css
174174

175175
extra_javascript:
176-
- https://js-na1.hs-scripts.com/23133402.js # HubSpot chatbot
176+
- https://js-na1.hs-scripts.com/23133402.js # HubSpot chatbot
177177
- javascripts/mathjax.js
178178
- https://polyfill.io/v3/polyfill.min.js?features=es6
179179
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js

docs/src/api/make_pages.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@
1313
element = package.split("_", 1)[1]
1414

1515
nav = mkdocs_gen_files.Nav()
16-
for path in sorted(Path(package).glob("**/*.py")) + sorted(
17-
Path(f"workflow_{element}").glob("**/*.py")
18-
):
19-
if path.stem == "__init__":
16+
for path in sorted(Path(package).glob("**/*.py")):
17+
if path.stem == "__init__" or path.stem == "version":
2018
continue
2119
with mkdocs_gen_files.open(f"api/{path.with_suffix('')}.md", "w") as f:
2220
module_path = ".".join(

docs/src/concepts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ In its initial versions, Facemap empowered researchers to identify regions of in
99
The latest iteration of Facemap introduces the ability to track keypoints across the animal's face. This feature marks a departure from solely relying on predefined ROIs, allowing for more dynamic and precise analysis of facial expressions and movements.[^3]
1010

1111
+ **KeyPoints Detection**: Facemap now employs cutting-edge machine learning algorithms to automatically detect and track specific facial landmarks, such as the tips of whiskers, the corners of the eyes, and the edges of the mouth. This approach enables a finer-grained analysis of facial expressions, enhancing the software's utility in behavioral neuroscience research.
12+
1213
+ **Dynamic Tracking**: Unlike the static ROIs, keypoints move with the subject across frames. This dynamic tracking ensures that more subtle facial movements are captured, providing richer datasets for analysis.
1314

1415
[^1]: Dolensek, N., Gehrlach, D. A., Klein, A. S., & Gogolla, N. (2020). Facial
@@ -29,5 +30,4 @@ Major features include:
2930
- Ingestion and storage of input video metadata.
3031
- Queueing and triggering of Facemap analysis on multiple sessions.
3132
- Ingestion of analysis outcomes as motion and video principle components.
32-
- Ingestion of analysis outcomes from inference of facial keypoints.
33-
33+
- Ingestion of analysis outcomes from inference of facial keypoints.

docs/src/index.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ DataJoint Element for modeling neural activity based on orofacial tracking using
1818

1919
+ Clone the repository to your computer
2020

21-
```bash
22-
git clone https://github.com/<enter_github_username>/element-facemap
23-
```
21+
```bash
22+
git clone https://github.com/<enter_github_username>/element-facemap.git
23+
```
2424

2525
+ Install with `pip`
26-
27-
```bash
28-
pip install -e .
29-
```
26+
27+
```bash
28+
pip install -e .
29+
```
3030

3131
+ [Data Pipeline](./pipeline.md) - Pipeline and table descriptions
3232

docs/src/partnerships.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ Element Facemap was developed in collaboration with Hui Chen Lu's Lab at Indiana
44
University Bloomington.
55

66
Our team also works with the [Facemap developers](https://github.com/MouseLand/facemap) to promote
7-
integration and interoperability between Facemap and the DataJoint Element Facemap.
7+
integration and interoperability between Facemap and the DataJoint Element Facemap.

element_facemap/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Package metadata."""
22

3-
__version__ = "0.2.0"
3+
__version__ = "0.2.1"

0 commit comments

Comments
 (0)