Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add workflow cli #274

Draft
wants to merge 204 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
204 commits
Select commit Hold shift + click to select a range
f4e45c0
fix(images): add diff static
cameronraysmith Dec 1, 2023
ca7c24c
fix: add gitkeep to src folder
cameronraysmith Dec 1, 2023
d6bb660
fix(gitignore): update hydra and flyte exclusions
cameronraysmith Dec 1, 2023
c7bb6e5
feat(flyte): add local cluster config file
cameronraysmith Dec 1, 2023
40d2e77
feat(flyte): add config file template
cameronraysmith Dec 1, 2023
06f5c5e
feat(envrc): add direnv activation of dotenv
cameronraysmith Dec 1, 2023
f8a1b5c
feat(make): load dotenv variables
cameronraysmith Dec 1, 2023
18ec4c4
feat(dotenv): add example `.env` file
cameronraysmith Dec 1, 2023
a9d6956
fix(containerfiles): rename folder
cameronraysmith Dec 1, 2023
dcc1dd9
fix(containerfiles): use Dockerfile extension
cameronraysmith Dec 1, 2023
5b34a18
fix(make): add system/dev helpers
cameronraysmith Dec 1, 2023
032e152
feat: add pkg dockerfile
cameronraysmith Dec 1, 2023
2627f94
feat: add gpu dockerfile
cameronraysmith Dec 1, 2023
532bc50
feat(make): add poetry dev commands
cameronraysmith Dec 1, 2023
b71338c
feat(pyproject): switch to poetry build
cameronraysmith Dec 1, 2023
d32e9b5
fix(dnadiffusion): use version from pyproject.toml
cameronraysmith Dec 1, 2023
158e633
feat(dnadiffusion): add dataclass auto-creation
cameronraysmith Dec 1, 2023
39c1627
feat(dnadiffusion): add constants
cameronraysmith Dec 1, 2023
ed818aa
feat(dnadiffusion): configure logging
cameronraysmith Dec 1, 2023
cd3cca4
feat(dnadiffusion): add hydra cli
cameronraysmith Dec 1, 2023
2a7e657
feat(dnadiffusion): add example workflows
cameronraysmith Dec 1, 2023
c176733
feat(argo): add container build workflow
cameronraysmith Dec 1, 2023
2ba00c5
feat(github): add environment setup action
cameronraysmith Dec 1, 2023
904fc8a
feat(CI): add CI workflow
cameronraysmith Dec 1, 2023
a4f05db
chore(poetry): add lockfile
cameronraysmith Dec 1, 2023
94db685
fix(pandas): reenable `>2` via flytekit fork
cameronraysmith Dec 1, 2023
02d8a7e
fix(make): add CI targets
cameronraysmith Dec 1, 2023
445546a
fix(pyproject): add workflows extras
cameronraysmith Dec 2, 2023
519b978
fix(cli): use version from pyproject
cameronraysmith Dec 2, 2023
a769f2c
fix(poetry): update lockfile
cameronraysmith Dec 2, 2023
629f6c2
fix(actions): build `workflow_dispatch` only
cameronraysmith Dec 2, 2023
296234e
fix(actions): docker `workflow_dispatch` only
cameronraysmith Dec 2, 2023
96e38aa
fix(actions): CI only runs tests by default
cameronraysmith Dec 2, 2023
bcdc22d
chore(lint)
cameronraysmith Dec 2, 2023
4a63a87
fix(actions): add build-images
cameronraysmith Dec 2, 2023
ebe6074
fix(CI): rename config job
cameronraysmith Dec 2, 2023
a95f049
fix(execute): set default remote project
cameronraysmith Dec 2, 2023
900ac5b
test(CI): enable workflow debug
cameronraysmith Dec 2, 2023
2e2677b
fix(pyproject): update description
cameronraysmith Dec 2, 2023
bea9a4e
test(CI): enable test debug
cameronraysmith Dec 2, 2023
ce43908
fix(pyproject): add poe task to downgrade on cpu
cameronraysmith Dec 2, 2023
c7976ab
fix(actions): downgrade to torch cpu on setup
cameronraysmith Dec 2, 2023
1f404f5
fix(CI): move test debug step before lint
cameronraysmith Dec 2, 2023
7218a32
fix(CI): also build-images on `execute-workflow`
cameronraysmith Dec 2, 2023
3339950
fix: update runners
cameronraysmith Dec 2, 2023
74fdb80
fix(containers): add workflows extras
cameronraysmith Dec 2, 2023
220eae2
fix(codecov): add explicit config file
cameronraysmith Dec 2, 2023
dd1bd25
chore(github): add security policy
cameronraysmith Dec 2, 2023
cc6b030
fix(build-images): use name part slug as lowercase
cameronraysmith Dec 2, 2023
3bc28aa
fix: rename containerfiles dir to containers
cameronraysmith Dec 2, 2023
66570b4
fix: use containers dir
cameronraysmith Dec 2, 2023
460687e
fix(containers): install git in pkg dockerfile
cameronraysmith Dec 2, 2023
88cdacb
fix(argo): resource requests for gpu image build
cameronraysmith Dec 2, 2023
e433c91
fix: install zlib1g-dev for pybedtools compilation
cameronraysmith Dec 3, 2023
4bac31b
fix(argo): increase disk request for pkg image
cameronraysmith Dec 3, 2023
3ae341b
chore(labels): update
cameronraysmith Dec 3, 2023
72450e9
fix(codecov): set 10% threshold
cameronraysmith Dec 3, 2023
144b1ec
test(CI): disable skip-duplicate-runs
cameronraysmith Dec 3, 2023
7ee8f89
fix(test-release): only on dispatch
cameronraysmith Dec 3, 2023
535ebdf
fix(CD): add workflow
cameronraysmith Dec 3, 2023
36e6252
fix(documentation): workflow dispatch only
cameronraysmith Dec 3, 2023
2742287
fix(docs): update build
cameronraysmith Dec 3, 2023
655906f
fix: rename inactivity
cameronraysmith Dec 3, 2023
a973dc9
fix: move deprecated workflows to folder
cameronraysmith Dec 3, 2023
eab0ea0
fix(make): add workflow execution targets
cameronraysmith Dec 3, 2023
08e968f
fix(env): update example
cameronraysmith Dec 3, 2023
a4b1174
fix(make): update ghcr in `tag_images`
cameronraysmith Dec 3, 2023
81ad618
feat(conda): virtual-packages spec for conda-lock
cameronraysmith Dec 3, 2023
66f01f6
fix(pyproject): configure conda-lock
cameronraysmith Dec 3, 2023
8ab24c6
feat(conda): add conda-lock file
cameronraysmith Dec 3, 2023
5c8d6ec
fix(conda): note deprecation in manual environment
cameronraysmith Dec 3, 2023
3c898e5
fix(containers): use conda-lock env in conda image
cameronraysmith Dec 3, 2023
db66457
fix(argo): add mode parameter
cameronraysmith Dec 3, 2023
ba212aa
fix(CI): remove skip-duplicate-runs
cameronraysmith Dec 3, 2023
4dd3de2
fix(make): add explicit `run_dev` target
cameronraysmith Dec 3, 2023
938c159
fix(build-images): specify mode variable
cameronraysmith Dec 3, 2023
228c31e
fix(labels): add CI workflow configuration
cameronraysmith Dec 3, 2023
9a7e174
fix(CI): configure label-based control flow
cameronraysmith Dec 3, 2023
7148772
fix(CI): print variable values
cameronraysmith Dec 3, 2023
0409c7e
fix(CI): use standard if syntax in set-variables
cameronraysmith Dec 3, 2023
90aba9f
fix: ImportPathMismatchError caused by `./notebooks/dnadiffusion.py`
cameronraysmith Dec 3, 2023
a2a4d53
fix(conftest): catch errors for event loops
cameronraysmith Dec 3, 2023
b2a1c81
fix(pyproject): pin pytest-asyncio `<0.23.0`
cameronraysmith Dec 3, 2023
89fccdf
fix(CI): use `!` negation
cameronraysmith Dec 3, 2023
3000d5b
fix(CI): do not set default action var outputs
cameronraysmith Dec 3, 2023
0d14b44
test(CI): check var outputs
cameronraysmith Dec 3, 2023
38d7678
fix(CI): send vars to GITHUB_OUTPUT not ENV
cameronraysmith Dec 3, 2023
7da8bff
Revert "fix(CI): do not set default action var outputs"
cameronraysmith Dec 3, 2023
70b2f55
fix(CI): name action variable step
cameronraysmith Dec 3, 2023
93bae65
fix(CI): string quote negation
cameronraysmith Dec 3, 2023
487c52b
fix(CI): use string comparison
cameronraysmith Dec 3, 2023
bc04f79
fix(CI): limit docs build to ready for review
cameronraysmith Dec 3, 2023
50001de
fix(build-images): accept string input on call
cameronraysmith Dec 3, 2023
24181a5
fix(build-images): set mode env var
cameronraysmith Dec 3, 2023
e90718c
fix(build-images): use `inputs` context directly
cameronraysmith Dec 3, 2023
a04984f
fix(hydra): branch name `GITHUB_HEAD_REF` on PRs
cameronraysmith Dec 4, 2023
9035537
Revert "fix(hydra): branch name `GITHUB_HEAD_REF` on PRs"
cameronraysmith Dec 4, 2023
b066ad6
fix(hydra): add clause for detached head state
cameronraysmith Dec 4, 2023
35f602d
feat(pyproject): add plumbum to workflows deps
cameronraysmith Dec 4, 2023
123d01f
fix(hydra): docstring git_info_to_workflow_version
cameronraysmith Dec 4, 2023
0cc9b7c
fix(hydra): use plubmum instead of subprocess
cameronraysmith Dec 4, 2023
0fff5c4
fix(CI): generate flyte config file before tests
cameronraysmith Dec 4, 2023
d9f88af
fix(CI): decouple tests from image build
cameronraysmith Dec 4, 2023
2e08d25
feat(make): add target to test detached head
cameronraysmith Dec 4, 2023
bcc432a
fix(pyproject): comment hypothetical linux-aarch64
cameronraysmith Dec 4, 2023
c5e6ce3
chore(containers): add deprecated conda manual
cameronraysmith Dec 4, 2023
a9f6d22
fix(conda-lock): update cuda `12.3.0`
cameronraysmith Dec 4, 2023
22aad49
feat(containers): add micromamba image
cameronraysmith Dec 4, 2023
cc676ae
feat(argo): build conda container image
cameronraysmith Dec 4, 2023
3b02e1a
fix(build-image): build conda image
cameronraysmith Dec 4, 2023
1370bbf
fix(containers): update micromamba to user-based
cameronraysmith Dec 4, 2023
3b79a19
fix(containers): use conda-lock cli to install env
cameronraysmith Dec 4, 2023
82ef993
fix(containers): remove redundant ENV LANG
cameronraysmith Dec 4, 2023
cf31f23
fix(containers): use full path to condax
cameronraysmith Dec 4, 2023
1cabf8f
fix(container): use full path to conda-lock
cameronraysmith Dec 4, 2023
439fa3b
fix(pyproject): add pip to conda-lock pkgs
cameronraysmith Dec 4, 2023
340deda
fix(pyproject): conda-lock outputs env and lock
cameronraysmith Dec 4, 2023
52ab090
fix(conda-lock): add pip
cameronraysmith Dec 4, 2023
a974ee6
fix(containers): use ensure-path for condax
cameronraysmith Dec 4, 2023
a30cd7e
fix(containers): manually set path for local bin
cameronraysmith Dec 4, 2023
c67e817
fix(actions): use `inputs` context
cameronraysmith Dec 4, 2023
8250b56
fix(containers): manually construct home variable
cameronraysmith Dec 4, 2023
6ccfbc0
fix(conda-lock): pin to correct fork branch
cameronraysmith Dec 4, 2023
5e38c00
fix(build-images): remove set mode step
cameronraysmith Dec 4, 2023
479a5fa
fix(CI): move concurrency groups to jobs
cameronraysmith Dec 5, 2023
b8ba8c7
fix(CI): job prefix for concurrency groups
cameronraysmith Dec 5, 2023
71461a9
fix(make): get pr source branch from merge ref
cameronraysmith Dec 5, 2023
6fd8d82
test(workflows): reenable cache for all tasks
cameronraysmith Dec 5, 2023
ebdded7
fix(make): remove unused `@`s
cameronraysmith Dec 6, 2023
f82328e
fix: label
cameronraysmith Dec 6, 2023
2b07e8b
fix(HTSeq): install from fork
cameronraysmith Dec 6, 2023
08ac473
fix(pyproject): update to poetry `1.7.1`
cameronraysmith Dec 6, 2023
65a09e7
chore: lint with ruff `0.1.7`
cameronraysmith Dec 6, 2023
c045501
fix(pyproject): pin HTSeq post PR
cameronraysmith Dec 7, 2023
10534a9
feat(make): add local image build targets
cameronraysmith Dec 7, 2023
1a8f411
fix(containers): add swig for HTSeq build
cameronraysmith Dec 7, 2023
d805899
fix(pyproject): remove explicit HTSeq from conda
cameronraysmith Dec 7, 2023
67647cf
fix(conda): update lock files
cameronraysmith Dec 7, 2023
244d2fc
chore(format): use ruff
cameronraysmith Dec 7, 2023
4d39662
fix(make): use ruff to format
cameronraysmith Dec 7, 2023
3140b93
fix(gitignore): add hidden nix folders
cameronraysmith Dec 8, 2023
dbb12d6
fix(make): add devshell/nix targets
cameronraysmith Dec 8, 2023
2e2276a
feat(envrc): enable flake
cameronraysmith Dec 8, 2023
187b0f2
feat(flake): init
cameronraysmith Dec 8, 2023
eecfb0e
chore(flake): init lock
cameronraysmith Dec 8, 2023
1835b99
feat(vscode): add devcontainer recs/settings
cameronraysmith Dec 8, 2023
420df6d
feat(devcontainer): add container and config
cameronraysmith Dec 8, 2023
93d81a0
fix(env): add cachix env examples [no ci]
cameronraysmith Dec 8, 2023
6f24a3e
fix(direnv): disable flake devshell activation
cameronraysmith Dec 8, 2023
a8eac2f
bug(conda-lock): issue reporting only
cameronraysmith Dec 8, 2023
50b50a0
fix(conda-lock): manually update conda-lock files
cameronraysmith Dec 8, 2023
39a9903
fix(pyproject.toml): comments regarding conda-lock
cameronraysmith Dec 8, 2023
b32c347
fix(build): disable conda image build
cameronraysmith Dec 8, 2023
0361ce4
fix(vscode): update search and watcher excludes
cameronraysmith Dec 8, 2023
3c3eb5a
fix(vscode): exclude local venv from search/watch
cameronraysmith Dec 8, 2023
3e4cb61
fix(poetry): add local config to use `./.venv`
cameronraysmith Dec 9, 2023
d9c840d
fix(flake): disable devenv poetry config
cameronraysmith Dec 9, 2023
aa03ed6
fix(direnv): reenable flake devshell as default
cameronraysmith Dec 9, 2023
41f1fb2
fix(pyproject): refactor into smaller dep groups
cameronraysmith Dec 10, 2023
8560fca
fix(poetry): update lock
cameronraysmith Dec 10, 2023
cc60a97
feat(flake): build devshell env with poetry2nix
cameronraysmith Dec 10, 2023
fdea6ee
chore(flake): update lock
cameronraysmith Dec 10, 2023
203bbe8
feat(flyte): add config for browser auth
cameronraysmith Dec 10, 2023
7a53e99
chore(env): add variable for flytectl config template
cameronraysmith Dec 10, 2023
a172dff
fix(make): use env vars in `update_config`
cameronraysmith Dec 10, 2023
f3cdcd5
fix(flake): remove default activation of bioinformatics group
cameronraysmith Dec 10, 2023
b8be2ea
chore(flake): update lock
cameronraysmith Dec 10, 2023
65ddb09
fix(flake): add `yq-go` to devshell
cameronraysmith Dec 10, 2023
8e6e8ae
fix(devcontainer): disable direnv extension
cameronraysmith Dec 10, 2023
60a0ca6
fix(devcontainer): forward port `53593`
cameronraysmith Dec 10, 2023
1306194
fix(direnv): disable default `use flake`
cameronraysmith Dec 10, 2023
6041398
fix(poetry): add markers for sys_platform
cameronraysmith Dec 10, 2023
f62ba87
fix(pyproject): reorganize
cameronraysmith Dec 10, 2023
b8d4065
fix(setup_environment): use dep groups instead of extras
cameronraysmith Dec 10, 2023
5181346
feat(make): add codespace targets
cameronraysmith Dec 10, 2023
84d00cf
fix(flake): poetry2nix flake-utils follows flake
cameronraysmith Dec 10, 2023
e17d2f6
feat(vscode): add debug launch configuration
cameronraysmith Dec 10, 2023
6fed0fd
fix: downgrade mysql-connector-python to version with setup.py
cameronraysmith Dec 12, 2023
7dbdcf3
fix: disable mysql connector
cameronraysmith Dec 12, 2023
e1013b0
feat(make): update codespace code targets
cameronraysmith Dec 12, 2023
3856416
fix(devcontainer): move cloudcode to recs
cameronraysmith Dec 12, 2023
771b710
fix(flake): add buildInputs
cameronraysmith Dec 12, 2023
1d895ba
fix(pyproject): reorganize
cameronraysmith Dec 12, 2023
4a78dff
chore(gitignore): add manual direnv folder
cameronraysmith Dec 12, 2023
8089904
feat(flake): add script to activate flake like direnv `use flake`
cameronraysmith Dec 12, 2023
8c9d51b
feat(make): add target to call flake devshell script
cameronraysmith Dec 12, 2023
5ac91fa
fix(make): declare devshell PHONY
cameronraysmith Dec 12, 2023
a5b7308
fix(devshell): add helper script
cameronraysmith Dec 12, 2023
ae841fc
fix(docs): point to make in dev section
cameronraysmith Dec 12, 2023
2195be5
feat(make): export requirements.txt with poetry
cameronraysmith Dec 13, 2023
2853d96
fix(pyproject): additional conda-lock reqs from pypi
cameronraysmith Dec 13, 2023
b00c136
chore(conda-lock): not functional
cameronraysmith Dec 13, 2023
13272da
feat(requirements): add poetry exported pip requirements
cameronraysmith Dec 13, 2023
0a57a9f
fix(pkg.Dockerfile): separate dependency installation from package
cameronraysmith Dec 13, 2023
0dafac8
fix(gpu.Dockerfile): separate dependency installation from package
cameronraysmith Dec 13, 2023
c4be807
test(lrwine): toggle parameters to trigger rebuild
cameronraysmith Dec 13, 2023
db4f299
fix(pyproject): adopt htseq `2.0.5`
cameronraysmith Dec 15, 2023
66d663b
chore(poetry): update lock
cameronraysmith Dec 15, 2023
e0713c3
chore(conda): update lock
cameronraysmith Dec 15, 2023
a32159d
fix(devcontainer): remove make extension
cameronraysmith Dec 15, 2023
abee230
fix(flake): reenable bioinformatics group
cameronraysmith Dec 15, 2023
2069869
fix(pyproject): uniform dep naming
cameronraysmith Dec 15, 2023
dc0c742
fix(requirements): update pip requirements
cameronraysmith Dec 15, 2023
dc636fe
fix(vscode): update theme
cameronraysmith Jul 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 115 additions & 0 deletions .argo/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
namespace: argo
spec:
entrypoint: main
serviceAccountName: argo-server
templates:
- name: main
steps:
- - name: publish-pkg-container-1
templateRef:
name: cwft-kaniko
template: build-push-https
clusterScope: true
arguments:
parameters:
- name: mode
value: '{{workflow.parameters.mode}}'
- name: imageName
value: '{{workflow.parameters.imageName1}}'
- name: containerFilePath
value: '{{workflow.parameters.containerFilePath1}}'
- name: appName
value: '{{workflow.parameters.appName}}'
- name: branch
value: '{{workflow.parameters.branch}}'
- name: shortSha
value: '{{workflow.parameters.shortSha}}'
- name: containerRegistryURL1
value: '{{workflow.parameters.containerRegistryURL1}}'
- name: containerRegistryURL2
value: '{{workflow.parameters.containerRegistryURL2}}'
- name: gitUrlNoProtocol
value: '{{workflow.parameters.gitUrlNoProtocol}}'
- name: memoryRequest
value: "5Gi" # override default: 512Mi
- name: cpuRequest
value: "3" # override default: 500m
- name: memoryLimit
value: "16Gi" # override default: 2Gi
- name: cpuLimit
value: "8" # override default: 2
- name: storageRequest
value: "35Gi" # override default: 15Gi
- name: publish-gpu-container-2
templateRef:
name: cwft-kaniko
template: build-push-https
clusterScope: true
arguments:
parameters:
- name: mode
value: '{{workflow.parameters.mode}}'
- name: imageName
value: '{{workflow.parameters.imageName2}}'
- name: containerFilePath
value: '{{workflow.parameters.containerFilePath2}}'
- name: appName
value: '{{workflow.parameters.appName}}'
- name: branch
value: '{{workflow.parameters.branch}}'
- name: shortSha
value: '{{workflow.parameters.shortSha}}'
- name: containerRegistryURL1
value: '{{workflow.parameters.containerRegistryURL1}}'
- name: containerRegistryURL2
value: '{{workflow.parameters.containerRegistryURL2}}'
- name: gitUrlNoProtocol
value: '{{workflow.parameters.gitUrlNoProtocol}}'
- name: memoryRequest
value: "7Gi" # override default: 512Mi
- name: cpuRequest
value: "2" # override default: 500m
- name: memoryLimit
value: "32Gi" # override default: 2Gi
- name: cpuLimit
value: "8" # override default: 2
- name: storageRequest
value: "50Gi" # override default: 15Gi
# - name: publish-conda-container-3
# templateRef:
# name: cwft-kaniko
# template: build-push-https
# clusterScope: true
# arguments:
# parameters:
# - name: mode
# value: '{{workflow.parameters.mode}}'
# - name: imageName
# value: '{{workflow.parameters.imageName3}}'
# - name: containerFilePath
# value: '{{workflow.parameters.containerFilePath3}}'
# - name: appName
# value: '{{workflow.parameters.appName}}'
# - name: branch
# value: '{{workflow.parameters.branch}}'
# - name: shortSha
# value: '{{workflow.parameters.shortSha}}'
# - name: containerRegistryURL1
# value: '{{workflow.parameters.containerRegistryURL1}}'
# - name: containerRegistryURL2
# value: '{{workflow.parameters.containerRegistryURL2}}'
# - name: gitUrlNoProtocol
# value: '{{workflow.parameters.gitUrlNoProtocol}}'
# - name: memoryRequest
# value: "7Gi" # override default: 512Mi
# - name: cpuRequest
# value: "2" # override default: 500m
# - name: memoryLimit
# value: "32Gi" # override default: 2Gi
# - name: cpuLimit
# value: "8" # override default: 2
# - name: storageRequest
# value: "50Gi" # override default: 15Gi
4 changes: 4 additions & 0 deletions .devcontainer/devcontainer.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM ghcr.io/cachix/devenv:latest

