Skip to content

Commit

Permalink
Init project
Browse files Browse the repository at this point in the history
  • Loading branch information
xiachenrui committed Nov 14, 2024
0 parents commit 11f00b6
Show file tree
Hide file tree
Showing 146 changed files with 15,238 additions and 0 deletions.
96 changes: 96 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
[flake8]
ignore =
# Do not use mutable data structures for argument defaults. They are created during function definition time.
# \ All calls to the function reuse this one instance of that data structure, persisting changes between them.
B006
# Unsed variable -> sometimes we need to ignore this for debugging purposes
B007
# 1 blank line required between summary line and description
B008
# Function definition does not bind loop variabl
B023
# Unnecessary use of map - use a list comprehension instead.
C417
# Unnecessary dict comprehension - rewrite using dict().
C416
# Unnecessary dict call - rewrite as a literal.
C408
# line break before a binary operator -> black does not adhere to PEP8
W503
# line break occured after a binary operator -> black does not adhere to PEP8
W504
# line too long -> we accept long comment lines; black gets rid of long code lines
E501
# whitespace before : -> black does not adhere to PEP8
E203
# missing whitespace after ,', ';', or ':' -> black does not adhere to PEP8
E231
# continuation line over-indented for hanging indent -> black does not adhere to PEP8
E126
# too many leading '#' for block comment -> this is fine for indicating sections
E262
# Do not assign a lambda expression, use a def -> lambda expression assignments are convenient
E731
# allow I, O, l as variable names -> I is the identity matrix
E741
# Missing docstring in public package
D104
# Missing docstring in public module
D100
# Missing docstring in __init__
D107
# Missing docstring in magic method
D105
# format string does contain unindexed parameters
P101
# first line should end with a period [Bug: doesn't work with single-line docstrings]
D400
# First line should be in imperative mood; try rephrasing
D401
# Missing docstring in public method
D102
# Missing docstring in public function
D103
# One-line docstring should fit on one line with quotes
D200
# D403 First word of the first line should be properly capitalized
D403
# Section has no content
D414
# RST213 Inline emphasis start-string without end-string.
RST213
# Unnecessary list comprehension passed to all()
C419

exclude =
.git,
__pycache__,
build,
docs/_build,
dist,
experiments,
per-file-ignores =
tests/*: D
*/__init__.py: F401
extend-immutable-calls =
# Add functions returning immutable values here to avoid B008
pathlib.Path
Path
rst-roles =
class,
func,
ref,
meth,
doc,
py:class,
method,
attr,
cite:p,
cite:t,
rst-directives =
envvar,
exception,
rst-substitutions =
version,
extend-ignore =
RST307,RST210,RST201,RST203,RST301
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# ignore the special file
**.ipynb linguist-vendored
**.R linguist-vendored
**.r linguist-vendored
**.Rprofile linguist-vendored
48 changes: 48 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
name: Bug report
about: DECIPHER doesn’t do what it should? Please help us fix it!
title: ''
labels: bug
assignees: ''
---

### Please ensure:

- [ ] I have confirmed this bug exists on the **latest** version of DECIPHER. See https://github.com/gao-lab/decipher
- [ ] I follow the tutorial from the [DECIPHER tutorial](https://github.com/gao-lab/decipher).

-----------

### Minimal code sample (that we can run without your data, using public data)

> **Note**: Please fill in the following information. You could read [this ](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) for how to provide the necessary information to reproduce your bug.
**Environment information:**

- Operating system: <!-- e.g. Windows 10, Ubuntu 20.04, macOS 11.2.3 -->
- CUDA version: <!-- e.g. 11.1, None for CPU only -->
- Python version: <!-- e.g. 3.9.1 -->
- Torch version: <!-- e.g. 2.0.1 -->
- Pytorch geometric version: <!-- e.g. 2.3.0 -->
- DECIPHER version: <!-- e.g. 0.1.0 -->
- Others: <!-- Other unconventional env setup -->

**Data information:**

<!-- Please describe the data you used. -->

**Codes:**

```python
# Your code here, if you change the hyper-parameters, please also include them here.
```

**Error message:**

```python
[Paste the error output produced by the above code here]
```

**Other supplement:**
None
<!-- Anything you think is important -->
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Enhancement request
about: Anything you’d like to see in DECIPHER?
title: ''
labels: enhancement
assignees: ''
---

<!-- Please describe your feature you would like to see below: -->
...
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: Usage Question
about: Any question is welcome!
title: ''
labels: question
assignees: ''
---

<!-- Please write your question below. -->
39 changes: 39 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: build

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ 3.11 ]

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
sudo apt update
sudo apt install -y libxml2-utils pandoc
curl -sSL https://install.python-poetry.org | python3 -
pip install --upgrade pip
pip install -e ".[docs, dev]"
install_pyg_dependencies
- name: Build documentation
run: |
sphinx-build -b html docs docs/_build
78 changes: 78 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: release

on:
release:
types: [published]

jobs:
deploy:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ 3.11 ]

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
sudo apt update
sudo apt install -y libxml2-utils pandoc
curl -sSL https://install.python-poetry.org | python3 -
pip install --upgrade pip
pip install -e ".[docs, dev]"
install_pyg_dependencies
- name: Build documentation
run: |
sphinx-build -b html docs docs/_build
- name: Build package
run: |
poetry build
ls -lh dist
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

docker:
runs-on: ubuntu-latest
steps:
- name: Delete huge unnecessary tools folder
run: |
rm -rf /opt/hostedtoolcache
cd /opt
find . -maxdepth 1 -mindepth 1 '!' -path ./containerd '!' -path ./actionarchivecache '!' -path ./runner '!' -path ./runner-cache -exec rm -rf '{}' ';'
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: huhansan666666
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
dockerfile: ./Dockerfile
push: true
tags: huhansan666666/decipher:latest
88 changes: 88 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# file
*.tmp
*.xlsx
*.gif
*.dat
*.log
*.db
*.sqlite
*.h5ad
*.fq
*.pyc
*.pth
*.zip
*.csv
*.tsv
*.gz
*.rds
*.pickle
*.RData
*.Rhistory
*.pdf
*.h5
*.*pt
*.tar
*.joblib
*.dill
*.np[zy]
*.adjlist
*.pkl
*.svg
*.png
*.html
*.mm
*.rda
*.lg
*.o
*.jpg
*.svs
*.tiff
*.tif
*.TIF
._*
*.pth
*.json
*.ipynb
*.DS_Store
*.lock
*.arrow
.codecov.yaml
hyperparams.yaml
.coverage*
.snakemake_timestamp
events.**
*.txt
*.xenium
*.parquet

# folder
**/conda/
**/.cache/
**/.nv/
**/.ipython/
**/tensorboard/
**/tmp*/
**/__pycache__/
**/logs/
**/raw/
**/lightning_logs/*
**/.snakemake/

results
other/
build/
api/
.ipynb_checkpoints/
.virtual_documents/
resource/*
case/*
tests/data/*
experiments/data/*
experiments/**/*.yaml
**/explain/**.yaml

# exclude
!resource/README.md
!.vscode/*
!Dockerfile
!decipher/data/*
Loading

0 comments on commit 11f00b6

Please sign in to comment.