timewarp-ide 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. timewarp_ide-1.0.0/CONTRIBUTING.md +218 -0
  2. timewarp_ide-1.0.0/LICENSE +21 -0
  3. timewarp_ide-1.0.0/MANIFEST.in +87 -0
  4. timewarp_ide-1.0.0/PKG-INFO +357 -0
  5. timewarp_ide-1.0.0/README.md +304 -0
  6. timewarp_ide-1.0.0/compilers/__init__.py +37 -0
  7. timewarp_ide-1.0.0/compilers/base.py +205 -0
  8. timewarp_ide-1.0.0/compilers/basic_compiler.py +806 -0
  9. timewarp_ide-1.0.0/compilers/logo_compiler.py +570 -0
  10. timewarp_ide-1.0.0/compilers/pilot_compiler.py +585 -0
  11. timewarp_ide-1.0.0/core/__init__.py +18 -0
  12. timewarp_ide-1.0.0/core/audio/__init__.py +8 -0
  13. timewarp_ide-1.0.0/core/audio/engine.py +363 -0
  14. timewarp_ide-1.0.0/core/debugging/__init__.py +24 -0
  15. timewarp_ide-1.0.0/core/debugging/error_analyzer.py +710 -0
  16. timewarp_ide-1.0.0/core/debugging/performance_monitor.py +704 -0
  17. timewarp_ide-1.0.0/core/debugging/test_framework.py +634 -0
  18. timewarp_ide-1.0.0/core/debugging/visual_debugger.py +481 -0
  19. timewarp_ide-1.0.0/core/editor/__init__.py +18 -0
  20. timewarp_ide-1.0.0/core/editor/code_completion.py +441 -0
  21. timewarp_ide-1.0.0/core/editor/code_completion_engine.py +412 -0
  22. timewarp_ide-1.0.0/core/editor/code_formatter.py +262 -0
  23. timewarp_ide-1.0.0/core/editor/compiler_manager.py +396 -0
  24. timewarp_ide-1.0.0/core/editor/enhanced_editor.py +762 -0
  25. timewarp_ide-1.0.0/core/editor/language_engine.py +591 -0
  26. timewarp_ide-1.0.0/core/editor/syntax_analyzer.py +427 -0
  27. timewarp_ide-1.0.0/core/framework.py +538 -0
  28. timewarp_ide-1.0.0/core/hardware/__init__.py +8 -0
  29. timewarp_ide-1.0.0/core/hardware/devices.py +317 -0
  30. timewarp_ide-1.0.0/core/interpreter.py +1230 -0
  31. timewarp_ide-1.0.0/core/iot/__init__.py +8 -0
  32. timewarp_ide-1.0.0/core/iot/devices.py +380 -0
  33. timewarp_ide-1.0.0/core/language/__init__.py +18 -0
  34. timewarp_ide-1.0.0/core/language/compiler/__init__.py +19 -0
  35. timewarp_ide-1.0.0/core/language/compiler/codegen.py +310 -0
  36. timewarp_ide-1.0.0/core/language/compiler/lexer.py +491 -0
  37. timewarp_ide-1.0.0/core/language/compiler/optimizer.py +146 -0
  38. timewarp_ide-1.0.0/core/language/compiler/parser.py +566 -0
  39. timewarp_ide-1.0.0/core/language/errors/__init__.py +17 -0
  40. timewarp_ide-1.0.0/core/language/errors/error_manager.py +224 -0
  41. timewarp_ide-1.0.0/core/language/handlers/__init__.py +14 -0
  42. timewarp_ide-1.0.0/core/language/handlers/logo_handler.py +287 -0
  43. timewarp_ide-1.0.0/core/language/handlers/pilot_handler.py +221 -0
  44. timewarp_ide-1.0.0/core/language/handlers/python_handler.py +224 -0
  45. timewarp_ide-1.0.0/core/language/interpreter.py +447 -0
  46. timewarp_ide-1.0.0/core/language/james_compiler.py +289 -0
  47. timewarp_ide-1.0.0/core/language/lexer.py +346 -0
  48. timewarp_ide-1.0.0/core/language/parser.py +909 -0
  49. timewarp_ide-1.0.0/core/language/plugins/__init__.py +18 -0
  50. timewarp_ide-1.0.0/core/language/plugins/base.py +367 -0
  51. timewarp_ide-1.0.0/core/language/plugins/loader.py +313 -0
  52. timewarp_ide-1.0.0/core/language/plugins/manager.py +257 -0
  53. timewarp_ide-1.0.0/core/language/plugins/registry.py +206 -0
  54. timewarp_ide-1.0.0/core/language/runtime/__init__.py +17 -0
  55. timewarp_ide-1.0.0/core/language/runtime/engine.py +383 -0
  56. timewarp_ide-1.0.0/core/language/runtime/modes.py +9 -0
  57. timewarp_ide-1.0.0/core/language/runtime/variables.py +9 -0
  58. timewarp_ide-1.0.0/core/language/stdlib/core.py +237 -0
  59. timewarp_ide-1.0.0/core/language/tests/__init__.py +20 -0
  60. timewarp_ide-1.0.0/core/language/tests/test_errors.py +115 -0
  61. timewarp_ide-1.0.0/core/language/tests/test_integration.py +182 -0
  62. timewarp_ide-1.0.0/core/language/tests/test_stdlib.py +155 -0
  63. timewarp_ide-1.0.0/core/languages/__init__.py +21 -0
  64. timewarp_ide-1.0.0/core/languages/basic.py +617 -0
  65. timewarp_ide-1.0.0/core/languages/javascript_executor.py +137 -0
  66. timewarp_ide-1.0.0/core/languages/logo.py +553 -0
  67. timewarp_ide-1.0.0/core/languages/perl.py +142 -0
  68. timewarp_ide-1.0.0/core/languages/pilot.py +641 -0
  69. timewarp_ide-1.0.0/core/languages/python_executor.py +100 -0
  70. timewarp_ide-1.0.0/core/networking/__init__.py +8 -0
  71. timewarp_ide-1.0.0/core/networking/collaboration.py +518 -0
  72. timewarp_ide-1.0.0/core/optimizations/performance_optimizer.py +307 -0
  73. timewarp_ide-1.0.0/core/utilities/__init__.py +12 -0
  74. timewarp_ide-1.0.0/core/utilities/animation.py +40 -0
  75. timewarp_ide-1.0.0/core/utilities/audio.py +45 -0
  76. timewarp_ide-1.0.0/core/utilities/hardware.py +58 -0
  77. timewarp_ide-1.0.0/core/utilities/particles.py +24 -0
  78. timewarp_ide-1.0.0/core/utilities/timing.py +23 -0
  79. timewarp_ide-1.0.0/docs/compiler.md +301 -0
  80. timewarp_ide-1.0.0/docs/languages/basic.md +283 -0
  81. timewarp_ide-1.0.0/docs/languages/logo.md +487 -0
  82. timewarp_ide-1.0.0/docs/languages/pilot.md +400 -0
  83. timewarp_ide-1.0.0/examples/arrays_demo.bas +62 -0
  84. timewarp_ide-1.0.0/examples/calculator.bas +28 -0
  85. timewarp_ide-1.0.0/examples/calculator.pilot +89 -0
  86. timewarp_ide-1.0.0/examples/graphics_demo.bas +39 -0
  87. timewarp_ide-1.0.0/examples/hello.timewarp +33 -0
  88. timewarp_ide-1.0.0/examples/logo_demo.timewarp +60 -0
  89. timewarp_ide-1.0.0/examples/loops_demo.bas +52 -0
  90. timewarp_ide-1.0.0/examples/multimode_demo.timewarp +144 -0
  91. timewarp_ide-1.0.0/examples/number_guessing.bas +32 -0
  92. timewarp_ide-1.0.0/examples/pilot_demo.timewarp +43 -0
  93. timewarp_ide-1.0.0/examples/python_demo.timewarp +113 -0
  94. timewarp_ide-1.0.0/examples/simple_shapes.logo +53 -0
  95. timewarp_ide-1.0.0/features/ai_assistant.py +502 -0
  96. timewarp_ide-1.0.0/features/gamification.py +1093 -0
  97. timewarp_ide-1.0.0/features/tutorial_system.py +457 -0
  98. timewarp_ide-1.0.0/games/__init__.py +17 -0
  99. timewarp_ide-1.0.0/games/engine/__init__.py +11 -0
  100. timewarp_ide-1.0.0/games/engine/game_manager.py +183 -0
  101. timewarp_ide-1.0.0/games/engine/game_objects.py +120 -0
  102. timewarp_ide-1.0.0/games/engine/game_renderer.py +81 -0
  103. timewarp_ide-1.0.0/games/engine/physics.py +157 -0
  104. timewarp_ide-1.0.0/gui/__init__.py +19 -0
  105. timewarp_ide-1.0.0/gui/components/__init__.py +22 -0
  106. timewarp_ide-1.0.0/gui/components/dialogs.py +1210 -0
  107. timewarp_ide-1.0.0/gui/components/educational_debug.py +344 -0
  108. timewarp_ide-1.0.0/gui/components/project_explorer.py +311 -0
  109. timewarp_ide-1.0.0/gui/components/venv_manager.py +202 -0
  110. timewarp_ide-1.0.0/gui/editor/__init__.py +543 -0
  111. timewarp_ide-1.0.0/gui/editor/features.py +737 -0
  112. timewarp_ide-1.0.0/plugins/__init__.py +560 -0
  113. timewarp_ide-1.0.0/plugins/plugins/code_formatter/manifest.json +9 -0
  114. timewarp_ide-1.0.0/plugins/plugins/code_formatter/plugin.py +348 -0
  115. timewarp_ide-1.0.0/plugins/plugins/syntax_highlighter/manifest.json +9 -0
  116. timewarp_ide-1.0.0/plugins/plugins/syntax_highlighter/plugin.py +350 -0
  117. timewarp_ide-1.0.0/plugins/sample_plugin/manifest.json +9 -0
  118. timewarp_ide-1.0.0/plugins/sample_plugin/plugin.py +208 -0
  119. timewarp_ide-1.0.0/pyproject.toml +153 -0
  120. timewarp_ide-1.0.0/requirements.txt +23 -0
  121. timewarp_ide-1.0.0/samples/basic/arrays.bas +20 -0
  122. timewarp_ide-1.0.0/samples/basic/functions.bas +102 -0
  123. timewarp_ide-1.0.0/samples/basic/hello.bas +11 -0
  124. timewarp_ide-1.0.0/samples/basic_ascii_art.bas +163 -0
  125. timewarp_ide-1.0.0/samples/logo/complex.logo +97 -0
  126. timewarp_ide-1.0.0/samples/logo/shapes.logo +44 -0
  127. timewarp_ide-1.0.0/samples/logo_geometry_explorer.logo +297 -0
  128. timewarp_ide-1.0.0/samples/pilot/adventure.pilot +445 -0
  129. timewarp_ide-1.0.0/samples/pilot/math_quiz.pilot +72 -0
  130. timewarp_ide-1.0.0/samples/pilot_math_quiz.pilot +81 -0
  131. timewarp_ide-1.0.0/samples/python_data_science_demo.py +399 -0
  132. timewarp_ide-1.0.0/samples/sample_basic_program.bas +25 -0
  133. timewarp_ide-1.0.0/samples/sample_logo_program.logo +63 -0
  134. timewarp_ide-1.0.0/samples/sample_pilot_program.pilot +22 -0
  135. timewarp_ide-1.0.0/samples/sample_python_program.py +233 -0
  136. timewarp_ide-1.0.0/setup.cfg +4 -0
  137. timewarp_ide-1.0.0/setup.py +82 -0
  138. timewarp_ide-1.0.0/tests/__init__.py +7 -0
  139. timewarp_ide-1.0.0/tests/test_core_interpreter.py +288 -0
  140. timewarp_ide-1.0.0/tests/test_feature_systems.py +430 -0
  141. timewarp_ide-1.0.0/tests/test_performance.py +501 -0
  142. timewarp_ide-1.0.0/tests/test_runner.py +395 -0
  143. timewarp_ide-1.0.0/timewarp_ide/__init__.py +32 -0
  144. timewarp_ide-1.0.0/timewarp_ide/compiler.py +117 -0
  145. timewarp_ide-1.0.0/timewarp_ide/main.py +32 -0
  146. timewarp_ide-1.0.0/timewarp_ide.egg-info/PKG-INFO +357 -0
  147. timewarp_ide-1.0.0/timewarp_ide.egg-info/SOURCES.txt +161 -0
  148. timewarp_ide-1.0.0/timewarp_ide.egg-info/dependency_links.txt +1 -0
  149. timewarp_ide-1.0.0/timewarp_ide.egg-info/entry_points.txt +4 -0
  150. timewarp_ide-1.0.0/timewarp_ide.egg-info/not-zip-safe +1 -0
  151. timewarp_ide-1.0.0/timewarp_ide.egg-info/requires.txt +21 -0
  152. timewarp_ide-1.0.0/timewarp_ide.egg-info/top_level.txt +11 -0
  153. timewarp_ide-1.0.0/tools/__init__.py +14 -0
  154. timewarp_ide-1.0.0/tools/ml/__init__.py +9 -0
  155. timewarp_ide-1.0.0/tools/ml/aiml_integration.py +296 -0
  156. timewarp_ide-1.0.0/tools/ml/ml_manager_dialog.py +333 -0
  157. timewarp_ide-1.0.0/tools/plugins/advanced_debugger/plugin.py +726 -0
  158. timewarp_ide-1.0.0/tools/plugins/hardware_controller/plugin.py +620 -0
  159. timewarp_ide-1.0.0/tools/plugins/iot_device_manager/plugin.py +722 -0
  160. timewarp_ide-1.0.0/tools/plugins/learning_assistant/plugin.py +1131 -0
  161. timewarp_ide-1.0.0/tools/plugins/sensor_visualizer/plugin.py +765 -0
  162. timewarp_ide-1.0.0/tools/theme.py +490 -0
  163. timewarp_ide-1.0.0/tools/tool_manager.py +659 -0
