Skip to content

Commit 54ed7fa

Browse files
committed
refactor: initial commit after python project template change
0 parents  commit 54ed7fa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+6491
-0
lines changed

.envrc.disabled

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
layout python3
2+
# or, uncomment for specific 'base'-version of python:
3+
# layout python "$HOME/.pyenv/versions/3.8.2/bin/python"

.git_archival.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ref-names: $Format:%D$

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.git_archival.txt export-subst

.github/workflows/build-darwin.yaml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: "darwin tests & binary build for 'kiara'"
2+
# This workflow is triggered on pushes to the repository.
3+
on: [push]
4+
env:
5+
DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer
6+
MACOSX_DEPLOYMENT_TARGET: 10.13
7+
8+
9+
jobs:
10+
test-darwin:
11+
name: pytest on darwin
12+
runs-on: macos-10.15
13+
strategy:
14+
matrix:
15+
python_version: [3.6, 3.7, 3.8, 3.9]
16+
steps:
17+
- name: "Set up Python ${{ matrix.python_version }}"
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: "${{ matrix.python_version }}"
21+
- uses: actions/checkout@v2
22+
- name: install requirements
23+
run: pip install -U -e '.[dev_testing,all]'
24+
- name: Test with pytest
25+
run: make test
26+
27+
mypy-darwin:
28+
name: mypy check on darwin
29+
runs-on: macos-10.15
30+
strategy:
31+
matrix:
32+
python_version: [3.6, 3.7, 3.8, 3.9]
33+
steps:
34+
- name: "Set up Python ${{ matrix.python_version }}"
35+
uses: actions/setup-python@v2
36+
with:
37+
python-version: "${{ matrix.python_version }}"
38+
- uses: actions/checkout@v2
39+
- name: install requirements
40+
run: pip install -U -e '.[dev_testing,all]'
41+
- name: Test with mypy
42+
run: make mypy
43+
44+
flake8-darwin:
45+
name: flake8 on darwin
46+
runs-on: macos-10.15
47+
steps:
48+
- name: Set up Python 3.9
49+
uses: actions/setup-python@v2
50+
with:
51+
python-version: 3.9
52+
- uses: actions/checkout@v2
53+
- name: install requirements
54+
run: pip install -U -e '.[dev_testing,all]'
55+
- name: Test with flake8
56+
run: make flake
57+
58+
59+
60+
build-darwin:
61+
name: build darwin binary
62+
runs-on: macos-10.15
63+
needs:
64+
- test-darwin
65+
- mypy-darwin
66+
- flake8-darwin
67+
steps:
68+
- uses: actions/cache@v2
69+
with:
70+
path: ~/.pyenv/
71+
key: ${{ runner.os }}-target-darwin-10.13-kiara-python-build
72+
- run: brew install readline xz bzip2 lbzip2 lzlib openssl zlib
73+
- uses: actions/checkout@v2
74+
- name: download build script
75+
run: wget https://gitlab.com/frkl/frkl.project/-/raw/develop/scripts/build-binary/build.sh && chmod +x build.sh
76+
- name: download spec file
77+
run: wget https://gitlab.com/frkl/frkl.project/-/raw/develop/scripts/build-binary/onefile.spec
78+
- name: build_binary
79+
run: ./build.sh --python-type pyenv
80+
# # uncomment to sign binary (needs certificate data in env)
81+
# - name: Add MacOS certs
82+
# run: chmod +x ./scripts/build-binary/add-osx-cert.sh && ./scripts/build-binary/add-osx-cert.sh
83+
# env:
84+
# CERTIFICATE_OSX_APPLICATION: ${{ secrets.CERTIFICATE_OSX_APPLICATION }}
85+
# CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }}
86+
# - name: sign binary
87+
# run: "codesign -f -s 'Developer ID Application: Markus Binsteiner (4Q559SZWTL)' dist/darwin19/kiara"
88+
- name: Archive Mac OS X binary
89+
uses: actions/upload-artifact@v1
90+
with:
91+
name: kiara
92+
path: dist/darwin19/kiara