RUN echo 'extra-substituters = https://devenv.cachix.org' >> /etc/nix/nix.conf && \
echo 'extra-trusted-public-keys = devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=' >> /etc/nix/nix.conf
35 changes: 35 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "test-devenv",
"build": {
"dockerfile": "./devcontainer.Dockerfile",
"context": ".."
},
"customizations": {
"vscode": {
"extensions": [
// "mkhl.direnv",
// vim extension breaks
// during installation
// install via `recommends`
// "vscodevim.vim@1.26.2",
"pmndrs.pmndrs",
"jnoortheen.nix-ide",
"tamasfe.even-better-toml",
"donjayamanne.python-extension-pack",
"charliermarsh.ruff",
"redhat.vscode-yaml",
"ms-kubernetes-tools.vscode-kubernetes-tools",
"ms-vsliveshare.vsli",
"eamodio.gitlens",
"GitHub.vscode-pull-request-github",
"github.vscode-github-actions",
"ms-azuretools.vscode-docker",
"ms-toolsai.jupyter",
"njzy.stats-bar",
"vscode-icons-team.vscode-icons"
]
}
},
"overrideCommand": false,
"forwardPorts": [53593]
}
15 changes: 15 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then
# source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
# fi

# if ! use flake . --impure --accept-flake-config
# then
# echo "nix flake could not be built; update flake.nix and run direnv allow/reload" >&2
# fi

