Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust data loaders to directory-wise set-up #38

Merged
merged 190 commits into from
Jan 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
190 commits
Select commit Hold shift + click to select a range
4b4f029
fixed missing replacment in functino call over multiple lines
davidsebfischer Dec 10, 2020
02c139f
fixed subtissue field reference
davidsebfischer Dec 10, 2020
f44a3cd
remove remaining new_index attributes from _convert_and_set_var_names
le-ander Dec 11, 2020
1d38480
fixed not container field access in human_kidney_2019_10x_stewart_001_10
davidsebfischer Dec 11, 2020
1f0eef6
fixed download website to be able to contain multiple entries in meta…
davidsebfischer Dec 11, 2020
62e6b43
fixed download properties
davidsebfischer Dec 11, 2020
f316a6b
Merge branch 'human_data_loader_fixes' of https://github.com/theislab…
davidsebfischer Dec 11, 2020
c30758d
formalised source attribute
davidsebfischer Dec 11, 2020
226a45f
reformatted .uns specues attribute setting
davidsebfischer Dec 11, 2020
92d0abf
call super init in datasetgroup constructors
le-ander Dec 11, 2020
48ebe8d
fixed bug in usage of META_DATA_FIELDS
davidsebfischer Dec 11, 2020
aa936f1
Merge branch 'human_data_loader_fixes' of https://github.com/theislab…
davidsebfischer Dec 11, 2020
c79974e
applied temporary fix in accessing download_meta
davidsebfischer Dec 11, 2020
f387dea
fixed bug in setting download attributes to NOne
davidsebfischer Dec 11, 2020
0fe8d76
fixed bug in human blood data loader
davidsebfischer Dec 11, 2020
d14893a
added healthy and state_exact to meta
davidsebfischer Dec 11, 2020
4701acd
fixed download attribute in braga et al
davidsebfischer Dec 11, 2020
0082772
moved assignments into anndata into base load()
davidsebfischer Dec 11, 2020
823930f
added support for variable uns and obs setting of data meta data that…
davidsebfischer Dec 11, 2020
187bc89
added support for gene name conversion in super()load()
davidsebfischer Dec 11, 2020
449cc9d
added support to check for equiality of column entries to condition s…
davidsebfischer Dec 11, 2020
a2e3dc1
moved _mapped_features into constants
davidsebfischer Dec 11, 2020
020161c
introduced cell ontology obs keys into base class
davidsebfischer Dec 11, 2020
a0818d2
added setter check to species attribute in data loading
davidsebfischer Dec 11, 2020
0eb7788
added remaining loading hyperparameters into unadded remaining loadin…
davidsebfischer Dec 11, 2020
1ce2065
fixed type hinting for species_allowed_entries
davidsebfischer Dec 11, 2020
55bb123
updated cellxgene data loader to new constant field standards
davidsebfischer Dec 11, 2020
265a53c
coupled .annotated to obs keys that indicate presence of cell types
davidsebfischer Dec 11, 2020
b2f0c4b
added dev stage and age meta data
davidsebfischer Dec 11, 2020
642980f
fixed loading of cell-wise or data set-wide attributes
davidsebfischer Dec 11, 2020
c1dcc48
refactored UNS_STRING_META_IN_OBS as constant
davidsebfischer Dec 11, 2020
6ebc2b7
updated cellxgene data loader to new data loading format
davidsebfischer Dec 11, 2020
600f418
fixed doc string
davidsebfischer Dec 11, 2020
da43df8
updated mouse data loaders to new formaupdated mouse data loaders to …
davidsebfischer Dec 11, 2020
d41ec60
removed redundant code
davidsebfischer Dec 11, 2020
bef177c
finished tms loaders
davidsebfischer Dec 11, 2020
1a606af
removed redundant code
davidsebfischer Dec 11, 2020
f9bb39f
updated available terms in MCA and TMS field containers
davidsebfischer Dec 11, 2020
71ce59a
updated interactive data set
davidsebfischer Dec 11, 2020
3964a64
grouped mouse loaders by study
davidsebfischer Dec 11, 2020
730a0ab
fixed mouse groups
davidsebfischer Dec 11, 2020
b9e5212
refactor human datasets (moving most attributes into constructor)
le-ander Dec 12, 2020
5f3ec99
added example hcl collection super class
davidsebfischer Dec 12, 2020
a6b9088
fix bug in mouse adipose dataloader
le-ander Dec 13, 2020
ee7555a
refactor human datasets by study and SO. MUCH. MORE.
le-ander Dec 14, 2020
1a3251f
updated hcl loaders to work with super class
davidsebfischer Dec 14, 2020
1b93898
made all human data loaders raw data loaders
davidsebfischer Dec 14, 2020
4595e08
added new auto chaching
davidsebfischer Dec 14, 2020
da575fb
added download method into base class
davidsebfischer Dec 14, 2020
078e015
removed separate caching from hcl
davidsebfischer Dec 14, 2020
2eb2c38
small fixes
le-ander Dec 15, 2020
f9cfc34
fix sample name of hcl colon datasets
le-ander Dec 15, 2020
b34ecc2
fixed redundant reference to fn in tms dataset constructo
davidsebfischer Dec 15, 2020
25d498f
Merge branch 'human_data_loader_fixes' of https://github.com/theislab…
davidsebfischer Dec 15, 2020
533d0d0
remove fn also in mca and hcl
le-ander Dec 15, 2020
1e47716
inherit atlas adata fields from sfaira adata fields
le-ander Dec 15, 2020
cf7fa09
remove adata_fields for template dataloaders
le-ander Dec 15, 2020
0460a06
replace explicit parent class call with super()
le-ander Dec 15, 2020
92a3c28
use "organsism" instead of "species" across sfaira and optimise imports
le-ander Dec 15, 2020
5ba1403
remove references to dataset specific adata_ids
le-ander Dec 15, 2020
cdc2bad
remove references to dataset specific adata_ids
le-ander Dec 15, 2020
d1c3791
add missing newline
le-ander Dec 15, 2020
2991792
Revert "use "organsism" instead of "species" across sfaira and optimi…
le-ander Dec 15, 2020
fb9c56e
rename species to organism
le-ander Dec 15, 2020
28af26d
remove self in super init call
le-ander Dec 15, 2020
a0a85e2
add cache_path to DatasetGroup constructor
le-ander Dec 15, 2020
3621849
replace more baseclass calls with super()
le-ander Dec 15, 2020
8e8756b
added standardized reading from cache
davidsebfischer Dec 16, 2020
b654bd5
moved constant code into TMS super class
davidsebfischer Dec 16, 2020
d7bee96
redirected data laoder of hcl to access hcl only data folder rather t…
davidsebfischer Dec 16, 2020
99f278f
update readthedocs data description
davidsebfischer Dec 16, 2020
71727f8
add cache directory creation
le-ander Dec 17, 2020
c2a1b5c
added preprint to rtfd and readme
davidsebfischer Dec 18, 2020
5cad9fe
Merge branch 'human_data_loader_fixes' of https://github.com/theislab…
davidsebfischer Dec 18, 2020
5a5b330
fixed example code block
davidsebfischer Dec 18, 2020
46a2967
exluded data loader tests from git path
davidsebfischer Jan 4, 2021
eec0bf6
added missing cache path in meta data script
davidsebfischer Jan 4, 2021
b0dccb7
explicitly added cache path into all data set constructors
davidsebfischer Jan 4, 2021
4acca62
buffered missing meta data entries in meta data table
davidsebfischer Jan 4, 2021
c1331bd
added missing atrribute initialisations into base constructor
davidsebfischer Jan 4, 2021
27944a4
buffered laoding meta data if meta data is not yet prepared
davidsebfischer Jan 4, 2021
0ab8e5d
fixed bug upon missing meta data
davidsebfischer Jan 4, 2021
9fb16a0
fixed bugs and readability of meta data conversion and added attribut…
davidsebfischer Jan 4, 2021
10bfcab
propagated caching and raw reading parameters into all methods that u…
davidsebfischer Jan 4, 2021
01386c1
fixed bug in load meta
davidsebfischer Jan 4, 2021
e5b0f6b
fixed bug in switch
davidsebfischer Jan 4, 2021
ad52045
fixed handling of healthy attribute as bool
davidsebfischer Jan 4, 2021
5b1f658
added formatting check for meta data
davidsebfischer Jan 4, 2021
b9e04f2
corrected usage of meta dtypes
davidsebfischer Jan 4, 2021
1f9818c
fixed year entry to be int
davidsebfischer Jan 4, 2021
6285c4d
added value and erasing protection
davidsebfischer Jan 4, 2021
1b83ec9
simplified allowed entries code
davidsebfischer Jan 4, 2021
5169883
fixed type hinting
davidsebfischer Jan 4, 2021
aa8a8ba
fixed bug in __value_protection
davidsebfischer Jan 4, 2021
fac3550
caught further exception in __value_protection
davidsebfischer Jan 4, 2021
d23e78a
moved template data loaders into doi specific folder
davidsebfischer Jan 4, 2021
4c0a20e
restructured thompson data loading
davidsebfischer Jan 4, 2021
e222484
took out external.py files from data loaders to make directories leaner
davidsebfischer Jan 4, 2021
eae12da
added directory oriented, automated data set groups for mouse
davidsebfischer Jan 4, 2021
74c0814
added super group for each organism
davidsebfischer Jan 4, 2021
2e861f3
added sfaira wide super groups and super groups nesting
davidsebfischer Jan 4, 2021
17392a2
fixed refactoring induced path error in anatomically grouper data set…
davidsebfischer Jan 4, 2021
99bb2a2
fixed import error
davidsebfischer Jan 4, 2021
5651bea
merged human and mouse data directories
davidsebfischer Jan 4, 2021
ab64916
fixed remaining issues in refactoring
davidsebfischer Jan 4, 2021
aae6273
fixed refactor issue in location of human data sets
davidsebfischer Jan 4, 2021
096e08a
depreceated group.py and half way through fixing refactor bug in huma…
davidsebfischer Jan 4, 2021
fefd823
fixed remaining bugs in human data loaders introduced by refactor
davidsebfischer Jan 4, 2021
f126c4d
restructured data centred extra dependencies
davidsebfischer Jan 5, 2021
282769c
enabled parallelised loading
davidsebfischer Jan 5, 2021
63268a5
enabled error handling in loading parallelisation
davidsebfischer Jan 5, 2021
36107e1
removed incorrect assert
davidsebfischer Jan 5, 2021
8e82a9e
allowed multiple parallelisations in meta data loading
davidsebfischer Jan 5, 2021
370675a
fixed argumnet passing to meta data writing script
davidsebfischer Jan 5, 2021
9249fef
fixed bug in previous commit
davidsebfischer Jan 5, 2021
7bc7afc
fixed bug in parallelisation of loading
davidsebfischer Jan 5, 2021
899cc84
switched from starmap_async to starmap
davidsebfischer Jan 5, 2021
cf9e30b
tried to mitigate multiprocessing pickling error
davidsebfischer Jan 5, 2021
d00e9d6
refactor static map function
davidsebfischer Jan 5, 2021
438c630
fixed bug in passing tuple to map fn
davidsebfischer Jan 5, 2021
8fcffd3
changed DatasetGroup to be a used class, not just abstract and introd…
davidsebfischer Jan 5, 2021
e25a060
fixed cellxgene group
davidsebfischer Jan 5, 2021
9ce1a3e
fixed bug in meta data script
davidsebfischer Jan 5, 2021
3bd64be
fixed bug in flattening
davidsebfischer Jan 5, 2021
a064e62
improved dataset group doc strings
davidsebfischer Jan 5, 2021
add00d7
disabled loading paralellisation if there is only one dataset in group
davidsebfischer Jan 5, 2021
cb55f6e
added default empty class map into Dataset constructor
davidsebfischer Jan 5, 2021
558d9bd
grouped subsetting code together
davidsebfischer Jan 5, 2021
36f9e8a
added template dataset test and excluded this from hereon in gitignore
davidsebfischer Jan 5, 2021
715f4b1
fixed remaining "human" bugs originating from refactor
davidsebfischer Jan 5, 2021
3c4b417
added missing organism statements
davidsebfischer Jan 7, 2021
ea8bc06
simplified data loading with custom actions on data sets
davidsebfischer Jan 7, 2021
5ac7c84
simplified custom and standardised functions for multiprocessing
davidsebfischer Jan 7, 2021
1aca54c
renamed loading functions in DatasetGroup to follow DatasetBase funct…
davidsebfischer Jan 7, 2021
cb23337
fixed usage of multiprocessing pool
davidsebfischer Jan 7, 2021
27c3d9f
fixed closing of worker pool
davidsebfischer Jan 7, 2021
9925129
caught exception of missing cell types in meta data writint pg
davidsebfischer Jan 7, 2021
a262fc5
added auto extraction of a streamlined group from group.py via Datase…
davidsebfischer Jan 7, 2021
c8ba864
fixed reading of group.py and dataset wise loaders to be alternative
davidsebfischer Jan 7, 2021
c47307d
refactored unknown cell type identification
davidsebfischer Jan 7, 2021
5279d04
fixed bug in last commit
davidsebfischer Jan 7, 2021
2e584e3
enabled additive gene version collapse
davidsebfischer Jan 7, 2021
e434978
fixed _convert_and_set_var_names
davidsebfischer Jan 7, 2021
0616e86
fixed bug in last commit
davidsebfischer Jan 7, 2021
92163b0
added debugging to _convert_and_set_var_names
davidsebfischer Jan 8, 2021
ee780a1
fixed serial loading
davidsebfischer Jan 9, 2021
339d4eb
updated meta reporting
davidsebfischer Jan 10, 2021
c807f94
fixed missing doi nan mention
davidsebfischer Jan 10, 2021
152e3f3
coutneracted name space shadowing in meta data writing
davidsebfischer Jan 10, 2021
e25da3f
fixed bug in sequential loading
davidsebfischer Jan 10, 2021
115ee94
fixed write meta
davidsebfischer Jan 10, 2021
1a92fb9
fixed bug in collapsing gene counts
davidsebfischer Jan 10, 2021
fd7cbab
clear datasets from memory after copying during backed writing. close…
le-ander Jan 11, 2021
8c99e70
fixed bug in meta data writing and in MCA base loader
davidsebfischer Jan 11, 2021
4ccc167
Merge branch 'human_data_loader_fixes' of https://github.com/theislab…
davidsebfischer Jan 11, 2021
8803db5
removed debugging prints
davidsebfischer Jan 11, 2021
d9d7937
fixed HCL loading
davidsebfischer Jan 11, 2021
cac8a69
fixed UI bug with interactive dataset
davidsebfischer Jan 11, 2021
1f4e377
improved data loader documentation
davidsebfischer Jan 11, 2021
7893bd2
depreceated subtissue
davidsebfischer Jan 11, 2021
2df8c78
fixed interactive data loader
davidsebfischer Jan 11, 2021
81f1e59
removed bad check for healthy attribute in meta data setting of adata
davidsebfischer Jan 11, 2021
653c924
move organ annotation to obs_key_orag property
le-ander Jan 11, 2021
b4458a3
fixed directory formatted doi
davidsebfischer Jan 11, 2021
04a7706
Merge branch 'human_data_loader_fixes' of https://github.com/theislab…
davidsebfischer Jan 11, 2021
af624ff
fixed meta data loading error
davidsebfischer Jan 12, 2021
f851ebc
fixed missing refactor bug
davidsebfischer Jan 12, 2021
ab5dd44
added xlrd dependency
davidsebfischer Jan 13, 2021
3bff6a0
fixed xlsx loading
davidsebfischer Jan 13, 2021
91012b9
removed HCL notebook
davidsebfischer Jan 13, 2021
ecf8039
added gc into clearing
davidsebfischer Jan 14, 2021
51d4b8d
add CI, fix #71 and minor architecture improvements (#72)
Zethson Jan 14, 2021
532795d
removed check SNAPSHOT wf
Zethson Jan 14, 2021
1d1bf1f
added README badge
Zethson Jan 14, 2021
d2da74b
fix docs badge style
Zethson Jan 14, 2021
efeb0e5
Merge pull request #76 from theislab/feature/docs_badge
Zethson Jan 14, 2021
a2fae71
fixed hcl loader
davidsebfischer Jan 15, 2021
2dfc5e5
Merge branch 'human_data_loader_fixes' of https://github.com/theislab…
davidsebfischer Jan 15, 2021
68f5052
fixed hcl loaders
davidsebfischer Jan 16, 2021
8060d10
tooked out sub_tissue from all data laoders
davidsebfischer Jan 16, 2021
7c2bcde
fixed syntax bug
davidsebfischer Jan 16, 2021
dd59424
fixed whitespace bugs
davidsebfischer Jan 16, 2021
4e772c9
homogenized string style to ""
davidsebfischer Jan 16, 2021
29444c3
fixed bugs introduced by refactor
davidsebfischer Jan 16, 2021
f3aa906
fixed hcl base loader
davidsebfischer Jan 16, 2021
1c4a8a2
enabled rapid raw loading of groups saved in one object
davidsebfischer Jan 17, 2021
3ad33d0
fixed hcl base loader
davidsebfischer Jan 17, 2021
7ba74ba
fixed typing in various places
davidsebfischer Jan 18, 2021
3c4ffcb
Merge branch 'dev' into human_data_loader_fixes
davidsebfischer Jan 18, 2021
314895d
remove superflous raw loading docstrings
le-ander Jan 18, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions .bandit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### profile may optionally select or skip tests