.github/workflows/build-linux.yaml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: "linux tests, binary- and documentation builds for 'kiara'"
2+
# This workflow is triggered on pushes to the repository.
3+
on: [push]
4+
5+
6+
jobs:
7+
test-linux:
8+
name: pytest on linux
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
python_version: [3.6, 3.7, 3.8, 3.9]
13+
steps:
14+
- name: "Set up Python ${{ matrix.python_version }}"
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: "${{ matrix.python_version }}"
18+
- uses: actions/checkout@v2
19+
- name: install requirements
20+
run: pip install -U -e '.[dev_testing,all]'
21+
- name: Test with pytest
22+
run: make test
23+
24+
mypy-linux:
25+
name: mypy check on linux
26+
runs-on: ubuntu-latest
27+
strategy:
28+
matrix:
29+
python_version: [3.6, 3.7, 3.8, 3.9]
30+
steps:
31+
- name: "Set up Python ${{ matrix.python_version }}"
32+
uses: actions/setup-python@v2
33+
with:
34+
python-version: "${{ matrix.python_version }}"
35+
- uses: actions/checkout@v2
36+
- name: install requirements
37+
run: pip install -U -e '.[dev_testing,all]'
38+
- name: Test with mypy
39+
run: make mypy
40+
41+
flake8-linux:
42+
name: flake8 on linux
43+
runs-on: ubuntu-latest
44+
steps:
45+
- name: Set up Python 3.9
46+
uses: actions/setup-python@v2
47+
with:
48+
python-version: 3.9
49+
- uses: actions/checkout@v2
50+
- name: install requirements
51+
run: pip install -U -e '.[dev_testing,all]'
52+
- name: Test with flake8
53+
run: make flake
54+
55+
build-docs:
56+
name: build documentation
57+
runs-on: ubuntu-latest
58+
needs:
59+
- test-linux
60+
- mypy-linux
61+
- flake8-linux
62+
steps:
63+
- name: Set up Python 3.9.1
64+
uses: actions/setup-python@v2
65+
with:
66+
python-version: 3.9.1
67+
- uses: actions/checkout@v2
68+
- name: install requirements
69+
run: pip install --extra-index-url https://gitlab.com/api/v4/projects/25344049/packages/pypi/simple -e '.[dev_documentation,all]'
70+
- name: create documentation
71+
run: make docs
72+
- name: deploy documentation to gh-pages
73+
uses: JamesIves/[email protected]
74+
with:
75+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
76+
BRANCH: gh-pages
77+
FOLDER: build/site
78+
79+
80+
81+
build-linux:
82+
name: build linux binary
83+
runs-on: ubuntu-16.04
84+
needs:
85+
- test-linux
86+
- mypy-linux
87+
- flake8-linux
88+
steps:
89+
- uses: actions/cache@v2
90+
with:
91+
path: ~/.pyenv/
92+
key: ${{ runner.os }}-target-ubuntu-kiara-python-build
93+
- uses: actions/checkout@v2
94+
- name: download build script
95+
run: wget https://gitlab.com/frkl/frkl.project/-/raw/develop/scripts/build-binary/build.sh && chmod +x build.sh
96+
- name: download spec file
97+
run: wget https://gitlab.com/frkl/frkl.project/-/raw/develop/scripts/build-binary/onefile.spec
98+
- name: build_binary
99+
run: "PATH=\"$(echo $PATH | tr : '\n' | grep -v linuxbrew | paste -s -d:)\" ./build.sh --python-type pyenv"
100+
- name: Archive Linux binary
101+
uses: actions/upload-artifact@v1
102+
with:
103+
name: kiara
104+
path: dist/linux-gnu/kiara

