Skip to content

Commit e7f6060

Browse files
committed
2 parents 4e195c3 + 3b98067 commit e7f6060

19 files changed

+348
-2
lines changed

.github/workflows/development.yaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
pull_request:
44
push:
55
tags:
6-
- '*.*.*'
6+
- "*.*.*"
77
jobs:
88
test-changelog:
99
runs-on: ubuntu-latest
@@ -61,7 +61,8 @@ jobs:
6161
uses: actions/upload-artifact@v2
6262
with:
6363
name: image-${{env.PKG_NAME}}-${{env.PKG_VERSION}}-py${{matrix.py_ver}}-${{matrix.distro}}
64-
path: "image-${{env.PKG_NAME}}-${{env.PKG_VERSION}}-py${{matrix.py_ver}}-\
64+
path:
65+
"image-${{env.PKG_NAME}}-${{env.PKG_VERSION}}-py${{matrix.py_ver}}-\
6566
${{matrix.distro}}.tar.gz"
6667
retention-days: 1
6768
- if: matrix.py_ver == '3.8' && matrix.distro == 'alpine'
@@ -145,3 +146,15 @@ jobs:
145146
asset_path: ${{env.PKG_SDIST_PATH}}
146147
asset_name: pip-${{env.SDIST_PKG_NAME}}-${{env.PKG_VERSION}}.tar.gz
147148
asset_content_type: application/gzip
149+
# Open Source documentation deploy workflow
150+
deploy-docs:
151+
if: github.event_name == 'push'
152+
needs: build
153+
runs-on: ubuntu-latest
154+
steps:
155+
- uses: actions/checkout@v2
156+
- uses: actions/setup-python@v2
157+
with:
158+
python-version: 3.x
159+
- run: pip install mkdocs-material mkdocs-redirects mkdocstrings mkdocstrings-python
160+
- run: mkdocs gh-deploy --force --config-file ./docs/mkdocs.yml
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: u24_element_before_release
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- '**'
7+
tags-ignore:
8+
- '**'
9+
workflow_dispatch:
10+
jobs:
11+
call_context_check:
12+
uses: dj-sciops/djsciops-cicd/.github/workflows/context_check.yaml@main
13+
call_u24_elements_build_alpine:
14+
uses: dj-sciops/djsciops-cicd/.github/workflows/u24_element_build.yaml@main
15+
with:
16+
py_ver: 3.9
17+
image: djbase
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: u24_element_release_call
2+
on:
3+
workflow_run:
4+
workflows: ["u24_element_tag_to_release"]
5+
types:
6+
- completed
7+
jobs:
8+
call_context_check:
9+
uses: dj-sciops/djsciops-cicd/.github/workflows/context_check.yaml@main
10+
test_call_u24_elements_release_alpine:
11+
if: >-
12+
github.event.workflow_run.conclusion == 'success' && ( contains(github.event.workflow_run.head_branch, 'test') || (github.event.workflow_run.event == 'pull_request'))
13+
uses: dj-sciops/djsciops-cicd/.github/workflows/u24_element_release.yaml@main
14+
with:
15+
py_ver: 3.9
16+
twine_repo: testpypi
17+
secrets:
18+
TWINE_USERNAME: ${{secrets.TWINE_TEST_USERNAME}}
19+
TWINE_PASSWORD: ${{secrets.TWINE_TEST_PASSWORD}}
20+
call_u24_elements_release_alpine:
21+
if: >-
22+
github.event.workflow_run.conclusion == 'success' && github.repository_owner == 'datajoint' && !contains(github.event.workflow_run.head_branch, 'test')
23+
uses: dj-sciops/djsciops-cicd/.github/workflows/u24_element_release.yaml@main
24+
with:
25+
py_ver: 3.9
26+
secrets:
27+
TWINE_USERNAME: ${{secrets.TWINE_USERNAME}}
28+
TWINE_PASSWORD: ${{secrets.TWINE_PASSWORD}}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: u24_element_tag_to_release
2+
on:
3+
push:
4+
tags:
5+
- '*.*.*'
6+
- 'test*.*.*'
7+
jobs:
8+
call_context_check:
9+
uses: dj-sciops/djsciops-cicd/.github/workflows/context_check.yaml@main
10+
call_u24_elements_build_alpine:
11+
uses: dj-sciops/djsciops-cicd/.github/workflows/u24_element_build.yaml@main
12+
with:
13+
py_ver: 3.9
14+
image: djbase

docs/docker-compose-docs-serve.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# docker-compose -f docs/docker-compose-docs-serve.yaml up --build
2+
# navigate to http://localhost/
3+
version: "2.4"
4+
services:
5+
docs:
6+
build:
7+
context: ../
8+
dockerfile: docs/docs.dockerfile
9+
environment:
10+
- THEME_DIR=material
11+
volumes:
12+
- ..:/main
13+
ports:
14+
- 80:80
15+
command:
16+
- bash
17+
- -c
18+
- |
19+
pwd
20+
mkdocs --version
21+
mkdocs serve --config-file ./docs/mkdocs.yml -a 0.0.0.0:80
22+
# tail -f /dev/null

