Skip to content

Commit

Permalink
Merge pull request #26 from ElNiak/development-formal-attacks
Browse files Browse the repository at this point in the history
update docs
  • Loading branch information
ElNiak authored Jun 3, 2024
2 parents ec03a28 + b2d8418 commit 5d79554
Show file tree
Hide file tree
Showing 5 changed files with 208 additions and 44 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/pr-generate-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ jobs:
uses: "actions/checkout@v3"
- name: "Generate docs"
run: |
pip3 install -r requirements.txt
pip3 install setup.py
make gen-docs
mkdocs gh-deploy --force --clean
mv sources docs
- name: "Commit generated documentation"
uses: "stefanzweifel/git-auto-commit-action@v4"
with:
Expand Down
53 changes: 13 additions & 40 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,62 +6,35 @@ NPROC := $(shell nproc)
###################################################################################################

gen-docs:
python3 ./docs/generate_doc.py
gendocs --config mkgendocs.yaml
python3 ./docs/generate_doc.py
gendocs --config docs/mkgendocs.yaml

mkdocs:
make gen-docs
mkdocs serve
make gen-docs
mkdocs serve

# Clean Docker images and containers
clean:
# This command removes all stopped containers and unused images
# This command removes all stopped containers and unused images
docker image prune -a

# Remove all unused Docker images
clean-docker:
# Removes unused Docker images
# Removes unused Docker images
docker image prune
# Removes all Docker images
# Removes all Docker images
docker image prune -a
# Force removal of all images
# Force removal of all images
docker rmi $(docker images -a -q)

# Fully clean Docker environment
clean-docker-full:
# Removes unused Docker images and containers
# Removes unused Docker images and containers
docker image prune
docker image prune -a
# Fully clean the Docker system (containers, networks, and images)
# Fully clean the Docker system (containers, networks, and images)
docker system prune -a -f
docker volume prune -a
# Force removal of all images
docker volume prune -a
# Force removal of all images
docker rmi $(docker images -a -q)


###################################################################################################
# RUNNER COMMANDS
###################################################################################################

# Compose the full Docker environment for all implementations
# Launch the web application interface for protocol testing
compose:
docker network inspect net >/dev/null 2>&1 || docker network create --gateway 172.27.1.1 --subnet 172.27.1.0/24 net
# Set up host permissions and launch Docker Compose
sudo chown -R $(USER):$(GROUPS) $(PWD)/src/Protocols-Ivy/
xhost +
docker compose up -d
# Update host settings for network testing
cd src/panther/scripts/hosts/; bash update_etc_hosts.sh

# Start a Docker container for interactive Bash access
# Example: IMPLEM="picoquic" make start-bash
start-bash:
# Run a Docker container with increased memory limits and volume mounts
docker run --privileged --cpus="$(NPROC).0" --memory="10g" --memory-reservation="9.5g" \
-v $(PWD)/tls-keys:/PANTHER/tls-keys \
-v $(PWD)/tickets:/PANTHER/tickets \
-v $(PWD)/qlogs:/PANTHER/qlogs \
-v $(PWD)/src/Protocols-Ivy/doc/examples/quic:/PANTHER/Protocols-Ivy/doc/examples/quic \
-v $(PWD)/src/Protocols-Ivy/ivy/include/1.7:/PANTHER/Protocols-Ivy/ivy/include/1.7 \
-it $(IMPLEM)-ivy bash

