Skip to content

Commit

Permalink
build(retrocookie): reflect updates to source template from generated…
Browse files Browse the repository at this point in the history
… project 'science-institute_brain-lab'
  • Loading branch information
Joseph Burling committed Jun 10, 2022
1 parent 44f3061 commit 55ba632
Show file tree
Hide file tree
Showing 20 changed files with 154 additions and 382 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,4 @@ dmypy.json
.build/
.DS_Store
/build
/science-institute_neuro-lab
/science-institute_brain-lab
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ body:
attributes:
label: Version
description: What version of the package were you running?
placeholder: "0.0.1"
placeholder: "{{cookiecutter._pkg_version}}"
validations:
required: true

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
py_ver: "{{cookiecutter.python_version}}"
release_branch: main

call_sciops_docker_images:
call_sciops_docker_image_debian:
needs: call_semantic_versioning
if: |
always() &&
Expand All @@ -39,14 +39,13 @@ jobs:
jhub_ver: "1.4.2"
py_ver: "{{cookiecutter.python_version}}{% raw %}"
dist: debian
env_base_hash: 44c5f19
worker_base_hash: fcd8909
codebook_base_hash: a7ee3ce
workflow_version: ${{ needs.call_semantic_versioning.outputs.new_tag }}
release_upload_url: ${{ needs.call_semantic_versioning.outputs.upload_url }}
secrets:
RAW_DEPLOY_KEY: ${{ secrets.RAW_DEPLOY_KEY }}
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
BOT_SSH_KEY: ${{secrets.BOT_SSH_KEY}}
REGISTRY_USERNAME: ${{secrets.REGISTRY_USERNAME}}
REGISTRY_PASSWORD: ${{secrets.REGISTRY_PASSWORD}}

if_run_tests_failed:
if: github.event.workflow_run.conclusion == 'failure'
Expand Down
43 changes: 41 additions & 2 deletions datajoint-workflow/{{cookiecutter.github_repo}}/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,48 @@ DataJoint LabBook displays data from your database.

...

### DataJoint Axon (Data Upload)
### DataJoint Axon (Data Upload/Download)


#### Axon GUI

1. In the Axon app, on the lower left side, click the 'gear' icon (Config). Enter the following information in each field (See the `Misc` section below for what the generated `json` config file will look like once configured):

- AWS Account ID: `123456789012`

- DataJoint Account Client ID: `xxxxxxxxxxxxxxxxxxxxxx`

- S3 Role: `{{cookiecutter.github_repo}}_researcher_prod`

- S3 Bucket: `dj-sciops`

2. At the top right of the Axon app, click the 'circle arrow' icon (Token). This will open a browser to be able to sign in with your DataJoint account and generate a temporary token.

3. Select the 'S3 Bucket' tab on the left side of the Axon app. Enter the following information to view the current list of files uploaded, the press 'Load':

- S3 Bucket Directory: `{{cookiecutter.github_repo}}/inbox/`

4. To upload a folder to a subfolder within the 'S3 Bucket Directory', for example to upload the subject data folder 'SUBJ100' from your local machine, enter the following path on S3: `{{cookiecutter.github_repo}}/inbox/SUBJ100`

#### Axon CLI

...

#### Misc

```json
{
"version": "1.2.0",
"aws": { "account_id": "123456789012" },
"s3":
{
"role": "{{cookiecutter.github_repo}}_researcher_prod",
"bucket": "dj-sciops",
},
"djauth": { "client_id": "xxxxxxxxxxxxxxxxxxxxxx" },
}
```

...

