Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 46 additions & 25 deletions .github/workflows/publish-python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,54 @@ name: Publish Python Package
on:
push:
tags:
- 'v*' # Trigger on version tag push (e.g., v1.0.0)
- 'v*'

jobs:
build:
runs-on: ubuntu-latest
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v4

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: auto
args: --release --out dist --manifest-path rust_bindings/Cargo.toml
sccache: 'true'
manylinux: auto

- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels
path: dist

release:
name: Release
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine

- name: Build the package
run: |
python setup.py sdist bdist_wheel

- name: Publish to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
twine upload dist/*
- uses: actions/download-artifact@v4
with:
name: wheels
path: dist

- name: Publish to PyPI
uses: PyO3/maturin-action@v1
with:
command: upload
args: --non-interactive --skip-existing dist/*
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
22 changes: 19 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,34 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
python-version: '3.12'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest
pip install -e .
pip install pytest maturin

- name: Build and install Rust extension
run: |
maturin build --release --out dist
pip install dist/*.whl

- name: Run tests
run: |
# Move source out of the way so we test the installed package
mkdir _ignore
mv rao_algorithms _ignore/
pytest tests/
# Move it back for subsequent steps if any
mv _ignore/rao_algorithms .
30 changes: 30 additions & 0 deletions git_commit_history.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
hash,author,date,message
17ee7ad8488cdc78e3cf9f05da9004bd05bf8f98,vinod-dega,2025-04-03 17:58:03 +0530,Merge pull request #2 from VaidhyaMegha/feature/repo-governance
34a72af4d2a2566388d97ffc1dfdfca80cf6a246,Suchethan021,2025-04-03 17:16:57 +0530,added pip install -e . to the dependencies installation in test.yml
22bfd870dd020a56b5046a241652a4744d07c3af,Suchethan021,2025-04-03 16:48:34 +0530,feat: implement repository governance standards
45716f2222ae7c991c28d6ee3bb7e6777d8cdecf,Suchethan021,2025-04-01 17:07:53 +0530,Fix Docker build: Install package in development mode before tests
1579687ab2cf9dc96d1239ebcaa1c23d78a9f7cb,Suchethan021,2025-04-01 16:48:50 +0530,update homepage and CNAME for optimizations.aisdlc.com
adab529855dd113a225ed9c973e7b5e0d8425e2e,Sandeep Kunkunuru,2025-03-29 19:27:11 +0530,Update release version
e66519bb41f1aa932a8dea2214b4cff3ef301caf,Sandeep Kunkunuru,2025-03-29 19:25:01 +0530,feat: Add detailed convergence history tracking to all optimization algorithms
f03c04e2dad1fba799450d195a6af6ef138130d7,Sandeep Kunkunuru,2025-03-29 16:13:13 +0530,Update the release version
7a574f91711850a6850471c3348455f9889a995f,Sandeep Kunkunuru,2025-03-29 16:11:08 +0530,Updates to docs
e8b6da7002aa1e9cdb408e8d353df58c8d1b02a8,Sandeep Kunkunuru,2025-03-29 16:02:22 +0530,Publishing app to github pages
61fbf17babe7c24e4301f384fbb1f04c2eb104d2,Sandeep Kunkunuru,2025-03-29 15:35:03 +0530,Adding frontend to simulate optimization algorithms
11fe70c30d72b99e3cd8f4b5c12cb859edb2bbc6,Sandeep Kunkunuru,2025-03-26 00:50:15 +0530,docs: add comprehensive documentation for new optimization algorithms
e0c8475b8ff29f697bdc7f88b753b35a3ea1eb5d,Sandeep Kunkunuru,2025-03-26 00:29:29 +0530,Update package version
85326a76c46e0f97482e65b2c1b09df12e96e2b9,Sandeep Kunkunuru,2025-03-26 00:25:50 +0530,feat: Implement additional optimization algorithms by Prof. R.V. Rao
98844b66c824d7e6623391f63bfea87a17dca55d,vinod-dega,2024-10-29 11:54:10 +0530,Add pull_request_template.md
236866574a09ce219cbe4d3dc446e82f0118f799,Sandeep Kunkunuru,2024-10-02 21:46:19 +0530,Adding more objective functions and test cases
e133bb549e791a4b126971eb5b1d2a4c59a5f032,Sandeep Kunkunuru,2024-10-02 21:21:45 +0530,Adding reference implementation and saving convergence scores
b942a20035abf2edca6878df6246907c4905ca86,Sandeep Kunkunuru,2024-10-02 17:12:16 +0530,folder structure has been corrected
12edfc7b2d922aaa99946687ca029cb92892d03a,Sandeep Kunkunuru,2024-10-02 16:12:08 +0530,Update pypi package page using README.md
b9e0f9a35142f2099e8a51e30cffa4aeda0f1bdf,Sandeep Kunkunuru,2024-10-02 16:11:48 +0530,Update pypi package page using README.md
72d8a081a6a7dcd9704e2bb5459687396f7769b1,Sandeep Kunkunuru,2024-10-02 16:10:06 +0530,Update pypi package page using README.md
146e11f02cd7465670ab097d85eeed76350bd913,Sandeep Kunkunuru,2024-10-02 16:03:29 +0530,rename package
86a8632ab34eb18340160a454e049ebf410a8a90,Sandeep Kunkunuru,2024-10-02 16:00:17 +0530,Updates
60dc723c9be590150a50b7f3805cf5aefa428ba4,Sandeep Kunkunuru,2024-10-02 15:52:12 +0530,"Added Dockerfile, tests, and README"
08476428e141d4571c5c6c9a77b4587a3beb9130,Sandeep Kunkunuru,2024-10-02 14:59:57 +0530,Add github workflows
fa965b1e81275b12ddb2a92f83d8e9cc76b6f24b,Sandeep Kunkunuru,2024-10-02 14:58:12 +0530,Merge remote-tracking branch 'origin/main'
aff9a9a1345daa1cf93640de851015ca7be9c1c6,Sandeep Kunkunuru,2024-10-02 14:58:09 +0530,Updates to LICENSE
fcc4aac272c984eaa46a86da861816a067732953,Sandeep Kunkunuru,2024-10-02 14:55:01 +0530,Initial commit
0f2b418b2060e45e346ee09cb2b5909f9076ecc7,Sandeep Kunkunuru,2024-10-02 14:53:41 +0530,Initial commit
30 changes: 30 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[build-system]
requires = ["maturin>=1.0,<2.0"]
build-backend = "maturin"

[project]
name = "rao-algorithms"
version = "0.8.0"
description = "High-performance optimization algorithms by Prof. R.V. Rao (Jaya, Rao, TLBO) backed by Rust"
authors = [
{ name = "Sandeep Kunkunuru", email = "sandeep.kunkunuru@gmail.com" }
]
license = { text = "MIT" }
readme = "README.md"
requires-python = ">=3.8"
dependencies = [
"numpy>=1.20",
]
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Rust",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering :: Mathematics",
]

[tool.maturin]
features = ["pyo3/extension-module"]
module-name = "rao_algorithms.samyama_optimization"
manifest-path = "rust_bindings/Cargo.toml"
python-source = "."
Loading
Loading