diff --git a/.github/workflows/internal-check-python-venv-support.yml b/.github/workflows/internal-check-python-venv-support.yml index 595c892ea..596cb6dd1 100644 --- a/.github/workflows/internal-check-python-venv-support.yml +++ b/.github/workflows/internal-check-python-venv-support.yml @@ -32,10 +32,17 @@ jobs: env: USE_VIRTUAL_PYTHON_ENVIRONMENT_VENV: "true" # 1. Run the script under test to create, activate and install the virtual environment - # 2a. Run pip in dry-run mode without installing or resolving dependencies - # 2b. Suppress all pip output (stderr) - # 2c. Check if pip *would install* anything using grep - # 2d. If there are missing dependencies and the environment is incomplete, return 1 (indicates all requirements already satisfied) + # 2. Run pip install for the current environment in dry-mode with full output first to get all infos and fail on missing packages. + # 3a. The leading exclamation mark tells the shell to invert the returned exit code. + # Failing because "Would install" is missing leads to a successful execution. + # 3b. Run pip install for the current environment in dry-run mode without installing or resolving dependencies + # 3c. Suppress all pip output (stderr) + # 3d. Check if pip would install anything using grep + # 3e. If there are missing dependencies and the environment is incomplete, + # fail with code 1 (indicates all requirements already satisfied) + # + # Output installed dependencies for troubleshooting purposes:.venv/bin/pip freeze run: | - ./scripts/activatePythonEnvironment.sh - pip install --dry-run --no-deps --requirement "./requirements.txt" 2>/dev/null | grep -q "Would install" || return 1 \ No newline at end of file + source ./scripts/activatePythonEnvironment.sh + .venv/bin/pip install --dry-run --quiet --requirement requirements.txt + ! .venv/bin/pip install --dry-run --requirement requirements.txt 2>/dev/null | grep -q "Would install" \ No newline at end of file diff --git a/conda-environment.yml b/conda-environment.yml index e3c9cfaf2..b71034667 100644 --- a/conda-environment.yml +++ b/conda-environment.yml @@ -5,26 +5,26 @@ channels: - plotly - conda-forge dependencies: - - python=3.12.* - - _python_rc=* # Needed on Mac since Python >= 3.12 - - jupyter=1.1.* - - matplotlib=3.10.* - - nbconvert=7.16.* - - nbconvert-webpdf=7.16.* - - numpy=1.26.* - - pandas=2.2.* - - pip=25.0.* - - setuptools=80.9.* # opentsne uses sklearn.base uses joblib uses distutils missing in Python >= 12 (TODO use native openTSNE?) - - typing-extensions=4.12.* # Also needed for opentsne and Python >= 3.12 - - opentsne=1.0.* # to visualize node embeddings in 2D (t-SNE dimensionality reduction) - - wordcloud=1.9.* - - monotonic=1.* - - plotly=6.0.* - - python-kaleido=0.2.* # To render plotly plots. Static image export for web-based visualization libraries. - - scikit-learn=1.6.* # To try out this HDBSCAN implementation - - seaborn=0.13.* # To visualize clustering results - - optuna=4.5.* - - umap-learn=0.5.* # to visualize node embeddings in 2D (UMAP dimensionality reduction) - - shap=0.48.* + - python=3.12.9 + - _python_rc=1 # Needed on Mac since Python >= 3.12 + - jupyter=1.1.1 + - matplotlib=3.10.5 + - nbconvert=7.16.6 + - nbconvert-webpdf=7.16.6 + - numpy=1.26.4 + - pandas=2.2.3 + - pip=25.0.1 + - setuptools=80.9.0 # opentsne uses sklearn.base uses joblib uses distutils missing in Python >= 12 (TODO use native openTSNE?) + - typing-extensions=4.12.2 # Also needed for opentsne and Python >= 3.12 + - opentsne=1.0.2 # to visualize node embeddings in 2D (t-SNE dimensionality reduction) + - wordcloud=1.9.4 + - monotonic=1.6 + - plotly=6.2.0 + - python-kaleido=1.0.0 # To render plotly plots. Static image export for web-based visualization libraries. + - scikit-learn=1.6.1 # For anomaly detection HDBSCAN clustering, scores like AMI, and others + - seaborn=0.13.2 # To visualize clustering results + - optuna=4.5.0 + - umap-learn=0.5.9 # to visualize node embeddings in 2D (UMAP dimensionality reduction) + - shap=0.48.0 - pip: - - neo4j==5.28.* \ No newline at end of file + - neo4j==5.28.2 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 5e12b5ce7..6ed2b65d2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,30 +4,30 @@ # NOTE: Keep this file in sync with conda-environment.yml # --- Core tools --- -jupyter==1.1.* -matplotlib==3.10.* -nbconvert[webpdf]==7.16.* -numpy==1.26.* -pandas==2.2.* -pip==25.0.* -setuptools==80.9.* # opentsne uses sklearn.base uses joblib uses distutils missing in Python >= 12 (TODO use native openTSNE?) -typing-extensions==4.12.* # Needed for opentsne and Python >= 3.12 +jupyter==1.1.1 +matplotlib==3.10.5 +nbconvert[webpdf]==7.16.6 +numpy==1.26.4 +pandas==2.2.3 +pip==25.0.1 +setuptools==80.9.0 # opentsne uses sklearn.base uses joblib uses distutils missing in Python >= 12 (TODO use native openTSNE?) +typing-extensions==4.12.2 # Needed for opentsne and Python >= 3.12 # --- Visualization --- -wordcloud==1.9.* -monotonic==1.* -plotly[kaleido]==6.2.* -seaborn==0.13.* # To visualize clustering results +wordcloud==1.9.4 +monotonic==1.6 +plotly[kaleido]==6.2.0 +seaborn==0.13.2 # To visualize clustering results # --- Machine Learning / Optimization --- -scikit-learn==1.6.* -optuna==4.5.* -umap-learn==0.5.* # Dimensionality reduction to visualize node embeddings in 2D +scikit-learn==1.6.1 +optuna==4.5.0 +umap-learn==0.5.8 # Dimensionality reduction to visualize node embeddings in 2D # --- Database connector --- -neo4j==5.28.* +neo4j==5.28.2 # --- Native/scientific packages (may require compilation) --- # These are included but may cause install errors in pip/venv -opentsne==1.0.* # Dimensionality reduction to visualize node embeddings in 2D. Might get replaced by umap. -shap==0.48.* # For e.g. explaining anomaly detection results \ No newline at end of file +opentsne==1.0.2 # Dimensionality reduction to visualize node embeddings in 2D. Might get replaced by umap. +shap==0.48.0 # For e.g. explaining anomaly detection results \ No newline at end of file