-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9389d4e
commit 301454c
Showing
3 changed files
with
151 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
tags: | ||
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
pull_request: | ||
branches: | ||
- master | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
name: ${{ matrix.platform }} py${{ matrix.python-version }} | ||
runs-on: ${{ matrix.platform }} | ||
strategy: | ||
matrix: | ||
platform: [ ubuntu-latest ] | ||
python-version: [ "3.8", "3.9", "3.10" ] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools pytest | ||
pip install -e . | ||
- name: Test with pytest | ||
run: pytest | ||
env: | ||
PLATFORM: ${{ matrix.platform }} | ||
|
||
- name: Coverage | ||
uses: codecov/codecov-action@v1 | ||
|
||
deploy: | ||
# this will run when you have tagged a commit, starting with "v*" | ||
# and requires that you have put your twine API key in your | ||
# github secrets (see readme for details) | ||
needs: [ test ] | ||
runs-on: ubuntu-latest | ||
if: contains(github.ref, 'tags') | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.x" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -U setuptools setuptools_scm wheel twine | ||
- name: Build and publish | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }} | ||
run: | | ||
git tag | ||
python setup.py sdist bdist_wheel | ||
twine upload dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,79 @@ | ||
[metadata] | ||
description-file = README.md | ||
name = eulerangles | ||
description = deal with large sets of Euler angles in Python | ||
long_description = file: README.md | ||
long_description_content_type = text/markdown | ||
url = https://github.com/alisterburt/eulerangles | ||
author = Alister Burt | ||
author_email = [email protected] | ||
license = BSD-3-Clause | ||
license_file = LICENSE | ||
classifiers = | ||
Development Status :: 2 - Pre-Alpha | ||
License :: OSI Approved :: BSD License | ||
Natural Language :: English | ||
Programming Language :: Python :: 3 | ||
Programming Language :: Python :: 3 :: Only | ||
Programming Language :: Python :: 3.8 | ||
Programming Language :: Python :: 3.9 | ||
Programming Language :: Python :: 3.10 | ||
|
||
project_urls = | ||
Source Code =https://github.com/alisterburt/eulerangles | ||
|
||
[options] | ||
packages = find: | ||
install_requires = | ||
numpy | ||
python_requires = >=3.8 | ||
setup_requires = | ||
setuptools_scm | ||
zip_safe = False | ||
|
||
[options.extras_require] | ||
dev = | ||
black | ||
flake8 | ||
flake8-docstrings | ||
ipython | ||
isort | ||
jedi<0.18.0 | ||
jupyter-book | ||
mypy | ||
pre-commit | ||
pydocstyle | ||
pytest | ||
testing = | ||
pytest | ||
|
||
[bdist_wheel] | ||
universal = 1 | ||
|
||
[flake8] | ||
exclude = docs,_version.py,.eggs,examples | ||
max-line-length = 88 | ||
docstring-convention = numpy | ||
ignore = D100, D213, D401, D413, D107, W503 | ||
|
||
[isort] | ||
profile = black | ||
src_paths = eulerangles | ||
|
||
[pydocstyle] | ||
match_dir = eulerangles | ||
convention = numpy | ||
add_select = D402,D415,D417 | ||
ignore = D100, D213, D401, D413, D107 | ||
|
||
[tool:pytest] | ||
addopts = -W error | ||
|
||
[mypy] | ||
files = eulerangles | ||
warn_unused_configs = True | ||
warn_unused_ignores = True | ||
check_untyped_defs = True | ||
implicit_reexport = False | ||
show_column_numbers = True | ||
show_error_codes = True | ||
ignore_missing_imports = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,3 @@ | ||
from setuptools import setup, find_packages | ||
import setuptools | ||
|
||
from eulerangles.version import __version__ | ||
|
||
setup( | ||
name='eulerangles', | ||
packages=find_packages(include=['eulerangles', '*'], exclude=['test',]), | ||
version=f'{__version__}', | ||
license='BSD 3-Clause License', | ||
description="""Simplify the handling of large sets of Euler angles in Python | ||
""", | ||
author='Alister Burt', | ||
author_email='[email protected]', | ||
url='https://github.com/alisterburt/eulerangles', | ||
keywords=['transformation', 'euler angles', 'eulerian angles', 'cryo-EM', 'cryo-ET'], | ||
classifiers=[ | ||
'Intended Audience :: Developers', | ||
'License :: OSI Approved :: BSD License', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.6', | ||
'Programming Language :: Python :: 3.7', | ||
'Programming Language :: Python :: 3.8', | ||
], | ||
) | ||
setuptools.setup(use_scm_version={"write_to": "eulerangles/_version.py"}) |