Skip to content

Commit e1ca38b

Browse files
v.1.0.0
BasicSpanner migration. Initial commit.
1 parent 167c71d commit e1ca38b

72 files changed

Lines changed: 27245 additions & 1 deletion

Some content is hidden

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

.github/workflows/build-linux.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Linux Build
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build-linux:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
with:
18+
submodules: recursive
19+
20+
- name: Try Setup Qt 6.9 (aqt)
21+
id: qt
22+
continue-on-error: true
23+
uses: jurplel/install-qt-action@v4
24+
with:
25+
version: '6.9.*'
26+
arch: 'gcc_64'
27+
modules: qtcharts
28+
29+
- name: Diagnose Qt availability
30+
if: steps.qt.outcome == 'failure'
31+
run: |
32+
python3 -m pip install --upgrade pip aqtinstall==3.3.*
33+
python3 -m aqt version
34+
python3 -m aqt list-qt linux desktop --arch 6.9.1 || true
35+
python3 -m aqt list-qt linux desktop --modules 6.9.1 gcc_64 || true
36+
37+
- name: Fallback install Qt from apt (qt6-base-dev, qt6-charts-dev)
38+
if: steps.qt.outcome == 'failure'
39+
run: |
40+
sudo apt-get update
41+
sudo apt-get install -y qt6-base-dev qt6-charts-dev
42+
43+
- name: Setup CMake
44+
uses: jwlawson/actions-setup-cmake@v1.13
45+
with:
46+
cmake-version: '3.25.0'
47+
48+
- name: Set CMAKE_PREFIX_PATH
49+
run: |
50+
if [ -n "${QTDIR:-}" ]; then
51+
echo "CMAKE_PREFIX_PATH=$QTDIR" >> "$GITHUB_ENV"
52+
else
53+
echo "CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu/cmake" >> "$GITHUB_ENV"
54+
fi
55+
56+
- name: Configure CMake
57+
run: |
58+
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH"
59+
60+
- name: Build
61+
run: |
62+
cmake --build build --parallel
63+
64+
- name: Verify executable
65+
run: |
66+
if [ -f "build/BasicSpanner" ]; then
67+
echo "Executable created: build/BasicSpanner"
68+
else
69+
echo "Executable not found" && exit 1
70+
fi
71+
72+
- name: Upload artifact
73+
uses: actions/upload-artifact@v4
74+
with:
75+
name: BasicSpanner-Linux-${{ github.sha }}
76+
path: |
77+
build/BasicSpanner
78+
retention-days: 14
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Windows Build
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
test-build:
12+
runs-on: windows-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Qt
19+
uses: jurplel/install-qt-action@v4
20+
with:
21+
version: '6.9.*'
22+
arch: 'win64_msvc2022_64'
23+
modules: qtcharts
24+
25+
- name: Setup Visual Studio
26+
uses: microsoft/setup-msbuild@v1.1
27+
28+
- name: Setup CMake
29+
uses: jwlawson/actions-setup-cmake@v1.13
30+
with:
31+
cmake-version: '3.25.0'
32+
33+
- name: Setup Python
34+
uses: actions/setup-python@v4
35+
with:
36+
python-version: '3.9'
37+
38+
- name: Install Python dependencies
39+
run: |
40+
python -m pip install --upgrade pip
41+
pip install -r requirements.txt
42+
43+
- name: Configure CMake
44+
run: |
45+
cmake -B build -S . -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="${{ env.QT_ROOT_DIR }};${{ env.QTDIR }}"
46+
47+
- name: Build project
48+
run: |
49+
cmake --build build --config Release --parallel
50+
51+
- name: Verify executable
52+
run: |
53+
if (Test-Path "build\Release\BasicSpanner.exe") {
54+
Write-Host "Executable created successfully"
55+
Get-ChildItem "build\Release\BasicSpanner.exe" | Select-Object Name, Length
56+
} else {
57+
Write-Host "Executable not found"
58+
exit 1
59+
}
60+
61+
- name: Test basic functionality
62+
run: |
63+
Write-Host "Testing basic functionality..."
64+
if (Test-Path "build\Release\verify_basic_network.exe") {
65+
Write-Host "Verification executable found"
66+
} else {
67+
Write-Host "Verification executable not found (optional)"
68+
}
69+
70+
- name: Upload build artifacts
71+
uses: actions/upload-artifact@v4
72+
with:
73+
name: BasicSpanner-Windows-${{ github.sha }}
74+
path: build/Release/
75+
retention-days: 7

