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
29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build

on:
push:
tags:
- 'v*'

jobs:
build:
name: Create Release
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get version from setup.cfg
id: get-version
run: echo "::set-output name=version::$(awk -F "=" '/^version/ {print $2}' setup.cfg | tr -d '[:space:]')"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: v${{ steps.get-version.outputs.version }}
release_name: Release v${{ steps.get-version.outputs.version }}
draft: false
# prerelease: ${{ contains(github.ref, '-beta') || contains(github.ref, '-alpha') || contains(github.ref, '-rc') }}
prerelease: false
20 changes: 20 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Publish to PyPI.org
on:
release:
types: [published]
workflow_dispatch: # Add this to allow manual triggering
jobs:
pypi:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- run: python3 -m pip install --upgrade build && python3 -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = reactea
version = 0.1.1-beta
version = 1.0.0
description = ReactEA: Combining Evolutionary Algorithms with Reaction Rules Towards Focused Molecular Design
long_description = file: README.md
long_description_content_type = text/markdown
Expand All @@ -12,7 +12,7 @@ license = GPL-3.0 license
license_file = LICENSE
platforms = unix, linux, osx, cygwin, win32
classifiers =
Development Status :: 4 - Beta
Development Status :: 5 - Production/Stable
License :: OSI Approved :: MIT License
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Expand Down
2 changes: 2 additions & 0 deletions src/reactea/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
from reactea.optimization.jmetal.ea import ChemicalEA
from reactea.wrappers import case_study_wrapper, evaluation_functions_wrapper

__version__ = '1.0.0'


def run_reactea(configs_path: Union[str, dict],
case_study: CaseStudy,
Expand Down