Skip to content

Commit a985186

Browse files
authored
Merge pull request #7 from theislab/feat/update_package
update dependences
2 parents f831275 + 9223303 commit a985186

File tree

16 files changed

+454
-4
lines changed

16 files changed

+454
-4
lines changed

.editorconfig

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# http://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
indent_style = space
7+
indent_size = 4
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
charset = utf-8
11+
end_of_line = lf
12+
13+
[*.bat]
14+
indent_style = tab
15+
end_of_line = crlf
16+
17+
[LICENSE]
18+
insert_final_newline = false
19+
20+
[Makefile]
21+
indent_style = tab

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "*.*.*"
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
# will use ref/SHA that triggered it
14+
- name: Checkout code
15+
uses: actions/checkout@v3
16+
17+
- name: Set up Python 3.10
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: "3.9"
21+
22+
- name: Install poetry
23+
uses: abatilo/actions-poetry@v2.0.0
24+
with:
25+
poetry-version: 1.4.2
26+
27+
- name: Build project for distribution
28+
run: poetry build
29+
30+
- name: Check Version
31+
id: check-version
32+
run: |
33+
[[ "$(poetry version --short)" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] \
34+
|| echo ::set-output name=prerelease::true
35+
36+
- name: Publish to PyPI
37+
env:
38+
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
39+
run: poetry publish

.github/workflows/test.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: regvelo
5+
6+
on:
7+
push:
8+
branches: [main]
9+
pull_request:
10+
branches: [main]
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
python-version: ["3.9", "3.10", "3.11"]
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v2
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
- name: Cache pip
26+
uses: actions/cache@v2
27+
with:
28+
path: ~/.cache/pip
29+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
30+
restore-keys: |
31+
${{ runner.os }}-pip-
32+
- name: Install dependencies
33+
run: |
34+
pip install pytest-cov
35+
pip install .[dev]
36+
- name: Test with pytest
37+
run: |
38+
pytest --cov-report=xml --cov=velovi
39+
- name: After success
40+
run: |
41+
bash <(curl -s https://codecov.io/bash)
42+
pip list

.gitignore

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
# DS_Store
2+
.DS_Store
3+
4+
# Byte-compiled / optimized / DLL files
5+
__pycache__/
6+
*.py[cod]
7+
*$py.class
8+
9+
# C extensions
10+
*.so
11+
12+
# Distribution / packaging
13+
.Python
14+
build/
15+
develop-eggs/
16+
dist/
17+
downloads/
18+
eggs/
19+
.eggs/
20+
lib/
21+
lib64/
22+
parts/
23+
sdist/
24+
var/
25+
wheels/
26+
pip-wheel-metadata/
27+
share/python-wheels/
28+
*.egg-info/
29+
.installed.cfg
30+
*.egg
31+
MANIFEST
32+
33+
# PyInstaller
34+
# Usually these files are written by a python script from a template
35+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
36+
*.manifest
37+
*.spec
38+
39+
# Installer logs
40+
pip-log.txt
41+
pip-delete-this-directory.txt
42+
43+
# Unit test / coverage reports
44+
htmlcov/
45+
.tox/
46+
.nox/
47+
.coverage
48+
.coverage.*
49+
.cache
50+
nosetests.xml
51+
coverage.xml
52+
*.cover
53+
*.py,cover
54+
.hypothesis/
55+
.pytest_cache/
56+
57+
# Translations
58+
*.mo
59+
*.pot
60+
61+
# Django stuff:
62+
*.log
63+
local_settings.py
64+
db.sqlite3
65+
db.sqlite3-journal
66+
67+
# Flask stuff:
68+
instance/
69+
.webassets-cache
70+
71+
# Scrapy stuff:
72+
.scrapy
73+
74+
# Sphinx documentation
75+
docs/_build/
76+
77+
# PyBuilder
78+
target/
79+
80+
# Jupyter Notebook
81+
.ipynb_checkpoints
82+
83+
# IPython
84+
profile_default/
85+
ipython_config.py
86+
87+
# pyenv
88+
.python-version
89+
90+
# pipenv
91+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94+
# install all needed dependencies.
95+
#Pipfile.lock
96+
97+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
98+
__pypackages__/
99+
100+
# Celery stuff
101+
celerybeat-schedule
102+
celerybeat.pid
103+
104+
# SageMath parsed files
105+
*.sage.py
106+
107+
# Environments
108+
.env
109+
.venv
110+
env/
111+
venv/
112+
ENV/
113+
env.bak/
114+
venv.bak/
115+
116+
# Spyder project settings
117+
.spyderproject
118+
.spyproject
119+
120+
# Rope project settings
121+
.ropeproject
122+
123+
# mkdocs documentation
124+
/site
125+
126+
# mypy
127+
.mypy_cache/
128+
.dmypy.json
129+
dmypy.json
130+
131+
# Pyre type checker
132+
.pyre/
133+
134+
# vscode
135+
.vscode/settings.json
136+
docs/api/reference/
137+
*.h5ad

.pre-commit-config.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
fail_fast: false
2+
default_language_version:
3+
python: python3
4+
default_stages:
5+
- commit
6+
- push
7+
minimum_pre_commit_version: 2.16.0
8+
repos:
9+
- repo: https://github.com/psf/black
10+
rev: "23.1.0"
11+
hooks:
12+
- id: black
13+
- repo: https://github.com/asottile/blacken-docs
14+
rev: 1.13.0
15+
hooks:
16+
- id: blacken-docs
17+
- repo: https://github.com/pre-commit/mirrors-prettier
18+
rev: v3.0.0-alpha.6
19+
hooks:
20+
- id: prettier
21+
# Newer versions of node don't work on systems that have an older version of GLIBC
22+
# (in particular Ubuntu 18.04 and Centos 7)
23+
# EOL of Centos 7 is in 2024-06, we can probably get rid of this then.
24+
# See https://github.com/scverse/cookiecutter-scverse/issues/143 and
25+
# https://github.com/jupyterlab/jupyterlab/issues/12675
26+
language_version: "17.9.1"
27+
- repo: https://github.com/charliermarsh/ruff-pre-commit
28+
rev: v0.0.254
29+
hooks:
30+
- id: ruff
31+
args: [--fix, --exit-non-zero-on-fix]
32+
- repo: https://github.com/pre-commit/pre-commit-hooks
33+
rev: v4.4.0
34+
hooks:
35+
- id: detect-private-key
36+
- id: check-ast
37+
- id: end-of-file-fixer
38+
- id: mixed-line-ending
39+
args: [--fix=lf]
40+
- id: trailing-whitespace
41+
- id: check-case-conflict
42+
- repo: local
43+
hooks:
44+
- id: forbid-to-commit
45+
name: Don't commit rej files
46+
entry: |
47+
Cannot commit .rej files. These indicate merge conflicts that arise during automated template updates.
48+
Fix the merge conflicts manually and remove the .rej files.
49+
language: fail
50+
files: '.*\.rej$'

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
author = info["Weixu Wang"]
2222
copyright = f"{datetime.now():%Y}, {author}."
2323
version = info["Version"]
24-
repository_url = "https://github.com/theislab/RegVelo_repo"
24+
repository_url = "https://github.com/theislab/RegVelo"
2525

2626
# The full version, including alpha/beta/rc tags
2727
release = info["Version"]

0 commit comments

Comments
 (0)