Skip to content

Commit e9005f9

Browse files
committed
add readme
1 parent 2b6540a commit e9005f9

5 files changed

Lines changed: 61 additions & 79 deletions

File tree

Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,3 @@ edition = "2018"
77
askama = "0.12.1"
88
clap = { version = "4.4.6", features = ["derive"] }
99
regex = "1.10.2"
10-
serde = { version = "1", features = ["derive"] }
11-
serde_yaml = "0.8"

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,41 @@
11
# CPA: Create-Python-App
2+
3+
## Overview
4+
`cpa` is a cli tool designed to streamline the setup of new Python projects. It automates the creation of Python projects with commonly used configs and boilerplate.
5+
6+
## Goals
7+
- **Speed up Project Creation**: Reduce the time spent on repetitive setup tasks
8+
- **Best Practices**: Encourage best practices for code quality, formatting, and style by including configs for tools like `black`, `isort`, and `flake8`.
9+
- **Automation**: Automate tasks such as generating `.gitignore` files, setting up pre-commit hooks, and configuring code linters and formatters.
10+
11+
## Features
12+
- Provides pre-commit hook setup with hooks for checking merge conflicts, large files, and code styling.
13+
14+
## Installation
15+
Download binary from Github
16+
```bash
17+
18+
```
19+
20+
Building from source
21+
```bash
22+
# cd to project
23+
cargo install --path .
24+
```
25+
## Usage
26+
To create a new project:
27+
28+
```bash
29+
cpa create --name <project_name>
30+
```
31+
32+
Optional params:
33+
- `--preset`: Specifies a Python version for the project. Defaults to "python" which is mapped internally to "python3.10".
34+
35+
Example:
36+
```bash
37+
cpa create --name my_project --preset python3.10
38+
```
39+
40+
## Contributions and Feedback
41+
Users are welcome to contribute to the project by submitting pull requests or opening issues for bugs and feature requests. Feedback is also greatly appreciated to help improve the tool.

flake8.cfg

Lines changed: 0 additions & 49 deletions
This file was deleted.

prettier.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

templates/.cpa/flake8.cfg

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
[flake8]
2-
ignore = E203,E231,E501,I100,I201,I202,D102,D100,C901,D104,D101,D105,D107,D400,D103,D205,W503,E402,E266,F841
3-
# E203 whitespace before ':'. Conflicts with how Black formats slicing.
4-
# E231 missing whitespace after ',', ';', or ':'. Conflicts with Black.
5-
# E501 line too long (82 > 79 characters). Ignored because max-line-length is set.
6-
# I100 Import statements are in the wrong order.
7-
# I201 Missing newline between import groups.
8-
# I202 Additional newline in a group of imports.
9-
# D102 Missing docstring in public method.
10-
# D100 Missing docstring in public module.
11-
# C901 function is too complex. Ignored because max-complexity is set.
12-
# D104 Missing docstring in public package.
13-
# D101 Missing docstring in public class.
14-
# D105 Missing docstring in magic method.
15-
# D107 Missing docstring in __init__.
16-
# D400 First line should end with a period.
17-
# D103 Missing docstring in public function.
18-
# D205 1 blank line required between summary line and description.
19-
# W503 line break before binary operator. This is no longer PEP 8 compliant.
20-
# E402 module level import not at top of file.
21-
# E266 too many leading '#' for block comment.
22-
# F841 local variable is assigned to but never used.
2+
ignore =
3+
# C901, # function is too complex. Ignored because max-complexity is set.
4+
D100, # Missing docstring in public module.
5+
D101, # Missing docstring in public class.
6+
D102, # Missing docstring in public method.
7+
D103, # Missing docstring in public function.
8+
D104, # Missing docstring in public package.
9+
D105, # Missing docstring in magic method.
10+
D107, # Missing docstring in __init__.
11+
D205, # 1 blank line required between summary line and description.
12+
D400, # First line should end with a period.
13+
E203, # whitespace before ':'. Conflicts with how Black formats slicing.
14+
E231, # missing whitespace after ',', ';', or ':'. Conflicts with Black.
15+
E266, # too many leading '#' for block comment.
16+
E402, # module level import not at top of file.
17+
E501, # line too long (82 > 79 characters). Ignored because max-line-length is set.
18+
F841, # local variable is assigned to but never used.
19+
I100, # Import statements are in the wrong order.
20+
I201, # Missing newline between import groups.
21+
I202, # Additional newline in a group of imports.
22+
W503 # line break before binary operator. This is no longer PEP 8 compliant.
2323

2424
exclude =
2525
.cache,

0 commit comments

Comments
 (0)