Skip to content

Commit

Permalink
Merge branch 'main' into edit_req
Browse files Browse the repository at this point in the history
  • Loading branch information
namsaraeva committed Dec 10, 2024
2 parents edc1274 + 7409b41 commit 8213bb2
Show file tree
Hide file tree
Showing 508 changed files with 7,577 additions and 50,992 deletions.
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Bug report
about: Create a report to help us improve
title: ""
labels: ""
assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request
about: Suggest an idea for this project
title: ""
labels: ""
assignees: ""
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
2 changes: 1 addition & 1 deletion .github/additional_files/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,4 @@ dependencies:
- zarr==2.18.2
- zict==3.0.0
- zipp==3.19.0
- xarray==2024.5.0
- xarray==2024.5.0
104 changes: 71 additions & 33 deletions .github/workflows/generate_documentation.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,81 @@
# This is a basic workflow to help you get started with Actions

name: Build Documentation
name: Build and Deploy Documentation

on: [push]
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build-linux:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 5

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: set up Pandoc
uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: '3.1.11' # The pandoc version to download (if necessary) and use.
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda install -y python=3.10
conda env update --file .github/additional_files/environment.yml --name base
- name: Install package
run: |
pip install ./
- name: Install Sphinx and additional dependences
run: |
sudo apt install pandoc
pip install sphinx sphinx-rtd-theme==2.0.0 sphinx-autodoc-typehints sphinx-argparse nbsphinx renku-sphinx-theme
- name: Generate Documentation
run: |
cd docs_source
make clean
make html
- uses: actions/checkout@v4
- name: Setup pip cache
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: set up Pandoc
uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: "3.1.11" # The pandoc version to download (if necessary) and use.
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda install -y python=3.10
sudo apt install pandoc
pip install ."[dev]"/
#conda env update --file .github/additional_files/environment.yml --name base
- uses: Mushus/checkout-submodule@v1
with:
basePath: .
submodulePath: ./examples/notebooks
- name: Generate Documentation
run: |
cd docs
make clean
make html
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
name: github-pages
path: docs/_build/html/

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
49 changes: 29 additions & 20 deletions .github/workflows/unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,32 @@ jobs:
max-parallel: 5

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda install -y python=3.10
conda env update --file .github/additional_files/environment.yml --name base
- name: Install package
run: |
pip install ./
- name: Test with pytest
run: |
pip install pytest
pytest
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Add conda to system path
run: |
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda install -y python=3.10
conda env update --file .github/additional_files/environment.yml --name base
- name: Install package
run: |
pip install uv
uv pip install --system .
- name: Install pre-commit
run: |
uv pip install --system pre-commit
- name: Run pre-commit checks
run: |
pre-commit install
pre-commit run --all-files
- name: Test with pytest
run: |
uv pip install --system pytest
pytest
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ development/
development.ipynb
config_test.yml
segmentation_workflows/
scportrait_data/


#do not track output generated by sphinx-gallery
sg_execution_times.rst
docs/auto_examples/

# Byte-compiled / optimized / DLL files
__pycache__/
Expand All @@ -21,6 +27,7 @@ __pycache__/
# Distribution / packaging
.Python
build/
_build/
develop-eggs/
dist/
downloads/
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "examples/notebooks"]
path = examples/notebooks
url = https://github.com/MannLabs/scPortrait-notebooks.git
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/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
exclude: |
(?x)(
docs/|
docs_source/|
example_data/
)
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.2
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --unsafe-fixes]
- id: ruff-format
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.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: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
hooks:
- id: mypy
args: [--no-strict-optional, --ignore-missing-imports]
additional_dependencies:
["types-requests", "types-attrs", "types-PyYAML"]
- 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$'
22 changes: 11 additions & 11 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities
Expand Down Expand Up @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include src/pretrained_models
include src/pretrained_models
Loading

0 comments on commit 8213bb2

Please sign in to comment.