Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Kim committed Sep 13, 2023
0 parents commit fe3c4d7
Show file tree
Hide file tree
Showing 38 changed files with 1,741 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .codecov.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Based on pydata/xarray
codecov:
require_ci_to_pass: no

coverage:
status:
project:
default:
# Require 1% coverage, i.e., always succeed
target: 1
patch: false
changes: false

comment:
layout: diff, flags, files
behavior: once
require_base: no
23 changes: 23 additions & 0 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"template": "https://github.com/scverse/cookiecutter-scverse",
"commit": "8a4b931453619c21ee88c66222d313b935e6e274",
"checkout": null,
"context": {
"cookiecutter": {
"project_name": "embedding-scvi",
"package_name": "embedding_scvi",
"project_description": "A very interesting piece of code",
"author_full_name": "Martin Kim",
"author_email": "[email protected]",
"github_user": "martinkim0",
"project_repo": "https://github.com/YosefLab/embedding-scvi",
"license": "MIT License",
"_copy_without_render": [
".github/workflows/**.yaml",
"docs/_templates/autosummary/**.rst"
],
"_template": "https://github.com/scverse/cookiecutter-scverse"
}
},
"directory": null
}
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{yml,yaml}]
indent_size = 2

[.cruft.json]
indent_size = 2

[Makefile]
indent_style = tab
89 changes: 89 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Bug report
description: Report something that is broken or incorrect
labels: bug
body:
- type: markdown
attributes:
value: |
**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports)
detailing how to provide the necessary information for us to reproduce your bug. In brief:
* Please provide exact steps how to reproduce the bug in a clean Python environment.
* In case it's not clear what's causing this bug, please provide the data or the data generation procedure.
* Sometimes it is not possible to share the data, but usually it is possible to replicate problems on publicly
available datasets or to share a subset of your data.
- type: textarea
id: report
attributes:
label: Report
description: A clear and concise description of what the bug is.
validations:
required: true

- type: textarea
id: versions
attributes:
label: Version information
description: |
Please paste below the output of
```python
import session_info
session_info.show(html=False, dependencies=True)
```
placeholder: |
-----
anndata 0.8.0rc2.dev27+ge524389
session_info 1.0.0
-----
asttokens NA
awkward 1.8.0
backcall 0.2.0
cython_runtime NA
dateutil 2.8.2
debugpy 1.6.0
decorator 5.1.1
entrypoints 0.4
executing 0.8.3
h5py 3.7.0
ipykernel 6.15.0
jedi 0.18.1
mpl_toolkits NA
natsort 8.1.0
numpy 1.22.4
packaging 21.3
pandas 1.4.2
parso 0.8.3
pexpect 4.8.0
pickleshare 0.7.5
pkg_resources NA
prompt_toolkit 3.0.29
psutil 5.9.1
ptyprocess 0.7.0
pure_eval 0.2.2
pydev_ipython NA
pydevconsole NA
pydevd 2.8.0
pydevd_file_utils NA
pydevd_plugins NA
pydevd_tracing NA
pygments 2.12.0
pytz 2022.1
scipy 1.8.1
setuptools 62.5.0
setuptools_scm NA
six 1.16.0
stack_data 0.3.0
tornado 6.1
traitlets 5.3.0
wcwidth 0.2.5
zmq 23.1.0
-----
IPython 8.4.0
jupyter_client 7.3.4
jupyter_core 4.10.0
-----
Python 3.9.13 | packaged by conda-forge | (main, May 27 2022, 16:58:50) [GCC 10.3.0]
Linux-5.18.6-arch1-1-x86_64-with-glibc2.35
-----
Session information updated at 2022-07-07 17:55
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Scverse Community Forum
url: https://discourse.scverse.org/
about: If you have questions about “How to do X”, please ask them here.
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Feature request
description: Propose a new feature for embedding-scvi
labels: enhancement
body:
- type: textarea
id: description
attributes:
label: Description of feature
description: Please describe your suggestion for a new feature. It might help to describe a problem or use case, plus any alternatives that you have considered.
validations:
required: true
29 changes: 29 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Check Build

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

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

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
30 changes: 30 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release

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

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

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

- name: Install hatch
run: pip install hatch

- 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_API_TOKEN }}
59 changes: 59 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Test

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

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

jobs:
test:
runs-on: ${{ matrix.os }}
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"
- os: ubuntu-latest
python: "3.10"
pip-flags: "--pre"

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 ${{ matrix.pip-flags }} ".[dev,test]"
- name: Test
env:
MPLBACKEND: agg
PLATFORM: ${{ matrix.os }}
DISPLAY: :42
run: |
pytest -v --cov --color=yes
- name: Upload coverage
uses: codecov/codecov-action@v3
28 changes: 28 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Temp files
.DS_Store
*~
buck-out/

# Compiled files
.venv/
__pycache__/
.mypy_cache/
.ruff_cache/

# Distribution / packaging
/build/
/dist/
/*.egg-info/

# Tests and coverage
/.pytest_cache/
/.cache/
/data/

# docs
/docs/generated/
/docs/_build/

# IDEs
/.idea/
/.vscode/
50 changes: 50 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
fail_fast: false
default_language_version:
python: python3
default_stages:
- commit
- push
minimum_pre_commit_version: 2.16.0
repos:
- repo: https://github.com/psf/black
rev: "23.9.1"
hooks:
- id: black
- repo: https://github.com/asottile/blacken-docs
rev: 1.16.0
hooks:
- id: blacken-docs
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
hooks:
- id: prettier
# Newer versions of node don't work on systems that have an older version of GLIBC
# (in particular Ubuntu 18.04 and Centos 7)
# EOL of Centos 7 is in 2024-06, we can probably get rid of this then.
# See https://github.com/scverse/cookiecutter-scverse/issues/143 and
# https://github.com/jupyterlab/jupyterlab/issues/12675
language_version: "17.9.1"
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.289
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: detect-private-key
- id: check-ast
- id: end-of-file-fixer
- id: mixed-line-ending
args: [--fix=lf]
- id: trailing-whitespace
- id: check-case-conflict
- repo: local
hooks:
- id: forbid-to-commit
name: Don't commit rej files
entry: |
Cannot commit .rej files. These indicate merge conflicts that arise during automated template updates.
Fix the merge conflicts manually and remove the .rej files.
language: fail
files: '.*\.rej$'
16 changes: 16 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# https://docs.readthedocs.io/en/stable/config-file/v2.html
version: 2
build:
os: ubuntu-20.04
tools:
python: "3.10"
sphinx:
configuration: docs/conf.py
# disable this for more lenient docs builds
fail_on_warning: true
python:
install:
- method: pip
path: .
extra_requirements:
- doc
Loading

0 comments on commit fe3c4d7

Please sign in to comment.