### DataJoint CodeBook (JupyterHub)

Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
COMPOSE_PROJECT_NAME=djsciops-devcontainer
DJ_PASS=simple
DJ_USER=root
REPO_OWNER={{cookiecutter.github_user}}
REPO_NAME={{cookiecutter.github_repo}}
WORKFLOW_VERSION={{cookiecutter._pkg_version}}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"name": "{{cookiecutter.__project_name}} (devcontainer)",
"dockerComposeFile": [
"../docker-compose-devcontainer_env.yaml"
"./docker-compose.yml"
],
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
Expand All @@ -15,7 +15,7 @@
"vivaxy.vscode-conventional-commits",
"yzhang.markdown-all-in-one"
],
"initializeCommand": "test -f \"${localWorkspaceFolder}/.env\" || exit 7",
"initializeCommand": "test -f \"${localWorkspaceFolder}/.devcontainer/.env\" || exit 7",
"service": "devcontainer_env",
// Set *default* container specific settings.json values on container create.
"settings": {
Expand All @@ -35,8 +35,6 @@
"module",
"docker"
],
"djcookiecutter.condaExec": "mamba",
"djcookiecutter.localPath": "${env:HOME}/Documents/datajoint/dj-cookiecutter",
"files.exclude": {
"**/.DS_Store": true,
"**/.git": true,
Expand All @@ -53,7 +51,7 @@
"build": true,
"src/*.egg-info": true
},
"jupyter.alwaysScrollOnNewCell": true,
"interactiveWindow.alwaysScrollOnNewCell": true,
"jupyter.generateSVGPlots": true,
"jupyter.interactiveWindowMode": "single",
"jupyter.notebookFileRoot": "${workspaceFolder}",
Expand All @@ -65,7 +63,7 @@
"reportGeneralTypeIssues": "information"
},
"python.analysis.typeCheckingMode": "basic",
"python.defaultInterpreterPath": "/usr/local/bin/python",
"python.defaultInterpreterPath": "/opt/local/conda/bin/python",
"python.formatting.blackArgs": [
"--line-length=88"
],
Expand All @@ -85,5 +83,5 @@
"python.testing.pytestEnabled": true
},
"shutdownAction": "none",
"workspaceFolder": "/home/{{cookiecutter.github_user}}/{{cookiecutter.github_repo}}"
"workspaceFolder": "/home/ubuntu/{{cookiecutter.github_repo}}"
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# > docker-compose -f docker/docker-compose-devcontainer_env.yaml up -V --detach --force-recreate --remove-orphans --build
# > docker-compose -f docker/docker-compose-devcontainer_env.yaml down --volumes
# > docker-compose -f docker/.devcontainer/docker-compose.yml up -V --detach --force-recreate --remove-orphans --build
# > docker-compose -f docker/.devcontainer/docker-compose.yml down --volumes

version: "2.4"
services:
mysql_db:
mysql_sciops:
environment:
MYSQL_ROOT_PASSWORD: ${DJ_PASS:-simple}
image: datajoint/mysql:5.7
Expand All @@ -14,21 +14,21 @@ services:
- 6603:3306
restart: always
volumes:
- sqldata:/var/lib/mysql
- sciops-sqldata:/var/lib/mysql

devcontainer_env:
build:
context: ../.
dockerfile: docker/devcontainer.Dockerfile
context: ../../.
dockerfile: docker/.devcontainer/build/Dockerfile
args:
REPO_OWNER:
REPO_NAME:
image: registry.vathes.com/${REPO_OWNER}/devcontainer-${REPO_NAME}:py${PY_VER}-${DIST}-${WORKFLOW_VERSION}
REPO_NAME: ${REPO_NAME?}
WORKFLOW_VERSION: v${WORKFLOW_VERSION?}
image: ghcr.io/${REPO_OWNER?}/${REPO_NAME}:latest
depends_on:
mysql_db:
mysql_sciops:
condition: service_healthy
environment:
DJ_HOST: mysql_db
DJ_HOST: mysql_sciops
DJ_PASS: ${DJ_PASS:-simple}
DJ_USER: ${DJ_USER:-root}
init: true
Expand All @@ -38,21 +38,20 @@ services:
ports:
- 18888:8888
volumes:
- ..:/home/${REPO_OWNER}/${REPO_NAME}
- vscode:/home/${REPO_OWNER}/.vscode-server/extensions
- vscode-insiders:/home/${REPO_OWNER}/.vscode-server-insiders/extensions
- /home/${REPO_OWNER}/${REPO_NAME}/.nox
- /home/${REPO_OWNER}/${REPO_NAME}/src/{{cookiecutter.__pkg_import_name}}.egg-info
- ../..:/home/ubuntu/${REPO_NAME}
- vscode:/home/ubuntu/.vscode-server/extensions
- /home/ubuntu/${REPO_NAME}/.nox
- /home/ubuntu/${REPO_NAME}/src/{{cookiecutter.__pkg_import_name}}.egg-info

# MySQL GUI --------------
# http://localhost:8087/
# System: PostgreSQL
# Server: mysql_db
# Server: mysql_sciops
# Username: root
# Password: simple
adminer:
environment:
ADMINER_DEFAULT_SERVER: mysql_db
ADMINER_DEFAULT_SERVER: mysql_sciops
ADMINER_DESIGN: nette
image: adminer
networks:
Expand All @@ -62,17 +61,15 @@ services:
published: 8087
restart: always
depends_on:
mysql_db:
mysql_sciops:
condition: service_started

networks:
{{cookiecutter.__pkg_import_name}}:
name: {{cookiecutter.__project_name}}-network

volumes:
sqldata:
name: {{cookiecutter.__project_name}}-vol-sqldata
sciops-sqldata:
name: {{cookiecutter.__project_name}}-vol-sciops-sqldata
vscode:
name: {{cookiecutter.__project_name}}-vol-vscode
vscode-insiders:
name: {{cookiecutter.__project_name}}-vol-vscode-insiders
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
*.pem
.env
!.datajoint_config.json
*.env
!build.env
!run.example.env
!.devcontainer/.datajoint_config.json
!.devcontainer/.env
Loading

0 comments on commit 55ba632

Please sign in to comment.