diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..c31074e --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,36 @@ +name: vis5-ci-build +on: + pull_request: + branches: + - main + push: + branches: + - main + +jobs: + + lint-code: + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Python 3.9 + uses: actions/setup-python@v1 + with: + python-version: 3.9 + + - name: Install linters + run: pip install black pylint flake8 + + - name: Check code with black + run: black --check . + + - name: Run flake8 + run: flake8 --show-source --ignore=E501,E741,E203,W503,E266 vis5 + + - name: Run pylint + run: > + pylint -d + line-too-long,invalid-name,import-outside-toplevel,logging-fstring-interpolation,unnecessary-pass,no-else-return + vis5 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..2826517 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,2 @@ +[build-system] +requires = ['setuptools', 'wheel', 'dunamai'] diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..ec31578 --- /dev/null +++ b/setup.py @@ -0,0 +1,24 @@ +from setuptools import setup, find_packages + +from vis5 import __version__ + + +# Don't install requirements if on ReadTheDocs build system. +# Load the PEP508 formatted requirements from the requirements.txt file. Needs +# pip version > 19.0 +with open("requirements.txt", "r") as fh: + requires = fh.readlines() + +setup( + name="vis5", + version=__version__, + packages=find_packages(), + python_requires=">=3.6", + install_requires=requires, + # metadata for upload to PyPI + author="Kiyo Masui, J. Richard Shaw", + author_email="richard@phas.ubc.ca", + description="vis5 data reader", + license="MIT", + url="http://github.com/radiocosmology/vis5", +) diff --git a/vis5/__init__.py b/vis5/__init__.py new file mode 100644 index 0000000..4fbf573 --- /dev/null +++ b/vis5/__init__.py @@ -0,0 +1,5 @@ +"""vis5 data format""" + +import dunamai as _dunamai + +__version__ = _dunamai.get_version("vis5", third_choice=_dunamai.Version.from_any_vcs)