You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://creativecommons.org/licenses/by-nc-nd/4.0/)
2
2
[](https://github.com/dimitri-yatsenko/datajoint-book/actions/workflows/main.yml)
3
3
4
-
# DataJoint Book
5
-
6
-
Welcome to the [DataJoint Book](https://dimitri-yatsenko.github.io/datajoint-book), a comprehensive
7
-
introduction to relational database programming in the context of scientific computing and data science.
8
4
9
5
# License
10
6
@@ -16,20 +12,87 @@ You may share the content as long as you
16
12
* do not use it for commercial purposes
17
13
* do not make modifications.
18
14
19
-
# Contributions
20
-
We welcome and appreciate your contributions to this book, whether as a reviewer or as a contributor.
21
-
All contributions will be gratefully acknowledged.
22
-
You may suggest modifications by submitting an issue in the main [GitHub repository](https://github.com/dimitri-yatsenko/datajoint-book) for this book.
23
-
For more substrantial contributions and collaborations, including co-authorship and publications, please contact Dimitri Yatsenko.
24
15
25
-
# Deployment
16
+
# DataJoint Book
17
+
18
+
Welcome to the [DataJoint Book](https://dimitri-yatsenko.github.io/datajoint-book), a comprehensive
19
+
introduction to relational database programming in the context of scientific computing and data science.
20
+
21
+
This book is built as an **executable book**, following the principles of the [Executable Books Project](https://executablebooks.org/en/latest/), an international collaboration to build open source tools that facilitate publishing computational narratives using the Jupyter ecosystem.
22
+
23
+
The book is authored using [MyST Markdown](https://mystmd.org/) (Markedly Structured Text), an extensible, semantic, and community-driven flavor of markdown designed for scientific and computational narratives. MyST enables us to:
24
+
25
+
- Write rich, publication-quality content with enhanced markdown syntax
26
+
- Embed executable code cells and computational outputs directly in the documentation
27
+
- Generate interactive web pages and other output formats from the same source
28
+
- Maintain a single source of truth for documentation, examples, and executable content
29
+
30
+
This approach ensures that all code examples in the book are tested, up-to-date, and can be run directly by readers, bridging the gap between documentation and hands-on learning.
31
+
32
+
## Running the Book with Dev Containers
33
+
34
+
This repository includes a **Dev Container** (Development Container) configuration that provides a pre-configured development environment with all necessary dependencies, tools, and extensions already set up. This eliminates the need to manually install Python, DataJoint, MyST, and other required packages on your local machine.
35
+
36
+
### What is a Dev Container?
37
+
38
+
A Dev Container is a Docker-based development environment that runs inside a container but integrates seamlessly with your code editor (like Visual Studio Code or GitHub Codespaces). It ensures that everyone working on the book has an identical, reproducible environment, regardless of their operating system or local setup.
39
+
40
+
### How to Use the Dev Container
41
+
42
+
**Option 1: Using Visual Studio Code (Local)**
43
+
44
+
1. Install [Docker Desktop](https://www.docker.com/products/docker-desktop) on your machine
45
+
2. Install [Visual Studio Code](https://code.visualstudio.com/)
46
+
3. Install the [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) in VS Code
47
+
4. Clone this repository and open it in VS Code
48
+
5. When prompted, click "Reopen in Container" (or use Command Palette: `Dev Containers: Reopen in Container`)
49
+
6. VS Code will build the container and reload the workspace inside it
50
+
51
+
**Option 2: Using GitHub Codespaces (Cloud)**
52
+
53
+
1. Navigate to this repository on GitHub
54
+
2. Click the green "Code" button
55
+
3. Select the "Codespaces" tab
56
+
4. Click "Create codespace on main"
57
+
5. GitHub will launch a cloud-based VS Code environment with the Dev Container already running
58
+
59
+
Once inside the Dev Container, you have access to all tools needed to build, edit, and execute the book's content, including Jupyter notebooks, Python with DataJoint, and MyST build tools.
60
+
61
+
62
+
# Building and Deployment
63
+
64
+
Once you're working inside the Dev Container (see above), you can build and preview the book locally.
65
+
66
+
### Building the Book
26
67
27
68
The MyST static site deployment instructions are provided here: https://mystmd.org/guide/deployment
28
69
29
-
Inside the devcontainer:
70
+
To build and serve the book locally:
30
71
31
72
```shell
32
73
$ cd book
33
74
$ myst build --html
34
75
$ npx serve _build/html
35
76
```
77
+
78
+
This will:
79
+
1. Build the static HTML site from the MyST markdown and Jupyter notebook sources
80
+
2. Start a local web server (typically at `http://localhost:3000`)
81
+
3. Allow you to preview the book in your browser exactly as it will appear when deployed
82
+
83
+
### Automatic Deployment
84
+
85
+
The book is **automatically published** to [https://dimitri-yatsenko.github.io/datajoint-book](https://dimitri-yatsenko.github.io/datajoint-book) using GitHub Actions.
86
+
87
+
Every time changes are pushed to the `main` branch, a GitHub Actions workflow:
88
+
1. Builds the book using MyST
89
+
2. Deploys the generated HTML to GitHub Pages
90
+
3. Makes the updated book immediately available online
91
+
92
+
You can monitor the build and deployment status via the badge at the top of this README or by viewing the [Actions tab](https://github.com/dimitri-yatsenko/datajoint-book/actions) in the repository. This automated CI/CD pipeline ensures that the published version always reflects the latest content in the repository.
93
+
94
+
# Contributions
95
+
We welcome and appreciate your contributions to this book, whether as a reviewer or as a contributor.
96
+
All contributions will be gratefully acknowledged.
97
+
You may suggest modifications by submitting an issue in the main [GitHub repository](https://github.com/dimitri-yatsenko/datajoint-book) for this book.
98
+
For more substrantial contributions and collaborations, including co-authorship and publications, please contact Dimitri Yatsenko.
0 commit comments