Skip to content

Commit cf3c7bf

Browse files
committed
Build pass
1 parent 8a64e5b commit cf3c7bf

19 files changed

+477
-7
lines changed

.gitignore

Lines changed: 233 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,233 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[codz]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
*.py.cover
50+
.hypothesis/
51+
.pytest_cache/
52+
cover/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
.pybuilder/
76+
target/
77+
78+
# Jupyter Notebook
79+
.ipynb_checkpoints
80+
81+
# IPython
82+
profile_default/
83+
ipython_config.py
84+
85+
# pyenv
86+
# For a library or package, you might want to ignore these files since the code is
87+
# intended to run in multiple environments; otherwise, check them in:
88+
# .python-version
89+
90+
# pipenv
91+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94+
# install all needed dependencies.
95+
#Pipfile.lock
96+
97+
# UV
98+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99+
# This is especially recommended for binary packages to ensure reproducibility, and is more
100+
# commonly ignored for libraries.
101+
#uv.lock
102+
103+
# poetry
104+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105+
# This is especially recommended for binary packages to ensure reproducibility, and is more
106+
# commonly ignored for libraries.
107+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108+
#poetry.lock
109+
#poetry.toml
110+
111+
# pdm
112+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
115+
#pdm.lock
116+
#pdm.toml
117+
.pdm-python
118+
.pdm-build/
119+
120+
# pixi
121+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122+
#pixi.lock
123+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124+
# in the .venv directory. It is recommended not to include this directory in version control.
125+
.pixi
126+
127+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
128+
__pypackages__/
129+
130+
# Celery stuff
131+
celerybeat-schedule
132+
celerybeat.pid
133+
134+
# SageMath parsed files
135+
*.sage.py
136+
137+
# Environments
138+
.env
139+
.envrc
140+
.venv
141+
env/
142+
venv/
143+
ENV/
144+
env.bak/
145+
venv.bak/
146+
147+
# Spyder project settings
148+
.spyderproject
149+
.spyproject
150+
151+
# Rope project settings
152+
.ropeproject
153+
154+
# mkdocs documentation
155+
/site
156+
157+
# mypy
158+
.mypy_cache/
159+
.dmypy.json
160+
dmypy.json
161+
162+
# Pyre type checker
163+
.pyre/
164+
165+
# pytype static type analyzer
166+
.pytype/
167+
168+
# Cython debug symbols
169+
cython_debug/
170+
171+
# PyCharm
172+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
173+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
174+
# and can be added to the global gitignore or merged into this file. For a more nuclear
175+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
176+
#.idea/
177+
178+
# Abstra
179+
# Abstra is an AI-powered process automation framework.
180+
# Ignore directories containing user credentials, local state, and settings.
181+
# Learn more at https://abstra.io/docs
182+
.abstra/
183+
184+
# Visual Studio Code
185+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
186+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
187+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
188+
# you could uncomment the following to ignore the entire vscode folder
189+
# .vscode/
190+
191+
# Ruff stuff:
192+
.ruff_cache/
193+
194+
# PyPI configuration file
195+
.pypirc
196+
197+
# Marimo
198+
marimo/_static/
199+
marimo/_lsp/
200+
__marimo__/
201+
202+
# Streamlit
203+
.streamlit/secrets.toml
204+
205+
206+
# From libCacheSim
207+
__pycache__
208+
*deprecated*
209+
*.DS_Store*
210+
*.bak
211+
*.clean
212+
*.nogit*
213+
*_build*
214+
*.out
215+
build
216+
.idea
217+
example/cacheSimulatorC/cmake-build-debug
218+
.vscode/*
219+
*.log
220+
fig/
221+
result/
222+
data_large/
223+
# Chaos
224+
sftp-config.json
225+
# Clangd cache
226+
*.cache/
227+
.lint-logs/
228+
# Python wheels
229+
*.whl
230+
231+
# Custom files
232+
CMakeFiles/*
233+
*.pyc

CMakeLists.txt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
cmake_minimum_required(VERSION 3.15...3.27)
2+
project(libCacheSim-python)
3+
set(DESCRIPTION "The libCacheSim Python Package")
4+
set(PROJECT_WEB "http://cachemon.github.io/libCacheSim-python")
5+
6+
# Note(haocheng): now we still utilize the exported cache from
7+
# the main project, which should be deprecated soon
28

39
# Include exported variables from cache
410
if(DEFINED LIBCB_BUILD_DIR)
5-
set(PARENT_BUILD_DIR "${LIBCB_BUILD_DIR}")
11+
set(MAIN_PROJECT_BUILD_DIR "${LIBCB_BUILD_DIR}")
612
message(STATUS "Using provided LIBCB_BUILD_DIR: ${LIBCB_BUILD_DIR}")
713
else()
8-
set(PARENT_BUILD_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../build")
14+
set(MAIN_PROJECT_BUILD_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/libCacheSim/build")
915
endif()
10-
set(EXPORT_FILE "${PARENT_BUILD_DIR}/export_vars.cmake")
16+
set(EXPORT_FILE "${MAIN_PROJECT_BUILD_DIR}/export_vars.cmake")
1117

1218
if(EXISTS "${EXPORT_FILE}")
1319
include("${EXPORT_FILE}")
@@ -56,7 +62,7 @@ include_directories(${ZSTD_INCLUDE_DIR})
5662
include_directories(${MAIN_PROJECT_SOURCE_DIR}/libCacheSim/bin)
5763

5864
# Find the main libCacheSim library
59-
set(MAIN_PROJECT_BUILD_DIR "${PARENT_BUILD_DIR}")
65+
set(MAIN_PROJECT_BUILD_DIR "${MAIN_PROJECT_BUILD_DIR}")
6066
set(MAIN_PROJECT_LIB_PATH "${MAIN_PROJECT_BUILD_DIR}/liblibCacheSim.a")
6167

6268
if(EXISTS "${MAIN_PROJECT_LIB_PATH}")

docs/mkdocs.yml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
site_name: libCacheSim Python Documentation
2+
site_url: https://cachemon.github.io/libCacheSim-python/
3+
repo_url: https://github.com/cacheMon/libCacheSim-python
4+
repo_name: cacheMon/libCacheSim-python
5+
6+
docs_dir: src
7+
8+
nav:
9+
- Home: index.md
10+
- Quick Start: quickstart.md
11+
- API Reference: api.md
12+
- Examples: examples.md
13+
14+
theme:
15+
name: material
16+
language: en
17+
palette:
18+
# Palette toggle for light mode
19+
- scheme: default
20+
primary: custom
21+
accent: custom
22+
toggle:
23+
icon: material/brightness-7
24+
name: Switch to dark mode
25+
# Palette toggle for dark mode
26+
- scheme: slate
27+
primary: custom
28+
accent: custom
29+
toggle:
30+
icon: material/brightness-4
31+
name: Switch to light mode
32+
font:
33+
text: Open Sans
34+
features:
35+
- header.autohide
36+
- navigation.tabs
37+
- navigation.footer
38+
- navigation.sections
39+
- navigation.expand
40+
- navigation.path
41+
- navigation.top
42+
- toc.follow
43+
- search.highlight
44+
- search.share
45+
- search.suggest
46+
- content.code.copy
47+
- content.code.annotate
48+
49+
extra_css:
50+
- ../stylesheets/extra.css
51+
52+
plugins:
53+
- search
54+
- i18n:
55+
docs_structure: folder
56+
fallback_to_default: true
57+
reconfigure_material: true
58+
reconfigure_search: true
59+
default_language_only: false
60+
languages:
61+
- locale: en
62+
default: true
63+
name: English
64+
build: true
65+
- locale: zh
66+
name: 中文
67+
build: true
68+
nav_translations:
69+
Home: 首页
70+
Quick Start: 快速开始
71+
API Reference: API参考
72+
Examples: 使用示例
73+
- mkdocstrings:
74+
handlers:
75+
python:
76+
paths: [../src]
77+
options:
78+
docstring_style: google
79+
show_source: true
80+
show_root_heading: true
81+
82+
markdown_extensions:
83+
- admonition
84+
- pymdownx.details
85+
- pymdownx.superfences:
86+
custom_fences:
87+
- name: mermaid
88+
class: mermaid
89+
format: !!python/name:pymdownx.superfences.fence_code_format
90+
- pymdownx.highlight:
91+
anchor_linenums: true
92+
line_spans: __span
93+
pygments_lang_class: true
94+
- pymdownx.inlinehilite
95+
- pymdownx.snippets
96+
- pymdownx.tabbed:
97+
alternate_style: true
98+
- pymdownx.keys
99+
- pymdownx.mark
100+
- pymdownx.tilde
101+
- codehilite
102+
- toc:
103+
permalink: true
104+
- tables
105+
- footnotes
106+
107+
extra:
108+
social:
109+
- icon: fontawesome/brands/github
110+
link: https://github.com/cacheMon/libCacheSim-python
111+
112+
copyright: Copyright © 2025 libCacheSim Team

docs/requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
mkdocs-material>=9.6.5
2+
mkdocstrings-python>=1.16.2
3+
mkdocs-static-i18n>=1.2.0
-1.3 KB
Binary file not shown.
-10.7 KB
Binary file not shown.
-5.68 KB
Binary file not shown.
-2.2 KB
Binary file not shown.
-11.8 KB
Binary file not shown.
-1.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)