Skip to content

Commit

Permalink
Add pyproject.toml and update github actions (#277)
Browse files Browse the repository at this point in the history
* add pyproject and update github actions

* fix test action

* import bioscrape in try-except

* readme update for CI and version

* setup version update

* add pypi release github action
  • Loading branch information
ayush9pandey authored Jun 20, 2024
1 parent dee6155 commit 8db3158
Show file tree
Hide file tree
Showing 9 changed files with 216 additions and 85 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: BioCRNpyler Deploy
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
python-version: [3.8, 3.11, 3.12]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov python-libsbml
- name: Tnstall biocrnpyler
run: pip install -e .[all]
- name: Test biocrnpyler
run: pytest --cov biocrnpyler
- uses: actions/checkout@main
- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false
name: codecov-umbrella
token: ${{ secrets.CODECOV_TOKEN }}
verbose: false
30 changes: 0 additions & 30 deletions .github/workflows/install_and_code_cov.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/pypi-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Manually run this action
name: PyPI Release

on:
workflow_dispatch:

jobs:
pypi-publish:
runs-on: ubuntu-latest
environment: Release Deploy

steps:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.12'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build the package
run: |
python -m build
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN}}
33 changes: 33 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: BioCRNpyler Test
on:
push:
branches: ["*","!master"]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 4
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov python-libsbml
- name: Tnstall biocrnpyler
run: pip install -e .[all]
- name: Test biocrnpyler
run: pytest --cov biocrnpyler
- uses: actions/checkout@main
- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false
name: codecov-umbrella
token: ${{ secrets.CODECOV_TOKEN }}
verbose: false
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# BioCRNPyler — Biomolecular Chemical Reaction Network Compiler
## Python toolbox to create CRN models in SBML for biomolecular mechanisms

[![Build Status](https://travis-ci.com/BuildACell/BioCRNPyler.svg?branch=master)](https://travis-ci.com/BuildACell/BioCRNPyler)
[![Build Status](https://github.com/buildacell/biocrnpyler/actions/workflows/deploy.yml/badge.svg)](https://github.com/biocircuits/bioscrape/actions/workflows/deploy_bioscrape.yml)
[![codecov](https://codecov.io/gh/BuildACell/BioCRNPyler/branch/master/graph/badge.svg)](https://codecov.io/gh/BuildACell/BioCRNPyler)
[![PyPI version](https://badge.fury.io/py/biocrnpyler.svg)](https://badge.fury.io/py/biocrnpyler)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/BuildACell/BioCRNPyler/master?filepath=%2Fexamples%2F)
Expand Down Expand Up @@ -111,12 +111,13 @@ see [contribution guidelines](https://github.com/BuildACell/BioCRNPyler/blob/mas

BioCRNpyler versions:

* 1.0.2 (latest stable release): To install run `pip install biocrnpyler`
* 1.1.2 (latest stable release): To install run `pip install biocrnpyler`
* 1.1.1 (previous stable release, compatible only with python <= 3.10): To install run `pip install biocrnpyler==1.1.1`
* 0.9.0 (beta release): To install run `pip install biocrnpyler==0.9.0`
* 0.2.1 (alpha release): To install run `pip install biocrnpyler==0.2.1`

# License
Released under the BSD 3-Clause License (see `LICENSE`)

Copyright (c) 2020, Build-A-Cell. All rights reserved.
Copyright (c) 2024, Build-A-Cell. All rights reserved.

Large diffs are not rendered by default.

58 changes: 58 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
[build-system]
requires = ["setuptools>=64", "wheel"]
build-backend = "setuptools.build_meta"

[tool.distutils.bdist_wheel]
universal = true

[project]
name = "BioCRNpyler"
version = "1.1.2"
description = "A chemical reaction network compiler for generating large biological circuit models"
authors = [{name='Build-A-Cell'}]
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Topic :: Software Development',
'Topic :: Scientific/Engineering',
'Operating System :: OS Independent',
]
license = {file = "LICENSE"}
readme = "README.md"
keywords=["SBML", "synthetic biology", "modeling",
"Chemical Reaction Network", "CRN"]
dependencies = [
"python-libsbml",
"numpy<2.0",
"matplotlib",
"networkx",
"bokeh>=1.4.0",
"fa2_modified",
"jupyter",
"pytest",
"pytest-cov",
"nbconvert"
]
requires-python = ">=3.7"

[project.optional-dependencies]
test = [
"pytest"
]

[project.urls]
"Homepage" = "https://github.com/buildacell/biocrnpyler/"
"Bug Tracker" = "https://github.com/buildacell/biocrnpyler/issues"

[tool.setuptools]
packages = ["biocrnpyler"]
include-package-data = true
package-dir = {"biocrnpyler"="biocrnpyler"}
5 changes: 0 additions & 5 deletions requirements.txt.old

This file was deleted.

4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

setup(
name='biocrnpyler',
version='1.1.1',
author='BuildACell',
version='1.1.2',
author='Build-A-Cell',
url='https://github.com/BuildACell/biocrnpyler/',
description='A chemical reaction network compiler for generating large biological circuit models',
long_description=long_description,
Expand Down

0 comments on commit 8db3158

Please sign in to comment.