Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 13 additions & 20 deletions .github/workflows/build_exe.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: Build Executables

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+-?*"
workflow_dispatch:
workflow_call:
inputs:
is_release:
required: true
type: boolean

jobs:
build:
Expand All @@ -18,18 +19,21 @@ jobs:
move_command: move dist\mangotango.exe dist\mangotango_windows.exe
sha_command: pwsh -c "Get-FileHash -Algorithm SHA1 dist\mangotango_windows.exe | Format-Table Hash -HideTableHeaders > dist\mangotango_windows.exe.sha1"
list_command: dir dist
check_command: dist\mangotango_windows.exe --noop
- platform_name: MacOS 14
artifact_name: macos-14
os: macos-14
move_command: mv dist/mangotango dist/mangotango_macos_14
sha_command: shasum -a 1 dist/mangotango_macos_14 > dist/mangotango_macos_14.sha1
list_command: ls -ll dist
check_command: dist/mangotango_macos_14 --noop
- platform_name: MacOS 15
artifact_name: macos-15
os: macos-15
move_command: mv dist/mangotango dist/mangotango_macos_15
sha_command: shasum -a 1 dist/mangotango_macos_15 > dist/mangotango_macos_15.sha1
list_command: ls -ll dist
check_command: dist/mangotango_macos_15 --noop

name: Build ${{ matrix.platform_name }}
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -88,26 +92,15 @@ jobs:
- name: Inspect the dist/ directory before uploading artifacts
run: ${{ matrix.list_command }}

- name: Check that the executable runs
if: inputs.is_release == false
run: ${{ matrix.check_command}}

- name: Upload artifacts
if: inputs.is_release
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: |
dist/*

release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: artifacts

- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
artifacts/**/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: New Release

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+-?*"
workflow_dispatch:

jobs:
call-build_exe:
uses: ./.github/workflows/build_exe.yml
with:
is_release: true
release:
needs: call-build_exe
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: artifacts

- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
artifacts/**/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ jobs:

- name: Run tests
run: pytest
test_build:
uses: ./.github/workflows/build_exe.yml
with:
is_release: false
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ python -m venv venv
python -m mangotango
```

## Development Guide
## Development Guide and Documentation

[Development Guide](./docs/dev-guide.md)

Expand Down
10 changes: 9 additions & 1 deletion analyzers/example/test_example_base.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os

from preprocessing.series_semantic import identifier
from testing import CsvTestData, test_primary_analyzer
from testing import CsvConfig, CsvTestData, test_primary_analyzer

from .example_base.interface import interface
from .example_base.main import main
Expand All @@ -28,6 +28,14 @@ def test_example_base():
# JsonTestData if you have data that need to be interpreted into
# types not directly supported by the file format like timestamp.
semantics={"message_id": identifier},
# This is optional; it lets you specify how the CSV file is read.
# Every field in this is optional, too. These are the defaults.
csv_config=CsvConfig(
has_header=True,
quote_char='"',
encoding="utf8",
separator=",",
),
),
# These outputs are the expected outputs of the analyzer.
# You don't need to specify all the outputs, only the ones you want to test.
Expand Down
Loading