Skip to content

Commit bdf9336

Browse files
refactoring
1 parent 2cf4a7e commit bdf9336

File tree

222 files changed

+88315
-1847
lines changed

Some content is hidden

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

222 files changed

+88315
-1847
lines changed

.env.example

Lines changed: 28 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,28 @@
1-
# Code2Logic Environment Configuration
2-
# Copy this file to .env and fill in your API keys
3-
4-
# =============================================================================
5-
# LLM PROVIDERS
6-
# =============================================================================
7-
8-
# OpenRouter (https://openrouter.ai)
9-
OPENROUTER_API_KEY=sk-or-v1-your-key-here
10-
OPENROUTER_MODEL=qwen/qwen-2.5-coder-32b-instruct
11-
BENCH_USE_LLM=1
12-
13-
# OpenAI (https://platform.openai.com)
14-
OPENAI_API_KEY=sk-your-key-here
15-
OPENAI_MODEL=gpt-4-turbo
16-
17-
# Anthropic (https://console.anthropic.com)
18-
ANTHROPIC_API_KEY=sk-ant-your-key-here
19-
ANTHROPIC_MODEL=claude-3-sonnet-20240229
20-
21-
# Groq (https://console.groq.com)
22-
GROQ_API_KEY=gsk_your-key-here
23-
GROQ_MODEL=llama-3.1-70b-versatile
24-
25-
# Together AI (https://together.ai)
26-
TOGETHER_API_KEY=your-key-here
27-
TOGETHER_MODEL=mistralai/Mixtral-8x7B-Instruct-v0.1
28-
29-
# =============================================================================
30-
# LOCAL LLM
31-
# =============================================================================
32-
33-
# Ollama (local)
34-
OLLAMA_HOST=http://localhost:11434
35-
OLLAMA_MODEL=qwen2.5-coder:14b
36-
37-
# =============================================================================
38-
# DEFAULT SETTINGS
39-
# =============================================================================
40-
41-
# Default provider: openrouter, openai, anthropic, groq, together, ollama
42-
CODE2LOGIC_DEFAULT_PROVIDER=ollama
43-
44-
# Default model (overrides provider-specific model)
45-
# CODE2LOGIC_DEFAULT_MODEL=
46-
47-
# Default project name (used for output files like project.toon, project.functions.toon)
48-
CODE2LOGIC_PROJECT_NAME=project
49-
50-
# Verbose logging
51-
CODE2LOGIC_VERBOSE=false
52-
53-
# Cache directory
54-
CODE2LOGIC_CACHE_DIR=~/.code2logic/cache
1+
# Call graph splitting (Mermaid calls.mmd)
2+
#
3+
# For large projects, Mermaid PNG rendering can exceed size limits.
4+
# Enable split mode to generate multiple smaller call-graph diagrams:
5+
# output/calls_part_01.mmd, output/calls_part_02.mmd, ...
6+
#
7+
# Enable/disable splitting
8+
CODE2FLOW_CALLS_SPLIT=1
9+
10+
# Keep writing the full calls.mmd in addition to parts
11+
CODE2FLOW_CALLS_KEEP_MAIN=0
12+
13+
# Minimum number of functions per part
14+
CODE2FLOW_CALLS_MIN_NODES=30
15+
16+
# Maximum number of functions per part
17+
CODE2FLOW_CALLS_MAX_NODES=250
18+
19+
# Maximum number of parts to generate
20+
CODE2FLOW_CALLS_MAX_PARTS=20
21+
22+
# Include singleton components (1 function with no edges)
23+
CODE2FLOW_CALLS_INCLUDE_SINGLETONS=0
24+
25+
# Mermaid renderer limits (used by code2flow/mermaid_generator.py)
26+
# Increase if Mermaid CLI reports edge/text limits.
27+
CODE2FLOW_MERMAID_MAX_EDGES=20000
28+
CODE2FLOW_MERMAID_MAX_TEXT_SIZE=2000000

.gitignore