# printf "\nrun \`nix flake update --impure && nix flake check --impure\` to update the flake lockfile."
# printf "\nuse \`direnv revoke\` to unload the dev environment or \`direnv allow\` to reload it.\n\n"

# not necessary if using nix flake
# devenv devshell with dotenv enabled
dotenv
58 changes: 58 additions & 0 deletions .example.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Used as admin.clientSecretEnvVar with the unhashed version of
# configuration.auth.internal.clientSecretHash
# from the flyte-binary helm chart values.yaml file
# authType: ClientSecret
# clientId: flytepropeller
# clientSecretEnvVar: FLYTE_OAUTH_CLIENT_SECRET

## nix
CACHIX_CACHE_NAME=dnadiffusion
CACHIX_AUTH_TOKEN=e1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

## Compute
GCP_PROJECT_ID=project-111111
GCP_STORAGE_SCOPES=https://www.googleapis.com/auth/devstorage.read_write
GCP_STORAGE_CONTAINER=project-111111-flyte-meta-cluster
GCP_ARTIFACT_REGISTRY_PATH=us.gcr.io/project/path

## GitHub
GH_ORG=pinellolab
GH_REPO_NAME=DNA-Diffusion
GH_REPO_NAME_SLUG=dna-diffusion
GH_REPO=pinellolab/DNA-Diffusion

