Skip to content

Commit

Permalink
Merge pull request deeptools#48 from lldelisle/fix_pypi
Browse files Browse the repository at this point in the history
Release 17.1
  • Loading branch information
bgruening authored Dec 6, 2023
2 parents 340de4b + 74a6b3a commit 6b516a1
Show file tree
Hide file tree
Showing 22 changed files with 412 additions and 465 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Pylint

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: mamba-org/setup-micromamba@main
with:
environment-file: ./HiCMatrix_env_ci.yml
cache-downloads: true
environment-name: HiCMatrix_env_ci
- name: Analysing the code with pylint
run: |
# Disable
# C0103: Invalid name
# C0114: Missing module docstring
# C0115: Missing class docstring
# C0116: Missing function or method docstring
# C0301: Line too long
# C0302: Too many lines in module
# R0801: Similar lines
# R0902: Too many instance attributes
# R0904: Too many public methods
# R0912: Too many branches
# R0913: Too many arguments
# R0914: Too many local variables
# R0915: Too many statements
# R1702: Too many nested blocks
# R1728: Consider using a generator
pylint --disable C0103,C0114,C0115,C0116,C0301,C0302,R0801,R0902,R0904,R0912,R0913,R0914,R0915,R1702,R1728 $(git ls-files '*.py')
shell: micromamba-shell {0}
39 changes: 39 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package

on:
release:
types: [published]

permissions:
contents: read

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@v1.8
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
60 changes: 60 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Test
on: [push, pull_request]

defaults:
run:
shell: bash -l {0}

jobs:
test-linux:
name: Test on Linux
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
steps:
- uses: actions/checkout@v3
- name: Use python ${{ matrix.python-version }}
run: echo -e "\n - python = ${{ matrix.python-version }}" >> ./HiCMatrix_env_ci.yml
- uses: mamba-org/setup-micromamba@main
with:
environment-file: ./HiCMatrix_env_ci.yml
cache-downloads: true
environment-name: HiCMatrix_env_ci
- name: pip install
run: |
python3 -m pip install .
shell: micromamba-shell {0}
- name: Test HiCMatrix
run: |
py.test hicmatrix/test/ --capture=sys
shell: micromamba-shell {0}
test-osx:
name: Test on OSX
runs-on: macOS-latest
strategy:
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
steps:
- uses: actions/checkout@v3
- name: Use python ${{ matrix.python-version }}
run: echo -e "\n - python = ${{ matrix.python-version }}" >> ./HiCMatrix_env_ci.yml
- uses: mamba-org/setup-micromamba@main
with:
environment-file: ./HiCMatrix_env_ci.yml
cache-downloads: true
environment-name: HiCMatrix_env_ci
- name: pip install
run: |
python3 -m pip install .
shell: micromamba-shell {0}
- name: Test HiCMatrix
run: |
py.test hicmatrix/test/ --capture=sys
shell: micromamba-shell {0}
20 changes: 20 additions & 0 deletions HiCMatrix_env_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: HiCMatrix_env_ci
channels:
- conda-forge
- bioconda
dependencies:
- numpy >= 1.20
- scipy >= 1.2
- pandas >= 0.25
- pytables >= 3.5
- cooler >= 0.8.9
- intervaltree >= 3.0
- pytest
- pylint
- pytest-xdist
- pytest-forked
- nose
- pathlib
- configparser
- build # For the upload
- twine # For the upload
83 changes: 0 additions & 83 deletions azure-pipelines.yml

This file was deleted.

Loading

0 comments on commit 6b516a1

Please sign in to comment.