Skip to content

Commit

Permalink
Add automatic pypi deploy (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
anders-kiaer authored Apr 4, 2019
1 parent 528fdbe commit 007789e
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 33 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ venv
.pytest_cache
*.pyc
.DS_Store
dist
build
11 changes: 9 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,20 @@ before_install:
- sh -e /etc/init.d/xvfb start

install:
- pip install -r requirements.txt
- pip install -r dev_requirements.txt
- wget https://chromedriver.storage.googleapis.com/73.0.3683.68/chromedriver_linux64.zip
- unzip chromedriver_linux64.zip
- export PATH=$PATH:$PWD

script:
- pip install .
- pip install .[tests]
- pycodestyle webviz_config
- pytest tests

deploy:
- provider: pypi
user: webviz
password:
secure: nPhoazwJZ2bOq8T2C9bMdzVS7mACdUkgwdmhEnsFrWT7Oh46h5ypuuaIl/Ir23n5OUYoZS+mg230hclD12McTafnH8MQnGpyooViuZy1oRWzbjjcdI5jq4poEmZokC0pS4ZM+lNeQ01eI4z3BMxwsYvvgZWVyBU+vVtwUSNrRrMnR9Vd3Wg7K17646/OvGsSoYJsN7G64Pm/rLmvphAebWYN/rwfZFz/bOPAhXJkgBmxZDZm2c4H04vCnftPhRSeL3nP7RsZQID/S1KoUuedN/E1inDg/PSAWXTWaRgbL5p6lHvbFC13Z26viRw7tD7BKo3irYxIsUup/v6rD1bwAZvaRGih1rQ5DCShOD/Yz70MpLmnDgiq2GMYWraROq/Uw+HieN+7mg2oPD7ChPeAWLBLmFw7sjZp8qwHq/3qSPARLZqRhAMOltiDtqv7llxv2w8jOcPI0hX7q1KdkWSrv7Nsf0g1wYN8G27+OM4OnDDh8q4R0EherpWQ4vSDN81d4jy8+YQcq8ALOS1k6A7XH5iP50sCArKyJzySs8IeMTT5m7/ddF/x8hnvTQxmdJMYaPAM0TSumdGFmGO0fash1I4NB8R5++ZY8185ELhSuiqz/4vZnA0Gi29yDVSIjOtjKCbPiaQRe0shue2+5zXpeH83MtS0SFD3EVgQ/yt4R58=
on:
tags: true
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,16 @@ python3 -m virtualenv $PATH_TO_VENV
source $PATH_TO_VENV/bin/activate
```

In order to install the utility, run
The simplest way of installing `webviz-config` is to run
```bash
pip install webviz-config
```

If you want to download the latest source code and install it manually you
can run
```bash
git clone [email protected]:equinor/webviz-config.git
cd webviz-config
pip install -r requirements.txt
pip install .
```
### Run tests
Expand All @@ -41,14 +46,14 @@ To run tests it is necessary to first install [selenium chrome driver](https://g
Then install dev requirements and run pytest:

```bash
pip install -r dev_requirements.txt
pip install .[tests]
pytest tests
```

Linting can be checked by:

```bash
pycodestyle webviz_config/ tests/
pycodestyle webviz_config tests
```

### Build documentation
Expand All @@ -57,7 +62,7 @@ End-user documentation (i.e. YAML configuration file) be created
after installation by

```bash
pip install -r dev_requirements.txt
pip install .[tests]
cd ./docs
python3 build_docs.py
```
Expand Down
7 changes: 0 additions & 7 deletions dev_requirements.txt

This file was deleted.

16 changes: 0 additions & 16 deletions requirements.txt

This file was deleted.

48 changes: 45 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
from setuptools import setup, find_packages

with open('README.md', 'r') as fh:
long_description = fh.read()

tests_requires = [
'chromedriver-binary>=74.0.3729.6.0',
'dash>=0.38.0',
'markdown>=3.0.1',
'pylint>=2.3.1',
'pytest-dash>=2.1.1',
'pycodestyle>=2.5.0',
'selenium>=3.141.0'
]

setup(
name='webviz-config',
version='0.1',
description='Configuration file support for webviz',
url='https://github.com/Statoil/webviz-config',
long_description=long_description,
long_description_content_type='text/markdown',
url='https://github.com/equinor/webviz-config',
author='R&T Equinor',
packages=find_packages(exclude=['tests']),
package_data={
Expand All @@ -19,5 +33,33 @@
'webviz=webviz_config.command_line:main'
],
},
zip_safe=False
install_requires=[
'cryptography>=2.5',
'dash>=0.35.2',
'dash-auth>=1.3.1',
'dash-core-components>=0.42.1',
'dash-html-components>=0.13.4',
'dash-table>=3.4.0',
'flask-caching>=1.4.0',
'flask-talisman>=0.6.0',
'jinja2>=2.10',
'pandas==0.24.1',
'pyarrow>=0.11.1',
'pyyaml>=3.13',
'webviz_components>=0.0.1'
],
tests_require=tests_requires,
extras_require={'tests': tests_requires},
setup_requires=['setuptools_scm>=3.2.0'],
use_scm_version=True,
zip_safe=False,
classifiers=[
'Programming Language :: Python :: 3',
'Operating System :: OS Independent',
'Natural Language :: English',
'Topic :: Multimedia :: Graphics',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Visualization',
'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)'
]
)
7 changes: 7 additions & 0 deletions webviz_config/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from pkg_resources import get_distribution, DistributionNotFound

try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
# package is not installed
pass

0 comments on commit 007789e

Please sign in to comment.