## Flyte
FLYTE_CLUSTER_ENDPOINT=dns:///cluster.net
FLYTE_OAUTH_CLIENT_SECRET=O0000000000000000000000000000000
FLYTECTL_CONFIG_TEMPLATE=.flyte/config-browser.yaml
FLYTECTL_CONFIG=.flyte/config.yaml # required CI, may override constants.py

## Python
WORKFLOW_IMAGE="ghcr.io/pinellolab/dna-diffusion" # tag computed from git
LOG_LEVEL=INFO

## Makefile
WORKFLOW_PROJECT=dnadiffusion
WORKFLOW_DOMAIN=development
WORKFLOW_PACKAGE_PATH=src
WORKFLOW_IMPORT_PATH=dnadiffusion.workflows.example
WORKFLOW_NAME=wf
# WORKFLOW_IMPORT_PATH=dnadiffusion.workflows.lrwine
# WORKFLOW_NAME=training_workflow
# WORKFLOW_REGISTRATION_MODE=prod
# WORKFLOW_REGISTRATION_MODE=dev
# WORKFLOW_VERSION="repo-branch-shortsha" # override auto version
# WORKFLOW_FILE=workflows/example.py
# WORKFLOW_FILE_WORKFLOW_ARGS='{"C": 0.1, "max_iter": 1000}'
GLOBAL_IMAGE_TAG=latest
WORKFLOW_OUTPUT_FORMAT=dot

