-
Notifications
You must be signed in to change notification settings - Fork 1
Dev v0.0.2 data preprocess #3
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
e490d0b
Add config.yml to .gitignore to prevent tracking of configuration files
wli51 6f818e1
Add config.yml.template
wli51 9965e3b
Add data wrangling script for DepMap PRISM dataset preprocessing
wli51 96565ea
Add test for wrangle_depmap_prism script execution
wli51 aba3db4
Add processed_depmap_prism_ic50.csv to .gitignore to prevent tracking…
wli51 c14df83
Add VSCode settings for Python environment and Jupyter notebook confi…
wli51 3433e20
Add utility function for detecting if running in notebook, make a sep…
wli51 f2f9d0d
Elevante IN_NOTEBOOK detection to a utils module of an importable sub…
wli51 ace7201
Move notebook under subdir notebook
wli51 cfe2bdd
Update default markers in pathing utility to include .env and LICENSE
wli51 8764ad9
Add pyproject.toml for nbutils package configuration
wli51 2127824
Add script to convert Jupyter notebooks to Python scripts
wli51 929dbf7
Update README.md with project setup instructions for notebook and scr…
wli51 1f4c740
Use external json schema for config yml validation
wli51 cca528e
Make data wrangling notebook always save plots and only skip showing …
wli51 6e5ebd9
Refactor test script path and improve assertion error message formatting
wli51 39e4e45
Update README.md with configuration requirements and analysis noteboo…
wli51 3791ad5
Update analysis README.md to rename notebook and improve formatting
wli51 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,9 @@ | ||
// .vscode/settings.json | ||
{ | ||
"python.envFile": "${workspaceFolder}/.env", | ||
"python.analysis.extraPaths": [ | ||
"agentic_system/src", | ||
"analysis/src" | ||
], | ||
"jupyter.notebookFileRoot": "${workspaceFolder}" | ||
} |
This file contains hidden or 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 hidden or 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,51 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
# Resolve repo root | ||
if git rev-parse --show-toplevel &>/dev/null; then | ||
REPO_ROOT="$(git rev-parse --show-toplevel)" | ||
else | ||
# Fallback: repo root is parent of this script's directory twice | ||
REPO_ROOT="$(realpath "$(dirname "$0")"/..)" | ||
fi | ||
|
||
NB_ROOT="$REPO_ROOT/analysis/notebooks" | ||
OUT_ROOT="$REPO_ROOT/analysis/scripts" | ||
|
||
# Optional --force flag to rebuild everything | ||
FORCE=0 | ||
if [[ "${1:-}" == "--force" ]]; then | ||
FORCE=1 | ||
fi | ||
|
||
echo "Repo root: $REPO_ROOT" | ||
echo "Notebook root: $NB_ROOT" | ||
echo "Output root: $OUT_ROOT" | ||
echo | ||
|
||
mkdir -p "$OUT_ROOT" | ||
|
||
# Find all notebooks (skip checkpoints) | ||
while IFS= read -r -d '' nb; do | ||
rel="${nb#$NB_ROOT/}" # path relative to NB_ROOT | ||
dest_dir="$OUT_ROOT/$(dirname "$rel")" # mirror folder structure | ||
base="$(basename "$rel" .ipynb)" # filename without .ipynb | ||
out_path="$dest_dir/$base.py" | ||
|
||
mkdir -p "$dest_dir" | ||
|
||
if [[ $FORCE -eq 0 && -f "$out_path" && "$nb" -ot "$out_path" ]]; then | ||
echo "Up to date: $rel" | ||
continue | ||
fi | ||
|
||
echo "Converting: $rel -> ${out_path#$REPO_ROOT/}" | ||
jupyter nbconvert \ | ||
--to script \ | ||
--output-dir "$dest_dir" \ | ||
"$nb" | ||
|
||
done < <(find "$NB_ROOT" -type f -name '*.ipynb' -not -path '*/.ipynb_checkpoints/*' -print0) | ||
|
||
echo | ||
echo "Done." |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding this file's details to the readme.