# (optional) list included tests here:
tests: []

# (optional) list skipped tests here:
skips: ['B101', 'B403', 'B404', 'B603', 'B607', 'B301', 'B303', 'B311', 'B310']
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Bug report
about: Create a bug report to help us improve
title: 'Bug Summary'
labels: ''
assignees: ''

---

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

**To Reproduce**
Steps to reproduce the behavior:
1. ...
2. ...
3. ...

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

**System [please complete the following information]:**
- OS: e.g. [Ubuntu 20.04]
- Language Version: [e.g. Python 3.9]
- Virtual environment: [e.g. Conda]

**Additional context**
Add any other context about the problem here.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest a new feature
title: 'Feature Request Summary'
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.

**Additional context**
Add any other context or screenshots about the feature request here.
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/general_question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: General question
about: Ask a question about anything related to this project
title: 'Question'
labels: ''
assignees: ''

---

**Question**

Please ask your question here. It can be about the usage of this project, the internals, the implementation or whatever interests you.
Please use the BUG template for bugs, and the FEATURE REQUEST template for feature requests.
25 changes: 25 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: 2
updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: daily
time: "04:00"
open-pull-requests-limit: 99
target-branch: development
labels:
- dependabot
commit-message:
prefix: "[DEPENDABOT]"

- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
time: "04:00"
open-pull-requests-limit: 99
target-branch: development
labels:
- dependabot
commit-message:
prefix: "[DEPENDABOT]"
19 changes: 19 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Many thanks for contributing to sfaira!