4 changes: 2 additions & 2 deletions docs/generate_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def get_mkgendocs_config():
"""
try:
with open("mkgendocs.yaml", encoding="UTF-8") as mkgendocs_config:
with open("docs/mkgendocs.yaml", encoding="UTF-8") as mkgendocs_config:
return yaml.safe_load(mkgendocs_config)
except FileNotFoundError as error_message:
print("mkgendocs.yaml not found")
Expand Down Expand Up @@ -108,7 +108,7 @@ def main():

mkgendocs_config["pages"] = new_pages

with open("mkgendocs.yaml", "w", encoding="UTF-8") as mkgendocs_config_file:
with open("docs/mkgendocs.yaml", "w", encoding="UTF-8") as mkgendocs_config_file:
yaml.dump(mkgendocs_config, mkgendocs_config_file)


Expand Down
189 changes: 189 additions & 0 deletions docs/mkgendocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
pages:
- functions:
- load_config
- execute_command
- get_current_branch
- start_tool
- install_tool
- clean_tool
- build_webapp
- build_worker
- build_docker_visualizer
- stop_tool
- start_bash_container
- is_tmux_session
page: panther/panther_cli.md
source: ./panther/panther_cli.py
- functions:
- log_docker_output
- container_exists
- get_container_ip
- restore_hosts_file
- append_to_hosts_file
- load_config
- execute_command
- get_current_branch
- network_exists
- create_network
- create_docker_network
- create_docker_compose_config
- start_tool
- monitor_docker_usage
- update_docker_compose
- install_tool
- clean_tool
- build_ivy_webapp
- build_worker
- build_docker_visualizer
- stop_tool
- get_nproc
- start_bash_container
- cli
page: panther/panther_cli_click.md
source: ./panther/panther_cli_click.py
- functions:
- update_docker_compose
page: panther/panther_compose.md
source: ./panther/panther_compose.py
- functions:
- log_docker_output
- container_exists
- get_container_ip
- get_panther_container
- push_image_to_registry
- restore_hosts_file
- append_to_hosts_file
- network_exists
- create_network
- create_docker_network
- monitor_docker_usage
page: panther/panther_docker.md
source: ./panther/panther_docker.py
- functions:
- update_docker_swarm
- apply_scalability
page: panther/panther_swarm.md
source: ./panther/panther_swarm.py
- functions:
- replace_tag
- write_header_tex
- write_footer_tex
- get_line
- write_line
page: panther/outputs/results/trace_to_tex.md
source: ./panther/outputs/results/trace_to_tex.py
- functions:
- readlastline
- lines_that_contain
page: panther/outputs/results/create-csv.md
source: ./panther/outputs/results/create-csv.py
- functions:
- main
page: panther/panther_webapp/scripts/run_docker_image.md
source: ./panther/panther_webapp/scripts/run_docker_image.py
- functions:
- main
page: panther/panther_webapp/app/panther_server.md
source: ./panther/panther_webapp/app/panther_server.py
- functions:
- setup_cytoscape
- setup_quic_model
- get_relations
- add_assertion
- setup_assertions
- find_external_action
- find_external_object_action
- get_action_implementation
- get_called_action_implementation
- get_action_return
- get_action_parameters
- init_mapping
- get_module_object_attributes
- check_object_present
- init_tp_mapping
- get_prefix
- change_permission
- split_line
page: panther/panther_webapp/app/utils/cytoscape_generator.md
source: ./panther/panther_webapp/app/utils/cytoscape_generator.py
- functions:
- end_script
- get_workers_ips
- update_avg
- get_container_cpu_usage
- get_stats_cpu_usage
- threshold_not_reached
page: panther/panther_scalability/scalability_policy.md
source: ./panther/panther_scalability/scalability_policy.py
- functions:
- main
page: panther/panther_worker/app/panther.md
source: ./panther/panther_worker/app/panther.py
- functions:
- main
page: panther/panther_worker/app/panther_client.md
source: ./panther/panther_worker/app/panther_client.py
- functions:
- getListOfFiles
page: panther/panther_worker/app/scripts/installers/update-for-docker.md
source: ./panther/panther_worker/app/scripts/installers/update-for-docker.py
- functions:
- bootstrap
- main
page: panther/panther_worker/app/scripts/installers/get-pip.md
source: ./panther/panther_worker/app/scripts/installers/get-pip.py
- functions:
- bootstrap
- main
page: panther/panther_worker/app/scripts/installers/get-pip2.7.md
source: ./panther/panther_worker/app/scripts/installers/get-pip2.7.py
- functions:
- getListOfFiles
page: panther/panther_worker/app/scripts/updater/update-for-docker.md
source: ./panther/panther_worker/app/scripts/updater/update-for-docker.py
- functions:
- update_config_from_global_conf
- update_experiment_config
- execute_command
- restore_config
- update_config
- update_protocol_config
- get_experiment_config
- get_protocol_config
page: panther/panther_worker/app/panther_config/panther_config.md
source: ./panther/panther_worker/app/panther_config/panther_config.py
- functions:
- count
- maxz
- update_csv
- merge_dats
- make_dat
- main
page: panther/panther_worker/app/panther_stats/panther_quic_stats.md
source: ./panther/panther_worker/app/panther_stats/panther_quic_stats.py
- functions:
- count
- maxz
- update_csv
- merge_dats
- make_dat
- main
page: panther/panther_worker/app/panther_stats/panther_minip_stats.md
source: ./panther/panther_worker/app/panther_stats/panther_minip_stats.py
- functions:
- count
- maxz
- update_csv
- merge_dats
- make_dat
- main
page: panther/panther_worker/app/panther_stats/panther_apt_stats.md
source: ./panther/panther_worker/app/panther_stats/panther_apt_stats.py
- functions:
- EPOCHS
- dump_cid
- get_epoch
- stream_is_client_initiated
- stream_is_unidirectional
page: panther/panther_worker/app/implementations/quic-implementations/aioquic/aioquic/connection.md
source: ./panther/panther_worker/app/implementations/quic-implementations/aioquic/aioquic/connection.py
2 changes: 1 addition & 1 deletion mkdocs.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
site_name: unit-converter
site_name: Panther Documentation
theme:
name: material
palette:
Expand Down

0 comments on commit 5d79554

Please sign in to comment.