Lines changed: 50 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,24 @@
1-
poetry.lock
2-
examples/reproduction/*
3-
examples/output/*
4-
bdd_output/*
5-
generated*/
6-
artifacts/
7-
out/
8-
project.c2l.*
9-
project.func.*
10-
project.json
11-
project.yaml
12-
!project.toon
13-
project.toon-schema.json
14-
project.logicml.yaml
15-
project.functions.toon
16-
project.functions-schema.json
17-
function.toon
18-
function-schema.json
19-
ollama_benchmark_results.csv
20-
*_benchmark_results.csv
1+
.pkl
2+
recordings
3+
output/*
4+
!output/analysis.yaml
5+
!output/llm_flow.yaml
6+
!output/llm_flow.md
7+
!output/*.mmd
8+
!output/*.png
9+
oferteo_firmy.txt
2110
.idea
11+
.gguf
12+
*.gguf
13+
.projektor
14+
test-env
15+
push-e
16+
publish-env
17+
nlp2cmd-repo
18+
.nlp2cmd/
2219
# Byte-compiled / optimized / DLL files
2320
__pycache__/
24-
*.py[codz]
21+
*.py[cod]
2522
*$py.class
2623

2724
# C extensions
@@ -48,8 +45,6 @@ share/python-wheels/
4845
MANIFEST
4946

5047
# PyInstaller
51-
# Usually these files are written by a python script from a template
52-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
5348
*.manifest
5449
*.spec
5550

@@ -67,7 +62,7 @@ htmlcov/
6762
nosetests.xml
6863
coverage.xml
6964
*.cover
70-
*.py.cover
65+
*.py,cover
7166
.hypothesis/
7267
.pytest_cache/
7368
cover/
@@ -104,48 +99,20 @@ profile_default/
10499
ipython_config.py
105100

106101
# pyenv
107-
# For a library or package, you might want to ignore these files since the code is
108-
# intended to run in multiple environments; otherwise, check them in:
109-
# .python-version
102+
.python-version
110103

111104
# pipenv
112-
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
113-
# However, in case of collaboration, if having platform-specific dependencies or dependencies
114-
# having no cross-platform support, pipenv may install dependencies that don't work, or not
115-
# install all needed dependencies.
116-
#Pipfile.lock
117-
118-
# UV
119-
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
120-
# This is especially recommended for binary packages to ensure reproducibility, and is more
121-
# commonly ignored for libraries.
122-
#uv.lock
105+
Pipfile.lock
123106

124107
# poetry
125-
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
126-
# This is especially recommended for binary packages to ensure reproducibility, and is more
127-
# commonly ignored for libraries.
128-
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
129-
#poetry.lock
130-
#poetry.toml
108+
poetry.lock
131109

132110
# pdm
133-
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
134-
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
135-
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
136-
#pdm.lock
137-
#pdm.toml
111+
.pdm.toml
138112
.pdm-python
139113
.pdm-build/
140114

141-
# pixi
142-
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
143-
#pixi.lock
144-
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
145-
# in the .venv directory. It is recommended not to include this directory in version control.
146-
.pixi
147-
148-
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
115+
# PEP 582
149116
__pypackages__/
150117

151118
# Celery stuff
@@ -157,7 +124,6 @@ celerybeat.pid
157124

158125
# Environments
159126
.env
160-
.envrc
161127
.venv
162128
env/
163129
venv/
@@ -189,40 +155,29 @@ dmypy.json
189155
# Cython debug symbols
190156
cython_debug/
191157

192-
# PyCharm
193-
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
194-
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
195-
# and can be added to the global gitignore or merged into this file. For a more nuclear
196-
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
197-
#.idea/
198-
199-
# Abstra
200-
# Abstra is an AI-powered process automation framework.
201-
# Ignore directories containing user credentials, local state, and settings.
202-
# Learn more at https://abstra.io/docs
203-
.abstra/
204-
205-
# Visual Studio Code
206-
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
207-
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
208-
# and can be added to the global gitignore or merged into this file. However, if you prefer,
209-
# you could uncomment the following to ignore the entire vscode folder
210-
# .vscode/
211-
212-
# Ruff stuff:
213-
.ruff_cache/
214-
215-
# PyPI configuration file
216-
.pypirc
217-
218-
# Cursor
219-
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
220-
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
221-
# refer to https://docs.cursor.com/context/ignore-files
222-
.cursorignore
223-
.cursorindexingignore
224-
225-
# Marimo
226-
marimo/_static/
227-
marimo/_lsp/
228-
__marimo__/
158+
# IDE
159+
.idea/
160+
.vscode/
161+
*.swp
162+
*.swo
163+
*~
164+
165+
# OS
166+
.DS_Store
167+
Thumbs.db
168+
169+
# Project specific
170+
*.bak
171+
*.backup
172+
reports/
173+
*.json.bak
174+
env-report.json
175+
176+
# Secrets
177+
.env.local
178+
.env.*.local
179+
secrets/
180+
credentials/
181+
182+
# Separate projects
183+
webops/

0 commit comments

Comments
 (0)