Skip to content

Commit

Permalink
new tests, docs, ...
Browse files Browse the repository at this point in the history
  • Loading branch information
csae8092 committed Oct 28, 2024
1 parent 759d29c commit a209d83
Show file tree
Hide file tree
Showing 20 changed files with 143 additions and 476 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: docs

on:
workflow_dispatch:
release:
types: [created]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: prepare
run: cp ./README.md ./docs/.
- name: Install needed packages
run: |
python -m pip install --upgrade pip
pip install mkdocs "mkdocstrings[python]"
- name: build the docs
run: mkdocs build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{secrets.GITHUB_TOKEN}}
publish_dir: ./site
18 changes: 18 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: flake8 Lint

on:
push:

jobs:
flake8-lint:
runs-on: ubuntu-latest
name: Lint
steps:
- name: Check out source repository
uses: actions/checkout@v3
- name: Set up Python environment
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: flake8 Lint
uses: py-actions/flake8@v2
31 changes: 31 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: pypi

on:
release:
types: [created]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: config
run: |
RELEASE=${GITHUB_REF##*/}
sed -i -e "s/version=\".*\"/version=\"$RELEASE\"/" pyproject.toml
echo $RELEASE
cat setup.py
- name: Install pip, setuptools, build, twine
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m build
twine upload dist/*
31 changes: 31 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Test
on:
push:

jobs:
test:
name: Test Application
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
pip install --upgrade --upgrade-strategy eager -r requirements_dev.txt
- name: Install actual package
run: |
pip install -e .
- name: Run tests
run: coverage run -m pytest -v
- name: Create Coverage Report
run: coverage xml
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
verbose: true
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,6 @@ env/

# IDE settings
.vscode/
*.ipynb
*.ipynb

docs/README.md
20 changes: 0 additions & 20 deletions docs/Makefile

This file was deleted.

1 change: 0 additions & 1 deletion docs/authors.rst

This file was deleted.

154 changes: 0 additions & 154 deletions docs/conf.py

This file was deleted.

1 change: 0 additions & 1 deletion docs/contributing.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/history.rst

This file was deleted.

20 changes: 0 additions & 20 deletions docs/index.rst

This file was deleted.

51 changes: 0 additions & 51 deletions docs/installation.rst

This file was deleted.

Loading

0 comments on commit a209d83

Please sign in to comment.