Skip to content

Commit

Permalink
refactor: initial commit after python project template change
Browse files Browse the repository at this point in the history
  • Loading branch information
makkus committed Apr 14, 2021
0 parents commit 54ed7fa
Show file tree
Hide file tree
Showing 72 changed files with 6,491 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .envrc.disabled
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
layout python3
# or, uncomment for specific 'base'-version of python:
# layout python "$HOME/.pyenv/versions/3.8.2/bin/python"
1 change: 1 addition & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ref-names: $Format:%D$
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git_archival.txt export-subst
92 changes: 92 additions & 0 deletions .github/workflows/build-darwin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: "darwin tests & binary build for 'kiara'"
# This workflow is triggered on pushes to the repository.
on: [push]
env:
DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer
MACOSX_DEPLOYMENT_TARGET: 10.13


jobs:
test-darwin:
name: pytest on darwin
runs-on: macos-10.15
strategy:
matrix:
python_version: [3.6, 3.7, 3.8, 3.9]
steps:
- name: "Set up Python ${{ matrix.python_version }}"
uses: actions/setup-python@v2
with:
python-version: "${{ matrix.python_version }}"
- uses: actions/checkout@v2
- name: install requirements
run: pip install -U -e '.[dev_testing,all]'
- name: Test with pytest
run: make test

mypy-darwin:
name: mypy check on darwin
runs-on: macos-10.15
strategy:
matrix:
python_version: [3.6, 3.7, 3.8, 3.9]
steps:
- name: "Set up Python ${{ matrix.python_version }}"
uses: actions/setup-python@v2
with:
python-version: "${{ matrix.python_version }}"
- uses: actions/checkout@v2
- name: install requirements
run: pip install -U -e '.[dev_testing,all]'
- name: Test with mypy
run: make mypy

flake8-darwin:
name: flake8 on darwin
runs-on: macos-10.15
steps:
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- uses: actions/checkout@v2
- name: install requirements
run: pip install -U -e '.[dev_testing,all]'
- name: Test with flake8
run: make flake



build-darwin:
name: build darwin binary
runs-on: macos-10.15
needs:
- test-darwin
- mypy-darwin
- flake8-darwin
steps:
- uses: actions/cache@v2
with:
path: ~/.pyenv/
key: ${{ runner.os }}-target-darwin-10.13-kiara-python-build
- run: brew install readline xz bzip2 lbzip2 lzlib openssl zlib
- uses: actions/checkout@v2
- name: download build script
run: wget https://gitlab.com/frkl/frkl.project/-/raw/develop/scripts/build-binary/build.sh && chmod +x build.sh
- name: download spec file
run: wget https://gitlab.com/frkl/frkl.project/-/raw/develop/scripts/build-binary/onefile.spec
- name: build_binary
run: ./build.sh --python-type pyenv
# # uncomment to sign binary (needs certificate data in env)
# - name: Add MacOS certs
# run: chmod +x ./scripts/build-binary/add-osx-cert.sh && ./scripts/build-binary/add-osx-cert.sh
# env:
# CERTIFICATE_OSX_APPLICATION: ${{ secrets.CERTIFICATE_OSX_APPLICATION }}
# CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }}
# - name: sign binary
# run: "codesign -f -s 'Developer ID Application: Markus Binsteiner (4Q559SZWTL)' dist/darwin19/kiara"
- name: Archive Mac OS X binary
uses: actions/upload-artifact@v1
with:
name: kiara
path: dist/darwin19/kiara
104 changes: 104 additions & 0 deletions .github/workflows/build-linux.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: "linux tests, binary- and documentation builds for 'kiara'"
# This workflow is triggered on pushes to the repository.
on: [push]


jobs:
test-linux:
name: pytest on linux
runs-on: ubuntu-latest
strategy:
matrix:
python_version: [3.6, 3.7, 3.8, 3.9]
steps:
- name: "Set up Python ${{ matrix.python_version }}"
uses: actions/setup-python@v2
with:
python-version: "${{ matrix.python_version }}"
- uses: actions/checkout@v2
- name: install requirements
run: pip install -U -e '.[dev_testing,all]'
- name: Test with pytest
run: make test

mypy-linux:
name: mypy check on linux
runs-on: ubuntu-latest
strategy:
matrix:
python_version: [3.6, 3.7, 3.8, 3.9]
steps:
- name: "Set up Python ${{ matrix.python_version }}"
uses: actions/setup-python@v2
with:
python-version: "${{ matrix.python_version }}"
- uses: actions/checkout@v2
- name: install requirements
run: pip install -U -e '.[dev_testing,all]'
- name: Test with mypy
run: make mypy

flake8-linux:
name: flake8 on linux
runs-on: ubuntu-latest
steps:
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- uses: actions/checkout@v2
- name: install requirements
run: pip install -U -e '.[dev_testing,all]'
- name: Test with flake8
run: make flake

build-docs:
name: build documentation
runs-on: ubuntu-latest
needs:
- test-linux
- mypy-linux
- flake8-linux
steps:
- name: Set up Python 3.9.1
uses: actions/setup-python@v2
with:
python-version: 3.9.1
- uses: actions/checkout@v2
- name: install requirements
run: pip install --extra-index-url https://gitlab.com/api/v4/projects/25344049/packages/pypi/simple -e '.[dev_documentation,all]'
- name: create documentation
run: make docs
- name: deploy documentation to gh-pages
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: build/site



