Skip to content

Commit

Permalink
Merge pull request #63 from satzbeleg/dev
Browse files Browse the repository at this point in the history
Fix Installation Bug
  • Loading branch information
ulf1 authored Apr 27, 2021
2 parents 0eb9501 + 47e0959 commit 1db41eb
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 27 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/syntax-and-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,19 @@ jobs:

runs-on: ubuntu-18.04

strategy:
matrix:
python-version: ['3.6', '3.7', '3.8', '3.x']

name: Python ${{ matrix.python-version }} Tests

steps:
- uses: actions/checkout@v1
- name: Set up Python 3.6
- name: Setup python
uses: actions/setup-python@v1
with:
python-version: 3.6
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 0.6.5 / 2020-04-23

* Test multiple python versions
* Installation problems: remove pandoc from setup.py

# 0.6.4 / 2021-04-08

* PyPi RST format description
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[![PyPI version](https://badge.fury.io/py/bwsample.svg)](https://badge.fury.io/py/bwsample)
[![DOI](https://zenodo.org/badge/335090754.svg)](https://zenodo.org/badge/latestdoi/335090754)
[![bwsample](https://snyk.io/advisor/python/bwsample/badge.svg)](https://snyk.io/advisor/python/bwsample)

# bwsample: Sampling and Evaluation of Best-Worst Scaling sets
Sampling algorithm for best-worst scaling (BWS) sets, extracting pairs from evaluated BWS sets, count in dictionary of keys sparse matrix, and compute scores based on it.
Expand All @@ -14,7 +15,7 @@ The package `bwsample` addresses three areas:
The `bwsample` [git repo](http://github.com/satzbeleg/bwsample) is available as [PyPi package](https://pypi.org/project/bwsample)

```sh
pip install bwsample>=0.6.3
pip install bwsample>=0.6.5
```

## Sampling
Expand Down Expand Up @@ -185,7 +186,14 @@ pip install -r requirements-demo.txt --no-cache-dir
* Jupyter for the examples: `jupyter lab`
* Check syntax: `flake8 --ignore=F401 --exclude=$(grep -v '^#' .gitignore | xargs | sed -e 's/ /,/g')`
* Run Unit Tests: `pytest`
* Upload to PyPi with twine: `python setup.py sdist && twine upload -r pypi dist/*`

Publish

```sh
pandoc README.md --from markdown --to rst -s -o README.rst
python setup.py sdist
twine upload -r pypi dist/*
```

### Clean up

Expand Down
2 changes: 1 addition & 1 deletion bwsample/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '0.6.4'
__version__ = '0.6.5'

from .sampling import sample
from .counting import count
Expand Down
8 changes: 5 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# for setup
setuptools>=56.0.0
wheel>=0.31.0
twine==3.3.0
pypandoc>=1.5
# syntax check, unit test, profiling
flake8>=3.8.4
pytest>=6.2.1
twine==3.3.0
pypandoc>=1.5
wheel>=0.31.0
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# public packages (see setup.py)
numpy>=1.19.5,<2
scipy>=1.5.4,<2
scikit-learn>=0.24.1
scikit-learn>=0.24.1,<1
36 changes: 18 additions & 18 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from setuptools import setup
import pypandoc


def get_version(path):
Expand All @@ -12,20 +11,21 @@ def get_version(path):
raise RuntimeError("Unable to find version string.")


setup(name='bwsample',
version=get_version("bwsample/__init__.py"),
description='Sampling algorithm for best-worst scaling sets.',
long_description=pypandoc.convert('README.md', 'rst'),
url='http://github.com/ulf1/bwsample',
author='Ulf Hamster',
author_email='554c46@gmail.com',
license='Apache License 2.0',
packages=['bwsample'],
install_requires=[
'setuptools>=40.0.0',
'numpy>=1.19.5',
'scipy>=1.5.4',
'scikit-learn>=0.24.1'
],
python_requires='>=3.6',
zip_safe=True)
setup(
name='bwsample',
version=get_version("bwsample/__init__.py"),
description='Sampling algorithm for best-worst scaling sets.',
long_description='README.rst',
url='http://github.com/ulf1/bwsample',
author='Ulf Hamster',
author_email='554c46@gmail.com',
license='Apache License 2.0',
packages=['bwsample'],
install_requires=[
'numpy>=1.19.5,<2',
'scipy>=1.5.4,<2',
'scikit-learn>=0.24.1,<1'
],
python_requires='>=3.6',
zip_safe=True
)

0 comments on commit 1db41eb

Please sign in to comment.