Skip to content

HelpersTask659_Improve_dependency_checking_for_helpers #660

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

Open
wants to merge 37 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
5369c2d
Update
gpsaggese May 4, 2025
ff93cce
Update
gpsaggese May 4, 2025
c09716a
Use llm_transform to use our style and convention
gpsaggese May 4, 2025
b1e322b
Lint
gpsaggese May 4, 2025
7f60e14
Lint
gpsaggese May 4, 2025
adb7cec
Lint
gpsaggese May 4, 2025
a9d108d
Lint
gpsaggese May 4, 2025
718df8e
Lint
gpsaggese May 5, 2025
ad39bd7
Lint
gpsaggese May 5, 2025
895ebf9
Lint
gpsaggese May 5, 2025
7a0bd46
Lint
gpsaggese May 5, 2025
e12fb11
Add TODOs
gpsaggese May 5, 2025
1e7c0ea
Add .gitignore
May 7, 2025
64eea9a
Updates: TODOs addressed
ehaabbasil May 10, 2025
ce9f005
Update: handle case for show_deps
ehaabbasil May 10, 2025
acd3039
Updates: lint fixes
ehaabbasil May 10, 2025
6239725
Update: fixed path mismatch in test_package_only_import
ehaabbasil May 11, 2025
ea045b3
Update: test_dot_output
ehaabbasil May 11, 2025
d2d72fc
Updates
ehaabbasil May 11, 2025
47746fb
Update: Typo
ehaabbasil May 11, 2025
572fb22
Update: .gitignore
ehaabbasil May 12, 2025
70652a3
Updates: styling fix and outcome
ehaabbasil May 12, 2025
1376ee8
Update: outcome test fix
ehaabbasil May 12, 2025
ccd2df6
Updates: lint fixes
ehaabbasil May 12, 2025
009a71f
Updates: comment
ehaabbasil May 13, 2025
9364a42
Merge
gpsaggese May 15, 2025
c2a9765
Update
gpsaggese May 15, 2025
b1b3230
Update
gpsaggese May 15, 2025
1c5cf8c
Updates: TODOs
ehaabbasil May 19, 2025
7d45eee
Updates: show_deps.py invoke show_deps / generate_deps
ehaabbasil May 24, 2025
1ed6808
Update gitignore
ehaabbasil May 24, 2025
4386534
Update: conflict
ehaabbasil May 24, 2025
4e78b18
Update: requirements check
ehaabbasil May 24, 2025
e669114
Resolve set_path conflict in thin_client_utils.sh
ehaabbasil Jun 3, 2025
3eab857
Resolve import conflict tasks.py
ehaabbasil Jun 3, 2025
9d4043f
Resolve conflicts tasks.py
ehaabbasil Jun 3, 2025
f89a51f
Update:tasks.py
ehaabbasil Jun 3, 2025
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
Binary file added .DS_Store
Binary file not shown.
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.coverage
dependency_graph.dot
dependency_graph.svg
dev_scripts_helpers/thin_client/build.py.log
dev_scripts_helpers/thin_client/thin_client_utils.py.log
dev_scripts_helpers/thin_client/tmp.requirements.txt
helpers.egg-info/
helpers/__pycache__/
i
import_check/__pycache__/
import_check/test/__pycache__/
report.txt
report_cycles.txt
report_max_level.txt
__pycache__/
dependency_report.txt
devops/compose/local.docker-compose.yml
tmp.precommit_output.txt
tmp.pytest.log
tmp.amp_normalize_import.txt
source
devops/compose/tmp.docker-compose.yml
2 changes: 2 additions & 0 deletions dev_scripts_helpers/thin_client/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ docker < 7
docker-compose >= 1.29.0
invoke >= 1.5.0
poetry
networkx >= 2.6.3
pydot >= 1.4.1
pytest >= 6.0.0
s3fs # For tools like `publish_notebook.py`.
tqdm
Expand Down
24 changes: 22 additions & 2 deletions dev_scripts_helpers/thin_client/thin_client_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,32 @@ set_csfy_env_vars() {


set_path() {
echo "# set_path()"
# Process interface.
dassert_eq_num_args $# 1 "set_path"
local dev_script_dir=$1
#
dassert_dir_exists $dev_script_dir
dtrace "dev_script_dir=$dev_script_dir"
# TODO(gp): Unify this as part of CmTask12257.
if [[ -n "$GIT_ROOT_DIR" ]]; then
# `GIT_ROOT_DIR` is available outside the container.
GIT_ROOT=$GIT_ROOT_DIR
elif [[ -n "$CSFY_GIT_ROOT_PATH" ]]; then
# `CSFY_GIT_ROOT_PATH` is available inside the container.
GIT_ROOT=$CSFY_GIT_ROOT_PATH
fi
export PATH=$(pwd):$PATH
dtrace "GIT_ROOT=$GIT_ROOT"
dassert_var_defined "GIT_ROOT"
export PATH=$GIT_ROOT_DIR:$PATH
# Avoid ./.mypy_cache/3.12/app/dev_scripts_helpers
DEV_SCRIPT_HELPER_DIR=$(find ${GIT_ROOT} -name dev_scripts_helpers -type d -not -path "*.mypy_cache*")
echo "DEV_SCRIPT_HELPER_DIR=$DEV_SCRIPT_HELPER_DIR"
dassert_dir_exists $DEV_SCRIPT_HELPER_DIR
dtrace "DEV_SCRIPT_HELPER_DIR=$DEV_SCRIPT_HELPER_DIR"
# Add to the PATH all the first level directory under `dev_scripts`.
export PATH_TMP="$(find $dev_script_dir -maxdepth 1 -type d -not -path "$(pwd)" | tr '\n' ':' | sed 's/:$//')"
export PATH_TMP="$(find $DEV_SCRIPT_HELPER_DIR -maxdepth 1 -type d -not -path "$(pwd)" | tr '\n' ':' | sed 's/:$//')"
dtrace "PATH_TMP=$PATH_TMP"
export PATH=$PATH_TMP:$PATH
# Remove duplicates.
export PATH=$(remove_dups $PATH)
Expand All @@ -213,6 +232,7 @@ set_path() {
}



set_pythonpath() {
local helpers_root_dir="$1"
echo "# set_pythonpath()"
Expand Down
Loading