Skip to content

Commit

Permalink
Merge branch 'main' into feature/gpu_ci
Browse files Browse the repository at this point in the history
  • Loading branch information
ivirshup authored Jul 21, 2023
2 parents b616478 + bd47cf9 commit 01f6aa8
Show file tree
Hide file tree
Showing 126 changed files with 5,724 additions and 1,795 deletions.
187 changes: 102 additions & 85 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,92 +1,109 @@
trigger:
- master
- main

variables:
PIP_CACHE_DIR: $(Pipeline.Workspace)/.pip
RUN_COVERAGE: no
PYTEST_ADDOPTS: --color=yes --junitxml=junit/test-results.xml
PRERELEASE_DEPENDENCIES: no

jobs:
- job: PyTest
pool:
vmImage: 'ubuntu-22.04'
strategy:
matrix:
Python310:
python.version: '3.10'
RUN_COVERAGE: yes
Python38:
python.version: '3.8'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'

- task: Cache@2
inputs:
key: '"python $(python.version)" | "$(Agent.OS)" | pyproject.toml'
restoreKeys: |
python | "$(Agent.OS)"
python
path: $(PIP_CACHE_DIR)
displayName: Cache pip packages

- script: |
python -m pip install --upgrade pip
pip install pytest-cov wheel
pip install .[dev,test]
displayName: 'Install dependencies'
- script: |
pip list
displayName: 'Display installed versions'
- script: |
pytest --color=yes --junitxml=junit/test-results.xml
displayName: 'PyTest'
condition: eq(variables['RUN_COVERAGE'], 'no')
- script: |
pytest --color=yes --junitxml=junit/test-results.xml --cov --cov-report=xml --cov-context=test
displayName: 'PyTest (coverage)'
condition: eq(variables['RUN_COVERAGE'], 'yes')
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/**/htmlcov'
condition: eq(variables['RUN_COVERAGE'], 'yes')

- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFiles: 'junit/test-*.xml'
testRunTitle: 'Publish test results for Python $(python.version)'

- script: bash <(curl -s https://codecov.io/bash)
displayName: 'Upload to codecov.io'
condition: eq(variables['RUN_COVERAGE'], 'yes')

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

- task: UsePythonVersion@0
inputs:
versionSpec: '3.10'
displayName: 'Use Python 3.10'

- script: |
python -m pip install --upgrade pip
pip install build twine
displayName: 'Install build tools and requirements'
- script: pip list
displayName: 'Display installed versions'

- script: |
python -m build --sdist --wheel .
twine check dist/*
displayName: 'Build & Twine check'
- job: PyTest
pool:
vmImage: "ubuntu-22.04"
strategy:
matrix:
Python310:
python.version: "3.10"
RUN_COVERAGE: yes
Python38:
python.version: "3.8"
PreRelease:
python.version: "3.10"
PRERELEASE_DEPENDENCIES: yes
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: "$(python.version)"
displayName: "Use Python $(python.version)"

- task: Cache@2
inputs:
key: '"python $(python.version)" | "$(Agent.OS)" | pyproject.toml'
restoreKeys: |
python | "$(Agent.OS)"
python
path: $(PIP_CACHE_DIR)
displayName: Cache pip packages

- script: |
python -m pip install --upgrade pip
pip install pytest-cov wheel
pip install .[dev,test]
displayName: "Install dependencies"
condition: eq(variables['PRERELEASE_DEPENDENCIES'], 'no')
- script: |
python -m pip install --pre --upgrade pip
pip install --pre pytest-cov wheel
pip install --pre .[dev,test]
displayName: "Install dependencies release candidates"
condition: eq(variables['PRERELEASE_DEPENDENCIES'], 'yes')
- script: |
pip list
displayName: "Display installed versions"
- script: |
pytest
displayName: "PyTest"
condition: eq(variables['RUN_COVERAGE'], 'no')
- script: |
pytest --cov --cov-report=xml --cov-context=test
displayName: "PyTest (coverage)"
condition: eq(variables['RUN_COVERAGE'], 'yes')
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: "$(System.DefaultWorkingDirectory)/**/coverage.xml"
reportDirectory: "$(System.DefaultWorkingDirectory)/**/htmlcov"
condition: eq(variables['RUN_COVERAGE'], 'yes')

- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFiles: "junit/test-*.xml"
testRunTitle: "Publish test results for Python $(python.version)"

- script: bash <(curl -s https://codecov.io/bash)
displayName: "Upload to codecov.io"
condition: eq(variables['RUN_COVERAGE'], 'yes')

- job: CheckBuild
pool:
vmImage: "ubuntu-22.04"
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: "3.10"
displayName: "Use Python 3.10"

- script: |
python -m pip install --upgrade pip
pip install build twine
displayName: "Install build tools and requirements"
- script: pip list
displayName: "Display installed versions"

- script: |
python -m build --sdist --wheel .
twine check dist/*
displayName: "Build & Twine check"
- script: |
pip install dist/*.whl
python -c 'import anndata; print(anndata.__version__)'
displayName: "Check runtime version"
4 changes: 2 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 88

[*.py]
indent_size = 4
indent_style = space

[*.{yml,yaml}]
indent_size = 2
43 changes: 0 additions & 43 deletions .flake8

This file was deleted.

61 changes: 61 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Bug report
description: anndata 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 anndata.
required: true
- label: (optional) I have confirmed this bug exists on the master branch of anndata.
required: false
- type: markdown
attributes:
value: |
**Note**: Please read [this guide][] detailing how to provide the necessary information for us to reproduce your bug.
[this guide]: https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports
- type: textarea
id: Report
attributes:
label: Report
description: |
Describe the bug you encountered, and what you were trying to do. Please use [github markdown][] features for readability.
[github markdown]: https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax
value: |
Code:
```python
```
Traceback:
```pytb
```
validations:
required: true
- type: textarea
id: versions
attributes:
label: Versions
description: |
Which version of anndata and other related software you used.
Please install `session-info`, run the following command, then paste the results into the text box below.
```python
>>> import anndata, session_info; session_info.show(html=False, dependencies=True)
```
render: python
validations:
required: true
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.
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Enhancement request
description: Anything you’d like to see in anndata?
#title: ...
labels: [enhancement]
#assignees: []
body:
- type: textarea
id: description
attributes:
label: |
Please describe your wishes and possible alternatives to achieve the desired result.
validations:
required: true
3 changes: 3 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- [ ] Closes #
- [ ] Tests added
- [ ] Release note added (or unnecessary)
18 changes: 0 additions & 18 deletions .github/actions/close-stale.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/actions/label-stale.yml

This file was deleted.

Loading

0 comments on commit 01f6aa8

Please sign in to comment.