## Local development
# Toggle to use local dev cluster
# these will override the values above
#
LOCAL_CONTAINER_REGISTRY=localhost:30000
ACTIVE_DOCKERFILE=containers/pkg.Dockerfile
# FLYTECTL_CONFIG=.flyte/config-local.yaml
# WORKFLOW_IMAGE=localhost:30000/dnadiffusion
# KUBECONFIG=/path/to/user/.flyte/sandbox/kubeconfig
17 changes: 17 additions & 0 deletions .flyte/config-browser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
admin:
endpoint: ${FLYTE_CLUSTER_ENDPOINT}
# authenticate in browser via oauth2-proxy
authType: Pkce

logger:
show-source: true
level: 0
storage:
type: stow
stow:
kind: google
config:
json: ""
project_id: ${GCP_PROJECT_ID}
scopes: ${GCP_STORAGE_SCOPES}
container: ${GCP_STORAGE_CONTAINER}
8 changes: 8 additions & 0 deletions .flyte/config-local.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
admin:
endpoint: localhost:30080
insecure: true
storage:
connection:
endpoint: http://localhost:30002
access-key: minio
secret-key: miniostorage
25 changes: 25 additions & 0 deletions .flyte/config-template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
admin:
endpoint: ${FLYTE_CLUSTER_ENDPOINT}
# authenticate in browser via oauth2-proxy
# authType: Pkce

