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

Add CLI for running the project from anywhere #20

Closed
wants to merge 6 commits into from
Closed

Conversation

Lucs1590
Copy link
Owner

@Lucs1590 Lucs1590 commented Oct 23, 2024

Add a command-line interface (CLI) to run the script from anywhere on the computer and update the documentation.

  • setup.py: Create a setup.py file to define the package and entry point for the command-line script.
  • README.md: Update installation instructions to include pip install . and add instructions for running the script using the command strava-to-trainingpeaks. Include sections for common issues, additional examples, and scenarios.
  • src/main.py: Enhance logging, add specific error messages, and create an interactive setup script for initial configuration. Use the argparse module to define and parse command-line arguments. Implement validation checks for user inputs, provide detailed help messages, and implement robust error handling. Add a retry mechanism for network errors during file downloads and a progress bar for long-running tasks. Include a command to reset the configuration to default settings.
  • requirements.txt: Add setuptools to the requirements.txt file.
  • tests/test_main.py: Add tests for new functionalities in src/main.py, including cross-platform compatibility, retry mechanism, progress bar, and resetting the configuration.

For more details, open the Copilot Workspace session.

Add a command-line interface (CLI) to run the script from anywhere on the computer and update the documentation.

* **setup.py**: Create a `setup.py` file to define the package and entry point for the command-line script.
* **README.md**: Update installation instructions to include `pip install .` and add instructions for running the script using the command `strava-to-trainingpeaks`. Include sections for common issues, additional examples, and scenarios.
* **src/main.py**: Enhance logging, add specific error messages, and create an interactive setup script for initial configuration. Use the `argparse` module to define and parse command-line arguments. Implement validation checks for user inputs, provide detailed help messages, and implement robust error handling. Add a retry mechanism for network errors during file downloads and a progress bar for long-running tasks. Include a command to reset the configuration to default settings.
* **requirements.txt**: Add `setuptools` to the `requirements.txt` file.
* **tests/test_main.py**: Add tests for new functionalities in `src/main.py`, including cross-platform compatibility, retry mechanism, progress bar, and resetting the configuration.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/Lucs1590/strava-to-trainingpeaks?shareId=XXXX-XXXX-XXXX-XXXX).
@Lucs1590 Lucs1590 closed this Oct 24, 2024
@Lucs1590 Lucs1590 deleted the add-cli branch October 24, 2024 17:32
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