Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert the entire repository to Python and write new tests #13

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

MrDevel0per
Copy link
Contributor

@MrDevel0per MrDevel0per commented Oct 30, 2024

Convert the entire repository from Swift to Python and rewrite tests.

  • Rename and convert Sources/Commands/Add.swift to src/commands/add.py

    • Convert AddOptions and Ally.Add structs to Python classes with argparse
    • Replace Swift code with equivalent Python code for adding an alias
    • Update file paths and commands to be compatible with Python
    • Remove Swift-specific code and imports
  • Rename and convert Sources/Commands/Dot/Dot.swift to src/commands/dot.py

    • Convert Dot and Dot.Open structs to Python classes with argparse
    • Replace Swift code with equivalent Python code for opening the dotfile
    • Update file paths and commands to be compatible with Python
    • Remove Swift-specific code and imports
  • Rename and convert Sources/Commands/Dot/Save.swift to src/commands/save.py

    • Convert SaveOptions and Dot.Save structs to Python classes with argparse
    • Replace Swift code with equivalent Python code for saving the dotfile
    • Update file paths and commands to be compatible with Python
    • Remove Swift-specific code and imports
  • Rename and convert Sources/Commands/Input.swift to src/commands/input.py

    • Convert input functions to Python functions
    • Replace Swift code with equivalent Python code for getting user input
    • Update file paths and commands to be compatible with Python
    • Remove Swift-specific code and imports
  • Rename and convert Sources/Commands/List.swift to src/commands/list.py

    • Convert ListOptions and Ally.List structs to Python classes with argparse
    • Replace Swift code with equivalent Python code for listing aliases
    • Update file paths and commands to be compatible with Python
    • Remove Swift-specific code and imports
  • Rename and convert Sources/Commands/Remove.swift to src/commands/remove.py

    • Convert RemoveOptions and Ally.Remove structs to Python classes with argparse
    • Replace Swift code with equivalent Python code for removing an alias
    • Update file paths and commands to be compatible with Python
    • Remove Swift-specific code and imports
  • Rename and convert Sources/Commands/Uninstall.swift to src/commands/uninstall.py

    • Convert Ally.Uninstall struct to a Python class with argparse
    • Replace Swift code with equivalent Python code for uninstalling Ally
    • Update file paths and commands to be compatible with Python
    • Remove Swift-specific code and imports
  • Rename and convert Sources/Helpers/CommandRunner.swift to src/helpers/command_runner.py

    • Convert safeShell function to a Python function
    • Replace Swift code with equivalent Python code for running shell commands
    • Update file paths and commands to be compatible with Python
    • Remove Swift-specific code and imports

For more details, open the Copilot Workspace session.

Convert the entire repository from Swift to Python and rewrite tests.

* Rename and convert `Sources/Commands/Add.swift` to `src/commands/add.py`
  - Convert `AddOptions` and `Ally.Add` structs to Python classes with `argparse`
  - Replace Swift code with equivalent Python code for adding an alias
  - Update file paths and commands to be compatible with Python
  - Remove Swift-specific code and imports

* Rename and convert `Sources/Commands/Dot/Dot.swift` to `src/commands/dot.py`
  - Convert `Dot` and `Dot.Open` structs to Python classes with `argparse`
  - Replace Swift code with equivalent Python code for opening the dotfile
  - Update file paths and commands to be compatible with Python
  - Remove Swift-specific code and imports

* Rename and convert `Sources/Commands/Dot/Save.swift` to `src/commands/save.py`
  - Convert `SaveOptions` and `Dot.Save` structs to Python classes with `argparse`
  - Replace Swift code with equivalent Python code for saving the dotfile
  - Update file paths and commands to be compatible with Python
  - Remove Swift-specific code and imports

* Rename and convert `Sources/Commands/Input.swift` to `src/commands/input.py`
  - Convert input functions to Python functions
  - Replace Swift code with equivalent Python code for getting user input
  - Update file paths and commands to be compatible with Python
  - Remove Swift-specific code and imports

* Rename and convert `Sources/Commands/List.swift` to `src/commands/list.py`
  - Convert `ListOptions` and `Ally.List` structs to Python classes with `argparse`
  - Replace Swift code with equivalent Python code for listing aliases
  - Update file paths and commands to be compatible with Python
  - Remove Swift-specific code and imports

* Rename and convert `Sources/Commands/Remove.swift` to `src/commands/remove.py`
  - Convert `RemoveOptions` and `Ally.Remove` structs to Python classes with `argparse`
  - Replace Swift code with equivalent Python code for removing an alias
  - Update file paths and commands to be compatible with Python
  - Remove Swift-specific code and imports

* Rename and convert `Sources/Commands/Uninstall.swift` to `src/commands/uninstall.py`
  - Convert `Ally.Uninstall` struct to a Python class with `argparse`
  - Replace Swift code with equivalent Python code for uninstalling Ally
  - Update file paths and commands to be compatible with Python
  - Remove Swift-specific code and imports

* Rename and convert `Sources/Helpers/CommandRunner.swift` to `src/helpers/command_runner.py`
  - Convert `safeShell` function to a Python function
  - Replace Swift code with equivalent Python code for running shell commands
  - Update file paths and commands to be compatible with Python
  - Remove Swift-specific code and imports

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/OCA-Creations/Ally?shareId=XXXX-XXXX-XXXX-XXXX).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant