diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml new file mode 100644 index 0000000..f3d4fca --- /dev/null +++ b/.github/workflows/python-app.yml @@ -0,0 +1,39 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Python application + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: "3.10" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest + run: | + pytest diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..1a7f5c6 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,43 @@ +# Code of Conduct + +Welcome to **dw-code** - an open-source project that values collaboration, creativity, and respect for all of its contributors. To ensure a positive and inclusive environment, we ask that you abide by our Code of Conduct. + +## Our Promise + +At **dw-code**, we pledge to create a welcoming space for everyone, regardless of their background, identity, or experience level. We believe in kindness, empathy, and collaboration. + +## Our Guidelines + +We encourage behavior that contributes to a thriving and supportive community, including: + +- Using language that is respectful and inclusive. +- Listening to and learning from different perspectives. +- Offering and accepting constructive feedback gracefully. +- Focusing on the best interests of the community. +- Showing empathy and support to fellow contributors. + +In our community, we do not tolerate: + +- The use of explicit language or offensive imagery. +- Harassment, trolling, or personal attacks. +- Public or private harassment. +- Sharing others' private information without permission. +- Any behavior that would be considered inappropriate in a professional setting. + +## Our Responsibility + +As maintainers of the **dw-code** project, we are committed to upholding these standards. We will take appropriate action in response to any violations of this Code of Conduct. Our goal is to maintain a respectful and inclusive atmosphere where all can feel safe and valued. + +## Reporting Concerns + +If you encounter behavior that violates this Code of Conduct, please report it to our project team through [E-mail]. Your report will be treated with respect and confidentiality. + +## Enforcement + +We reserve the right to remove, edit, or reject contributions that do not align with this Code of Conduct. In extreme cases, we may temporarily or permanently restrict individuals who engage in harmful behavior from contributing to the project. + +## Credits + +Our Code of Conduct is inspired by the [Contributor Covenant](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html) and tailored to fit our dw-code community. + +Thank you for contributing positively to the dw-code community. Together, we can create an environment that fosters learning, collaboration, and creativity for everyone. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..6f09291 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,65 @@ +## Contributing + +We welcome contributions from the community to help improve "dw-code." Whether it's bug fixes, feature enhancements, documentation improvements, or new features, your contributions are highly appreciated. Please follow these guidelines to contribute: + +### How to Contribute + +1. *Fork* the repository to your GitHub account. + +2. *Clone* your forked repository to your local machine: + + ``` + git clone https://github.com/rohitagr0310/dw-code.git + cd dw-code + ``` + +3. Star the repositry + + +4. Create a new branch for your contribution: + + ``` + git checkout -b feature-or-fix-branch + ``` + + Use a descriptive branch name that reflects the nature of your contribution (e.g., fix-bug-123, add-autocompletion-feature, etc.). + +5. Make your changes or additions to the codebase. + +6. *Test* your changes thoroughly to ensure they work as expected. + +7. *Commit* your changes with a clear and concise commit message: + + ``` + git commit -m "Brief description of your changes" + ``` + +8. *Push* your changes to your fork on GitHub: + + ``` + git push origin feature-or-fix-branch + ``` + + +9. Create a *Pull Request* (PR) from your branch to the main branch of the original repository. + +10. Provide a descriptive *title* and *description* for your PR, explaining what the changes accomplish. + +11. Our team will review your PR and may provide feedback or request changes. Please be responsive to any comments or suggestions. + +12. Once your PR is approved and passes all checks, it will be merged into the main codebase. + +### Code Style and Guidelines + +Please follow these coding conventions when contributing to "dw-code": + +- Use consistent code formatting (e.g., PEP 8 for Python). +- Write clear and concise code comments and documentation. +- Ensure that your code is well-documented, especially for new features or complex changes. +- Test your code thoroughly and include appropriate test cases. + +### Report Issues + +If you encounter bugs, have feature requests, or need assistance, please open an [issue](https://github.com/rohitagr0310/dw-code/issues) on our GitHub repository. Provide detailed information about the problem or request, including steps to reproduce the issue. + +Thank you for your contributions and for helping make "dw-code" better for everyone! diff --git a/README.md b/README.md index 4f47826..9b559c9 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,76 @@ -# dw-code -an open source ide which has a style and look of a vs code but has the power and functionality that is provided in dev c++ or codeblocks +# dw-code: A Powerful Python IDE with VS Code Style + +[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/rohitagr0310/dw-code/blob/master/LICENSE) +[![GitHub stars](https://img.shields.io/github/stars/rohitagr0310/dw-code.svg)](https://github.com/rohitagr0310/dw-code/stargazers) +[![GitHub issues](https://img.shields.io/github/issues/rohitagr0310/dw-code.svg)](https://github.com/rohitagr0310/dw-code/issues) +[![GitHub pull requests](https://img.shields.io/github/issues-pr/rohitagr0310/dw-code.svg)](https://github.com/rohitagr0310/dw-code/pulls) + +## Overview + +"dw-code" is an open-source Integrated Development Environment (IDE) designed to provide the style and look of Visual Studio Code (VS Code) while offering the power and functionality of popular C/C++ IDEs like Dev C++ and Code::Blocks. It's built using Python and the tkinter library. This repository is open for **Hacktoberfest 2023!!** + +## TODO: + +Before opening any issue refer to [TODO.md](https://github.com/rohitagr0310/dw-code/blob/main/TODO.md) + +## Features + +- VS Code-inspired user interface. +- Powerful code editing capabilities. +- Built-in menu bar for easy access to common functions. +- Syntax highlighting for multiple programming languages. +- Support for code autocompletion. +- Integrated file management and project organization. +- Extensible through plugins and extensions. +- Cross-platform, works on Windows, macOS, and Linux. + +## Getting Started + +To get started with "dw-code," follow these steps: + +1. Star the repository ⭐ + +2. Fork the repository 🍴 + +3. Clone the repository: + + ```bash + git clone https://github.com/yourusername/dw-code.git + cd dw-code + ``` + +4. Create a virtual environment (optional but recommended): + + ```bash + python -m venv venv + source venv/bin/activate # On Windows, use `venv\Scripts\activate` + ``` + +5. Install dependencies: + + ```bash + pip install -r requirements.txt + ``` + +6. Run the application: + + ```bash + python main.py + ``` + +## Contributing + +Contributions are welcome! If you'd like to contribute to "dw-code," please check out our [contribution guidelines](CONTRIBUTING.md). + +## Support + +If you encounter any issues or have questions, please open an [issue](https://github.com/rohitagr0310/dw-code/issues). + +## Acknowledgments + +- Thanks to the Python community for creating and maintaining tkinter. +- Special thanks to the VS Code and C/C++ IDE communities for inspiration. + +--- + +Happy coding with "dw-code"! diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..151b262 --- /dev/null +++ b/TODO.md @@ -0,0 +1,110 @@ +## TODO: + +Designing a full-fledged C/C++ IDE with all the mentioned features is a complex and time-consuming task. However, I can provide you with an outline of how you can approach building such an IDE: + +1. **User Interface (UI) Design:** + - Create a UI layout similar to Visual Studio Code (VS Code) with a menu bar, toolbar, code editor area, sidebar, and status bar. + - Implement theming functionality to allow users to customize the IDE's appearance. + +2. **Custom Controls:** + - Depending on your platform (e.g., Windows, macOS, Linux), you may need to create custom controls or use third-party libraries to mimic the VS Code interface. + +3. **Menu Bar and Toolbar:** + - Create a menu bar with common options like "File," "Edit," "View," "Tools," and "Help." + - Add toolbar buttons for actions like opening files, saving, compiling, and running code. + +4. **Code Editor Area:** + - Implement a code editor with features like syntax highlighting, code folding, and auto-completion. You can consider using existing code editor libraries like CodeMirror, Monaco Editor, or building your own. + +5. **Sidebar:** + - Create a sidebar for project management, file navigation, and other functionalities. Include options to expand or collapse the sidebar to maximize the code editor area. + +6. **Status Bar:** + - Add a status bar at the bottom of the window to display information like build status, line/column numbers, etc. + +7. **Keyboard Shortcuts:** + - Implement keyboard shortcuts for common actions to enhance user productivity. + +8. **Theming Engine:** + - Develop a theming engine to support different themes for the IDE's appearance. + +9. **Accessibility:** + - Ensure your IDE is accessible by following accessibility guidelines and making it screen reader-friendly. + +10. **User Preferences:** + - Allow users to customize settings such as font size, font family, indentation, and other preferences. + +11. **Testing and User Feedback:** + - Thoroughly test your IDE for usability and responsiveness on different screen sizes and resolutions. + - Gather user feedback to make improvements continually. + +12. **Code Intelligence:** + - Implement code completion, navigation, refactoring, linting, and static analysis features. + +13. **Debugger Integration:** + - Integrate a debugger with breakpoints, watch windows, and call stack support. + - Enable variable inspection and modification during debugging. + - Integrate with popular debuggers like GDB or LLDB. + +14. **Version Control:** + - Integrate Git with features like commit, push, pull, and branch management. + - Provide visual diff and merge tools for resolving conflicts. + +15. **Project Management:** + - Offer project templates for various C/C++ project types. + - Implement dependency management for libraries and packages. + - Integrate with build systems like CMake. + +16. **Multi-Language Support:** + - Extend support to other programming languages like Python or Rust with syntax highlighting and language-specific tooling. + +17. **Extensions and Plugins:** + - Develop an extension system for users to customize their IDE experience. + - Create a marketplace for users to discover and install extensions. + +18. **Customization:** + - Allow users to customize the UI by rearranging panels, tabs, and views. + - Support user-defined themes and color schemes. + +19. **Collaboration Features:** + - Consider implementing real-time collaborative coding and integration with collaboration platforms like Microsoft Teams or Slack. + +20. **Performance Optimization:** + - Include code optimization tools, profilers, and support for parallel compilation. + +21. **Documentation Integration:** + - Integrate with documentation generators and APIs for quick access to documentation. + - Provide contextual help and tooltips for functions and APIs. + +22. **Error Handling and Diagnostics:** + - Implement real-time error checking with detailed error messages. + - Offer suggestions for fixing common programming errors. + +23. **Deployment and Packaging:** + - Provide tools for packaging and distributing C/C++ applications. + - Support cross-compilation to target different platforms. + +24. **Unit Testing:** + - Integrate with unit testing frameworks for C/C++. + - Offer test result visualization and debugging support. + +25. **Profiling and Performance Analysis:** + - Include profiling tools for identifying code bottlenecks and memory usage analysis. + +26. **Integration with Cloud Services:** + - Integrate with cloud-based development and storage services like Azure, AWS, or Google Cloud. + +27. **Code Metrics and Analytics:** + - Offer code complexity analysis, code coverage analysis, and security vulnerability scanning. + +28. **Cross-Platform Support:** + - Extend your IDE to work on multiple platforms (Windows, macOS, Linux). + +29. **Internationalization and Localization:** + - Support multiple languages and locales. + - Localize the user interface. + +30. **Continuous Integration/Continuous Deployment (CI/CD) Integration:** + - Integrate with CI/CD pipelines for automated testing and deployment. + +Building such an IDE is a significant undertaking that requires a dedicated team of developers and designers. It's essential to prioritize features based on your target audience and continuously iterate based on user feedback and emerging trends in software development. diff --git a/__pycache__/menu_bar.cpython-311.pyc b/__pycache__/menu_bar.cpython-311.pyc new file mode 100644 index 0000000..571ec7a Binary files /dev/null and b/__pycache__/menu_bar.cpython-311.pyc differ diff --git a/main.py b/main.py new file mode 100644 index 0000000..4d6ffb1 --- /dev/null +++ b/main.py @@ -0,0 +1,26 @@ +import tkinter as tk +from menu_bar import create_menu_bar +from tkinter import scrolledtext + +def create_base_window(): + root = tk.Tk() + root.title("My Python IDE") + + # Create a menu bar using the imported function + create_menu_bar(root) + + # Create a text widget (for code editing) + text_widget = scrolledtext.ScrolledText( + root, + wrap=tk.WORD, + font=("Consolas", 12), # Use a monospaced font like Consolas + insertbackground="Black", # Color of the cursor + selectbackground="lightblue" # Color of selected text + ) + text_widget.pack(expand=tk.YES, fill=tk.BOTH) + + return root + +if __name__ == "__main__": + app = create_base_window() + app.mainloop() diff --git a/menu_bar.py b/menu_bar.py new file mode 100644 index 0000000..7f9fe30 --- /dev/null +++ b/menu_bar.py @@ -0,0 +1,33 @@ +import tkinter as tk +from tkinter import Menu + +def on_exit(root): + root.destroy() + +def create_menu_bar(root): + menubar = Menu(root) + root.config(menu=menubar) + + file_menu = Menu(menubar) + menubar.add_cascade(label="File", menu=file_menu) + + file_menu.add_command(label="New") + file_menu.add_command(label="Open") + file_menu.add_separator() + file_menu.add_command(label="Save") + file_menu.add_command(label="Save As") + file_menu.add_separator() + file_menu.add_command(label="Exit", command=lambda: on_exit(root)) + + edit_menu = Menu(menubar) + menubar.add_cascade(label="Edit", menu=edit_menu) + + edit_menu.add_command(label="Cut") + edit_menu.add_command(label="Copy") + edit_menu.add_command(label="Paste") + +if __name__ == "__main__": + root = tk.Tk() + create_menu_bar(root) + root.mainloop() + \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +