Skip to content

Commit

Permalink
Merge pull request #86 from kabilar/main
Browse files Browse the repository at this point in the history
Update GitHub Actions and Readme
  • Loading branch information
Thinh Nguyen authored Aug 7, 2023
2 parents 78ac980 + 8ca047d commit 5a76c6c
Show file tree
Hide file tree
Showing 16 changed files with 89 additions and 67 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Release
on:
workflow_dispatch:
jobs:
make_github_release:
uses: datajoint/.github/.github/workflows/make_github_release.yaml@main
pypi_release:
needs: make_github_release
uses: datajoint/.github/.github/workflows/pypi_release.yaml@main
secrets:
TWINE_USERNAME: ${{secrets.TWINE_USERNAME}}
TWINE_PASSWORD: ${{secrets.TWINE_PASSWORD}}
with:
UPLOAD_URL: ${{needs.make_github_release.outputs.release_upload_url}}
mkdocs_release:
uses: datajoint/.github/.github/workflows/mkdocs_release.yaml@main
permissions:
contents: write
33 changes: 33 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Test
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: "0 8 * * 1"
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
py_ver: ["3.9", "3.10"]
mysql_ver: ["8.0", "5.7"]
include:
- py_ver: "3.8"
mysql_ver: "5.7"
- py_ver: "3.7"
mysql_ver: "5.7"
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{matrix.py_ver}}
uses: actions/setup-python@v4
with:
python-version: ${{matrix.py_ver}}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 "black[jupyter]"
- name: Run style tests
run: |
python_version=${{matrix.py_ver}}
black element_deeplabcut --check --verbose --target-version py${python_version//.}
17 changes: 0 additions & 17 deletions .github/workflows/u24_element_before_release.yaml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/u24_element_release_call.yaml

This file was deleted.

14 changes: 0 additions & 14 deletions .github/workflows/u24_element_tag_to_release.yaml

This file was deleted.

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
[Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention.

## [0.2.8] - 2023-08-07

+ Update - GitHub Actions with new reusable workflows
+ Update - Readme instructions

## [0.2.7] - 2023-08-04

+ Fix - Update the project path in the pose config file to train the model
Expand Down Expand Up @@ -72,6 +77,7 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
graciously provided by the Mathis Lab.
+ Add - Support for 2d single-animal models

[0.2.8]: https://github.com/datajoint/element-deeplabcut/releases/tag/0.2.8
[0.2.7]: https://github.com/datajoint/element-deeplabcut/releases/tag/0.2.7
[0.2.6]: https://github.com/datajoint/element-deeplabcut/releases/tag/0.2.6
[0.2.5]: https://github.com/datajoint/element-deeplabcut/releases/tag/0.2.5
Expand Down
30 changes: 26 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,34 @@
# DataJoint Element - DeepLabCut
[![PyPI version](https://badge.fury.io/py/element-deeplabcut.svg)](http://badge.fury.io/py/element-deeplabcut)

# DataJoint Element for Pose Estimation with DeepLabCut

DataJoint Element for markerless pose estimation with
[DeepLabCut](https://www.deeplabcut.org/). 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.

![diagram](https://raw.githubusercontent.com/datajoint/element-deeplabcut/main/images/diagram_flowchart.svg)
## Experiment Flowchart

![flowchart](https://raw.githubusercontent.com/datajoint/element-deeplabcut/main/images/flowchart.svg)

## Data Pipeline Diagram

![pipeline](https://raw.githubusercontent.com/datajoint/element-deeplabcut/main/images/pipeline.svg)

## Getting Started

+ Install from PyPI

```bash
pip install element-deeplabcut
```

+ [Interactive tutorial](https://github.com/datajoint/workflow-deeplabcut)

+ [Documentation](https://datajoint.com/docs/elements/element-deeplabcut)

## Support

Installation and usage instructions can be found at the
[Element documentation](https://datajoint.com/docs/elements/element-deeplabcut).
+ If you need help getting started or run into any errors, please open a GitHub Issue
or contact our team by email at support@datajoint.com.
2 changes: 1 addition & 1 deletion docs/src/concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ corresponding tables in the database. Within the workflow, Element DeepLabCut c
to upstream Elements including Lab, Animal, and Session. For more detailed
documentation on each table, see the API docs for the respective schemas.

![element-deeplabcut diagram](https://raw.githubusercontent.com/datajoint/element-deeplabcut/main/images/diagram_dlc.svg)
![pipeline](https://raw.githubusercontent.com/datajoint/element-deeplabcut/main/images/pipeline.svg)

### `lab` schema ([API docs](../api/workflow_deeplabcut/pipeline/#workflow_deeplabcut.pipeline.Device))

Expand Down
2 changes: 1 addition & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ and automate data collection and analysis for neuroscience experiments. Each El
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.

![diagram](https://raw.githubusercontent.com/datajoint/element-deeplabcut/main/images/diagram_flowchart.svg)
![flowchart](https://raw.githubusercontent.com/datajoint/element-deeplabcut/main/images/flowchart.svg)

Element DeepLabCut runs DeepLabCut which uses image recognition machine learning models
to generate animal position estimates from consumer grade video equipment. The Element
Expand Down
4 changes: 3 additions & 1 deletion element_deeplabcut/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,9 @@ def generate(
"""
processed_dir = get_dlc_processed_data_dir()
output_dir = cls.infer_output_dir(
{**video_recording_key, "model_name": model_name}, relative=False, mkdir=True
{**video_recording_key, "model_name": model_name},
relative=False,
mkdir=True,
)

if task_mode is None:
Expand Down
2 changes: 1 addition & 1 deletion element_deeplabcut/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def activate(
*,
create_schema: bool = True,
create_tables: bool = True,
linking_module: str = None
linking_module: str = None,
):
"""Activate this schema.
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes

0 comments on commit 5a76c6c

Please sign in to comment.