.gitignore

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Build directories
2+
/build/
3+
/build-*/
4+
/bin/
5+
/lib/
6+
/release/
7+
/debug/
8+
/out/
9+
10+
# CMake
11+
CMakeCache.txt
12+
CMakeFiles/
13+
cmake_install.cmake
14+
install_manifest.txt
15+
CTestTestfile.cmake
16+
_deps/
17+
Makefile*
18+
19+
# Qt/meta-object generated files
20+
*.moc
21+
moc_*.cpp
22+
qrc_*.cpp
23+
ui_*.h
24+
25+
# Compiled artefacts
26+
*.o
27+
*.obj
28+
*.so
29+
*.dylib
30+
*.dll
31+
*.a
32+
*.lib
33+
*.exe
34+
*.out
35+
*.app
36+
*.pdb
37+
*.ilk
38+
*.exp
39+
40+
# IDE / editor
41+
.vscode/
42+
.idea/
43+
*.user
44+
*.user.*
45+
CMakeLists.txt.user*
46+
*.swp
47+
*~
48+
49+
# System
50+
.DS_Store
51+
Thumbs.db
52+
53+
# Python
54+
__pycache__/
55+
*.pyc
56+
*.pyo
57+
.pytest_cache/
58+
59+
# Runtime outputs
60+
real_time_permutations.txt
61+
permutation_results.txt
62+
histogram_data_*.csv
63+
isolated_nodes.txt
64+
rejected_self_loops.txt
65+
*.log
66+
output/*

CMakeLists.txt

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
cmake_minimum_required(VERSION 3.16)
2+
project(BasicSpanner CXX)
3+
4+
# Set C++ standard
5+
set(CMAKE_CXX_STANDARD 17)
6+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
7+
8+
# Find required packages
9+
find_package(Qt6 REQUIRED COMPONENTS Core Widgets Charts)
10+
11+
# Automatically handle Qt MOC, UIC, and RCC
12+
set(CMAKE_AUTOMOC ON)
13+
set(CMAKE_AUTOUIC ON)
14+
set(CMAKE_AUTORCC ON)
15+
16+
# Define source files
17+
file(GLOB_RECURSE SOURCES "src/**/*.cpp")
18+
file(GLOB_RECURSE HEADERS "src/**/*.h")
19+
20+
# Create executable
21+
add_executable(BasicSpanner
22+
src/main.cpp
23+
${SOURCES}
24+
${HEADERS}
25+
)
26+
27+
# Create test executable
28+
file(GLOB CORE_SOURCES "src/core/*.cpp")
29+
30+
# Create verification executable only if the source file exists
31+
if (EXISTS "${CMAKE_SOURCE_DIR}/verify_basic_network.cpp")
32+
add_executable(verify_basic_network
33+
verify_basic_network.cpp
34+
${CORE_SOURCES}
35+
)
36+
endif()
37+
38+
# Link libraries
39+
target_link_libraries(BasicSpanner
40+
Qt6::Core
41+
Qt6::Widgets
42+
Qt6::Charts
43+
)
44+
45+
46+
47+
if (TARGET verify_basic_network)
48+
target_link_libraries(verify_basic_network
49+
Qt6::Core
50+
Qt6::Widgets
51+
Qt6::Charts
52+
)
53+
endif()
54+
55+
# Include directories
56+
target_include_directories(BasicSpanner PRIVATE
57+
src/core
58+
src/gui
59+
src/gui/panels
60+
)
61+
62+
63+
64+
if (TARGET verify_basic_network)
65+
target_include_directories(verify_basic_network PRIVATE
66+
src/core
67+
src/gui
68+
src/gui/panels
69+
)
70+
endif()
71+
72+
# Set properties for different build types
73+
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
74+
target_compile_definitions(BasicSpanner PRIVATE DEBUG_BUILD)
75+
endif()
76+
77+
# Platform-specific settings
78+
if(WIN32)
79+
# Windows-specific settings
80+
if(MSVC)
81+
# MSVC compiler options
82+
target_compile_options(BasicSpanner PRIVATE
83+
/W3 # Warning level 3
84+
/permissive- # Disable non-conforming code
85+
/Zc:__cplusplus # Enable correct __cplusplus macro
86+
/EHsc # Exception handling
87+
)
88+
89+
# Set subsystem to console for proper output
90+
set_target_properties(BasicSpanner PROPERTIES
91+
WIN32_EXECUTABLE FALSE
92+
)
93+
endif()
94+
95+
# Copy Qt DLLs to output directory
96+
add_custom_command(TARGET BasicSpanner POST_BUILD
97+
COMMAND ${CMAKE_COMMAND} -E copy_if_different
98+
$<TARGET_FILE:Qt6::Core>
99+
$<TARGET_FILE:Qt6::Widgets>
100+
$<TARGET_FILE_DIR:BasicSpanner>
101+
)
102+
103+
# Windows deployment
104+
find_program(QT_WINDEPLOYQT_EXECUTABLE windeployqt HINTS ${Qt6_DIR}/../../../bin)
105+
if(QT_WINDEPLOYQT_EXECUTABLE)
106+
add_custom_command(TARGET BasicSpanner POST_BUILD
107+
COMMAND ${QT_WINDEPLOYQT_EXECUTABLE} $<TARGET_FILE:BasicSpanner>
108+
COMMENT "Deploying Qt libraries")
109+
endif()
110+
endif()
111+
112+
# Install rules
113+
install(TARGETS BasicSpanner
114+
RUNTIME DESTINATION bin
115+
)

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 José Marín, Ignacio Marín
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,18 @@
1-
# BasicSpanner
1+
# BasicSpanner
2+
3+
Interactive C++/Qt6 application that computes **basic networks** from an input graph and a set of seed nodes, with multi-threaded permutations, real-time reporting and an interactive visualization panel.
4+
5+
[![Platform](https://img.shields.io/badge/platform-Linux%20%7C%20Windows-blue.svg)](https://github.com/josemarinfarina/BasicSpanner)
6+
[![Language](https://img.shields.io/badge/language-C%2B%2B-orange.svg)](https://isocpp.org/)
7+
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
8+
[![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg)](https://github.com/josemarinfarina/BasicSpanner/actions)
9+
[![Version](https://img.shields.io/badge/version-1.0.0-blue.svg)](https://github.com/josemarinfarina/BasicNetworks/releases)
10+
11+
[![Download Windows](https://img.shields.io/badge/download-Windows%20Build-green.svg?style=for-the-badge&logo=visualstudio)]()
12+
[![Download Linux](https://img.shields.io/badge/download-Linux%20Build-blue.svg?style=for-the-badge&logo=linux)]()
13+
14+
15+
16+
## License
17+
18+
Released under the MIT License. See [LICENSE](LICENSE) for details.

requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
matplotlib>=3.5.0
2+
numpy>=1.21.0
3+
pathlib2>=2.3.0; python_version < "3.4"
4+
networkx>=2.6.0

0 commit comments

Comments
 (0)