Skip to content
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

Refactor to cookiecutter template from scverse. #35

Merged
merged 1 commit into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
40 changes: 20 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
name: Check Build

on:
push:
branches: [main]
pull_request:
branches: [main]
push:
branches: [main]
pull_request:
branches: [main]

jobs:
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: "**/pyproject.toml"
- name: Install build dependencies
run: python -m pip install --upgrade pip wheel twine build
- name: Build package
run: python -m build
- name: Check package
run: twine check --strict dist/*.whl
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: "**/pyproject.toml"
- name: Install build dependencies
run: python -m pip install --upgrade pip wheel twine build
- name: Build package
run: python -m build
- name: Check package
run: twine check --strict dist/*.whl
46 changes: 23 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
name: Release

on:
push:
tags:
- "*.*.*"
push:
tags:
- "*.*.*"

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
# will use ref/SHA that triggered it
- name: Checkout code
uses: actions/checkout@v3
release:
name: Release
runs-on: ubuntu-latest
steps:
# will use ref/SHA that triggered it
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install hatch
run: |
pip install hatch
- name: Install hatch
run: |
pip install hatch

- name: Build project for distribution
run: hatch build
- name: Build project for distribution
run: hatch build

- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}
94 changes: 47 additions & 47 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,57 +4,57 @@
name: PopV

on:
push:
branches: [main]
pull_request:
branches: [main]
push:
branches: [main]
pull_request:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 40
defaults:
run:
shell: bash -e {0} # -e to fail on error
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 40
defaults:
run:
shell: bash -e {0} # -e to fail on error

strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
python: "3.9"
- os: ubuntu-latest
python: "3.10"
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
python: "3.9"
- os: ubuntu-latest
python: "3.10"

env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python }}
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python }}

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
cache: "pip"
cache-dependency-path: "**/pyproject.toml"
- name: Install test dependencies
run: |
python -m pip install --upgrade pip wheel
- name: Install dependencies
run: |
pip install pytest-cov
pip install ${{ matrix.pip-flags }} ".[dev]"
- name: Test
env:
MPLBACKEND: agg
PLATFORM: ${{ matrix.os }}
DISPLAY: :42
run: |
pytest -v --cov --color=yes
- name: Upload coverage
uses: codecov/codecov-action@v3
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
cache: "pip"
cache-dependency-path: "**/pyproject.toml"
- name: Install test dependencies
run: |
python -m pip install --upgrade pip wheel
- name: Install dependencies
run: |
pip install pytest-cov
pip install ${{ matrix.pip-flags }} ".[dev]"
- name: Test
env:
MPLBACKEND: agg
PLATFORM: ${{ matrix.os }}
DISPLAY: :42
run: |
pytest -v --cov --color=yes
- name: Upload coverage
uses: codecov/codecov-action@v3
12 changes: 6 additions & 6 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Run to check if valid
# curl --data-binary @codecov.yml https://codecov.io/validate
coverage:
status:
project:
default:
target: 85%
threshold: 1%
patch: off
status:
project:
default:
target: 85%
threshold: 1%
patch: off

ignore:
14 changes: 2 additions & 12 deletions docs/notebooks/tabula_sapiens_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -566,25 +566,15 @@
" ref_batch_key=ref_batch_key,\n",
" unknown_celltype_label=unknown_celltype_label,\n",
" save_path_trained_models=output_model_fn,\n",
" cl_obo_folder=\"ontology/\",\n",
" cl_obo_folder=\"./PopV/popv/ontology/\",\n",
" prediction_mode=\"inference\", # 'fast' mode gives fast results (does not include BBKNN and Scanorama and makes more inaccurate predictions)\n",
" n_samples_per_label=n_samples_per_label,\n",
" accelerator=\"cpu\",\n",
" accelerator=\"cuda\",\n",
" compute_embedding=True,\n",
" hvg=None,\n",
").adata"
]
},
{
"cell_type": "code",
"execution_count": 18,
"id": "f523194b",
"metadata": {},
"outputs": [],
"source": [
"adata.uns['_accelerator'] = 'cpu'"
]
},
{
"cell_type": "code",
"execution_count": 19,
Expand Down
Loading
Loading