Skip to content

Commit

Permalink
Merge pull request #35 from lukapecnik/conda
Browse files Browse the repository at this point in the history
Conda support
  • Loading branch information
lukapecnik committed Dec 11, 2020
2 parents 70a1b6f + a79c98c commit 0f855fa
Show file tree
Hide file tree
Showing 12 changed files with 191 additions and 5 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
17 changes: 17 additions & 0 deletions .github/workflows/publish_conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: publish_conda

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: publish-to-conda
uses: fcakyon/conda-publish-action@v1.3
with:
subdir: 'conda'
anacondatoken: ${{ secrets.ANACONDA_TOKEN }}
platforms: 'win osx linux'
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ This project and everyone participating in it is governed by the [NiaAML Code of
## How Can I Contribute?

### Reporting Bugs
Before creating bug reports, please check existing issues list as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible in the [issue template](ISSUE_TEMPLATE.md).
Before creating bug reports, please check existing issues list as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible in the [issue template](.github/templates/ISSUE_TEMPLATE.md).

### Suggesting Enhancements

Open new issue using the [feature request template](FEATURE_REQUEST.md).
Open new issue using the [feature request template](.github/templates/FEATURE_REQUEST.md).

### Pull requests

Fill in the [pull request template](PULL_REQUEST.md) and make sure your code is documented.
Fill in the [pull request template](.github/templates/PULL_REQUEST.md) and make sure your code is documented.

## Setup development environment

Expand Down
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ The NiaAML framework allows you not only to run full pipeline optimization, but

## Installation

### pip

Install NiaAML with pip:

```sh
Expand All @@ -36,6 +38,24 @@ In case you would like to try out the latest pre-release version of the framewor
pip install niaaml --pre
```

### conda

To install NiaAML with conda, use:

```sh
$ conda install -c lukapecnik niaaml
```

### Install From Source

In case you want to install directly from the source code, use:

```sh
$ git clone https://github.com/lukapecnik/NiaAML.git
$ cd NiaAML
$ python setup.py install
```

## Graphical User Interface

There is a simple Graphical User Interface for the NiaAML package available [here](https://github.com/lukapecnik/NiaAML-GUI).
Expand Down
23 changes: 23 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ The NiaAML framework allows you not only to run full pipeline optimization, but
Installation
------------

pip
~~~

Install NiaAML with pip:

.. code:: sh
Expand All @@ -49,6 +52,26 @@ In case you would like to try out the latest pre-release version of the framewor
pip install niaaml --pre
conda
~~~~~

To install NiaAML with conda, use:

.. code:: sh
conda install -c lukapecnik niaaml
Install From Source
~~~~~~~~~~~~~~~~~~~

In case you want to install directly from the source code, use:

.. code:: sh
git clone https://github.com/lukapecnik/NiaAML.git
cd NiaAML
python setup.py install
Graphical User Interface
------------------------

Expand Down
4 changes: 4 additions & 0 deletions conda/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
python:
- 3.6
- 3.7
- 3.8
36 changes: 36 additions & 0 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{% set data = load_setup_py_data() %}

package:
name: niaaml
version: {{ data['version'] }}

source:
path: ..

build:
number: 0
script: python setup.py install --single-version-externally-managed --record=record.txt

requirements:
build:
- python>=3.6.1
- numpy>=1.19.1
- scikit-learn>=0.23.2
- NiaPy>=2.0.0rc11
- pandas>=1.1.4

run:
- python>=3.6.1
- numpy>=1.19.1
- scikit-learn>=0.23.2
- NiaPy>=2.0.0rc11
- pandas>=1.1.4

test:
imports:
- niaaml

about:
home: {{ data['url'] }}
license: {{ data['license'] }}
summary: {{ data['description'] }}
2 changes: 1 addition & 1 deletion niaaml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@
]

__project__ = 'niaaml'
__version__ = '1.0.0rc4'
__version__ = '1.0.0rc5'
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "NiaAML"
version = "1.0.0rc4"
version = "1.0.0rc5"
description = "Python automated machine learning framework."
license = "MIT"
authors = ["Luka Pečnik <lukapecnik96@gmail.com>", "Iztok Fister Jr. <iztok.fister1@um.si>"]
Expand Down
86 changes: 86 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
#!/usr/bin/env python

"""Setup script for the package."""

import io
import os
import sys
import logging

import setuptools


PACKAGE_NAME = 'niaaml'
MINIMUM_PYTHON_VERSION = '3.6.1'


def check_python_version():
"""Exit when the Python version is too low."""
if sys.version < MINIMUM_PYTHON_VERSION:
sys.exit("Python {0}+ is required.".format(MINIMUM_PYTHON_VERSION))


def read_package_variable(key, filename='__init__.py'):
"""Read the value of a variable from the package without importing."""
module_path = os.path.join(PACKAGE_NAME, filename)
with open(module_path) as module:
for line in module:
parts = line.strip().split(' ', 2)
if parts[:-1] == [key, '=']:
return parts[-1].strip("'")
logging.warning("'%s' not found in '%s'", key, module_path)
return None


def build_description():
"""Build a description for the project from documentation files."""
try:
readme = io.open("README.rst", encoding="UTF-8").read()
except IOError:
return "<placeholder>"
else:
return readme


check_python_version()

PACKAGE_VERSION = read_package_variable('__version__')

setuptools.setup(
name=PACKAGE_NAME,
version=PACKAGE_VERSION,
description="""
Python automated machine learning framework.
""",
url='https://github.com/lukapecnik/NiaAML',
author='lukapecnik',
author_email='lukapecnik96@gmail.com',
packages=setuptools.find_packages(),
long_description=build_description(),
license='MIT',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Topic :: Scientific/Engineering',
'Topic :: Software Development'
],
tests_requires=[
'sphinx >= 3.3.1'
'sphinx-rtd-theme >= 0.5.0'
'coveralls >= 2.2.0'
],
install_requires=[
'numpy >= 1.19.1',
'scikit-learn >= 0.23.2',
'NiaPy >= 2.0.0rc11',
'pandas >= 1.1.4'
]
)

0 comments on commit 0f855fa

Please sign in to comment.