Skip to content

Commit 52c0269

Browse files
committed
Update README (thank you, ChatGPT)
1 parent eb6e82b commit 52c0269

File tree

1 file changed

+53
-40
lines changed

1 file changed

+53
-40
lines changed

README.md

Lines changed: 53 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,26 @@ A template to bootstrap Python projects following best practices.
44

55
## 🚀 How to Use This Template
66

7-
You can create a new project using this template in **two ways**:
7+
You can create a new project in **two ways**:
88

9-
### 🔹 Option 1: Automatic Setup (Recommended)
10-
Use the `setup.sh` script to automatically download and set up everything.
9+
### 🔹 Automatic Setup (Recommended)
10+
11+
Run:
1112

1213
```bash
1314
curl -fsSL https://raw.githubusercontent.com/grok-ai/py-template/main/setup.sh -o setup.sh && bash setup.sh
1415
```
1516

1617
This will:
17-
- Prompt you for a project name
18-
- Install `uv` if not already installed
19-
- Use **Copier** to create a new project
20-
- Set up dependencies automatically
21-
22-
### 🔹 Option 2: Manual Setup
23-
If you prefer a **manual setup**, you can install the required tools and run Copier yourself.
18+
- Install [uv](https://github.com/astral-sh/uv) if needed.
19+
- Use [Copier](https://copier.readthedocs.io/en/stable/) to generate the project.
20+
- Prompt for project configuration (see [Customize the Project](#3-customize-the-project)).
21+
- (Optionally) set up the environment (dependencies, virtual environment).
22+
- Initialize Git and optionally push the repository.
2423

25-
#### **📌 Prerequisites**
26-
Before running Copier manually, ensure you have [`uv`](https://github.com/astral-sh/uv) (for managing dependencies)
24+
### 🔹 Manual Setup
2725

28-
Install it using:
26+
Install [uv](https://github.com/astral-sh/uv) and set up Copier:
2927

3028
```bash
3129
curl -LsSf https://astral.sh/uv/install.sh | sh
@@ -35,67 +33,82 @@ export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$PATH"
3533
Then, create a new project with:
3634

3735
```bash
38-
uvx copier copy --trust gh:grok-ai/py-template my-new-project
36+
uvx copier copy --trust gh:grok-ai/py-template <project-folder>
3937
```
4038

41-
### 3. Customize the Project
39+
Once completed, the project will be initialized in `<project-folder>`.
40+
41+
---
42+
43+
## 3. Customize the Project
4244

43-
The script will prompt you for the following configurations:
45+
During setup, you will be prompted for the following configurations:
4446

45-
- **Project Name**: The name of your new project.
46-
- **Python Package Name**: The default Python package name (this will be the directory name in lowercase, no spaces).
47+
- **Project Folder**: Name of the project folder.
48+
- **Python Package Name**: Defaults to the folder name in lowercase with spaces replaced by underscores.
4749
- **Description**: A short description of your project.
48-
- **GitHub Username**: Your GitHub username, if you want to push to a GitHub repository.
49-
- **GitHub Project Name**: The name of the GitHub repository, if you want to push to a GitHub repository.
50-
- **License**: Choose a license for your project (e.g., MIT, Apache-2.0).
51-
- **Pre-commit Hooks**: Choose whether to enable pre-commit hooks for your project.
50+
- **Maintainers**: A list of maintainers (name & email).
51+
- **Remote Option** (`remote_option`):
52+
- **GitHub**: Push the project to a GitHub repository.
53+
- **Manual**: Provide a custom remote URL (e.g., GitHub, GitLab, Bitbucket).
54+
- **No Remote**: Skip configuring a remote.
55+
- **Push to Remote** (`push_to_remote`): If using GitHub or manual, decide whether to automatically push after initialization.
56+
- **License**: Choose a license (MIT, Apache-2.0).
57+
- **Use Pre-commit Hooks** (`use_precommit`): Enable or disable pre-commit hooks.
58+
- **Dependencies**: Define dependencies to install.
59+
- **Initialize Environment** (`env_init`): Choose whether to set up a virtual environment immediately.
5260

53-
### 4. Manual Push to GitHub (Optional)
61+
---
5462

55-
If you did not choose to push to GitHub, you can still manually create the repository later and push the project using the following commands:
63+
## 4. Manual Push to a Remote Repository (Optional)
64+
65+
If `push_to_remote=false` or no remote was set, you can manually add and push later:
5666

5767
```bash
58-
# Add the GitHub remote
5968
git remote add origin https://github.com/your/repository
60-
61-
# Push the project
6269
git push -u origin main
6370
```
6471

65-
### 5. Development Setup
72+
Use the appropriate URL for GitHub, GitLab, or any other Git host.
73+
74+
---
75+
76+
## 5. Development Setup
6677

67-
Once your project is set up, you can manage the dependencies using `uv`. The setup already takes care of installing `uv` for you and creating a virtual environment in the `.venv` directory.
78+
Once set up, manage dependencies with uv. The virtual environment is stored in `.venv`.
6879

6980
---
7081

7182
## ✨ Features
7283

73-
- **Version Control**: Initialized with Git.
74-
- **Pre-commit Hooks**: Automatically set up pre-commit hooks for linting and formatting (mostly [Ruff](https://astral.sh/ruff), thanks again, Astral 🚀).
75-
- **Project Structure**: Follows modern Python project conventions, including a `src/` directory for your main code.
76-
- **Minimal and simple setup**: We prioritize simplicity, providing a clean and solid foundation to kickstart your project.
84+
- **Version Control**: Automatically initializes a Git repository.
85+
- **Optional Remote Push**: Configure a Git remote (GitHub or manual) and optionally push to it.
86+
- **Pre-commit Hooks**: If enabled, sets up [pre-commit hooks](https://pre-commit.com/).
87+
- **Modern Project Structure**: Uses an organized `src/` layout.
88+
- **Flexible**: Simple configuration logic for licensing, dependencies, and environment setup.
7789

7890
---
7991

8092
## 🔧 Customization
8193

82-
You can modify this template by editing the following:
94+
Modify this template by editing:
8395

84-
- **`setup.sh`**: The setup script that runs during initialization. You can add more tasks to automate further project configuration.
85-
- **`pyproject.toml`**: Customize your project's dependencies, configurations, and settings for tools like `pytest`, `ruff`, and more.
86-
- **`.pre-commit-config.yaml`**: Customize the pre-commit hooks configuration.
96+
- `copier.yml`: Adjust or add configuration options.
97+
- `pyproject.toml`: Define dependencies, linting, and testing configurations.
98+
- `.pre-commit-config.yaml`: Manage pre-commit hooks.
99+
- `setup.sh`: Modify automation steps.
87100

88101
---
89102

90103
## 📝 License
91104

92-
This project is licensed under the **MIT License**. See [LICENSE](LICENSE) for more details.
105+
This project is licensed under the **MIT License**. See LICENSE for more details.
93106

94107
---
95108

96-
### **Support**
109+
### Support
97110

98-
If you have any issues or suggestions, please feel free to open an issue.
111+
For issues or suggestions, open an issue on GitHub: https://github.com/grok-ai/py-template/issues
99112

100113
---
101114

0 commit comments

Comments
 (0)