Skip to content

Commit

Permalink
v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ChromaticIsobar committed Feb 26, 2021
2 parents 3f6098e + 98f68b8 commit 1b55f57
Show file tree
Hide file tree
Showing 13 changed files with 695 additions and 108 deletions.
131 changes: 131 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
name: package

on:
push:
branches:
- master
- develop
tags:
- 'v*.*'
pull_request:
branches:
- master
- develop

jobs:
test:
runs-on: ubuntu-latest
container: python:3.7
steps:
- uses: actions/checkout@v2
- name: Install
run: python -m pip install .[test]
- name: Test
run: python -m unittest -v

sphinx:
runs-on: ubuntu-latest
container: sphinxdoc/sphinx-latexpdf
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- name: Install
run: python -m pip install .[docs]
- name: Build HTML
run: make html
working-directory: docs
- name: Upload HTML
uses: actions/upload-artifact@v1
with:
name: pages
path: docs/build/html
- name: Build latex
run: make latexpdf
working-directory: docs
- name: Upload pdf
uses: actions/upload-artifact@v1
with:
name: manual
path: docs/build/latex/spectralanalysisformodalparameterlinearestimate.pdf

release-create:
if: ${{ startsWith( github.ref , 'refs/tags/' ) }}
runs-on: ubuntu-latest
needs: [test, sphinx]
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
version: ${{ steps.get_version.outputs.VERSION }}
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: ${{ contains( github.ref , 'dev' ) }}
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}

manual-upload:
runs-on: ubuntu-latest
needs: [sphinx, release-create]
steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: manual
path: manual
- name: Upload artifact
id: upload-manual
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release-create.outputs.upload_url }}
asset_path: ./manual/spectralanalysisformodalparameterlinearestimate.pdf
asset_name: SAMPLE_${{ needs.release-create.outputs.version }}.pdf
asset_content_type: application/pdf

pages-deploy:
runs-on: ubuntu-latest
needs: [sphinx, release-create]
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: pages
path: pages
- name: No Jekyll in pages
run: touch pages/.nojekyll
- name: Deploy pages
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: pages

pypi-upload:
runs-on: ubuntu-latest
container: python:3.7
needs: release-create
steps:
- uses: actions/checkout@v2
- name: Build
run: python setup.py sdist
- name: Install Twine
run: python -m pip install twine
- name: Upload
run: python -m twine upload --verbose dist/*
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
TWINE_REPOSITORY: ${{ secrets.TWINE_REPOSITORY }}
TWINE_NON_INTERACTIVE: 1
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ This extras are also available, but intended for internal use
- `codecheck`: for checking code style

## Documentation
Coming soon
API documentation can be found online here:

https://LIMUNIMI.github.io/SAMPLE/

## Notebooks
For learning to use the package, you can refer to the interactive
Expand Down
3 changes: 3 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
.. mdinclude:: ../../README.md

SAMPLE Package
==============

.. toctree::
:maxdepth: 5
:caption: Contents
Expand Down
7 changes: 7 additions & 0 deletions notebooks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Interactive notebooks
Interactive notebooks to demonstrate SAMPLE

- [SAMPLE](https://colab.research.google.com/github/LIMUNIMI/SAMPLE/blob/master/notebooks/SAMPLE.ipynb):
a walkthrough to explain the method's concept
- [SDT](https://colab.research.google.com/github/LIMUNIMI/SAMPLE/blob/master/notebooks/SDT.ipynb):
a step-by-step guide to using SAMPLE for estimating parameters of SDT's `modal` objects
Loading

0 comments on commit 1b55f57

Please sign in to comment.