-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
79 changed files
with
7,471 additions
and
7,653 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
__pycache__/ | ||
./makefile | ||
.git* | ||
.idea/ | ||
.profile | ||
.travis.y*ml | ||
.vscode/* | ||
*.code-workspace | ||
*.DS_Store | ||
*.egg | ||
*.egg-info/ | ||
**/.DS_Store | ||
**/*.ipynb_checkpoints | ||
dj_local_conf.json | ||
log*.txt | ||
scratch*.py | ||
scratch/ | ||
tox.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,11 @@ | ||
# | ||
[flake8] | ||
max-line-length = 88 | ||
# Ignore the following errors and warnings: | ||
# - whitespace after '(' (E201) | ||
# - whitespace before ')' (E202) | ||
# - whitespace before ':') (E203) | ||
# - assigning # to a lambda expression (E371) | ||
# - linebreaking before a binary operator (W503) | ||
extend-ignore = E201, E202, E203, E731, W503 | ||
# Ignore config setting files for git, github, intellij, vscode. | ||
exclude = .git, .github, .idea, .vscode |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: Aeon Mecha Container Environment | ||
|
||
on: | ||
push: | ||
branches: [datajoint_pipeline] | ||
|
||
jobs: | ||
build_and_push: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Make build space | ||
run: | | ||
sudo du -hd2 /tmp | ||
sudo rm -rf /usr/local/lib/android | ||
sudo rm -rf /usr/share/dotnet | ||
sudo apt-get clean -y | ||
sudo apt-get autoremove -y | ||
docker system df | ||
docker images -a | ||
docker system prune -fa --volumes | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Get previous tag | ||
id: previoustag | ||
uses: WyriHaximus/github-action-get-previous-tag@v1 | ||
with: | ||
fallback: v0.0.0a | ||
|
||
- name: Assign environment variables | ||
run: | | ||
echo "repository_lower=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV | ||
echo "image_build_date=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV | ||
- name: Setup QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
with: | ||
platforms: linux/amd64,linux/arm64 | ||
|
||
- name: Setup Docker buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v1 | ||
with: | ||
install: true | ||
driver: docker-container | ||
driver-opts: | | ||
image=moby/buildkit:buildx-stable-1 | ||
buildkitd-flags: --debug | ||
config-inline: | | ||
[worker.oci] | ||
max-parallelism = 2 | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
id: docker_build | ||
uses: docker/build-push-action@v2 | ||
with: | ||
no-cache: true | ||
build-args: | | ||
IMAGE_CREATED=${{ env.image_build_date }} | ||
IMAGE_VERSION=${{ steps.previoustag.outputs.tag }} | ||
context: . | ||
file: docker/image/Dockerfile | ||
platforms: linux/arm64,linux/amd64 | ||
push: true | ||
tags: | | ||
ghcr.io/${{ env.repository_lower }}:latest | ||
ghcr.io/${{ env.repository_lower }}:${{ steps.previoustag.outputs.tag }} | ||
- name: Image digest | ||
run: | | ||
echo ${{ steps.docker_build.outputs.digest }} | ||
docker system df | ||
docker images -a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
default_language_version: | ||
python: python3.9 | ||
|
||
default_stages: [commit, push] | ||
files: "^(docker|aeon\/dj_pipeline)\/.*$" | ||
repos: | ||
- repo: meta | ||
hooks: | ||
- id: identity | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.1.0 | ||
hooks: | ||
- id: check-yaml | ||
- id: detect-private-key | ||
- id: end-of-file-fixer | ||
exclude: LICENSE | ||
- id: no-commit-to-branch | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 22.1.0 | ||
hooks: | ||
- id: black | ||
args: | ||
- "--config" | ||
- "./pyproject.toml" | ||
|
||
- repo: https://github.com/pycqa/isort | ||
rev: 5.10.1 | ||
hooks: | ||
- id: isort | ||
name: isort (python) | ||
args: | ||
- "--settings-file" | ||
- "./pyproject.toml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Set env modules | ||
module add miniconda | ||
|
||
# Save Bonsai and deps to path | ||
export PATH=$PATH:/ceph/aeon/aeon/code/bonsai/Bonsai.Player/bin/Debug/net5.0 | ||
export DOTNET_ROOT=/ceph/aeon/aeon/code/dotnet | ||
export PATH=$PATH:/ceph/aeon/aeon/code/dotnet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,10 @@ | ||
# | ||
from importlib_metadata import PackageNotFoundError, version | ||
|
||
try: | ||
# Change here if project is renamed and does not equal the package name | ||
dist_name = "aeon" | ||
__version__ = version(dist_name) | ||
except PackageNotFoundError: | ||
__version__ = "unknown" | ||
finally: | ||
del version, PackageNotFoundError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,32 @@ | ||
import datajoint as dj | ||
import os | ||
|
||
_default_database_prefix = 'aeon_' | ||
import datajoint as dj | ||
import hashlib | ||
import uuid | ||
|
||
dj.config['display.width'] = 30 | ||
_default_database_prefix = os.getenv("DJ_DB_PREFIX") or "aeon_" | ||
_default_repository_config = {"ceph_aeon": "/ceph/aeon"} | ||
|
||
# safe-guard in case `custom` is not provided | ||
if 'custom' not in dj.config: | ||
dj.config['custom'] = {} | ||
if "custom" not in dj.config: | ||
dj.config["custom"] = {} | ||
|
||
db_prefix = dj.config["custom"].get("database.prefix", _default_database_prefix) | ||
|
||
db_prefix = dj.config['custom'].get('database.prefix', _default_database_prefix) | ||
repository_config = dj.config['custom'].get('repository_config', | ||
_default_repository_config) | ||
|
||
|
||
def get_schema_name(name): | ||
return db_prefix + name | ||
|
||
|
||
def dict_to_uuid(key): | ||
""" | ||
Given a dictionary `key`, returns a hash string as UUID | ||
""" | ||
hashed = hashlib.md5() | ||
for k, v in sorted(key.items()): | ||
hashed.update(str(k).encode()) | ||
hashed.update(str(v).encode()) | ||
return uuid.UUID(hex=hashed.hexdigest()) |
Oops, something went wrong.