.github/workflows/build-windows.yaml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: "windows tests & binary build for 'kiara'"
2+
# This workflow is triggered on pushes to the repository.
3+
on: [push]
4+
5+
6+
jobs:
7+
test-windows:
8+
name: pytest on windows
9+
runs-on: windows-latest
10+
strategy:
11+
matrix:
12+
python_version: [3.6, 3.7, 3.8, 3.9]
13+
steps:
14+
- name: "Set up Python ${{ matrix.python_version }}"
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: "${{ matrix.python_version }}"
18+
- uses: actions/checkout@v2
19+
- name: install requirements
20+
run: pip install -U -e '.[dev_testing,all]'
21+
- name: Test with pytest
22+
run: make test
23+
24+
mypy-windows:
25+
name: mypy check on windows
26+
runs-on: windows-latest
27+
strategy:
28+
matrix:
29+
python_version: [3.6, 3.7, 3.8, 3.9]
30+
steps:
31+
- name: "Set up Python ${{ matrix.python_version }}"
32+
uses: actions/setup-python@v2
33+
with:
34+
python-version: "${{ matrix.python_version }}"
35+
- uses: actions/checkout@v2
36+
- name: install requirements
37+
run: pip install -U -e '.[dev_testing,all]'
38+
- name: Test with mypy
39+
run: make mypy
40+
41+
flake8-windows:
42+
name: flake8 on windows
43+
runs-on: windows-latest
44+
steps:
45+
- name: Set up Python 3.9
46+
uses: actions/setup-python@v2
47+
with:
48+
python-version: 3.9
49+
- uses: actions/checkout@v2
50+
- name: install requirements
51+
run: pip install -U -e '.[dev_testing,all]'
52+
- name: Test with flake8
53+
run: make flake
54+
55+
build-windows:
56+
name: build windows binary
57+
runs-on: windows-latest
58+
needs:
59+
- test-windows
60+
- mypy-windows
61+
- flake8-windows
62+
steps:
63+
- uses: actions/checkout@v2
64+
- uses: actions/setup-python@v2
65+
with:
66+
python-version: '3.9' # Version range or exact version of a Python version to use, using SemVer's version range syntax
67+
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
68+
- name: download build script
69+
run: C:\msys64\usr\bin\wget.exe https://gitlab.com/frkl/frkl.project/-/raw/develop/scripts/build-binary/build.sh && chmod +x build.sh
70+
- name: download spec file
71+
run: C:\msys64\usr\bin\wget.exe https://gitlab.com/frkl/frkl.project/-/raw/develop/scripts/build-binary/onefile.spec
72+
- name: build_binary
73+
run: "bash ./build.sh --python-type system"
74+
- name: Archive windows binary
75+
uses: actions/upload-artifact@v1
76+
with:
77+
name: kiara
78+
path: dist/msys/kiara.exe

.gitignore

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Temporary and binary files
2+
*~
3+
*.py[cod]
4+
*.so
5+
*.cfg
6+
!.isort.cfg
7+
!setup.cfg
8+
*.orig
9+
*.log
10+
*.pot
11+
__pycache__/*
12+
.cache/*
13+
.*.swp
14+
*/.ipynb_checkpoints/*
15+
16+
# Project files
17+
.ropeproject
18+
.project
19+
.pydevproject
20+
.settings
21+
.idea
22+
tags
23+
24+
# Package files
25+
*.egg
26+
*.eggs/
27+
.installed.cfg
28+
*.egg-info
29+
30+
# Unittest and coverage
31+
htmlcov/*
32+
.coverage
33+
.coverage.*
34+
.tox
35+
junit.xml
36+
coverage.xml
37+
.pytest_cache/
38+
39+
# Build and docs folder/files
40+
/build/*
41+
/dist/*
42+
sdist/*
43+
cover/*
44+
MANIFEST
45+
46+
# Per-project virtualenvs
47+
.venv*/
48+
pip-wheel-metadata/
49+
.python-version
50+
src/kiara/version.txt
51+
.direnv
52+
public
53+
site
54+
.dephell_report
55+
.direnv
56+
.mypy_cache
57+
.env
58+
docs/api-documentation.md
59+
.frkl
60+
.envrc
61+
build.sh
62+
onefile.spec

.gitlab-ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
variables:
3+
GIT_STRATEGY: fetch
4+
GIT_DEPTH: 0
5+
GIT_SUBMODULE_STRATEGY: recursive
6+
LM_PYTHON_VERSION: "2"
7+
DS_PYTHON_VERSION: "3"
8+
PIP_EXTRA_INDEX_URL: "https://pkgs.frkl.io/frkl/dev"
9+
10+
# include:
11+
# - template: Dependency-Scanning.gitlab-ci.yml
12+
# - template: License-Management.gitlab-ci.yml
13+
14+
image: python:3.8
15+
16+
stages:
17+
- test
18+
- build
19+
- build_windows
20+
- release
21+
22+
include:
23+
- local: '/ci/gitlab/test/tox.yml'
24+
- local: '/ci/gitlab/test/mypy.yml'
25+
- local: '/ci/gitlab/test/flake8.yml'
26+
- local: '/ci/gitlab/test/coverage.yml'
27+
- local: '/ci/gitlab/test/safety.yml'
28+
- local: '/ci/gitlab/test/commitlint.yml'
29+
- local: '/ci/gitlab/build/docs.yml'
30+
- local: '/ci/gitlab/build/pkg.yml'
31+
- local: '/ci/gitlab/build/binary_linux.yml'
32+
- local: '/ci/gitlab/build/binary_windows.yml'
33+
# - local: '/ci/gitlab/release/binaries.yml'
34+
# - local: '/ci/gitlab/release/container.yml'
35+
36+
37+
pages:
38+
extends: .kiara_build_docs

0 commit comments

Comments
 (0)