**PR Checklist**
Please fill in the appropriate checklist below (delete whatever is not relevant). These are the most common things requested on pull requests (PRs).

- [ ] This comment contains a description of changes (with reason)
- [ ] Referenced issue is linked
- [ ] If you've fixed a bug or added code that should be tested, add tests!
- [ ] Documentation in `docs` is updated
- [ ] `docs/release-notes.rst` is updated

**Description of changes**
Please state what you've changed and how it might affect the user.

**Technical details**
Please state any technical details such as limitations, reasons for additional dependencies, benchmarks etc. here.

**Additional context**
Add any other context or screenshots here.
42 changes: 42 additions & 0 deletions .github/workflows/build_package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build sfaira Package

on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
python: [3.7, 3.8]
env:
PYTHONIOENCODING: utf-8

steps:
- uses: actions/checkout@v2
name: Check out source-code repository

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

- name: Upgrade and install pip
run: python -m pip install --upgrade pip

- name: Build sfaira
run: pip install .

- name: Import sfaira
run: python -c "import sfaira"

# Verify that the package does adhere to PyPI's standards
- name: Install required twine packaging dependencies
run: pip install setuptools wheel twine

- name: Build twine package
run: python setup.py sdist bdist_wheel

- name: Check twine package
run: twine check dist/*
34 changes: 34 additions & 0 deletions .github/workflows/pr_to_master_from_patch_release_only.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: PR to master branch from patch/release branch only

on:
pull_request:
branches:
- master

jobs:
test:
runs-on: ubuntu-latest
steps:
# PRs to the repository master branch are only ok if coming from any patch or release branch
- name: Check PRs
run: |
{ [[ $GITHUB_HEAD_REF = *"release"* ]]; } || [[ $GITHUB_HEAD_REF == *"patch"* ]]

# If the above check failed, post a comment on the PR explaining the failure
# NOTE - this may not work if the PR is coming from a fork, due to limitations in GitHub actions secrets
- name: Post PR comment
if: failure()
uses: mshick/add-pr-comment@v1
with:
message: |
Hi @${{ github.event.pull_request.user.login }},

It looks like this pull-request is has been made against the ${{github.event.pull_request.head.repo.full_name}} `master` branch.
The `master` branch should always contain code from the latest release.
Because of this, PRs to `master` are only allowed if they come from any ${{github.event.pull_request.head.repo.full_name}} `release` or `patch` branch.

You do not need to close this PR, you can change the target branch to `development` by clicking the _"Edit"_ button at the top of this page.

Thanks again for your contribution!
repo-token: ${{ secrets.GITHUB_TOKEN }}
allow-repeats: false
42 changes: 42 additions & 0 deletions .github/workflows/publish_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build Documentation

on:
push:
paths:
- "docs/**"
pull_request:
paths:
- "docs/**"

jobs:
build:

runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"

steps:
- uses: actions/checkout@v2
name: Check out source-code repository

- name: Setup Python
uses: actions/setup-python@v2.1.4
with:
python-version: 3.8

- name: Install pip
run: python -m pip install --upgrade pip

- name: Install doc dependencies
run: pip install -r docs/requirements.txt

- name: Build docs
run: |
cd docs
make html

- name: Deploy
if: ${{ github.ref == 'refs/heads/master' && github.event_name == 'push' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html
31 changes: 31 additions & 0 deletions .github/workflows/publish_package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish sfaira to PyPI

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
steps:
- uses: actions/checkout@v2
name: Check out source-code repository

- name: Set up Python
uses: actions/setup-python@v2.1.4
with:
python-version: '3.9'

- name: Install pip, setuptools, wheel, twine
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine

- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
30 changes: 30 additions & 0 deletions .github/workflows/run_bandit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Run bandit

on:
push:
paths:
- "**/*.py"
pull_request:
paths:
- "**/*.py"

jobs:
build:

runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"

steps:
- uses: actions/checkout@v2
name: Check out source-code repository

- name: Setup Python
uses: actions/setup-python@v2.1.4
with:
python-version: 3.9

- name: Install bandit
run: pip install bandit

- name: Run bandit
run: bandit -r sfaira -c .bandit.yml
31 changes: 31 additions & 0 deletions .github/workflows/run_flake8_linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Run flake8 linting

on:
push:
paths:
- "**/*.py"
pull_request:
paths:
- "**/*.py"

jobs:
lint:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"

steps:
- uses: actions/checkout@v2
name: Check out source-code repository

- name: Setup Python
uses: actions/setup-python@v2.1.4
with:
python-version: 3.9

- name: Install pip
run: python -m pip install --upgrade pip

- name: Lint with flake8
run: |
pip install flake8
flake8 .
Loading