Skip to content

Commit 8a70bf9

Browse files
committed
Merge branch main of datajoint/datajoint-tutorials
2 parents b39409a + 2bc9705 commit 8a70bf9

File tree

8 files changed

+41
-9
lines changed

8 files changed

+41
-9
lines changed

.devcontainer/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ RUN \
2626
echo '. /etc/bash_completion' >> /home/vscode/.bashrc && \
2727
echo 'export PS1="\[\e[32;1m\]\u\[\e[m\]@\[\e[34;1m\]\H\[\e[m\]:\[\e[33;1m\]\w\[\e[m\]$ "' >> /home/vscode/.bashrc && \
2828
apt-get clean
29+
2930
COPY ./requirements.txt /tmp/
31+
3032
RUN \
3133
# tutorial dependencies
3234
pip install --no-cache-dir black faker ipykernel && \

.devcontainer/devcontainer.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
// For format details, see https://aka.ms/devcontainer.json.
21
{
32
"name": "DataJoint Tutorial",
43
"dockerComposeFile": "docker-compose.yaml",
54
"service": "app",
65
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
7-
// Use this environment variable if you need to bind mount your local source code into a new container.
86
"remoteEnv": {
97
"LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}"
108
},
11-
// https://containers.dev/features
129
"onCreateCommand": "pip install -e . && MYSQL_VER=8.0 docker compose down && MYSQL_VER=8.0 docker compose up --build --wait",
1310
"postStartCommand": "docker volume prune -f",
1411
"hostRequirements": {

.devcontainer/docker-compose.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ services:
33
app:
44
cpus: 2
55
mem_limit: 4g
6-
build:
7-
context: ..
8-
dockerfile: ./.devcontainer/Dockerfile
6+
# build: # build context is used when developing locally
7+
# context: ..
8+
# dockerfile: ./.devcontainer/Dockerfile
9+
image: datajoint/datajoint_tutorials:latest
910
extra_hosts:
1011
- fakeservices.datajoint.io:127.0.0.1
1112
volumes:
12-
- ../..:/workspaces:cached
13+
- ..:/workspaces/datajoint-tutorials:cached
1314
- docker_data:/var/lib/docker # persist docker images
1415
privileged: true # only because of dind
1516
volumes:

.github/workflows/release.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Release
2+
on:
3+
workflow_dispatch:
4+
jobs:
5+
devcontainer-build:
6+
uses: datajoint/.github/.github/workflows/devcontainer-build.yaml@main
7+
devcontainer-publish:
8+
needs:
9+
- devcontainer-build
10+
uses: datajoint/.github/.github/workflows/devcontainer-publish.yaml@main
11+
secrets:
12+
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
13+
DOCKERHUB_TOKEN: ${{secrets.DOCKERHUB_TOKEN_FOR_ELEMENTS}}

.github/workflows/test.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Test
2+
on:
3+
push:
4+
pull_request:
5+
workflow_dispatch:
6+
schedule:
7+
- cron: "0 8 * * 1"
8+
jobs:
9+
devcontainer-build:
10+
uses: datajoint/.github/.github/workflows/devcontainer-build.yaml@main

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 0.1.3 - 2023-09-14
4+
5+
+ Add - GitHub Actions to build Docker image and push to DockerHub
6+
37
## 0.1.2 - 2023-07-13
48

59
+ Update - Pin versions for VS Code extensions

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,13 @@ DataJoint tutorials are easily accessible using an **interactive environment** t
7070
- We highly recommend this option for users that who want to apply DataJoint to **their own neuroscience experiments** and lab research after exploring the tutorials. Additionally, this option is particularly advantageous for those who have a keen interest in **other modules of the DataJoint Elements Library** (e.g., Miniscope, DeepLabCut). For this option, ensure you have the following:
7171
- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
7272
- [Docker](https://docs.docker.com/get-docker/)
73+
- On M1/M2 Mac, you have to:
74+
- enable Rosetta 2 on Docker advanced/experimental settings
75+
- ensure Rosetta is installed by typing `softwareupdate --install-rosetta` at a shell prompt
76+
- `export DOCKER_DEFAULT_PLATFORM=linux/amd64` in .zshrc or at a shell prompt
7377
- [Microsoft's Visual Studio Code (VS Code)](https://code.visualstudio.com/)
74-
- [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers).
78+
- [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers).
79+
- `git clone` the codebase repository and open it in VSCode.
7580
- To begin, navigate to the notebooks directory located in the left panel and proceed through the sequentially organized Jupyter notebooks, labeled by numbers. Execute the cells in the notebooks to begin your walkthrough of the tutorial.
7681
- Once you are done, see the options in the menu in the bottom-left corner. When running DevContainer on your machine, you can `Reopen folder locally`. By default, GitHub will also automatically stop the Codespaces after 30 minutes of inactivity.
7782

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
setup(
1414
name="datajoint-tutorials",
15-
version="0.1.2",
15+
version="0.1.3",
1616
description="DataJoint interactive tutorials",
1717
long_description=long_description,
1818
author="DataJoint",

0 commit comments

Comments
 (0)