Skip to content

Commit 13e79d1

Browse files
authored
Merge pull request #963 from sanders41/typos
Fix typos
2 parents d8ed48c + c4d2e37 commit 13e79d1

13 files changed

+39
-39
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ To check with the FastAPI feature enabled
7575
cargo clippy -F fastapi
7676
```
7777

78-
#### Run the code formater
78+
#### Run the code formatter
7979

8080
```sh
8181
cargo fmt --all
@@ -245,7 +245,7 @@ git fetch upstream
245245
git rebase upstream/main
246246
```
247247

248-
There may be some merge conficts that need to be resolved. After the feature branch has been update
248+
There may be some merge conflicts that need to be resolved. After the feature branch has been update
249249
locally, you can now update your pull request by pushing to the branch on GitHub:
250250

251251
```sh

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55

66
Generates a Python project structure with github actions for continuous integration and continuous
77
deployment. Both pure Python projects and Python projects with Rust modules using PyO3 can be
8-
created. Addtionally FastAPI projects can be generated.
8+
created. Additionally FastAPI projects can be generated.
99

1010
## Pure Python project included packages
1111

12-
For package managment choose between:
12+
For package management choose between:
1313

1414
- [poetry](https://python-poetry.org/)
1515
- [setuptools](https://github.com/pypa/setuptools)
@@ -106,7 +106,7 @@ python-project create
106106
```
107107

108108
You will be asked a series of questions that will be used to generate your project. The project
109-
generator will check pypi for the lastest version of the included packages and use those while
109+
generator will check pypi for the latest version of the included packages and use those while
110110
generating the project. This feature can be disabled by using with either `-s` or
111111
`--skip-download-latest-packages` when running the generator. If either there is an issue with
112112
retrieving the latest versions or if you have decided to skip looking up the latest version, the
@@ -167,7 +167,7 @@ python-project create -s
167167

168168
- Dependabot Schedule
169169

170-
When dependabot is enabed the schedule controls how often dependabot will check for updates and
170+
When dependabot is enabled the schedule controls how often dependabot will check for updates and
171171
create PRs.
172172

173173
- Use Continuous Deployment
@@ -205,33 +205,33 @@ python-project create -s
205205

206206
- Docs Site Name
207207

208-
This quesion will only show if you chose `yes` for `Include Docs`. This value sets the site name
208+
This question will only show if you chose `yes` for `Include Docs`. This value sets the site name
209209
field for mkdocs.
210210

211211
- Docs Site Description
212212

213-
This quesion will only show if you chose `yes` for `Include Docs`. This value provides a
213+
This question will only show if you chose `yes` for `Include Docs`. This value provides a
214214
a description of the repo to use in the docs.
215215

216216
- Docs Site URL
217217

218-
This quesion will only show if you chose `yes` for `Include Docs`. This is the URL where the docs
218+
This question will only show if you chose `yes` for `Include Docs`. This is the URL where the docs
219219
will be hosted.
220220

221221
- Docs Locale
222222

223-
This quesion will only show if you chose `yes` for `Include Docs`, and controls the language of
223+
This question will only show if you chose `yes` for `Include Docs`, and controls the language of
224224
the docs.
225225

226226
- Repo Name
227227

228-
This quesion will only show if you chose `yes` for `Include Docs`. This is the name of the repo
228+
This question will only show if you chose `yes` for `Include Docs`. This is the name of the repo
229229
the docs are referencing. For example in this repository the repo name would be
230230
`sanders41/python-project-generator`.
231231

232232
- Repo URL
233233

234-
This quesion will only show if you chose `yes` for `Include Docs`. This is URL for the repo the
234+
This question will only show if you chose `yes` for `Include Docs`. This is URL for the repo the
235235
docs are referencing. For example in this repository the repo url would be
236236
`https://github.com/sanders41/python-project-generator`
237237

@@ -351,7 +351,7 @@ python-project config reset
351351

352352
[just](https://github.com/casey/just) allows you to add project specific commands to the project
353353
that can be run from the command line. It is very similar to [make](https://github.com/mirror/make)
354-
but has the advantage of being cross platform compatable and purposee build for running commands.
354+
but has the advantage of being cross platform compatible and purposee build for running commands.
355355

356356
As an example, if you have the following in the `justfile` (this is included with the default file
357357
generated by this project):
@@ -410,14 +410,14 @@ just lint
410410
provided .pre-commit-config.yaml file) every time you make a commit to your code. If any of the
411411
lints fail pre-commit will cancel the commit. When possible, pre-commit will also automatically
412412
fix any errors that fail. For example pre-commit can automatically apply changes that fail ruff
413-
fromatting. pre-commit caches information and only runs on files that have changed so it is fast
413+
formatting. pre-commit caches information and only runs on files that have changed so it is fast
414414
and doesn't slow down your work flow will preventing you from forgetting to run checks.
415415

416416
### FastAPI migrations
417417

418418
[sqlx](https://github.com/launchbadge/sqlx) is used for migrations. A dedicated docker container
419419
runs the migrations each time docker is started. For creating new migrations install `sqlx-cli`.
420-
`sqlx-cli` also needs to be instealled in order to run the generated test suite.
420+
`sqlx-cli` also needs to be installed in order to run the generated test suite.
421421

422422
```sh
423423
cargo install sqlx-cli --no-default-features --features native-tls,postgres

src/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ pub enum Param {
104104
/// Save a default value for Is Application
105105
ApplicationOrLibrary { value: ApplicationOrLib },
106106

107-
/// Remove the saved application or libary value
107+
/// Remove the saved application or library value
108108
ResetApplicationOrLibrary,
109109

110110
/// Save default Python versions for GitHub Action testing

src/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ mod tests {
757757
}
758758

759759
#[test]
760-
fn test_save_github_actions_pythong_test_versions() {
760+
fn test_save_github_actions_python_test_versions() {
761761
let config = mock_config();
762762
let expected = vec!["3.11".to_string(), "3.12".to_string()];
763763
config
@@ -769,7 +769,7 @@ mod tests {
769769
}
770770

771771
#[test]
772-
fn test_reset_github_actions_pythong_test_versions() {
772+
fn test_reset_github_actions_python_test_versions() {
773773
let config = mock_config();
774774
config
775775
.save_github_actions_python_test_versions("3.11, 3.12".to_string())

src/fastapi/fastapi_files.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ logger.add(sys.stderr, level=settings.LOG_LEVEL)
182182
183183
@asynccontextmanager
184184
async def lifespan(_: FastAPI) -> AsyncGenerator: # pragma: no cover
185-
logger.info("Initalizing database connection pool")
185+
logger.info("Initializing database connection pool")
186186
try:
187187
await db.create_pool()
188188
except Exception as e:

src/fastapi/fastapi_installer.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@ const FASTAPI_BASE_DEV_DEPENDENCIES: &[&str] = &["httpx", "pytest-xdist"];
2323

2424
pub fn install_fastapi_dependencies(project_info: &ProjectInfo) -> Result<()> {
2525
match project_info.project_manager {
26-
ProjectManager::Uv => uv_fastapi_depencency_installer(project_info)?,
27-
ProjectManager::Poetry => poetry_fastapi_depencency_installer(project_info)?,
28-
ProjectManager::Setuptools => setuptools_fastapi_depencency_installer(project_info)?,
26+
ProjectManager::Uv => uv_fastapi_dependency_installer(project_info)?,
27+
ProjectManager::Poetry => poetry_fastapi_dependency_installer(project_info)?,
28+
ProjectManager::Setuptools => setuptools_fastapi_dependency_installer(project_info)?,
2929
ProjectManager::Pixi => bail!("Pixi is not currently supported for FastAPI projects"),
30-
ProjectManager::Maturin => maturin_fastapi_depencency_installer(project_info)?,
30+
ProjectManager::Maturin => maturin_fastapi_dependency_installer(project_info)?,
3131
};
3232

3333
Ok(())
3434
}
3535

36-
fn uv_fastapi_depencency_installer(project_info: &ProjectInfo) -> Result<()> {
36+
fn uv_fastapi_dependency_installer(project_info: &ProjectInfo) -> Result<()> {
3737
let dependencies = FASTAPI_BASE_DEPENDENCIES.to_vec();
3838
/* if project_info.database_manager == Some(DatabaseManager::SqlAlchemy) {
3939
dependencies.push("sqlalchemy");
@@ -67,7 +67,7 @@ fn uv_fastapi_depencency_installer(project_info: &ProjectInfo) -> Result<()> {
6767
Ok(())
6868
}
6969

70-
fn poetry_fastapi_depencency_installer(project_info: &ProjectInfo) -> Result<()> {
70+
fn poetry_fastapi_dependency_installer(project_info: &ProjectInfo) -> Result<()> {
7171
let dependencies = FASTAPI_BASE_DEPENDENCIES.to_vec();
7272
/* if project_info.database_manager == Some(DatabaseManager::SqlAlchemy) {
7373
dependencies.push("sqlalchemy");
@@ -101,7 +101,7 @@ fn poetry_fastapi_depencency_installer(project_info: &ProjectInfo) -> Result<()>
101101
Ok(())
102102
}
103103

104-
fn setuptools_fastapi_depencency_installer(project_info: &ProjectInfo) -> Result<()> {
104+
fn setuptools_fastapi_dependency_installer(project_info: &ProjectInfo) -> Result<()> {
105105
let venv_output = std::process::Command::new("python")
106106
.args(["-m", "venv", ".venv"])
107107
.current_dir(project_info.base_dir())
@@ -147,15 +147,15 @@ fn setuptools_fastapi_depencency_installer(project_info: &ProjectInfo) -> Result
147147
Ok(())
148148
}
149149

150-
fn maturin_fastapi_depencency_installer(project_info: &ProjectInfo) -> Result<()> {
150+
fn maturin_fastapi_dependency_installer(project_info: &ProjectInfo) -> Result<()> {
151151
use crate::project_info::Pyo3PythonManager;
152152

153153
if let Some(pyo3_python_manager) = &project_info.pyo3_python_manager {
154154
match pyo3_python_manager {
155-
Pyo3PythonManager::Uv => uv_fastapi_depencency_installer(project_info),
156-
Pyo3PythonManager::Setuptools => setuptools_fastapi_depencency_installer(project_info),
155+
Pyo3PythonManager::Uv => uv_fastapi_dependency_installer(project_info),
156+
Pyo3PythonManager::Setuptools => setuptools_fastapi_dependency_installer(project_info),
157157
}
158158
} else {
159-
bail!("No Python project mangager provided for PyO3 project");
159+
bail!("No Python project manager provided for PyO3 project");
160160
}
161161
}

src/fastapi/model_files.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fn create_token_models_file() -> String {
3131
3232
3333
class Token(BaseModel):
34-
"""Don't use CamelBase here because FastAPI requires snake case vairables for the token."""
34+
"""Don't use CamelBase here because FastAPI requires snake case variables for the token."""
3535
3636
access_token: str
3737
token_type: str = "bearer"

src/fastapi/route_files.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ async def get_current_user(pool: DbPool, cache_client: CacheClient, token: Token
131131
detail="Could not validate credentials",
132132
) from e
133133
if token_data.sub is None: # pragma: no cover
134-
logger.debug("Token does not countain sub data")
134+
logger.debug("Token does not contain sub data")
135135
raise HTTPException(
136136
status_code=HTTP_403_FORBIDDEN, detail="Count not validate credientials"
137137
)

src/fastapi/test_files.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ pub fn save_login_route_test_file(project_info: &ProjectInfo) -> Result<()> {
574574
Ok(())
575575
}
576576

577-
fn create_test_uitls_file(project_info: &ProjectInfo) -> String {
577+
fn create_test_utils_file(project_info: &ProjectInfo) -> String {
578578
let module = &project_info.module_name();
579579

580580
format!(
@@ -614,7 +614,7 @@ async def get_superuser_token_headers(test_client):
614614
pub fn save_test_utils_file(project_info: &ProjectInfo) -> Result<()> {
615615
let base = &project_info.base_dir();
616616
let file_path = base.join("tests/utils.py");
617-
let file_content = create_test_uitls_file(project_info);
617+
let file_content = create_test_utils_file(project_info);
618618

619619
save_file_with_content(&file_path, &file_content)?;
620620

src/github_actions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1462,7 +1462,7 @@ jobs:
14621462
- name: Set up Python
14631463
run: pixi add python=="${{{{ env.PYTHON_VERSION }}}}.*"
14641464
- name: Ruff format check
1465-
run: pixi run run-ruff-formar
1465+
run: pixi run run-ruff-former
14661466
- name: Lint with ruff
14671467
run: pixi run run-ruff-check
14681468
- name: mypy check

0 commit comments

Comments
 (0)