@@ -0,0 +1,218 @@
1
+ # Contributing to TimeWarp IDE
2
+
3
+ Welcome to the TimeWarp IDE project! We're excited to have you contribute to this educational programming environment.
4
+
5
+ ## 🚀 Quick Start
6
+
7
+ ### Prerequisites
8
+ - Python 3.9 or higher
9
+ - Git
10
+ - A GitHub account
11
+
12
+ ### Setting Up Development Environment
13
+
14
+ 1. **Clone the repository:**
15
+ ```bash
16
+ git clone https://github.com/James-HoneyBadger/Time_Warp.git
17
+ cd Time_Warp
18
+ ```
19
+
20
+ 2. **Run the automated setup:**
21
+ ```bash
22
+ ./setup_dev.sh
23
+ ```
24
+
25
+ 3. **Manual setup (if needed):**
26
+ ```bash
27
+ # Create and activate virtual environment
28
+ python3 -m venv .Time_Warp
29
+ source .Time_Warp/bin/activate
30
+
31
+ # Install dependencies
32
+ pip install -r requirements.txt
33
+
34
+ # Install pre-commit hooks
35
+ pre-commit install
36
+ ```
37
+
38
+ ## 🏗️ Project Structure
39
+
40
+ ```
41
+ Time_Warp/
42
+ ├── TimeWarp.py # Main application entry point
43
+ ├── core/ # Core interpreter and language engines
44
+ │ ├── interpreter.py # Central execution engine
45
+ │ ├── languages/ # Language-specific executors
46
+ │ ├── editor/ # Enhanced code editor components
47
+ │ └── hardware/ # Hardware integration modules
48
+ ├── tools/ # Utility tools and theme management
49
+ ├── plugins/ # Plugin system and extensions
50
+ ├── gui/ # GUI components and dialogs
51
+ ├── games/ # Game engine and examples
52
+ ├── examples/ # Sample programs and demos
53
+ ├── tests/ # Test suites
54
+ └── .github/ # GitHub workflows and templates
55
+ ```
56
+
57
+ ## 🧪 Development Workflow
58
+
59
+ ### Running TimeWarp IDE
60
+ ```bash
61
+ # Activate virtual environment
62
+ source .Time_Warp/bin/activate
63
+
64
+ # Run the IDE
65
+ python TimeWarp.py
66
+ ```
67
+
68
+ ### Testing
69
+ ```bash
70
+ # Run all tests
71
+ python run_tests.py
72
+
73
+ # Run specific test categories
74
+ python -m pytest tests/ -v
75
+ ```
76
+
77
+ ### Code Quality
78
+ ```bash
79
+ # Format code
80
+ black .
81
+
82
+ # Lint code
83
+ flake8 .
84
+
85
+ # Type checking
86
+ mypy TimeWarp.py core/
87
+
88
+ # Run pre-commit hooks manually
89
+ pre-commit run --all-files
90
+ ```
91
+
92
+ ## 📝 Coding Standards
93
+
94
+ ### Code Style
95
+ - Use **Black** for code formatting (line length: 88)
96
+ - Follow **PEP 8** naming conventions
97
+ - Use **type hints** where appropriate
98
+ - Write **docstrings** for all public functions and classes
99
+
100
+ ### File Organization
101
+ - **Test files**: `test_*.py` for unit tests, `*_test.py` for integration tests
102
+ - **Language demos**: Use appropriate extensions (`.pilot`, `.bas`, `.logo`, `.timewarp`)
103
+ - **Documentation**: Use Markdown for all documentation files
104
+
105
+ ### Commit Messages
106
+ Follow conventional commit format:
107
+ ```
108
+ type(scope): brief description
109
+
110
+ Detailed explanation of the changes made.
111
+
112
+ - List specific changes
113
+ - Include any breaking changes
114
+ - Reference issues if applicable
115
+ ```
116
+
117
+ Types: `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore`
118
+
119
+ ## 🎯 Contributing Guidelines
120
+
121
+ ### 1. Fork and Branch
122
+ - Fork the repository to your GitHub account
123
+ - Create a feature branch: `git checkout -b feature/your-feature-name`
124
+
125
+ ### 2. Make Changes
126
+ - Follow the coding standards above
127
+ - Add tests for new functionality
128
+ - Update documentation if needed
129
+ - Ensure all tests pass
130
+
131
+ ### 3. Submit Pull Request
132
+ - Push to your fork: `git push origin feature/your-feature-name`
133
+ - Create a pull request with a clear description
134
+ - Link any related issues
135
+ - Wait for review and feedback
136
+
137
+ ### 4. Code Review Process
138
+ - All PRs require at least one review
139
+ - Address feedback promptly
140
+ - Keep PRs focused and reasonably sized
141
+ - Update your branch if requested
142
+
143
+ ## 🐛 Bug Reports
144
+
145
+ When reporting bugs, please include:
146
+ - **OS and Python version**
147
+ - **Steps to reproduce**
148
+ - **Expected vs actual behavior**
149
+ - **Error messages or logs**
150
+ - **Screenshots if relevant**
151
+
152
+ Use the bug report template in `.github/ISSUE_TEMPLATE/`
153
+
154
+ ## 💡 Feature Requests
155
+
156
+ For new features:
157
+ - Check existing issues first
158
+ - Provide clear use cases
159
+ - Consider implementation complexity
160
+ - Be open to discussion and alternatives
161
+
162
+ ## 🏷️ Areas for Contribution
163
+
164
+ ### High Priority
165
+ - **Language Support**: Add new programming languages
166
+ - **Educational Tools**: Learning assistants and tutorials
167
+ - **Testing**: Improve test coverage and edge cases
168
+ - **Documentation**: User guides and API documentation
169
+
170
+ ### Medium Priority
171
+ - **UI/UX**: Interface improvements and accessibility
172
+ - **Performance**: Optimization and profiling
173
+ - **Plugins**: New plugin development
174
+ - **Hardware Integration**: IoT and sensor support
175
+
176
+ ### Good First Issues
177
+ Look for issues labeled `good-first-issue` or `help-wanted`
178
+
179
+ ## 🔧 Development Tips
180
+
181
+ ### Adding New Languages
182
+ 1. Create executor class in `core/languages/new_language.py`
183
+ 2. Implement required methods following existing patterns
184
+ 3. Register in `core/interpreter.py`
185
+ 4. Add syntax highlighting support
186
+ 5. Create test programs and unit tests
187
+
188
+ ### Plugin Development
189
+ - See `plugins/sample_plugin/` for template
190
+ - Follow plugin API conventions
191
+ - Include proper initialization and cleanup
192
+ - Add configuration options if needed
193
+
194
+ ### Testing Best Practices
195
+ - Write tests for new features
196
+ - Test edge cases and error conditions
197
+ - Use meaningful test names
198
+ - Keep tests isolated and fast
199
+
200
+ ## 📞 Getting Help
201
+
202
+ - **GitHub Discussions**: Ask questions and share ideas
203
+ - **Issues**: Report bugs or request features
204
+ - **Wiki**: Documentation and guides
205
+ - **Code Comments**: Inline documentation for complex logic
206
+
207
+ ## 📄 License
208
+
209
+ By contributing to TimeWarp IDE, you agree that your contributions will be licensed under the same license as the project.
210
+
211
+ ## 🙏 Recognition
212
+
213
+ Contributors are recognized in:
214
+ - GitHub contributors list
215
+ - Release notes for significant contributions
216
+ - Special mentions in documentation
217
+
218
+ Thank you for contributing to TimeWarp IDE! 🚀✨
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 TimeWarp IDE Development Team
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.
@@ -0,0 +1,87 @@
1
+ include README.md
2
+ include LICENSE
3
+ include requirements.txt
4
+ include CONTRIBUTING.md
5
+ include .pre-commit-config.yaml
6
+ include pytest.ini
7
+
8
+ # Include example programs
9
+ recursive-include examples *.pilot
10
+ recursive-include examples *.bas
11
+ recursive-include examples *.logo
12
+ recursive-include examples *.py
13
+ recursive-include examples *.js
14
+ recursive-include examples *.pl
15
+ recursive-include examples *.timewarp
16
+
17
+ # Include sample programs
18
+ recursive-include samples *.pilot
19
+ recursive-include samples *.bas
20
+ recursive-include samples *.logo
21
+ recursive-include samples *.py
22
+ recursive-include samples *.js
23
+ recursive-include samples *.pl
24
+ recursive-include samples *.timewarp
25
+
26
+ # Include documentation
27
+ recursive-include docs *.md
28
+ recursive-include docs *.txt
29
+ recursive-include docs *.rst
30
+
31
+ # Include test files (for development)
32
+ recursive-include tests *.py
33
+ recursive-include test_* *.py
34
+ recursive-include test_* *.pilot
35
+ recursive-include test_* *.bas
36
+ recursive-include test_* *.logo
37
+ recursive-include test_* *.py
38
+
39
+ # Include game files
40
+ recursive-include games *.py
41
+ recursive-include games *.json
42
+
43
+ # Include plugin files
44
+ recursive-include plugins *.py
45
+ recursive-include plugins *.json
46
+
47
+ # Include feature files
48
+ recursive-include features *.py
49
+
50
+ # Include tool files
51
+ recursive-include tools *.py
52
+
53
+ # Include data files
54
+ recursive-include data *.desktop
55
+ recursive-include data *.png
56
+ recursive-include data *.svg
57
+ recursive-include data *.ico
58
+
59
+ # Exclude development files
60
+ exclude .gitignore
61
+ exclude .gitattributes
62
+ exclude .pre-commit-config.yaml
63
+ exclude pytest.ini
64
+ exclude run_tests.py
65
+ exclude run_tests_production.py
66
+ exclude integration_tests.py
67
+ exclude benchmark_*.py
68
+ exclude debug_*.py
69
+ exclude test_*.py
70
+ exclude *_test.py
71
+ exclude performance_bench.py
72
+ exclude install_dependencies.py
73
+ exclude setup_dev.sh
74
+
75
+ # Exclude cache and temporary files
76
+ global-exclude *.pyc
77
+ global-exclude __pycache__
78
+ global-exclude .pytest_cache
79
+ global-exclude *.log
80
+ global-exclude debug_output.txt
81
+ global-exclude benchmark_results.json
82
+ global-exclude integration_test_report.json
83
+
84
+ # Exclude compiled outputs
85
+ global-exclude *_compiled
86
+ global-exclude *.ppm
87
+ global-exclude *.db
@@ -0,0 +1,357 @@
1
+ Metadata-Version: 2.4
2
+ Name: timewarp-ide
3
+ Version: 1.0.0
4
+ Summary: Educational Programming IDE with Multi-Language Support
5
+ Home-page: https://github.com/James-HoneyBadger/Time_Warp
6
+ Author: James-HoneyBadger
7
+ Author-email: TimeWarp Development Team <info@timewarp-ide.org>
8
+ Maintainer-email: James-HoneyBadger <timewarp-ide@example.com>
9
+ License: MIT
10
+ Project-URL: Homepage, https://github.com/James-HoneyBadger/Time_Warp
11
+ Project-URL: Documentation, https://timewarp-ide.readthedocs.io/
12
+ Project-URL: Repository, https://github.com/James-HoneyBadger/Time_Warp
13
+ Project-URL: Issues, https://github.com/James-HoneyBadger/Time_Warp/issues
14
+ Project-URL: Changelog, https://github.com/James-HoneyBadger/Time_Warp/blob/main/CHANGELOG.md
15
+ Keywords: education,programming,ide,basic,logo,pilot,compiler,turtle-graphics,educational
16
+ Classifier: Development Status :: 5 - Production/Stable
17
+ Classifier: Intended Audience :: Education
18
+ Classifier: Intended Audience :: Developers
19
+ Classifier: License :: OSI Approved :: MIT License
20
+ Classifier: Operating System :: OS Independent
21
+ Classifier: Programming Language :: Python :: 3
22
+ Classifier: Programming Language :: Python :: 3.9
23
+ Classifier: Programming Language :: Python :: 3.10
24
+ Classifier: Programming Language :: Python :: 3.11
25
+ Classifier: Programming Language :: Python :: 3.12
26
+ Classifier: Topic :: Education
27
+ Classifier: Topic :: Software Development :: Compilers
28
+ Classifier: Topic :: Software Development :: Interpreters
29
+ Requires-Python: >=3.9
30
+ Description-Content-Type: text/markdown
31
+ License-File: LICENSE
32
+ Requires-Dist: Pillow>=8.0.0
33
+ Provides-Extra: dev
34
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
35
+ Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
36
+ Requires-Dist: black>=22.0.0; extra == "dev"
37
+ Requires-Dist: flake8>=4.0.0; extra == "dev"
38
+ Requires-Dist: mypy>=1.0.0; extra == "dev"
39
+ Requires-Dist: sphinx>=4.0.0; extra == "dev"
40
+ Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "dev"
41
+ Provides-Extra: docs
42
+ Requires-Dist: sphinx>=4.0.0; extra == "docs"
43
+ Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "docs"
44
+ Provides-Extra: graphics
45
+ Requires-Dist: Pillow>=8.0.0; extra == "graphics"
46
+ Provides-Extra: hardware
47
+ Requires-Dist: pyserial>=3.0; extra == "hardware"
48
+ Requires-Dist: smbus2>=0.4.0; extra == "hardware"
49
+ Dynamic: author
50
+ Dynamic: home-page
51
+ Dynamic: license-file
52
+ Dynamic: requires-python
53
+
54
+ # ⏰ TimeWarp Compiler
55
+
56
+ **Compile Educational Programming Languages to Native Executables**
57
+
58
+ TimeWarp Compiler is a command-line tool that compiles educational programming languages (PILOT, BASIC, Logo) to native Linux executables. Transform your educational code into standalone programs that run without interpreters.
59
+
60
+ [![PyPI version](https://badge.fury.io/py/timewarp-ide.svg)](https://pypi.org/project/timewarp-ide/)
61
+ [![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
62
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
63
+
64
+ ## ✨ Features
65
+
66
+ ### 🎯 Multi-Language Compilation
67
+ Compile 3 educational programming languages to native executables:
68
+
69
+ - **PILOT** - Educational language with turtle graphics (1960s)
70
+ - **BASIC** - Classic line-numbered programming (1960s)
71
+ - **Logo** - Educational turtle graphics language (1960s)
72
+
73
+ ### 🚀 Native Performance
74
+ - **GCC Compilation** - Generate optimized C code and compile to native executables
75
+ - **Cross-Platform** - Linux executables (easily extensible to other platforms)
76
+ - **No Runtime Dependencies** - Standalone binaries that run anywhere
77
+
78
+ ### 📚 Rich Sample Programs
79
+ Comprehensive examples demonstrating language features:
80
+ - **BASIC**: Hello world, arrays, functions, loops
81
+ - **Logo**: Shapes, complex drawings, fractals
82
+ - **PILOT**: Math quizzes, interactive adventures
83
+
84
+ ## 🚀 Quick Start
85
+
86
+ ### Installation
87
+
88
+ #### Option 1: PyPI (Recommended)
89
+ ```bash
90
+ pip install timewarp-ide
91
+ ```
92
+
93
+ #### Option 2: From Source
94
+ ```bash
95
+ git clone https://github.com/James-HoneyBadger/Time_Warp.git
96
+ cd Time_Warp
97
+ pip install -e .
98
+ ```
99
+
100
+ ### System Requirements
101
+ - **Python**: 3.9 or higher
102
+ - **GCC**: GNU C Compiler (build dependency)
103
+ - **OS**: Linux (executables), macOS/Windows (compilation)
104
+
105
+ ## 📖 Usage
106
+
107
+ ### Basic Compilation
108
+ ```bash
109
+ # Compile a BASIC program
110
+ timewarp-compiler hello.bas -o hello
111
+
112
+ # Compile a Logo program
113
+ timewarp-compiler drawing.logo -o logo_app
114
+
115
+ # Compile a PILOT program
116
+ timewarp-compiler quiz.pilot -o math_quiz
117
+ ```
118
+
119
+ ### Command Line Options
120
+ ```bash
121
+ timewarp-compiler [OPTIONS] INPUT_FILE
122
+
123
+ Options:
124
+ -o, --output OUTPUT Output executable name (default: same as input)
125
+ --list-languages List supported languages and exit
126
+ --version Show version information
127
+ -h, --help Show help message
128
+ ```
129
+
130
+ ### Supported File Extensions
131
+ - `.bas` - BASIC programs
132
+ - `.logo` - Logo programs
133
+ - `.pilot` - PILOT programs
134
+
135
+ ## 📚 Sample Programs
136
+
137
+ ### BASIC Examples
138
+
139
+ #### Hello World
140
+ ```basic
141
+ 10 PRINT "HELLO WORLD BASIC PROGRAM"
142
+ 20 PRINT "This demonstrates basic BASIC features"
143
+ 30 LET ANSWER = 21 * 2
144
+ 40 PRINT "The answer is: "; ANSWER
145
+ 50 INPUT "Enter your name"; NAME$
146
+ 60 PRINT "Hello, "; NAME$
147
+ 70 PRINT "Counting from 1 to 5:"
148
+ 80 FOR I = 1 TO 5
149
+ 90 PRINT I
150
+ 100 NEXT I
151
+ 110 PRINT "Done!"
152
+ 120 END
153
+ ```
154
+
155
+ #### Array Operations
156
+ ```basic
157
+ 10 DIM SCORES(10)
158
+ 20 FOR I = 1 TO 10
159
+ 30 SCORES(I) = I * 10
160
+ 40 NEXT I
161
+ 50 PRINT "Scores:"
162
+ 60 FOR I = 1 TO 10
163
+ 70 PRINT "Score"; I; ": "; SCORES(I)
164
+ 80 NEXT I
165
+ 90 END
166
+ ```
167
+
168
+ ### Logo Examples
169
+
170
+ #### Simple Shapes
171
+ ```logo
172
+ TO SQUARE :SIZE
173
+ REPEAT 4 [FORWARD :SIZE RIGHT 90]
174
+ END
175
+
176
+ TO TRIANGLE :SIZE
177
+ REPEAT 3 [FORWARD :SIZE RIGHT 120]
178
+ END
179
+
180
+ TO CIRCLE :RADIUS
181
+ REPEAT 36 [FORWARD (2 * 3.14159 * :RADIUS / 36) RIGHT 10]
182
+ END
183
+
184
+ SQUARE 100
185
+ TRIANGLE 80
186
+ CIRCLE 50
187
+ ```
188
+
189
+ #### Fractal Tree
190
+ ```logo
191
+ TO TREE :SIZE
192
+ IF :SIZE < 5 [STOP]
193
+ FORWARD :SIZE
194
+ RIGHT 25
195
+ TREE :SIZE * 0.7
196
+ LEFT 50
197
+ TREE :SIZE * 0.7
198
+ RIGHT 25
199
+ BACK :SIZE
200
+ END
201
+
202
+ TREE 100
203
+ ```
204
+
205
+ ### PILOT Examples
206
+
207
+ #### Math Quiz
208
+ ```pilot
209
+ R: PILOT Math Quiz
210
+ R: Test your arithmetic skills
211
+
212
+ *START
213
+ T: Welcome to the Math Quiz!
214
+ T: Answer the following questions:
215
+
216
+ T: What is 5 + 3?
217
+ A: Your answer
218
+ C: #CORRECT = 8
219
+ J: (#ANS = #CORRECT) *CORRECT
220
+ T: Sorry, 5 + 3 = 8
221
+ J: *NEXT
222
+
223
+ *CORRECT
224
+ T: Correct! 5 + 3 = 8
225
+
226
+ *NEXT
227
+ T: What is 10 - 4?
228
+ A: Your answer
229
+ C: #CORRECT = 6
230
+ J: (#ANS = #CORRECT) *CORRECT2
231
+ T: Sorry, 10 - 4 = 6
232
+ J: *END
233
+
234
+ *CORRECT2
235
+ T: Excellent! 10 - 4 = 6
236
+
237
+ *END
238
+ T: Quiz complete!
239
+ E:
240
+ ```
241
+
242
+ #### Interactive Story
243
+ ```pilot
244
+ R: Choose Your Own Adventure
245
+
246
+ *BEGIN
247
+ T: You find yourself in a dark forest.
248
+ T: Do you go LEFT or RIGHT?
249
+
250
+ A: Your choice (LEFT/RIGHT)
251
+ J: (*ANS = LEFT) *LEFT_PATH
252
+ J: (*ANS = RIGHT) *RIGHT_PATH
253
+ T: Please choose LEFT or RIGHT
254
+ J: *BEGIN
255
+
256
+ *LEFT_PATH
257
+ T: You find a treasure chest!
258
+ T: Congratulations!
259
+ E:
260
+
261
+ *RIGHT_PATH
262
+ T: You encounter a dragon!
263
+ T: Game Over!
264
+ E:
265
+ ```
266
+
267
+ ## 🏗️ Architecture
268
+
269
+ ### Compilation Pipeline
270
+ 1. **Parse Source** - Language-specific parsing of source code
271
+ 2. **Generate C Code** - Convert to optimized C with runtime libraries
272
+ 3. **Compile Executable** - GCC compilation to native binary
273
+ 4. **Standalone Binary** - No external dependencies required
274
+
275
+ ### Language Compilers
276
+ - **BaseCompiler** - Abstract framework for language implementations
277
+ - **BasicCompiler** - Line-numbered BASIC with arrays and functions
278
+ - **LogoCompiler** - Turtle graphics with procedures and recursion
279
+ - **PilotCompiler** - Educational language with branching and variables
280
+
281
+ ### Runtime Libraries
282
+ Each language includes optimized C runtime libraries for:
283
+ - String manipulation and I/O
284
+ - Mathematical operations
285
+ - Turtle graphics rendering (PPM format)
286
+ - Variable management and scope
287
+
288
+ ## 📚 Documentation
289
+
290
+ ### Language References
291
+ - [BASIC Language Reference](docs/languages/basic.md)
292
+ - [Logo Language Reference](docs/languages/logo.md)
293
+ - [PILOT Language Reference](docs/languages/pilot.md)
294
+
295
+ ### Compiler Documentation
296
+ - [Compiler Usage Guide](docs/compiler.md)
297
+
298
+ ## 🔧 Development
299
+
300
+ ### Building from Source
301
+ ```bash
302
+ # Clone repository
303
+ git clone https://github.com/James-HoneyBadger/Time_Warp.git
304
+ cd Time_Warp
305
+
306
+ # Install in development mode
307
+ pip install -e .
308
+
309
+ # Run tests
310
+ python -m pytest
311
+
312
+ # Build package
313
+ python -m build
314
+ ```
315
+
316
+ ### Testing Compilers
317
+ ```bash
318
+ # Test all compilers
319
+ python -m pytest tests/
320
+
321
+ # Test specific language
322
+ python -c "from timewarp_ide.compiler import compile_file; compile_file('samples/basic/hello.bas', 'test_output')"
323
+ ```
324
+
325
+ ### Adding New Languages
326
+ 1. Create compiler class inheriting from `BaseCompiler`
327
+ 2. Implement `parse_source()` and `generate_c_code()` methods
328
+ 3. Add file extension mapping in `compiler.py`
329
+ 4. Include runtime library functions
330
+ 5. Add comprehensive tests
331
+
332
+ ## 🤝 Contributing
333
+
334
+ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md).
335
+
336
+ ### Areas for Contribution
337
+ - **New Languages** - Add support for additional educational languages
338
+ - **Performance** - Optimize compilation and runtime performance
339
+ - **Platforms** - Extend support to Windows/macOS executables
340
+ - **Features** - Enhanced language features and capabilities
341
+ - **Documentation** - Improve guides and examples
342
+
343
+ ## 📄 License
344
+
345
+ TimeWarp Compiler is open source software licensed under the MIT License. See [LICENSE](LICENSE) for details.
346
+
347
+ ## 🙏 Acknowledgments
348
+
349
+ - **PILOT**: Inspired by the original educational programming language
350
+ - **BASIC**: Based on classic BASIC implementations
351
+ - **Logo**: Built on the turtle graphics paradigm
352
+ - **GCC**: For the excellent C compilation toolchain
353
+ - **Python Community**: For the robust packaging ecosystem
354
+
355
+ ---
356
+
357
+ **⏰ TimeWarp Compiler** - Transform educational code into native executables.