Skip to content

Commit

Permalink
Merge branch 'master' into regress_out
Browse files Browse the repository at this point in the history
  • Loading branch information
flying-sheep authored Jul 25, 2023
2 parents 66582b5 + d08518f commit 3be56a6
Show file tree
Hide file tree
Showing 124 changed files with 1,150 additions and 750 deletions.
30 changes: 21 additions & 9 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,29 @@ trigger:
variables:
python.version: '3.9'
PIP_CACHE_DIR: $(Pipeline.Workspace)/.pip
PYTEST_ADDOPTS: '-v --color=yes --nunit-xml=nunit/test-results.xml'
ANNDATA_DEV: no
RUN_COVERAGE: no
TEST_EXTRA: 'test-full'
PRERELEASE_DEPENDENCIES: no

jobs:
- job: PyTest
pool:
vmImage: 'ubuntu-18.04'
vmImage: 'ubuntu-22.04'
strategy:
matrix:
Python37:
python.version: '3.7'
Python38:
python.version: '3.8'
Python39: {}
minimal_tests:
TEST_EXTRA: 'test-min'
anndata_dev:
python.version: '3.9'
ANNDATA_DEV: yes
RUN_COVERAGE: yes
PRERELEASE_DEPENDENCIES: yes

steps:
- task: UsePythonVersion@0
inputs:
Expand All @@ -45,9 +49,17 @@ jobs:
- script: |
python -m pip install --upgrade pip
pip install pytest-cov wheel
pip install wheel coverage
pip install .[dev,$(TEST_EXTRA)]
displayName: 'Install dependencies'
condition: eq(variables['PRERELEASE_DEPENDENCIES'], 'no')
- script: |
python -m pip install --pre --upgrade pip
pip install --pre wheel coverage
pip install --pre .[dev,$(TEST_EXTRA)]
displayName: 'Install dependencies release candidates'
condition: eq(variables['PRERELEASE_DEPENDENCIES'], 'yes')
- script: |
pip install -v "anndata[dev,test] @ git+https://github.com/scverse/anndata"
Expand All @@ -58,21 +70,21 @@ jobs:
pip list
displayName: 'Display installed versions'
- script: |
pytest --color=yes --ignore=scanpy/tests/_images --nunit-xml="nunit/test-results.xml"
- script: pytest
displayName: 'PyTest'
condition: eq(variables['RUN_COVERAGE'], 'no')

- script: |
pytest --color=yes --ignore=scanpy/tests/_images --nunit-xml="nunit/test-results.xml" --cov=scanpy --cov-report=xml
coverage run -m pytest
coverage xml
displayName: 'PyTest (coverage)'
condition: eq(variables['RUN_COVERAGE'], 'yes')
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/**/htmlcov'
failIfCoverageEmpty: true
condition: eq(variables['RUN_COVERAGE'], 'yes')

- task: PublishTestResults@2
Expand All @@ -88,7 +100,7 @@ jobs:

- job: CheckBuild
pool:
vmImage: 'ubuntu-18.04'
vmImage: 'ubuntu-22.04'
steps:

- task: UsePythonVersion@0
Expand Down
37 changes: 0 additions & 37 deletions .flake8

This file was deleted.

60 changes: 60 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Bug report
description: Scanpy doesn’t do what it should? Please help us fix it!
#title: ...
labels: ['Bug 🐛']
#assignees: []
body:
- type: checkboxes
id: terms
attributes:
label: Please make sure these conditions are met
# description: ...
options:
- label: I have checked that this issue has not already been reported.
required: true
- label: I have confirmed this bug exists on the latest version of scanpy.
required: true
- label: (optional) I have confirmed this bug exists on the master branch of scanpy.
required: false
- 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.
- type: textarea
id: description
attributes:
label: What happened?
description: Describe what you tried to do, and what happened instead.
validations:
required: true
- type: textarea
id: code
attributes:
label: Minimal code sample
description: (that we can copy&paste without having any data)
render: python
validations:
required: true
- type: textarea
id: traceback
attributes:
label: Error output
description: Produced by the code above. Leave empty if the issue is unexpected behavior instead of an error.
render: pytb
validations:
required: false
- type: textarea
id: versions
attributes:
label: Versions
description: Paste the output of `import scanpy; scanpy.logging.print_versions()` between the lines of backticks (\`\`\`)
value: |
<details>
```
```
</details>
validations:
required: true
34 changes: 0 additions & 34 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

17 changes: 0 additions & 17 deletions .github/ISSUE_TEMPLATE/enhancement-request.md

This file was deleted.

23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Enhancement request
description: Anything you’d like to see in scanpy?
#title: ...
labels: ['Enhancement ✨']
#assignees: []
body:
- type: dropdown
id: kind
attributes:
label: What kind of feature would you like to request?
options:
- 'Additional function parameters / changed functionality / changed defaults?'
- 'New analysis tool: A simple analysis tool you have been using and are missing in `sc.tools`?'
- 'New plotting function: A kind of plot you would like to seein `sc.pl`?'
- 'Other?'
validations:
required: true
- type: textarea
id: description
attributes:
label: Please describe your wishes
validations:
required: true
13 changes: 0 additions & 13 deletions .github/ISSUE_TEMPLATE/question.md

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/check-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Pull Request Validation

on:
pull_request:
branches:
- main
- master
types:
# milestone changes
- milestoned
- demilestoned
# label changes for “no milestone”
- labeled
- unlabeled
# initial check
- opened
- edited
- reopened
# code change (e.g. this workflow)
- synchronize

env:
LABELS: ${{ join( github.event.pull_request.labels.*.name, '|' ) }}

jobs:
check-milestone:
name: Check Milestone
runs-on: ubuntu-latest
steps:
- if: github.event.pull_request.milestone == null && contains( env.LABELS, 'no milestone' ) == false
run: exit 1
11 changes: 8 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,24 @@
/docs/_build/
/docs/generated/
/docs/data/
/docs/api/generated
/docs/external/generated
/docs/jupyter_execute

# tests
/*coverage*
/nunit/
/.cache/
/.pytest_cache/
/scanpy/tests/test*.h5ad
/scanpy/tests/figures/
/scanpy/tests/notebooks/figures/

# Environment management
/hatch.toml
/Pipfile
/Pipfile.lock
/requirements*.lock

# always-ignore extensions
*~
Expand All @@ -29,6 +36,7 @@ __pycache__/
/scanpy.egg-info/
/*-env/
/env-*/
/environment.yml

# OS stuff
.DS_Store
Expand All @@ -39,6 +47,3 @@ Thumbs.db
# IDEs and editors
/.idea/
/.vscode/

# Test artifacts
**/test-results.xml
16 changes: 7 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
repos:
- repo: https://github.com/psf/black
rev: 23.1.0
rev: 23.7.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.280
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v2.0.1
hooks:
- id: autopep8
args: ["-i"]
- id: ruff
args: ["--fix"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
Expand All @@ -25,6 +21,8 @@ repos:
- id: check-yaml
- id: check-merge-conflict
- id: detect-private-key
- id: no-commit-to-branch
args: ["--branch=master", "--branch=main"]

ci:
autofix_prs: false
Loading

0 comments on commit 3be56a6

Please sign in to comment.