Skip to content

Commit 6b516a1

Browse files
authored
Merge pull request #48 from lldelisle/fix_pypi
Release 17.1
2 parents 340de4b + 74a6b3a commit 6b516a1

22 files changed

+412
-465
lines changed

.github/workflows/pylint.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Pylint
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
- uses: mamba-org/setup-micromamba@main
11+
with:
12+
environment-file: ./HiCMatrix_env_ci.yml
13+
cache-downloads: true
14+
environment-name: HiCMatrix_env_ci
15+
- name: Analysing the code with pylint
16+
run: |
17+
# Disable
18+
# C0103: Invalid name
19+
# C0114: Missing module docstring
20+
# C0115: Missing class docstring
21+
# C0116: Missing function or method docstring
22+
# C0301: Line too long
23+
# C0302: Too many lines in module
24+
# R0801: Similar lines
25+
# R0902: Too many instance attributes
26+
# R0904: Too many public methods
27+
# R0912: Too many branches
28+
# R0913: Too many arguments
29+
# R0914: Too many local variables
30+
# R0915: Too many statements
31+
# R1702: Too many nested blocks
32+
# R1728: Consider using a generator
33+
pylint --disable C0103,C0114,C0115,C0116,C0301,C0302,R0801,R0902,R0904,R0912,R0913,R0914,R0915,R1702,R1728 $(git ls-files '*.py')
34+
shell: micromamba-shell {0}

.github/workflows/python-publish.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This workflow will upload a Python Package using Twine when a release is created
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Upload Python Package
10+
11+
on:
12+
release:
13+
types: [published]
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
deploy:
20+
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- uses: actions/checkout@v3
25+
- name: Set up Python
26+
uses: actions/setup-python@v3
27+
with:
28+
python-version: '3.8'
29+
- name: Install dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install build
33+
- name: Build package
34+
run: python -m build
35+
- name: Publish package
36+
uses: pypa/[email protected]
37+
with:
38+
user: __token__
39+
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/test.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Test
2+
on: [push, pull_request]
3+
4+
defaults:
5+
run:
6+
shell: bash -l {0}
7+
8+
jobs:
9+
test-linux:
10+
name: Test on Linux
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version:
15+
- "3.8"
16+
- "3.9"
17+
- "3.10"
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Use python ${{ matrix.python-version }}
21+
run: echo -e "\n - python = ${{ matrix.python-version }}" >> ./HiCMatrix_env_ci.yml
22+
- uses: mamba-org/setup-micromamba@main
23+
with:
24+
environment-file: ./HiCMatrix_env_ci.yml
25+
cache-downloads: true
26+
environment-name: HiCMatrix_env_ci
27+
- name: pip install
28+
run: |
29+
python3 -m pip install .
30+
shell: micromamba-shell {0}
31+
- name: Test HiCMatrix
32+
run: |
33+
py.test hicmatrix/test/ --capture=sys
34+
shell: micromamba-shell {0}
35+
test-osx:
36+
name: Test on OSX
37+
runs-on: macOS-latest
38+
strategy:
39+
matrix:
40+
python-version:
41+
- "3.8"
42+
- "3.9"
43+
- "3.10"
44+
steps:
45+
- uses: actions/checkout@v3
46+
- name: Use python ${{ matrix.python-version }}
47+
run: echo -e "\n - python = ${{ matrix.python-version }}" >> ./HiCMatrix_env_ci.yml
48+
- uses: mamba-org/setup-micromamba@main
49+
with:
50+
environment-file: ./HiCMatrix_env_ci.yml
51+
cache-downloads: true
52+
environment-name: HiCMatrix_env_ci
53+
- name: pip install
54+
run: |
55+
python3 -m pip install .
56+
shell: micromamba-shell {0}
57+
- name: Test HiCMatrix
58+
run: |
59+
py.test hicmatrix/test/ --capture=sys
60+
shell: micromamba-shell {0}

HiCMatrix_env_ci.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: HiCMatrix_env_ci
2+
channels:
3+
- conda-forge
4+
- bioconda
5+
dependencies:
6+
- numpy >= 1.20
7+
- scipy >= 1.2
8+
- pandas >= 0.25
9+
- pytables >= 3.5
10+
- cooler >= 0.8.9
11+
- intervaltree >= 3.0
12+
- pytest
13+
- pylint
14+
- pytest-xdist
15+
- pytest-forked
16+
- nose
17+
- pathlib
18+
- configparser
19+
- build # For the upload
20+
- twine # For the upload

azure-pipelines.yml

Lines changed: 0 additions & 83 deletions
This file was deleted.

0 commit comments

Comments
 (0)