# programmatic auth for CI
# where EnvVar is the unhashed version of
# configuration.auth.internal.clientSecretHash
# from the helm chart values file
authType: ClientSecret
clientId: flytepropeller
clientSecretEnvVar: FLYTE_OAUTH_CLIENT_SECRET
insecure: false
logger:
show-source: true
level: 0
storage:
type: stow
stow:
kind: google
config:
json: ""
project_id: ${GCP_PROJECT_ID}
scopes: ${GCP_STORAGE_SCOPES}
container: ${GCP_STORAGE_CONTAINER}
3 changes: 3 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# security

To report a potential security vulnerability in tctsti, please follow the [instructions to create a draft security advisory](https://github.com/pinellolab/DNA-Diffusion/security/advisories/new).
59 changes: 59 additions & 0 deletions .github/actions/setup_environment/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: 'Setup Environment'
description: 'Shared steps to setup the environment for CI jobs'

inputs:
python_version:
description: 'Python version to setup'
required: true
debug_enabled:
description: "Run with tmate.io debugging enabled"
required: true
default: "false"
gpu_enabled:
description: "Do not downgrade to CPU libraries"
required: true
default: "false"

runs:
using: "composite"
steps:
- name: Set up Python
id: setup-python
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python_version }}
- name: Install system dependencies
shell: bash
run: |
echo "install system dependencies"
# sudo apt-get update
# sudo apt-get install -y tree
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.7.1
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
shell: bash
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --with docs,lint,test,workflows,bioinformatics --no-interaction --no-root
- name: Install project
shell: bash
run: poetry install --with docs,lint,test,workflows,bioinformatics --no-interaction
- name: Downgrade to torch CPU
if: ${{ inputs.gpu_enabled != 'true' }}
shell: bash
run: |
source $VENV
poe torch-cpu
- name: "Setup tmate debug session"
uses: mxschmitt/action-tmate@v3
if: ${{ inputs.debug_enabled == 'true' }}
15 changes: 15 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
codecov:
branch: main

comment: false
github_checks: false

coverage:
status:
project:
default:
threshold: 10%

patch: off

changes: false
8 changes: 4 additions & 4 deletions .github/workflows/build.yml → .github/deprecated/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: Build

on:
workflow_dispatch:
push:
branches:
- main
pull_request:
# push:
# branches:
# - main
# pull_request:

jobs:
test:
Expand Down
Loading