Skip to content

Commit

Permalink
MNT bump to v3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
eboileau committed Feb 6, 2023
1 parent a2a39d5 commit a944462
Show file tree
Hide file tree
Showing 163 changed files with 13,321 additions and 13,246 deletions.
52 changes: 34 additions & 18 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,54 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: eboileau

about: Create a report to help us improve Rp-Bp
title: ""
labels: "T: bug"
assignees: ""
---

**Prerequisites**
Please answer the following questions for yourself before submitting an issue.
<!--
Please make sure that the bug is not already fixed either in newer versions or the
current development version.
1. Update version if a newer release exists: `conda update rpbp` or
2. Use the dev branch:
- create a conda environment and only install dependencies;
- clone this repository;
- run `pip install --no-deps -e .[test]`;
- make sure it works by running `python -m pytest`.
- [ ] I am running the latest version, and specified versions of the dependencies
- [ ] I checked the documentation and found no answer
- [ ] This issue has not already been filed
If the bug persists, please make sure that it has not already been filed before
opening a duplicate issue.
-->

**Description**
A clear and concise description of what the issue is.

<!-- A clear and concise description of what the bug is. -->

**Expected behavior**
A clear and concise description of what the expected behavior is.

<!-- A clear and concise description of what the expected behavior is. -->

**To Reproduce**
Describe detailed steps to reproduce the issue:

<!--
Minimal steps to reproduce the bug:
1. step 1
2. step 2
3. you get it...
-->

**Output**
If relevant, paste the output of the steps above, including the commands themselves and traceback, etc.

<!-- If relevant, paste the output of the steps above, including the commands themselves and traceback, etc. -->

**Environment**
- Pip version
- Python version
- Operating system

- Version of the package
- Conda/pip version and if relevant output of `conda list` or `pip freeze`
- Operating system and Python version <!-- e.g. [Linux/Python 3.10.6] -->

**Additional context**
Add any other context about the problem here.

<!-- Add any other context about the problem here. -->
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Feature request
about: Suggest an idea for this project
title: ""
labels: "T: enhancement"
assignees: ""
---

**Is your feature request related to a problem?**

<!-- A clear and concise description of what the problem is.
e.g. I would like to use the Rp-Bp output to do this, but [...] -->

**Describe a possible solution**

<!-- A clear and concise description of what you want to
happen. -->

**Did you consider alternative solutions?**

<!-- A clear and concise description of any
alternative solutions or features you've considered. Maybe a
separate program/software, etc. can do that? -->

**Additional context**

<!-- Add any other context or screenshots about the feature request
here. -->
59 changes: 59 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: CI

on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev

jobs:
install-and-test:
runs-on: ${{matrix.os}}
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Create rpbp conda environment
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
channels: bioconda,conda-forge,defaults
channel-priority: true
auto-update-conda: true
auto-activate-base: false
activate-environment: rpbp
environment-file: environment.yml
- name: Display conda env info
run: |
conda info
conda list
conda config --show-sources
conda config --show
printenv | sort
- name: Install test requirements
run: pip install pytest pytest-cov pytest-depends
- name: Install rp-bp with --no-deps option
run: pip install . --no-deps --verbose
- name: Run tests
run: python -m pytest . --cov=rpbp --cov-report=xml -s -v
- name: Compile stan models (should already exist -> no-op)
run: compile-rpbp-models
- name: Compile stan models with --force
run: compile-rpbp-models --force
- name: Upload code coverage to codecov
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
name: ${{ matrix.os }}
fail_ci_if_error: true
verbose: true
21 changes: 21 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: PyPI

on:
push:
tags:
- "*.*.*"
jobs:
pypi:
name: Upload to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- run: pip install --upgrade build
- run: python -m build
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_token }}
71 changes: 54 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,44 @@
*checkpoint.ipynb
*egg-info
__pycache__
# Byte-compiled, optimized, etc.
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg

# Jupyter Notebook
.ipynb_checkpoints

# Sphinx documentation
docs/_build/
docs/build/
docs/source/_build/
doc/source/build/
_readthedocs/

# Local and other files
/local/
/data/

*pkl
*bbl
*blg
Expand All @@ -10,22 +48,21 @@ __pycache__
*vim
*swp
*orig

scratch*ipynb

*bak

old
src
OpenBLAS
data
# Environments
.env
.venv
env/
venv/
env.bak/
venv.bak/

# Example data
c-elegans*

docs/_build/
docs/_static/
docs/_templates/
_build
_static
_templates

# Stan models (compiled)
src/rpbp/models/*
!src/rpbp/models/**/
src/rpbp/models/**/*/*
!src/rpbp/models/**/*.stan
45 changes: 45 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: requirements-txt-fixer
- id: mixed-line-ending
- id: check-toml

- repo: https://github.com/psf/black
rev: 22.6.0
hooks:
- id: black
- id: black-jupyter

- repo: https://github.com/kynan/nbstripout
rev: 0.5.0
hooks:
- id: nbstripout

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier
additional_dependencies:
- [email protected]
- "prettier-plugin-toml"

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.17.1
hooks:
- id: check-github-workflows
- id: check-readthedocs

- repo: https://github.com/pycqa/flake8
rev: "5.0.4"
hooks:
- id: flake8
args:
- "--max-line-length=88"
- "--ignore=E203,E265,E266,E501,F401,W503,W605,E722,E731,E741,F841"
ci:
autoupdate_schedule: quarterly
25 changes: 21 additions & 4 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# https://docs.readthedocs.io/en/stable/config-file/v2.html

version: 2

build:
os: "ubuntu-22.04"
tools:
python: "3.9"

sphinx:
builder: html
configuration: docs/source/conf.py
fail_on_warning: false

formats:
- pdf

python:
version: 3.6
install:
- method: pip
path: .
extra_requirements:
- docs
Loading

0 comments on commit a944462

Please sign in to comment.