Skip to content

Commit

Permalink
chore: troubleshooting CI
Browse files Browse the repository at this point in the history
  • Loading branch information
noamteyssier committed Oct 2, 2024
1 parent 4ac8366 commit 76d4191
Showing 1 changed file with 23 additions and 90 deletions.
113 changes: 23 additions & 90 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Python Package CI

on: [push]

env:
UV_SYSTEM_PYTHON: 1

jobs:
ci:
needs: [ostest, full-ci]
Expand All @@ -19,90 +22,29 @@ jobs:
python-version: ["3.10", "3.11"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v4

- name: Install uv and create venv
run: |
python -m pip install --upgrade pip
pip install uv
uv venv
- name: Debug - Check venv
run: |
echo "Python version:"
python --version
echo "Pip version:"
pip --version
echo "Virtual env path:"
echo $VIRTUAL_ENV
echo "Python path:"
which python
- name: Install uv
uses: astral-sh/setup-uv@v3

- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}

- name: Install project
run: |
. .venv/bin/activate
uv pip install -vv -e .[dev]
echo "Installed packages:"
pip list
- name: Debug - Check installation
run: |
. .venv/bin/activate
echo "Current directory:"
pwd
echo "Directory contents:"
ls -R
echo "Pip show geomux:"
pip show -f geomux
echo "Python path:"
python -c "import sys; print(sys.path)"
echo "Try importing geomux:"
python -c "import geomux; print(geomux.__file__)"
- name: Debug - Print Python path and package contents
run: |
. .venv/bin/activate
python -c "import sys; print(sys.path)"
python -c "import geomux; print(dir(geomux)); print(geomux.__file__)"
- name: Debug - Check package structure
run: |
. .venv/bin/activate
pip show -f geomux
- name: Debug - Print __main__.py contents
run: |
echo "Contents of __main__.py:"
cat geomux/__main__.py
uv sync --all-extras --dev
- name: Test with pytest
run: |
. .venv/bin/activate
pytest -v
- name: Debug - Check Python path for CLI
run: |
. .venv/bin/activate
python -c "import sys; import geomux; print(sys.path); print(geomux.__file__)"
which geomux
- name: Debug - Run module directly
run: |
. .venv/bin/activate
python -m geomux -i example/example.tsv.gz -o results_table.tab
uv run pytest -v
- name: Test table io from commandline
run: |
. .venv/bin/activate
geomux -i example/example.tsv.gz -o results_table.tab
uv run geomux -i example/example.tsv.gz -o results_table.tab
- name: Test adat io from commandline
run: |
. .venv/bin/activate
geomux -i example/example.h5ad -o results_table.tab
uv run geomux -i example/example.h5ad -o results_table.tab
ostest:
runs-on: ${{ matrix.os }}
Expand All @@ -112,35 +54,26 @@ jobs:
os: ["windows-latest", "macos-latest"]

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- uses: actions/checkout@v4

- name: Install uv and create venv
run: |
python -m pip install --upgrade pip
pip install uv
uv venv
- name: Install uv
uses: astral-sh/setup-uv@v3

- name: Set up Python 3.11
run: uv python install 3.11

- name: Install project
run: |
. .venv/bin/activate # Use 'call .venv\Scripts\activate' on Windows
uv pip install -e .[dev]
pip list
uv sync --all-extras --dev
- name: Test with pytest
run: |
. .venv/bin/activate # Use 'call .venv\Scripts\activate' on Windows
pytest -v
uv run pytest -v
- name: Test table io from commandline
run: |
. .venv/bin/activate # Use 'call .venv\Scripts\activate' on Windows
geomux -i example/example.tsv.gz -o results_table.tab
uv run geomux -i example/example.tsv.gz -o results_table.tab
- name: Test adat io from commandline
run: |
. .venv/bin/activate # Use 'call .venv\Scripts\activate' on Windows
geomux -i example/example.h5ad -o results_table.tabg
uv run geomux -i example/example.h5ad -o results_table.tab

0 comments on commit 76d4191

Please sign in to comment.