Skip to content

Commit

Permalink
Merge pull request #51 from ecrl/dev
Browse files Browse the repository at this point in the history
Update build/install method, add GitHub workflows, unittest -> pytest
  • Loading branch information
tjkessler committed Aug 1, 2023
2 parents 29b96b2 + befcf5c commit ac192b0
Show file tree
Hide file tree
Showing 13 changed files with 380 additions and 335 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/publish_to_pypi.yml
@@ -0,0 +1,30 @@
name: Upload new ECNet version to PyPI

on:
release:
types: [published]

permissions:
contents: read

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
26 changes: 26 additions & 0 deletions .github/workflows/run_tests.yml
@@ -0,0 +1,26 @@
name: Run ECNet tests

on: [push]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
pip install pytest pytest-md
- name: Install package
run: python -m pip install .
- name: Run tests
uses: pavelzw/pytest-action@v2
with:
emoji: false
report-title: 'ECNet test report'
1 change: 0 additions & 1 deletion README.md
Expand Up @@ -7,7 +7,6 @@
[![status](http://joss.theoj.org/papers/f556afbc97e18e1c1294d98e0f7ff99f/status.svg)](http://joss.theoj.org/papers/f556afbc97e18e1c1294d98e0f7ff99f)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/ECRL/ECNet/master/LICENSE.txt)
[![Documentation Status](https://readthedocs.org/projects/ecnet/badge/?version=latest)](https://ecnet.readthedocs.io/en/latest/?badge=latest)
[![Build Status](https://dev.azure.com/uml-ecrl/package-management/_apis/build/status/ECRL.ECNet?branchName=master)](https://dev.azure.com/uml-ecrl/package-management/_build/latest?definitionId=1&branchName=master)

**ECNet** is an open source Python package for creating machine learning models to predict fuel properties. ECNet comes bundled with a variety of fuel property datasets, including cetane number, yield sooting index, and research/motor octane number. ECNet was built using the [PyTorch](https://pytorch.org/) library, allowing easy implementation of our models in your existing ML pipelines.

Expand Down
26 changes: 0 additions & 26 deletions azure-pipelines.yml

This file was deleted.

10 changes: 10 additions & 0 deletions docs/api_blends.md
@@ -1,16 +1,26 @@
# ecnet.blends

## ecnet.blends.cetane_number

::: ecnet.blends.cetane_number
handler: python

## ecnet.blends.yield_sooting_index

::: ecnet.blends.yield_sooting_index
handler: python

## ecnet.blends.kinematic_viscosity

::: ecnet.blends.kinematic_viscosity
handler: python

## ecnet.blends.cloud_point

::: ecnet.blends.cloud_point
handler: python

## ecnet.blends.lower_heating_value

::: ecnet.blends.lower_heating_value
handler: python
8 changes: 8 additions & 0 deletions docs/api_callbacks.md
@@ -1,13 +1,21 @@
# ecnet.callbacks

## ecnet.callbacks.CallbackOperator

::: ecnet.callbacks.CallbackOperator
handler: python

## ecnet.callbacks.Callback

::: ecnet.callbacks.Callback
handler: python

## ecnet.callbacks.LRDecayLinear

::: ecnet.callbacks.LRDecayLinear
handler: python

## ecnet.callbacks.Validator

::: ecnet.callbacks.Validator
handler: python
26 changes: 26 additions & 0 deletions docs/api_datasets.md
@@ -1,40 +1,66 @@
# ecnet.datasets

## ecnet.datasets.QSPRDataset

::: ecnet.datasets.QSPRDataset
handler: python

## ecnet.datasets.QSPRDatasetFromFile

::: ecnet.datasets.QSPRDatasetFromFile
handler: python

## ecnet.datasets.QSPRDatasetFromValues

::: ecnet.datasets.QSPRDatasetFromValues
handler: python

## ecnet.datasets.load_bp

::: ecnet.datasets.load_bp
handler: python

## ecnet.datasets.load_cn

::: ecnet.datasets.load_cn
handler: python

## ecnet.datasets.load_cp

::: ecnet.datasets.load_cp
handler: python

## ecnet.datasets.load_kv

::: ecnet.datasets.load_kv
handler: python

## ecnet.datasets.load_lhv

::: ecnet.datasets.load_lhv
handler: python

## ecnet.datasets.load_mon

::: ecnet.datasets.load_mon
handler: python

## ecnet.datasets.load_pp

::: ecnet.datasets.load_pp
handler: python

## ecnet.datasets.load_ron

::: ecnet.datasets.load_ron
handler: python

## ecnet.datasets.load_ysi

::: ecnet.datasets.load_ysi
handler: python

## ecnet.datasets.load_mp

::: ecnet.datasets.load_mp
handler: python
8 changes: 8 additions & 0 deletions docs/api_tasks.md
@@ -1,13 +1,21 @@
# ecnet.tasks

## ecnet.tasks.select_rfr

::: ecnet.tasks.select_rfr
handler: python

## ecnet.tasks.tune_batch_size

::: ecnet.tasks.tune_batch_size
handler: python

## ecnet.tasks.tune_model_architecture

::: ecnet.tasks.tune_model_architecture
handler: python

## ecnet.tasks.tune_training_parameters

::: ecnet.tasks.tune_training_parameters
handler: python
3 changes: 1 addition & 2 deletions docs/index.md
Expand Up @@ -7,7 +7,6 @@
[![status](http://joss.theoj.org/papers/f556afbc97e18e1c1294d98e0f7ff99f/status.svg)](http://joss.theoj.org/papers/f556afbc97e18e1c1294d98e0f7ff99f)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/ECRL/ECNet/master/LICENSE.txt)
[![Documentation Status](https://readthedocs.org/projects/ecnet/badge/?version=latest)](https://ecnet.readthedocs.io/en/latest/?badge=latest)
[![Build Status](https://dev.azure.com/uml-ecrl/package-management/_apis/build/status/ECRL.ECNet?branchName=master)](https://dev.azure.com/uml-ecrl/package-management/_build/latest?definitionId=1&branchName=master)

## Installation

Expand All @@ -27,4 +26,4 @@ Additional dependencies (torch, sklearn, padelpy, alvadescpy, ecabc) will be ins

git clone https://github.com/ecrl/ecnet
cd ecnet
python setup.py install
pip install .
4 changes: 3 additions & 1 deletion ecnet/__init__.py
@@ -1,2 +1,4 @@
import pkg_resources
from .model import ECNet
__version__ = '4.1.1'

__version__ = pkg_resources.get_distribution("ecnet").version
43 changes: 43 additions & 0 deletions pyproject.toml
@@ -0,0 +1,43 @@
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
include-package-data = true

[tool.setuptools.packages.find]
exclude = ["databases*", "paper*"]

[tool.setuptools.package-data]
"*" = ["*.smiles", "*.target"]

[tool.pytest.ini_options]
filterwarnings = [
"ignore::DeprecationWarning",
]

[project]
name = "ecnet"
version = "4.1.2"
authors = [
{ name="Travis Kessler", email="travis.j.kessler@gmail.com" },
]
description = "Fuel property prediction using QSPR descriptors"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"torch==2.0.0",
"scikit-learn==1.2.2",
"padelpy==0.1.15",
"alvadescpy==0.1.2",
"ecabc==3.0.0"
]
classifiers = [
"Programming Language :: Python :: 3.11",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]

[project.urls]
"Homepage" = "https://github.com/ecrl/ecnet"
"Bug Tracker" = "https://github.com/ecrl/ecnet/issues"
25 changes: 0 additions & 25 deletions setup.py

This file was deleted.

0 comments on commit ac192b0

Please sign in to comment.