-
-
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.
Add basic project layout and github ci setup.
- Loading branch information
Showing
7 changed files
with
117 additions
and
0 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,2 @@ | ||
github: titusz | ||
custom: "https://iscc.foundation/support/" |
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,11 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "pip" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "daily" |
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,60 @@ | ||
name: CI | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
tests: | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
python-version: [3.7, 3.8, 3.9, '3.10'] | ||
os: [ubuntu-18.04, macos-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Poetry | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: 1.1.12 | ||
|
||
- name: Install Dependencies | ||
run: poetry install | ||
|
||
- name: Run Tests (Pure Python with coverage) | ||
run: poetry run pytest --cov=iscc_core --cov-report=xml -q tests | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v2 | ||
|
||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'python' ] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v1 | ||
with: | ||
languages: ${{ matrix.language }} | ||
|
||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v1 | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v1 |
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 @@ | ||
__version__ = "0.1.0" |
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,38 @@ | ||
[tool.poetry] | ||
name = "iscc-sdk" | ||
version = "0.1.0" | ||
description = "" | ||
authors = ["Titusz <[email protected]>"] | ||
license = "Apache-2.0" | ||
readme = "README.md" | ||
homepage = "https://sdk.iscc.codes" | ||
repository = "https://github.com/iscc/iscc-sdk" | ||
keywords=["iscc", "identifier", "media", "content", "hash", "blockchain", "similarity"] | ||
|
||
[tool.poetry.dependencies] | ||
python = ">=3.7,<4.0" | ||
iscc-core = "^0.2" | ||
iscc-schema = "^0.3" | ||
|
||
[tool.poetry.dev-dependencies] | ||
pytest = "^7.0" | ||
black = "^22.1" | ||
coverage = "^6.3" | ||
pytest-cov = "^3.0" | ||
poethepoet = "^0.13" | ||
bandit = "^1.7" | ||
|
||
[tool.black] | ||
skip-string-normalization = false | ||
line-length = 100 | ||
target-version = ['py37'] | ||
|
||
[tool.poe.tasks] | ||
black = { cmd = "poetry run black .", help = "Code style formating with black" } | ||
test = { cmd = "poetry run pytest --cov=iscc_sdk --cov-fail-under=100", help = "Run tests with coverage" } | ||
sec = { cmd = "poetry run bandit -r iscc_sdk -q", help = "Security check with bandit" } | ||
all = ["black", "test", "sec"] | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.0.0"] | ||
build-backend = "poetry.core.masonry.api" |
Empty file.
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,5 @@ | ||
from iscc_sdk import __version__ | ||
|
||
|
||
def test_version(): | ||
assert __version__ == "0.1.0" |