Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
ebe4c97
add mkdocs config and populate /docs folder
KristijanArmeni May 9, 2025
6a90430
add mkdostrings and deps to dev dependencies
KristijanArmeni May 9, 2025
c55a845
update README.md, add bages and logo
KristijanArmeni May 9, 2025
956c75b
create guides folder
KristijanArmeni May 15, 2025
57421e3
Add github workflow for docs build on pull request
KristijanArmeni May 15, 2025
c3fcbca
use a seperate, smaller requirements file for docs and use for workflow
KristijanArmeni May 19, 2025
b07a838
update readme esthetics a little bit
KristijanArmeni May 19, 2025
7ee6063
[fix] add requirements-mdocs.txt and remove cmake dependency
KristijanArmeni May 19, 2025
0cda3f3
fix links
KristijanArmeni May 19, 2025
0ede524
Wrote, "Getting Started" guide for technical docs.
VEDA95 Jun 17, 2025
c187e43
Added a link to the contributor workflow section under "Next Steps" i…
VEDA95 Jun 17, 2025
83f96a6
Merge branch 'develop' into reapply-mkdocs
JoeKarow Jun 24, 2025
6021583
add scoped token permission
JoeKarow Jun 24, 2025
d3ed254
use separate build / deploy actions
JoeKarow Jun 24, 2025
f2f46fd
use deploy key instead of github_token
JoeKarow Jun 24, 2025
7719d33
use separate build & deploy actions. only deploy to prod from main --…
JoeKarow Jun 24, 2025
d1093a0
update workflow to use pull_request_target for better security and co…
JoeKarow Jun 24, 2025
5e1a204
add manual trigger
JoeKarow Jun 24, 2025
5d8e963
change trigger back to pull_request
JoeKarow Jun 24, 2025
7a3d66f
Add macOS code signing and build improvements (#156)
JoeKarow Jun 24, 2025
04ef2d2
Merge branch 'main' into JoeKarow/mkdocs
JoeKarow Jun 24, 2025
914db72
reset permissions
JoeKarow Jun 24, 2025
7bb7f2f
Merge branch 'develop' into JoeKarow/mkdocs
JoeKarow Jun 24, 2025
8c4547e
Revised setup docs with the help of the ai-docs Joe generated. Also w…
VEDA95 Jul 21, 2025
bf5fad5
Merge remote-tracking branch 'upstream/develop' into JoeKarow/mkdocs
KristijanArmeni Jul 29, 2025
f6e70db
Split architecture docs into seperate sections
VEDA95 Jul 30, 2025
4085015
Added next steps to contribution section
VEDA95 Jul 30, 2025
3625eaa
Updated mkdoc nav config to reflect how the architecture docs are now…
VEDA95 Jul 30, 2025
dec990f
Update build_exe.yml
JoeKarow Jul 30, 2025
7e39a11
Update build_exe.yml
JoeKarow Jul 30, 2025
04976d1
Finished writing initial revisions to the analyzers documentation...
VEDA95 Aug 3, 2025
0958454
WIP writing docs for shiny and react dashboards...
VEDA95 Aug 3, 2025
2e582a4
Wrote initial draft for the technical docs for the react and shiny da…
VEDA95 Aug 3, 2025
818e3ab
Added Nexts Steps sub section for each domain section...
VEDA95 Aug 3, 2025
0b2e023
Transferred logging docs from branch JoeKarow/logging-system
VEDA95 Aug 3, 2025
e34cfb9
Added additional docs to the mkdocs navigation...
VEDA95 Aug 3, 2025
d2d6bd5
Revised navigation links to be more coherent in structure...
VEDA95 Aug 3, 2025
a1e8306
Implemented mermaid plugin for mkdocs...
VEDA95 Aug 3, 2025
9cc2e44
Shifted docs around and corrected link warning when running mkdeocs l…
VEDA95 Aug 3, 2025
588b6df
Moved testing docs to get-started folder...
VEDA95 Aug 3, 2025
e3099d0
Revised overview and testing links to clear link warnings...
VEDA95 Aug 3, 2025
40dc59e
Implemented reference docs FactoryOutputContext and related context o…
VEDA95 Aug 3, 2025
e277550
Applied black and isort formatting analyzer interface context...
VEDA95 Aug 3, 2025
3c2beb1
Rebuilt mkdoc site assets...
VEDA95 Aug 3, 2025
aebc47f
WIP troubleshooting why workflow is not deploying updated mkdoc asset…
VEDA95 Aug 3, 2025
be79d2e
WIP troubleshooting why workflow is not deploying updated mkdoc asset…
VEDA95 Aug 3, 2025
7f786b6
WIP troubleshooting why updated mkdoc assets are not being deployed t…
VEDA95 Aug 3, 2025
e10a00e
Implemented changes recommended in the latest review conducted by Kri…
VEDA95 Aug 6, 2025
e59ef61
Cleaning up unneccesarry files...
VEDA95 Aug 6, 2025
49781f1
Application-Wide Logging System (#177)
JoeKarow Aug 4, 2025
00e984c
Resolving merge conflicts with dev branch...
VEDA95 Aug 6, 2025
8e8f2e4
create guides folder
KristijanArmeni May 15, 2025
2f57d4b
Breaking out of rebase hell (hopefully)...
VEDA95 Aug 6, 2025
e3f3165
Rebuilt mkdoc site assets...
VEDA95 Aug 3, 2025
a36c6b1
Cleaning up unneccesarry files...
VEDA95 Aug 6, 2025
c99815b
Fixing merge conlict caused by docs/dev-guide.md
VEDA95 Aug 6, 2025
5ccfb56
Removing everything that was readded to overview while trying to brea…
VEDA95 Aug 6, 2025
a6f532f
Removing .idea directory that got added while breaking out of rebase …
VEDA95 Aug 6, 2025
36c233c
Attempting to fix action error that occurs when deploying mkdocs site...
VEDA95 Aug 6, 2025
4f8d8cd
Included link to technical docs site in project README...
VEDA95 Aug 6, 2025
be52e4e
feat, fix: add logo to the home page, fix home page links
KristijanArmeni Aug 7, 2025
a4efdf5
add /site to gitignore
KristijanArmeni Aug 7, 2025
5742bd5
docs: use About for homepage title
KristijanArmeni Aug 7, 2025
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
76 changes: 76 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# see: https://github.com/marketplace/actions/deploy-mkdocs
name: Publish docs via GitHub Pages

on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed
push:
branches:
- main
workflow_dispatch:
inputs:
deploy_to:
description: "Deployment destination"
type: choice
options:
- prod
- preview

jobs:
build:
name: Deploy docs
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
id-token: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
# ✅ Explicitly checkout the PR branch
ref: ${{ github.event.pull_request.head.sha }}
- name: Build
uses: Tiryoh/actions-mkdocs@v0.24.0
if: github.event.action != 'closed'
with:
# mkdocs_version: 'latest' # option
#mkdocs_version: '1.1' # option
requirements: "requirements-mkdocs.txt" # option
configfile: "mkdocs.yml" # option
- name: Fix site permissions
if: github.event.action != 'closed'
run: |
sudo chown -R runner:runner site/
find site/ -type f -exec chmod 644 {} \;
find site/ -type d -exec chmod 755 {} \;
- uses: rossjrw/pr-preview-action@v1
if: github.event_name == 'pull_request' || (github.event_name == 'workflow_dispatch' && inputs.deploy_to == 'preview')
with:
source-dir: ./site/
preview-branch: gh-pages
umbrella-dir: pr-preview
action: auto
- uses: JamesIves/github-pages-deploy-action@v4
if: (github.event_name == 'push' && github.ref_name == 'main') || (github.event_name == 'workflow_dispatch' && inputs.deploy_to == 'prod')
with:
folder: ./site/
branch: gh-pages
clean-exclude: pr-preview
force: false

# - name: Deploy docs
# uses: mhausenblas/mkdocs-deploy-gh-pages@master
# # Or use mhausenblas/mkdocs-deploy-gh-pages@nomaterial to build without the mkdocs-material theme
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# #CUSTOM_DOMAIN: optionaldomain.com
# CONFIG_FILE: mkdocs.yml
# EXTRA_PACKAGES: build-base
# # GITHUB_DOMAIN: github.myenterprise.com
# REQUIREMENTS: requirements-mkdocs.txt
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ __private__
/build
/dist
/analysis_outputs
/site
VERSION
*.DS_Store
.env*
Expand Down
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
repos:
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort

- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
- id: black
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12.10
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
# mango-tango-cli: A python terminal wrapper for CIB Mango Tree analyzers
<h2 align="center">mango-tango-cli</h2>
<h3 align="center">A Python command-line tool for detecting coordinated inauthentic behavior</h3>

<p align="center">
<img src="https://raw.githubusercontent.com/CIB-Mango-Tree/CIB-Mango-Tree-Website/main/assets/images/mango-text.PNG" alt="Mango logo" style="width:200px;"/>
</p>

<p align="center">
<a href="https://www.python.org/"><img alt="code" src="https://img.shields.io/badge/code-Python%203.12-blue?logo=Python"></a>
<a href="https://black.readthedocs.io/en/stable/"><img alt="style: black" src="https://img.shields.io/badge/style-Black-black?logo=Black"></a>
<a href="https://docs.astral.sh/ruff/"><img alt="style: black" src="https://img.shields.io/badge/tool-Polars-skyblue?logo=Polars"></a>
</p>

---

## Technical Documentation

For in-depth technical docs related to this repository please visit [https://civictechdc.github.io/mango-tango-cli](https://civictechdc.github.io/mango-tango-cli)

## Requirements

Expand Down
27 changes: 27 additions & 0 deletions analyzer_interface/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,17 +166,44 @@ def parquet_path(self) -> str:


class ShinyContext(BaseModel):
"""
Output interface for Shiny dashboards
"""

panel: NavPanel = None
"""
UI navigation panel to be added to shiny dashboard
"""

server_handler: Optional[ServerCallback] = None
"""
Server handler callback to be called by the shiny application instance
"""

class Config:
arbitrary_types_allowed = True


class FactoryOutputContext(BaseModel):
"""
Output interface for both factory and api_facotry functions for web
presenters.
"""

shiny: Optional[ShinyContext] = None
"""
Factory oputput for shiny dashboards
"""

api: Optional[dict[str, Any]] = None
"""
API factory output for React dashboard REST API
"""

data_frames: Optional[dict[str, DataFrame]] = None
"""
API factory dataframe output for React dashboard REST API
"""

class Config:
arbitrary_types_allowed = True
Loading