-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add validation for `use_slurm` flag in input.go * Add job file creation and sbatch function This commit adds the functionality to create a job file and run sbatch. It includes the implementation of the `CreateJobHeader`, `CreateJobBody`, `PrepareJobFile`, and `Sbatch` functions. Tests for these functions have also been added. * Refactor job file creation and remove unnecessary test cases * Add support for Slurm job submission This commit adds support for submitting jobs using Slurm. It checks if there is a `job.sh` file in the run directory and if so, it uses `sbatch` to submit the job. Otherwise, it continues to use the existing command to run the job. Additionally, a new method `PrepareJobFile` is added to create the `job.sh` file. * upgrade trunk * Update execution mode key in input validation * update dev container setup * update main.go * Refactor Job struct and add support for detecting submitted jobs * Add FindNewestLogFile function to utils.go and corresponding unit test This commit adds a new function called FindNewestLogFile to the utils.go file. This function finds the newest log file in a given directory by comparing the modification times of all the files in the directory. It also includes a corresponding unit test in the utils_test.go file to verify the functionality of the new function. * Add logging for job status and elapsed time
- Loading branch information
1 parent
29effac
commit b550eaa
Showing
17 changed files
with
526 additions
and
46 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
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,16 +1,24 @@ | ||
{ | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
"dockerfile": "Dockerfile", | ||
}, | ||
"features": { | ||
"ghcr.io/devcontainers/features/go:1": {}, | ||
"ghcr.io/devcontainers/features/git:1": {} | ||
"ghcr.io/devcontainers/features/git:1": {}, | ||
}, | ||
"postCreateCommand": "sudo /app/start.sh", | ||
"postCreateCommand": "sudo bash /app/start.sh", | ||
"customizations": { | ||
"vscode": { | ||
"extensions": ["golang.go", "GitHub.copilot"] | ||
} | ||
"extensions": ["golang.go", "GitHub.copilot"], | ||
"settings": { | ||
"terminal.integrated.defaultProfile.linux": "bash", | ||
"terminal.integrated.profiles.linux": { | ||
"zsh": { | ||
"path": "/bin/bash", | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
"containerUser": "dev" | ||
"containerUser": "dev", | ||
} |
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 |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
*logs | ||
*actions | ||
*notifications | ||
*tools | ||
plugins | ||
user_trunk.yaml | ||
user.yaml | ||
tmp |
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,4 @@ | ||
# Following source doesn't work in most setups | ||
ignored: | ||
- SC1090 | ||
- SC1091 |
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,10 @@ | ||
rules: | ||
quoted-strings: | ||
required: only-when-needed | ||
extra-allowed: ["{|}"] | ||
empty-values: | ||
forbid-in-block-mappings: true | ||
forbid-in-flow-mappings: true | ||
key-duplicates: {} | ||
octal-values: | ||
forbid-implicit-octal: true |
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,27 +1,38 @@ | ||
# This file controls the behavior of Trunk: https://docs.trunk.io/cli | ||
# To learn more about the format of this file, see https://docs.trunk.io/reference/trunk-yaml | ||
version: 0.1 | ||
cli: | ||
version: 1.5.1 | ||
version: 1.19.0 | ||
# Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins) | ||
plugins: | ||
sources: | ||
- id: trunk | ||
ref: v0.0.12 | ||
ref: v1.4.2 | ||
uri: https://github.com/trunk-io/plugins | ||
lint: | ||
enabled: | ||
- git-diff-check | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
disabled: | ||
- shellcheck | ||
- actionlint | ||
# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes) | ||
runtimes: | ||
enabled: | ||
- go@1.19.5 | ||
- go@1.21.0 | ||
- [email protected] | ||
- [email protected] | ||
# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration) | ||
lint: | ||
enabled: | ||
- [email protected] | ||
- [email protected] | ||
- git-diff-check | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
actions: | ||
enabled: | ||
- trunk-announce | ||
|
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,12 +1,8 @@ | ||
#!/bin/bash | ||
#=============================================================================== | ||
HADDOCK3_DIR="$HOME/repos/haddock3" | ||
|
||
### Activate the virtual environment | ||
## if your haddock3 installation uses venv | ||
source "$HADDOCK3_DIR/venv/bin/activate" || exit | ||
## if your haddock3 installation uses conda | ||
# conda activate haddock3 | ||
source /opt/conda/etc/profile.d/conda.sh | ||
conda activate env | ||
|
||
haddock3 "$@" | ||
#=============================================================================== |
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
Oops, something went wrong.