docs/docs.dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM python:slim
2+
3+
WORKDIR /main
4+
COPY ./docs /main
5+
COPY ./element_array_ephys /main
6+
COPY requirements.txt /main
7+
COPY setup.py /main
8+
RUN pip install mkdocs-material mkdocs-redirects mkdocstrings mkdocstrings-python

docs/mkdocs.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
site_name: Element Array Ephys
2+
repo_url: https://github.com/datajoint/element-array-ephys
3+
repo_name: datajoint/element-array-ephys
4+
docs_dir: ./src/
5+
6+
theme:
7+
name: material
8+
custom_dir: overrides
9+
logo: assets/elements-logo-black.png
10+
favicon: assets/elements-logo.png
11+
features:
12+
- toc.integrate
13+
palette:
14+
- media: "(prefers-color-scheme: light)"
15+
scheme: datajoint
16+
toggle:
17+
icon: material/brightness-7
18+
name: Switch to dark mode
19+
- media: "(prefers-color-scheme: dark)"
20+
scheme: slate
21+
toggle:
22+
icon: material/brightness-4
23+
name: Switch to light mode
24+
25+
nav:
26+
- Element Array Ephys: getting_started/index.md
27+
- Getting Started:
28+
- Installation: getting_started/index.md
29+
- Set Up: getting_started/setup.md
30+
- Tutorials: tutorials.md
31+
- Concepts: concepts.md
32+
- About: about.md
33+
- API: api.md
34+
35+
plugins:
36+
- search
37+
- redirects:
38+
redirect_maps:
39+
"index.md": "getting_started/index.md"
40+
- mkdocstrings:
41+
default_handler: python
42+
43+
markdown_extensions:
44+
- attr_list
45+
- toc:
46+
permalink: true
47+
- pymdownx.emoji:
48+
options:
49+
custom_icons:
50+
- overrides/.icons
51+
52+
extra:
53+
generator: false # Disable watermark
54+
social:
55+
- icon: datajoint/dj-logo-white
56+
link: https://www.datajoint.com/
57+
- icon: fontawesome/brands/slack
58+
link: https://datajoint.slack.com
59+
- icon: fontawesome/brands/linkedin
60+
link: https://www.linkedin.com/company/datajoint
61+
- icon: fontawesome/brands/twitter
62+
link: https://twitter.com/DataJointIO
63+
- icon: fontawesome/brands/github
64+
link: https://github.com/datajoint
65+
- icon: fontawesome/brands/stack-overflow
66+
link: https://stackoverflow.com/questions/tagged/datajoint
67+
- icon: fontawesome/brands/youtube
68+
link: https://www.youtube.com/channel/UCdeCuFOTCXlVMRzh6Wk-lGg
69+
70+
extra_css:
71+
- stylesheets/extra.css
Lines changed: 20 additions & 0 deletions
Loading

docs/overrides/partials/nav.html

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{% set class = "md-nav md-nav--primary" %}
2+
{% if "navigation.tabs" in features %}
3+
{% set class = class ~ " md-nav--lifted" %}
4+
{% endif %}
5+
{% if "toc.integrate" in features %}
6+
{% set class = class ~ " md-nav--integrated" %}
7+
{% endif %}
8+
<nav class="{{ class }}" aria-label="{{ lang.t('nav.title') }}" data-md-level="0">
9+
<label class="md-nav__title" for="__drawer">
10+
<a href="{{ config.extra.homepage | d(nav.homepage.url, true) | url }}" title="{{ config.site_name | e }}"
11+
class="md-nav__button md-logo" aria-label="{{ config.site_name }}" data-md-component="logo">
12+
{% include "partials/logo.html" %}
13+
</a>
14+
{#-
15+
Add DataJoint home link to navigation header, otherwise unchanged
16+
-#}
17+
<a href="https://www.datajoint.org/" title="DataJoint">
18+
⬅ Home
19+
</a>
20+
</label>
21+
{% if config.repo_url %}
22+
<div class="md-nav__source">
23+
{% include "partials/source.html" %}
24+
</div>
25+
{% endif %}
26+
<ul class="md-nav__list" data-md-scrollfix>
27+
{% for nav_item in nav %}
28+
{% set path = "__nav_" ~ loop.index %}
29+
{% set level = 1 %}
30+
{% include "partials/nav-item.html" %}
31+
{% endfor %}
32+
</ul>
33+
</nav>

docs/src/about.md

Whitespace-only changes.

0 commit comments

Comments
 (0)