build-linux:
name: build linux binary
runs-on: ubuntu-16.04
needs:
- test-linux
- mypy-linux
- flake8-linux
steps:
- uses: actions/cache@v2
with:
path: ~/.pyenv/
key: ${{ runner.os }}-target-ubuntu-kiara-python-build
- uses: actions/checkout@v2
- name: download build script
run: wget https://gitlab.com/frkl/frkl.project/-/raw/develop/scripts/build-binary/build.sh && chmod +x build.sh
- name: download spec file
run: wget https://gitlab.com/frkl/frkl.project/-/raw/develop/scripts/build-binary/onefile.spec
- name: build_binary
run: "PATH=\"$(echo $PATH | tr : '\n' | grep -v linuxbrew | paste -s -d:)\" ./build.sh --python-type pyenv"
- name: Archive Linux binary
uses: actions/upload-artifact@v1
with:
name: kiara
path: dist/linux-gnu/kiara
78 changes: 78 additions & 0 deletions .github/workflows/build-windows.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: "windows tests & binary build for 'kiara'"
# This workflow is triggered on pushes to the repository.
on: [push]


jobs:
test-windows:
name: pytest on windows
runs-on: windows-latest
strategy:
matrix:
python_version: [3.6, 3.7, 3.8, 3.9]
steps:
- name: "Set up Python ${{ matrix.python_version }}"
uses: actions/setup-python@v2
with:
python-version: "${{ matrix.python_version }}"
- uses: actions/checkout@v2
- name: install requirements
run: pip install -U -e '.[dev_testing,all]'
- name: Test with pytest
run: make test

mypy-windows:
name: mypy check on windows
runs-on: windows-latest
strategy:
matrix:
python_version: [3.6, 3.7, 3.8, 3.9]
steps:
- name: "Set up Python ${{ matrix.python_version }}"
uses: actions/setup-python@v2
with:
python-version: "${{ matrix.python_version }}"
- uses: actions/checkout@v2
- name: install requirements
run: pip install -U -e '.[dev_testing,all]'
- name: Test with mypy
run: make mypy

flake8-windows:
name: flake8 on windows
runs-on: windows-latest
steps:
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- uses: actions/checkout@v2
- name: install requirements
run: pip install -U -e '.[dev_testing,all]'
- name: Test with flake8
run: make flake

build-windows:
name: build windows binary
runs-on: windows-latest
needs:
- test-windows
- mypy-windows
- flake8-windows
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.9' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- name: download build script
run: C:\msys64\usr\bin\wget.exe https://gitlab.com/frkl/frkl.project/-/raw/develop/scripts/build-binary/build.sh && chmod +x build.sh
- name: download spec file
run: C:\msys64\usr\bin\wget.exe https://gitlab.com/frkl/frkl.project/-/raw/develop/scripts/build-binary/onefile.spec
- name: build_binary
run: "bash ./build.sh --python-type system"
- name: Archive windows binary
uses: actions/upload-artifact@v1
with:
name: kiara
path: dist/msys/kiara.exe
62 changes: 62 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Temporary and binary files
*~
*.py[cod]
*.so
*.cfg
!.isort.cfg
!setup.cfg
*.orig
*.log
*.pot
__pycache__/*
.cache/*
.*.swp
*/.ipynb_checkpoints/*

# Project files
.ropeproject
.project
.pydevproject
.settings
.idea
tags

# Package files
*.egg
*.eggs/
.installed.cfg
*.egg-info

# Unittest and coverage
htmlcov/*
.coverage
.coverage.*
.tox
junit.xml
coverage.xml
.pytest_cache/

# Build and docs folder/files
/build/*
/dist/*
sdist/*
cover/*
MANIFEST

# Per-project virtualenvs
.venv*/
pip-wheel-metadata/
.python-version
src/kiara/version.txt
.direnv
public
site
.dephell_report
.direnv
.mypy_cache
.env
docs/api-documentation.md
.frkl
.envrc
build.sh
onefile.spec
38 changes: 38 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
variables:
GIT_STRATEGY: fetch
GIT_DEPTH: 0
GIT_SUBMODULE_STRATEGY: recursive
LM_PYTHON_VERSION: "2"
DS_PYTHON_VERSION: "3"
PIP_EXTRA_INDEX_URL: "https://pkgs.frkl.io/frkl/dev"

# include:
# - template: Dependency-Scanning.gitlab-ci.yml
# - template: License-Management.gitlab-ci.yml

image: python:3.8

stages:
- test
- build
- build_windows
- release

include:
- local: '/ci/gitlab/test/tox.yml'
- local: '/ci/gitlab/test/mypy.yml'
- local: '/ci/gitlab/test/flake8.yml'
- local: '/ci/gitlab/test/coverage.yml'
- local: '/ci/gitlab/test/safety.yml'
- local: '/ci/gitlab/test/commitlint.yml'
- local: '/ci/gitlab/build/docs.yml'
- local: '/ci/gitlab/build/pkg.yml'
- local: '/ci/gitlab/build/binary_linux.yml'
- local: '/ci/gitlab/build/binary_windows.yml'
# - local: '/ci/gitlab/release/binaries.yml'
# - local: '/ci/gitlab/release/container.yml'


pages:
extends: .kiara_build_docs
Loading

0 comments on commit 54ed7fa

Please sign in to comment.