diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 1bc1d7ed..20123bfb 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -10,7 +10,7 @@ env: RUST_BACKTRACE: 1 RUSTFLAGS: "-D warnings" WORKING_DIR: "my-project" - MIN_PYTHON_VERSION: "3.10" + MIN_PYTHON_VERSION: "3.11" CI: true # For insta jobs: clippy: diff --git a/src/fastapi/docker_files.rs b/src/fastapi/docker_files.rs index fab2a18d..12c394dd 100644 --- a/src/fastapi/docker_files.rs +++ b/src/fastapi/docker_files.rs @@ -820,18 +820,18 @@ mod tests { copyright_year: Some("2023".to_string()), version: "0.1.0".to_string(), python_version: "3.11".to_string(), - min_python_version: "3.10".to_string(), + min_python_version: "3.11".to_string(), project_manager: ProjectManager::Uv, pyo3_python_manager: Some(Pyo3PythonManager::Uv), type_checker: TypeChecker::Mypy, is_application: true, is_async_project: false, github_actions_python_test_versions: vec![ - "3.10".to_string(), "3.11".to_string(), "3.12".to_string(), "3.13".to_string(), "3.14".to_string(), + "3.15".to_string(), ], max_line_length: 100, use_dependabot: true, diff --git a/src/github_actions.rs b/src/github_actions.rs index f903d343..8dc310cb 100644 --- a/src/github_actions.rs +++ b/src/github_actions.rs @@ -1994,18 +1994,18 @@ mod tests { copyright_year: Some("2023".to_string()), version: "0.1.0".to_string(), python_version: "3.12".to_string(), - min_python_version: "3.10".to_string(), + min_python_version: "3.11".to_string(), project_manager: ProjectManager::Maturin, pyo3_python_manager: Some(Pyo3PythonManager::Uv), type_checker: TypeChecker::Mypy, is_application: true, is_async_project: false, github_actions_python_test_versions: vec![ - "3.10".to_string(), "3.11".to_string(), "3.12".to_string(), "3.13".to_string(), "3.14".to_string(), + "3.15".to_string(), ], max_line_length: 100, use_dependabot: true, @@ -2041,13 +2041,13 @@ mod tests { fn test_build_github_actions_test_versions() { assert_eq!( build_actions_python_test_versions(&[ - "3.10".to_string(), "3.11".to_string(), "3.12".to_string(), "3.13".to_string(), "3.14".to_string(), + "3.15".to_string(), ]), - r#""3.10", "3.11", "3.12", "3.13", "3.14""#.to_string() + r#""3.11", "3.12", "3.13", "3.14", "3.15""#.to_string() ); } diff --git a/src/licenses.rs b/src/licenses.rs index 7964e2ad..c9da4132 100644 --- a/src/licenses.rs +++ b/src/licenses.rs @@ -272,19 +272,19 @@ mod tests { license: LicenseType::Mit, copyright_year: Some("2023".to_string()), version: "0.1.0".to_string(), - python_version: "3.11".to_string(), - min_python_version: "3.10".to_string(), + python_version: "3.12".to_string(), + min_python_version: "3.11".to_string(), project_manager: ProjectManager::Uv, pyo3_python_manager: None, type_checker: TypeChecker::Mypy, is_application: true, is_async_project: false, github_actions_python_test_versions: vec![ - "3.10".to_string(), "3.11".to_string(), "3.12".to_string(), "3.13".to_string(), "3.14".to_string(), + "3.15".to_string(), ], max_line_length: 100, use_dependabot: true, diff --git a/src/main.rs b/src/main.rs index 580b72c8..64cae7fc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -494,18 +494,18 @@ mod tests { copyright_year: Some("2023".to_string()), version: "0.1.0".to_string(), python_version: "3.12".to_string(), - min_python_version: "3.10".to_string(), + min_python_version: "3.11".to_string(), project_manager: ProjectManager::Uv, pyo3_python_manager: None, type_checker: TypeChecker::Mypy, is_application: true, is_async_project: false, github_actions_python_test_versions: vec![ - "3.10".to_string(), "3.11".to_string(), "3.12".to_string(), "3.13".to_string(), "3.14".to_string(), + "3.15".to_string(), ], max_line_length: 100, use_dependabot: true, diff --git a/src/project_generator.rs b/src/project_generator.rs index e89a3d9e..dddb09d3 100644 --- a/src/project_generator.rs +++ b/src/project_generator.rs @@ -1285,18 +1285,18 @@ mod tests { copyright_year: Some("2023".to_string()), version: "0.1.0".to_string(), python_version: "3.11".to_string(), - min_python_version: "3.10".to_string(), + min_python_version: "3.11".to_string(), project_manager: ProjectManager::Uv, pyo3_python_manager: Some(Pyo3PythonManager::Uv), type_checker: TypeChecker::Mypy, is_application: true, is_async_project: false, github_actions_python_test_versions: vec![ - "3.10".to_string(), "3.11".to_string(), "3.12".to_string(), "3.13".to_string(), "3.14".to_string(), + "3.15".to_string(), ], max_line_length: 100, use_dependabot: true, diff --git a/src/project_info.rs b/src/project_info.rs index 62eb2397..f55be010 100644 --- a/src/project_info.rs +++ b/src/project_info.rs @@ -11,9 +11,6 @@ use time::OffsetDateTime; use crate::config::Config; -#[cfg(feature = "fastapi")] -use crate::utils::is_allowed_fastapi_python_version; - #[derive(Clone, Debug, Default, Deserialize, Serialize, ValueEnum, PartialEq, Eq)] pub enum DependabotSchedule { #[default] @@ -625,7 +622,7 @@ pub fn get_project_info(use_defaults: bool) -> Result { let python_version_default = match config.python_version { Some(python) => python, - None => "3.14".to_string(), + None => "3.15".to_string(), }; let python_version = if use_defaults { python_version_default @@ -633,31 +630,11 @@ pub fn get_project_info(use_defaults: bool) -> Result { python_version_prompt(python_version_default)? }; - #[cfg(feature = "fastapi")] - if is_fastapi_project && !is_allowed_fastapi_python_version(&python_version)? { - bail!("The minimum supported Python version for FastAPI projects is 3.11"); - } - let min_python_version_default = { - #[cfg(feature = "fastapi")] - { - if is_fastapi_project { - match config.min_python_version { - Some(python) => python, - None => "3.11".to_string(), - } - } else { - match config.min_python_version { - Some(python) => python, - None => "3.10".to_string(), - } - } - } - #[cfg(not(feature = "fastapi"))] { match config.min_python_version { Some(python) => python, - None => "3.10".to_string(), + None => "3.11".to_string(), } } }; @@ -668,11 +645,6 @@ pub fn get_project_info(use_defaults: bool) -> Result { python_min_version_prompt(min_python_version_default)? }; - #[cfg(feature = "fastapi")] - if is_fastapi_project && !is_allowed_fastapi_python_version(&min_python_version)? { - bail!("The minimum supported Python version for FastAPI projects is 3.11"); - } - let github_actions_python_test_version_default = match config.github_actions_python_test_versions { Some(versions) => versions, @@ -685,42 +657,21 @@ pub fn get_project_info(use_defaults: bool) -> Result { } else { let mut versions: Vec = Vec::new(); - // Up to 3.14 - for i in min..15 { + // Up to 3.15 + for i in min..16 { versions.push(format!("3.{i}")); } versions } } else { - #[cfg(feature = "fastapi")] - if is_fastapi_project { - vec![ - "3.11".to_string(), - "3.12".to_string(), - "3.13".to_string(), - "3.14".to_string(), - ] - } else { - vec![ - "3.10".to_string(), - "3.11".to_string(), - "3.12".to_string(), - "3.13".to_string(), - "3.14".to_string(), - ] - } - - #[cfg(not(feature = "fastapi"))] - { - vec![ - "3.10".to_string(), - "3.11".to_string(), - "3.12".to_string(), - "3.13".to_string(), - "3.14".to_string(), - ] - } + vec![ + "3.11".to_string(), + "3.12".to_string(), + "3.13".to_string(), + "3.14".to_string(), + "3.15".to_string(), + ] } } }; @@ -1056,7 +1007,7 @@ mod tests { #[test] fn test_valid_two_digit_python_version() { - assert!(is_valid_python_version("3.10")); + assert!(is_valid_python_version("3.11")); } #[test] @@ -1091,6 +1042,6 @@ mod tests { #[test] fn test_invalid_python_version_non_numeric_patch() { - assert!(!is_valid_python_version("3.10.a")); + assert!(!is_valid_python_version("3.11.a")); } } diff --git a/src/python_files.rs b/src/python_files.rs index 37c5d16c..a1f3a086 100644 --- a/src/python_files.rs +++ b/src/python_files.rs @@ -288,18 +288,18 @@ mod tests { copyright_year: Some("2023".to_string()), version: "0.1.0".to_string(), python_version: "3.12".to_string(), - min_python_version: "3.10".to_string(), + min_python_version: "3.11".to_string(), project_manager: ProjectManager::Maturin, pyo3_python_manager: Some(Pyo3PythonManager::Uv), type_checker: TypeChecker::Mypy, is_application: true, is_async_project: false, github_actions_python_test_versions: vec![ - "3.10".to_string(), "3.11".to_string(), "3.12".to_string(), "3.13".to_string(), "3.14".to_string(), + "3.15".to_string(), ], max_line_length: 100, use_dependabot: true, diff --git a/src/rust_files.rs b/src/rust_files.rs index 5c159611..208e7c91 100644 --- a/src/rust_files.rs +++ b/src/rust_files.rs @@ -115,18 +115,18 @@ mod tests { copyright_year: Some("2023".to_string()), version: "0.1.0".to_string(), python_version: "3.12".to_string(), - min_python_version: "3.10".to_string(), + min_python_version: "3.11".to_string(), project_manager: ProjectManager::Maturin, pyo3_python_manager: Some(Pyo3PythonManager::Uv), type_checker: TypeChecker::Mypy, is_application: true, is_async_project: false, github_actions_python_test_versions: vec![ - "3.10".to_string(), "3.11".to_string(), "3.12".to_string(), "3.13".to_string(), "3.14".to_string(), + "3.15".to_string(), ], max_line_length: 100, use_dependabot: true, diff --git a/src/snapshots/python_project__github_actions__tests__save_ci_testing_fastapi_file_pyo3.snap b/src/snapshots/python_project__github_actions__tests__save_ci_testing_fastapi_file_pyo3.snap index 2a245c93..af0e4c7f 100644 --- a/src/snapshots/python_project__github_actions__tests__save_ci_testing_fastapi_file_pyo3.snap +++ b/src/snapshots/python_project__github_actions__tests__save_ci_testing_fastapi_file_pyo3.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n CARGO_TERM_COLOR: always\n RUST_BACKTRACE: 1\n RUSTFLAGS: \"-D warnings\"\n PYTHON_VERSION: \"3.10\"\n SECRET_KEY: \"someKey\"\n PRODUCTION_MODE: false\n FIRST_SUPERUSER_EMAIL: \"some@email.com\"\n FIRST_SUPERUSER_PASSWORD: \"somePassword1!\"\n FIRST_SUPERUSER_NAME: \"Super User\"\n POSTGRES_HOST: \"127.0.0.1\"\n POSTGRES_USER: \"postgres\"\n POSTGRES_PASSWORD: \"test_password\"\n POSTGRES_DB: \"test_db\"\n VALKEY_HOST: \"127.0.0.1\"\n VALKEY_PASSWORD: \"test_password\"\n MEILISEARCH_HOST: http://127.0.0.1\n STACK_NAME: \"test-stack\"\n DOMAIN: \"127.0.0.1\"\n LOG_LEVEL: \"DEBUG\"\n CI: true\njobs:\n clippy:\n name: Clippy\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: clippy\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo clippy\n run: cargo clippy --all-targets -- --deny warnings\n fmt:\n name: Rustfmt\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: rustfmt\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo fmt\n run: cargo fmt --all -- --check\n python-linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v3.0.0\n env:\n PREK_SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Install sqlx-cli\n run: cargo install sqlx-cli --no-default-features -F native-tls -F postgres\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: make .env\n run: touch .env\n - name: Start docker containers\n run: docker compose up db valkey migrations -d\n - name: Test with pytest\n run: uv run pytest -n auto\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n CARGO_TERM_COLOR: always\n RUST_BACKTRACE: 1\n RUSTFLAGS: \"-D warnings\"\n PYTHON_VERSION: \"3.11\"\n SECRET_KEY: \"someKey\"\n PRODUCTION_MODE: false\n FIRST_SUPERUSER_EMAIL: \"some@email.com\"\n FIRST_SUPERUSER_PASSWORD: \"somePassword1!\"\n FIRST_SUPERUSER_NAME: \"Super User\"\n POSTGRES_HOST: \"127.0.0.1\"\n POSTGRES_USER: \"postgres\"\n POSTGRES_PASSWORD: \"test_password\"\n POSTGRES_DB: \"test_db\"\n VALKEY_HOST: \"127.0.0.1\"\n VALKEY_PASSWORD: \"test_password\"\n MEILISEARCH_HOST: http://127.0.0.1\n STACK_NAME: \"test-stack\"\n DOMAIN: \"127.0.0.1\"\n LOG_LEVEL: \"DEBUG\"\n CI: true\njobs:\n clippy:\n name: Clippy\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: clippy\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo clippy\n run: cargo clippy --all-targets -- --deny warnings\n fmt:\n name: Rustfmt\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: rustfmt\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo fmt\n run: cargo fmt --all -- --check\n python-linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v3.0.0\n env:\n PREK_SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.11\", \"3.12\", \"3.13\", \"3.14\", \"3.15\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Install sqlx-cli\n run: cargo install sqlx-cli --no-default-features -F native-tls -F postgres\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: make .env\n run: touch .env\n - name: Start docker containers\n run: docker compose up db valkey migrations -d\n - name: Test with pytest\n run: uv run pytest -n auto\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_ci_testing_linux_only_file_pyo3.snap b/src/snapshots/python_project__github_actions__tests__save_ci_testing_linux_only_file_pyo3.snap index 70865830..3c059a26 100644 --- a/src/snapshots/python_project__github_actions__tests__save_ci_testing_linux_only_file_pyo3.snap +++ b/src/snapshots/python_project__github_actions__tests__save_ci_testing_linux_only_file_pyo3.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n CARGO_TERM_COLOR: always\n RUST_BACKTRACE: 1\n RUSTFLAGS: \"-D warnings\"\n PYTHON_VERSION: \"3.10\"\njobs:\n clippy:\n name: Clippy\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: clippy\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo clippy\n run: cargo clippy --all-targets -- --deny warnings\n fmt:\n name: Rustfmt\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: rustfmt\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo fmt\n run: cargo fmt --all -- --check\n python-linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v3.0.0\n env:\n PREK_SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Test with pytest\n run: uv run pytest\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n CARGO_TERM_COLOR: always\n RUST_BACKTRACE: 1\n RUSTFLAGS: \"-D warnings\"\n PYTHON_VERSION: \"3.11\"\njobs:\n clippy:\n name: Clippy\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: clippy\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo clippy\n run: cargo clippy --all-targets -- --deny warnings\n fmt:\n name: Rustfmt\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: rustfmt\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo fmt\n run: cargo fmt --all -- --check\n python-linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v3.0.0\n env:\n PREK_SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.11\", \"3.12\", \"3.13\", \"3.14\", \"3.15\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Test with pytest\n run: uv run pytest\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_ci_testing_linux_only_file_pyo3_pyrefly.snap b/src/snapshots/python_project__github_actions__tests__save_ci_testing_linux_only_file_pyo3_pyrefly.snap index 82670330..ac0b52e7 100644 --- a/src/snapshots/python_project__github_actions__tests__save_ci_testing_linux_only_file_pyo3_pyrefly.snap +++ b/src/snapshots/python_project__github_actions__tests__save_ci_testing_linux_only_file_pyo3_pyrefly.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n CARGO_TERM_COLOR: always\n RUST_BACKTRACE: 1\n RUSTFLAGS: \"-D warnings\"\n PYTHON_VERSION: \"3.10\"\njobs:\n clippy:\n name: Clippy\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: clippy\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo clippy\n run: cargo clippy --all-targets -- --deny warnings\n fmt:\n name: Rustfmt\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: rustfmt\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo fmt\n run: cargo fmt --all -- --check\n python-linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: pyrefly check\n run: uv run pyrefly check\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v3.0.0\n env:\n PREK_SKIP: no-commit-to-branch,pyrefly-check\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Test with pytest\n run: uv run pytest\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n CARGO_TERM_COLOR: always\n RUST_BACKTRACE: 1\n RUSTFLAGS: \"-D warnings\"\n PYTHON_VERSION: \"3.11\"\njobs:\n clippy:\n name: Clippy\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: clippy\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo clippy\n run: cargo clippy --all-targets -- --deny warnings\n fmt:\n name: Rustfmt\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: rustfmt\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo fmt\n run: cargo fmt --all -- --check\n python-linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: pyrefly check\n run: uv run pyrefly check\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v3.0.0\n env:\n PREK_SKIP: no-commit-to-branch,pyrefly-check\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.11\", \"3.12\", \"3.13\", \"3.14\", \"3.15\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Test with pytest\n run: uv run pytest\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_ci_testing_multi_os_file_pyo3.snap b/src/snapshots/python_project__github_actions__tests__save_ci_testing_multi_os_file_pyo3.snap index ed55234e..711fc064 100644 --- a/src/snapshots/python_project__github_actions__tests__save_ci_testing_multi_os_file_pyo3.snap +++ b/src/snapshots/python_project__github_actions__tests__save_ci_testing_multi_os_file_pyo3.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n CARGO_TERM_COLOR: always\n RUST_BACKTRACE: 1\n RUSTFLAGS: \"-D warnings\"\n PYTHON_VERSION: \"3.10\"\njobs:\n clippy:\n name: Clippy\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: clippy\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo clippy\n run: cargo clippy --all-targets -- --deny warnings\n fmt:\n name: Rustfmt\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: rustfmt\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo fmt\n run: cargo fmt --all -- --check\n python-linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v3.0.0\n env:\n PREK_SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n os: [ubuntu-latest, windows-latest, macos-latest]\n runs-on: ${{ matrix.os }}\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Test with pytest\n run: uv run pytest\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n CARGO_TERM_COLOR: always\n RUST_BACKTRACE: 1\n RUSTFLAGS: \"-D warnings\"\n PYTHON_VERSION: \"3.11\"\njobs:\n clippy:\n name: Clippy\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: clippy\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo clippy\n run: cargo clippy --all-targets -- --deny warnings\n fmt:\n name: Rustfmt\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n with:\n components: rustfmt\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo fmt\n run: cargo fmt --all -- --check\n python-linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v3.0.0\n env:\n PREK_SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.11\", \"3.12\", \"3.13\", \"3.14\", \"3.15\"]\n os: [ubuntu-latest, windows-latest, macos-latest]\n runs-on: ${{ matrix.os }}\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Test with pytest\n run: uv run pytest\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_fastapi_file.snap b/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_fastapi_file.snap index fd646b48..1b037c9a 100644 --- a/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_fastapi_file.snap +++ b/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_fastapi_file.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\n SECRET_KEY: \"someKey\"\n PRODUCTION_MODE: false\n FIRST_SUPERUSER_EMAIL: \"some@email.com\"\n FIRST_SUPERUSER_PASSWORD: \"somePassword1!\"\n FIRST_SUPERUSER_NAME: \"Super User\"\n POSTGRES_HOST: \"127.0.0.1\"\n POSTGRES_USER: \"postgres\"\n POSTGRES_PASSWORD: \"test_password\"\n POSTGRES_DB: \"test_db\"\n VALKEY_HOST: \"127.0.0.1\"\n VALKEY_PASSWORD: \"test_password\"\n MEILISEARCH_HOST: http://127.0.0.1\n STACK_NAME: \"test-stack\"\n DOMAIN: \"127.0.0.1\"\n LOG_LEVEL: \"DEBUG\"\n CI: true\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Ruff format check\n run: ruff format my_project tests --check\n - name: Lint with ruff\n run: ruff check .\n - name: mypy check\n run: mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v3.0.0\n env:\n PREK_SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Install sqlx-cli\n run: cargo install sqlx-cli --no-default-features -F native-tls -F postgres\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: make .env\n run: touch .env\n - name: Start docker containers\n run: docker compose up db valkey migrations -d\n - name: Test with pytest\n run: python -m pytest -n auto\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.11\"\n SECRET_KEY: \"someKey\"\n PRODUCTION_MODE: false\n FIRST_SUPERUSER_EMAIL: \"some@email.com\"\n FIRST_SUPERUSER_PASSWORD: \"somePassword1!\"\n FIRST_SUPERUSER_NAME: \"Super User\"\n POSTGRES_HOST: \"127.0.0.1\"\n POSTGRES_USER: \"postgres\"\n POSTGRES_PASSWORD: \"test_password\"\n POSTGRES_DB: \"test_db\"\n VALKEY_HOST: \"127.0.0.1\"\n VALKEY_PASSWORD: \"test_password\"\n MEILISEARCH_HOST: http://127.0.0.1\n STACK_NAME: \"test-stack\"\n DOMAIN: \"127.0.0.1\"\n LOG_LEVEL: \"DEBUG\"\n CI: true\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Ruff format check\n run: ruff format my_project tests --check\n - name: Lint with ruff\n run: ruff check .\n - name: mypy check\n run: mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v3.0.0\n env:\n PREK_SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.11\", \"3.12\", \"3.13\", \"3.14\", \"3.15\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Install sqlx-cli\n run: cargo install sqlx-cli --no-default-features -F native-tls -F postgres\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: make .env\n run: touch .env\n - name: Start docker containers\n run: docker compose up db valkey migrations -d\n - name: Test with pytest\n run: python -m pytest -n auto\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_linux_only_file.snap b/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_linux_only_file.snap index 920abccb..ed2566a7 100644 --- a/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_linux_only_file.snap +++ b/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_linux_only_file.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Ruff format check\n run: ruff format my_project tests --check\n - name: Lint with ruff\n run: ruff check .\n - name: mypy check\n run: mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v3.0.0\n env:\n PREK_SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Test with pytest\n run: pytest\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.11\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Ruff format check\n run: ruff format my_project tests --check\n - name: Lint with ruff\n run: ruff check .\n - name: mypy check\n run: mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v3.0.0\n env:\n PREK_SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.11\", \"3.12\", \"3.13\", \"3.14\", \"3.15\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Test with pytest\n run: pytest\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_linux_only_file_pyrefly.snap b/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_linux_only_file_pyrefly.snap index 0550fc9a..3f98dad4 100644 --- a/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_linux_only_file_pyrefly.snap +++ b/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_linux_only_file_pyrefly.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Ruff format check\n run: ruff format my_project tests --check\n - name: Lint with ruff\n run: ruff check .\n - name: pyrefly check\n run: pyrefly check\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v3.0.0\n env:\n PREK_SKIP: no-commit-to-branch,pyrefly-check\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Test with pytest\n run: pytest\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.11\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Ruff format check\n run: ruff format my_project tests --check\n - name: Lint with ruff\n run: ruff check .\n - name: pyrefly check\n run: pyrefly check\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v3.0.0\n env:\n PREK_SKIP: no-commit-to-branch,pyrefly-check\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.11\", \"3.12\", \"3.13\", \"3.14\", \"3.15\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Test with pytest\n run: pytest\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_multi_os_file.snap b/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_multi_os_file.snap index 5c762675..71622258 100644 --- a/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_multi_os_file.snap +++ b/src/snapshots/python_project__github_actions__tests__save_setuptools_ci_testing_multi_os_file.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Ruff format check\n run: ruff format my_project tests --check\n - name: Lint with ruff\n run: ruff check .\n - name: mypy check\n run: mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v3.0.0\n env:\n PREK_SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n os: [ubuntu-latest, windows-latest, macos-latest]\n runs-on: ${{ matrix.os }}\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Test with pytest\n run: pytest\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.11\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Ruff format check\n run: ruff format my_project tests --check\n - name: Lint with ruff\n run: ruff check .\n - name: mypy check\n run: mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v3.0.0\n env:\n PREK_SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.11\", \"3.12\", \"3.13\", \"3.14\", \"3.15\"]\n os: [ubuntu-latest, windows-latest, macos-latest]\n runs-on: ${{ matrix.os }}\n steps:\n - uses: actions/checkout@v7\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n cache: \"pip\"\n - name: Install Dependencies\n run: |\n python -m pip install -U pip\n python -m pip install -r requirements-dev.txt\n - name: Test with pytest\n run: pytest\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_fastapi_file.snap b/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_fastapi_file.snap index 12aa53ac..d05ae8d0 100644 --- a/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_fastapi_file.snap +++ b/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_fastapi_file.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\n SECRET_KEY: \"someKey\"\n PRODUCTION_MODE: false\n FIRST_SUPERUSER_EMAIL: \"some@email.com\"\n FIRST_SUPERUSER_PASSWORD: \"somePassword1!\"\n FIRST_SUPERUSER_NAME: \"Super User\"\n POSTGRES_HOST: \"127.0.0.1\"\n POSTGRES_USER: \"postgres\"\n POSTGRES_PASSWORD: \"test_password\"\n POSTGRES_DB: \"test_db\"\n VALKEY_HOST: \"127.0.0.1\"\n VALKEY_PASSWORD: \"test_password\"\n MEILISEARCH_HOST: http://127.0.0.1\n STACK_NAME: \"test-stack\"\n DOMAIN: \"127.0.0.1\"\n LOG_LEVEL: \"DEBUG\"\n CI: true\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v3.0.0\n env:\n PREK_SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Install sqlx-cli\n run: cargo install sqlx-cli --no-default-features -F native-tls -F postgres\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: make .env\n run: touch .env\n - name: Start docker containers\n run: docker compose up db valkey migrations -d\n - name: Test with pytest\n run: uv run pytest -n auto\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.11\"\n SECRET_KEY: \"someKey\"\n PRODUCTION_MODE: false\n FIRST_SUPERUSER_EMAIL: \"some@email.com\"\n FIRST_SUPERUSER_PASSWORD: \"somePassword1!\"\n FIRST_SUPERUSER_NAME: \"Super User\"\n POSTGRES_HOST: \"127.0.0.1\"\n POSTGRES_USER: \"postgres\"\n POSTGRES_PASSWORD: \"test_password\"\n POSTGRES_DB: \"test_db\"\n VALKEY_HOST: \"127.0.0.1\"\n VALKEY_PASSWORD: \"test_password\"\n MEILISEARCH_HOST: http://127.0.0.1\n STACK_NAME: \"test-stack\"\n DOMAIN: \"127.0.0.1\"\n LOG_LEVEL: \"DEBUG\"\n CI: true\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v3.0.0\n env:\n PREK_SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.11\", \"3.12\", \"3.13\", \"3.14\", \"3.15\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install Rust\n uses: dtolnay/rust-toolchain@stable\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Install sqlx-cli\n run: cargo install sqlx-cli --no-default-features -F native-tls -F postgres\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: make .env\n run: touch .env\n - name: Start docker containers\n run: docker compose up db valkey migrations -d\n - name: Test with pytest\n run: uv run pytest -n auto\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_linux_only_file.snap b/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_linux_only_file.snap index 7fe2bff5..f8854282 100644 --- a/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_linux_only_file.snap +++ b/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_linux_only_file.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v3.0.0\n env:\n PREK_SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Test with pytest\n run: uv run pytest\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.11\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v3.0.0\n env:\n PREK_SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.11\", \"3.12\", \"3.13\", \"3.14\", \"3.15\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Test with pytest\n run: uv run pytest\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_linux_only_file_pyrefly.snap b/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_linux_only_file_pyrefly.snap index 486f8672..a651044c 100644 --- a/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_linux_only_file_pyrefly.snap +++ b/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_linux_only_file_pyrefly.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.10\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: pyrefly check\n run: uv run pyrefly check\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v3.0.0\n env:\n PREK_SKIP: no-commit-to-branch,pyrefly-check\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Test with pytest\n run: uv run pytest\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n PYTHON_VERSION: \"3.11\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: pyrefly check\n run: uv run pyrefly check\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v3.0.0\n env:\n PREK_SKIP: no-commit-to-branch,pyrefly-check\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.11\", \"3.12\", \"3.13\", \"3.14\", \"3.15\"]\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Test with pytest\n run: uv run pytest\n" diff --git a/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_multi_os_file.snap b/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_multi_os_file.snap index f0b0aab5..688df463 100644 --- a/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_multi_os_file.snap +++ b/src/snapshots/python_project__github_actions__tests__save_uv_ci_testing_multi_os_file.snap @@ -2,4 +2,4 @@ source: src/github_actions.rs expression: content --- -"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n UV_CACHE_DIR: /tmp/.uv-cache\n PYTHON_VERSION: \"3.10\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v3.0.0\n env:\n PREK_SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n os: [ubuntu-latest, windows-latest, macos-latest]\n runs-on: ${{ matrix.os }}\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Test with pytest\n run: uv run pytest\n" +"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n UV_CACHE_DIR: /tmp/.uv-cache\n PYTHON_VERSION: \"3.11\"\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v6\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n prek:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v7\n - uses: j178/prek-action@v3.0.0\n env:\n PREK_SKIP: no-commit-to-branch\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.11\", \"3.12\", \"3.13\", \"3.14\", \"3.15\"]\n os: [ubuntu-latest, windows-latest, macos-latest]\n runs-on: ${{ matrix.os }}\n steps:\n - uses: actions/checkout@v7\n - name: Install uv\n uses: astral-sh/setup-uv@v8\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v6\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: uv sync --frozen\n - name: Test with pytest\n run: uv run pytest\n" diff --git a/src/snapshots/python_project__project_generator__tests__create_pyproject_toml_async_project.snap b/src/snapshots/python_project__project_generator__tests__create_pyproject_toml_async_project.snap index ad5c4898..a141a122 100644 --- a/src/snapshots/python_project__project_generator__tests__create_pyproject_toml_async_project.snap +++ b/src/snapshots/python_project__project_generator__tests__create_pyproject_toml_async_project.snap @@ -2,4 +2,4 @@ source: src/project_generator.rs expression: content --- -"[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"my-project\"\ndescription = \"This is a test\"\nauthors = [\n { name = \"Arthur Dent\", email = \"authur@heartofgold.com\" }\n]\nlicense = { file = \"LICENSE\" }\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\ndynamic = [\"version\"]\ndependencies = []\n\n[dependency-groups]\ndev = []\n\n[tool.hatch.version]\npath = \"my_project/_version.py\"\n\n[tool.mypy]\ncheck_untyped_defs = true\ndisallow_untyped_defs = true\n\n[[tool.mypy.overrides]]\nmodule = [\"tests.*\"]\ndisallow_untyped_defs = false\n\n[tool.pytest.ini_options]\nminversion = \"6.0\"\naddopts = \"--cov=my_project --cov-report term-missing --no-cov-on-fail\"\nasyncio_mode = \"auto\"\nasyncio_default_fixture_loop_scope = \"function\"\nasyncio_default_test_loop_scope = \"function\"\n\n[tool.coverage.report]\nexclude_lines = [\n \"if __name__ == .__main__.:\",\n \"if TYPE_CHECKING:\",\n \"pragma: no cover\",\n]\n\n[tool.ruff]\nline-length = 100\nfix = true\n\n[tool.ruff.lint]\nselect = [\n \"E\", # pycodestyle\n \"B\", # flake8-bugbear\n \"W\", # Warning\n \"F\", # pyflakes\n \"UP\", # pyupgrade\n \"I001\", # unsorted-imports\n \"T201\", # print found\n \"T203\", # pprint found\n \"RUF022\", # Unsorted __all__\n \"RUF023\", # Unforted __slots__\n \"ASYNC\", # flake8-async\n]\nignore=[\n # Recommended ignores by ruff when using formatter\n \"E501\",\n \"W191\",\n \"E111\",\n \"E114\",\n \"E117\",\n \"D206\",\n \"D300\",\n \"Q000\",\n \"Q001\",\n \"Q002\",\n \"Q003\",\n \"COM812\",\n \"COM819\",\n \"ISC001\",\n \"ISC002\",\n]\n\n[tool.uv]\nadd-bounds = \"exact\"\n" +"[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"my-project\"\ndescription = \"This is a test\"\nauthors = [\n { name = \"Arthur Dent\", email = \"authur@heartofgold.com\" }\n]\nlicense = { file = \"LICENSE\" }\nreadme = \"README.md\"\nrequires-python = \">=3.11\"\ndynamic = [\"version\"]\ndependencies = []\n\n[dependency-groups]\ndev = []\n\n[tool.hatch.version]\npath = \"my_project/_version.py\"\n\n[tool.mypy]\ncheck_untyped_defs = true\ndisallow_untyped_defs = true\n\n[[tool.mypy.overrides]]\nmodule = [\"tests.*\"]\ndisallow_untyped_defs = false\n\n[tool.pytest.ini_options]\nminversion = \"6.0\"\naddopts = \"--cov=my_project --cov-report term-missing --no-cov-on-fail\"\nasyncio_mode = \"auto\"\nasyncio_default_fixture_loop_scope = \"function\"\nasyncio_default_test_loop_scope = \"function\"\n\n[tool.coverage.report]\nexclude_lines = [\n \"if __name__ == .__main__.:\",\n \"if TYPE_CHECKING:\",\n \"pragma: no cover\",\n]\n\n[tool.ruff]\nline-length = 100\nfix = true\n\n[tool.ruff.lint]\nselect = [\n \"E\", # pycodestyle\n \"B\", # flake8-bugbear\n \"W\", # Warning\n \"F\", # pyflakes\n \"UP\", # pyupgrade\n \"I001\", # unsorted-imports\n \"T201\", # print found\n \"T203\", # pprint found\n \"RUF022\", # Unsorted __all__\n \"RUF023\", # Unforted __slots__\n \"ASYNC\", # flake8-async\n]\nignore=[\n # Recommended ignores by ruff when using formatter\n \"E501\",\n \"W191\",\n \"E111\",\n \"E114\",\n \"E117\",\n \"D206\",\n \"D300\",\n \"Q000\",\n \"Q001\",\n \"Q002\",\n \"Q003\",\n \"COM812\",\n \"COM819\",\n \"ISC001\",\n \"ISC002\",\n]\n\n[tool.uv]\nadd-bounds = \"exact\"\n" diff --git a/src/snapshots/python_project__project_generator__tests__create_setuptools_pyproject_toml_mit_lib.snap b/src/snapshots/python_project__project_generator__tests__create_setuptools_pyproject_toml_mit_lib.snap index 3d274581..084f340f 100644 --- a/src/snapshots/python_project__project_generator__tests__create_setuptools_pyproject_toml_mit_lib.snap +++ b/src/snapshots/python_project__project_generator__tests__create_setuptools_pyproject_toml_mit_lib.snap @@ -2,4 +2,4 @@ source: src/project_generator.rs expression: content --- -"[build-system]\nrequires = [\"setuptools\", \"wheel\"]\nbuild-backend = \"setuptools.build_meta\"\n\n[project]\nname = \"my-project\"\ndescription = \"This is a test\"\nauthors = [\n { name = \"Arthur Dent\", email = \"authur@heartofgold.com\" }\n]\nlicense = { text = \"MIT\" }\nrequires-python = \">=3.10\"\ndynamic = [\"version\", \"readme\"]\ndependencies = []\n\n[tool.setuptools.dynamic]\nversion = {attr = \"my_project.__version__\"}\nreadme = {file = [\"README.md\"]}\n\n[tool.setuptools.packages.find]\ninclude = [\"my_project*\"]\n\n[tool.setuptools.package-data]\nmy_project = [\"py.typed\"]\n\n[tool.mypy]\ncheck_untyped_defs = true\ndisallow_untyped_defs = true\n\n[[tool.mypy.overrides]]\nmodule = [\"tests.*\"]\ndisallow_untyped_defs = false\n\n[tool.pytest.ini_options]\nminversion = \"6.0\"\naddopts = \"--cov=my_project --cov-report term-missing --no-cov-on-fail\"\n\n[tool.coverage.report]\nexclude_lines = [\n \"if __name__ == .__main__.:\",\n \"if TYPE_CHECKING:\",\n \"pragma: no cover\",\n]\n\n[tool.ruff]\nline-length = 100\nfix = true\n\n[tool.ruff.lint]\nselect = [\n \"E\", # pycodestyle\n \"B\", # flake8-bugbear\n \"W\", # Warning\n \"F\", # pyflakes\n \"UP\", # pyupgrade\n \"I001\", # unsorted-imports\n \"T201\", # print found\n \"T203\", # pprint found\n \"RUF022\", # Unsorted __all__\n \"RUF023\", # Unforted __slots__\n]\nignore=[\n # Recommended ignores by ruff when using formatter\n \"E501\",\n \"W191\",\n \"E111\",\n \"E114\",\n \"E117\",\n \"D206\",\n \"D300\",\n \"Q000\",\n \"Q001\",\n \"Q002\",\n \"Q003\",\n \"COM812\",\n \"COM819\",\n \"ISC001\",\n \"ISC002\",\n]\n" +"[build-system]\nrequires = [\"setuptools\", \"wheel\"]\nbuild-backend = \"setuptools.build_meta\"\n\n[project]\nname = \"my-project\"\ndescription = \"This is a test\"\nauthors = [\n { name = \"Arthur Dent\", email = \"authur@heartofgold.com\" }\n]\nlicense = { text = \"MIT\" }\nrequires-python = \">=3.11\"\ndynamic = [\"version\", \"readme\"]\ndependencies = []\n\n[tool.setuptools.dynamic]\nversion = {attr = \"my_project.__version__\"}\nreadme = {file = [\"README.md\"]}\n\n[tool.setuptools.packages.find]\ninclude = [\"my_project*\"]\n\n[tool.setuptools.package-data]\nmy_project = [\"py.typed\"]\n\n[tool.mypy]\ncheck_untyped_defs = true\ndisallow_untyped_defs = true\n\n[[tool.mypy.overrides]]\nmodule = [\"tests.*\"]\ndisallow_untyped_defs = false\n\n[tool.pytest.ini_options]\nminversion = \"6.0\"\naddopts = \"--cov=my_project --cov-report term-missing --no-cov-on-fail\"\n\n[tool.coverage.report]\nexclude_lines = [\n \"if __name__ == .__main__.:\",\n \"if TYPE_CHECKING:\",\n \"pragma: no cover\",\n]\n\n[tool.ruff]\nline-length = 100\nfix = true\n\n[tool.ruff.lint]\nselect = [\n \"E\", # pycodestyle\n \"B\", # flake8-bugbear\n \"W\", # Warning\n \"F\", # pyflakes\n \"UP\", # pyupgrade\n \"I001\", # unsorted-imports\n \"T201\", # print found\n \"T203\", # pprint found\n \"RUF022\", # Unsorted __all__\n \"RUF023\", # Unforted __slots__\n]\nignore=[\n # Recommended ignores by ruff when using formatter\n \"E501\",\n \"W191\",\n \"E111\",\n \"E114\",\n \"E117\",\n \"D206\",\n \"D300\",\n \"Q000\",\n \"Q001\",\n \"Q002\",\n \"Q003\",\n \"COM812\",\n \"COM819\",\n \"ISC001\",\n \"ISC002\",\n]\n" diff --git a/src/snapshots/python_project__project_generator__tests__create_uv_pyproject_toml_mit_lib.snap b/src/snapshots/python_project__project_generator__tests__create_uv_pyproject_toml_mit_lib.snap index c766cb20..fc3cf037 100644 --- a/src/snapshots/python_project__project_generator__tests__create_uv_pyproject_toml_mit_lib.snap +++ b/src/snapshots/python_project__project_generator__tests__create_uv_pyproject_toml_mit_lib.snap @@ -2,4 +2,4 @@ source: src/project_generator.rs expression: content --- -"[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"my-project\"\ndescription = \"This is a test\"\nauthors = [\n { name = \"Arthur Dent\", email = \"authur@heartofgold.com\" }\n]\nlicense = { file = \"LICENSE\" }\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\ndynamic = [\"version\"]\ndependencies = []\n\n[dependency-groups]\ndev = []\n\n[tool.hatch.version]\npath = \"my_project/_version.py\"\n\n[tool.mypy]\ncheck_untyped_defs = true\ndisallow_untyped_defs = true\n\n[[tool.mypy.overrides]]\nmodule = [\"tests.*\"]\ndisallow_untyped_defs = false\n\n[tool.pytest.ini_options]\nminversion = \"6.0\"\naddopts = \"--cov=my_project --cov-report term-missing --no-cov-on-fail\"\n\n[tool.coverage.report]\nexclude_lines = [\n \"if __name__ == .__main__.:\",\n \"if TYPE_CHECKING:\",\n \"pragma: no cover\",\n]\n\n[tool.ruff]\nline-length = 100\nfix = true\n\n[tool.ruff.lint]\nselect = [\n \"E\", # pycodestyle\n \"B\", # flake8-bugbear\n \"W\", # Warning\n \"F\", # pyflakes\n \"UP\", # pyupgrade\n \"I001\", # unsorted-imports\n \"T201\", # print found\n \"T203\", # pprint found\n \"RUF022\", # Unsorted __all__\n \"RUF023\", # Unforted __slots__\n]\nignore=[\n # Recommended ignores by ruff when using formatter\n \"E501\",\n \"W191\",\n \"E111\",\n \"E114\",\n \"E117\",\n \"D206\",\n \"D300\",\n \"Q000\",\n \"Q001\",\n \"Q002\",\n \"Q003\",\n \"COM812\",\n \"COM819\",\n \"ISC001\",\n \"ISC002\",\n]\n" +"[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"my-project\"\ndescription = \"This is a test\"\nauthors = [\n { name = \"Arthur Dent\", email = \"authur@heartofgold.com\" }\n]\nlicense = { file = \"LICENSE\" }\nreadme = \"README.md\"\nrequires-python = \">=3.11\"\ndynamic = [\"version\"]\ndependencies = []\n\n[dependency-groups]\ndev = []\n\n[tool.hatch.version]\npath = \"my_project/_version.py\"\n\n[tool.mypy]\ncheck_untyped_defs = true\ndisallow_untyped_defs = true\n\n[[tool.mypy.overrides]]\nmodule = [\"tests.*\"]\ndisallow_untyped_defs = false\n\n[tool.pytest.ini_options]\nminversion = \"6.0\"\naddopts = \"--cov=my_project --cov-report term-missing --no-cov-on-fail\"\n\n[tool.coverage.report]\nexclude_lines = [\n \"if __name__ == .__main__.:\",\n \"if TYPE_CHECKING:\",\n \"pragma: no cover\",\n]\n\n[tool.ruff]\nline-length = 100\nfix = true\n\n[tool.ruff.lint]\nselect = [\n \"E\", # pycodestyle\n \"B\", # flake8-bugbear\n \"W\", # Warning\n \"F\", # pyflakes\n \"UP\", # pyupgrade\n \"I001\", # unsorted-imports\n \"T201\", # print found\n \"T203\", # pprint found\n \"RUF022\", # Unsorted __all__\n \"RUF023\", # Unforted __slots__\n]\nignore=[\n # Recommended ignores by ruff when using formatter\n \"E501\",\n \"W191\",\n \"E111\",\n \"E114\",\n \"E117\",\n \"D206\",\n \"D300\",\n \"Q000\",\n \"Q001\",\n \"Q002\",\n \"Q003\",\n \"COM812\",\n \"COM819\",\n \"ISC001\",\n \"ISC002\",\n]\n" diff --git a/src/snapshots/python_project__project_generator__tests__save_pyproject_toml_file_apache_pyo3.snap b/src/snapshots/python_project__project_generator__tests__save_pyproject_toml_file_apache_pyo3.snap index ab2d3b4c..9d7bffb5 100644 --- a/src/snapshots/python_project__project_generator__tests__save_pyproject_toml_file_apache_pyo3.snap +++ b/src/snapshots/python_project__project_generator__tests__save_pyproject_toml_file_apache_pyo3.snap @@ -2,4 +2,4 @@ source: src/project_generator.rs expression: content --- -"[build-system]\nrequires = [\"maturin>=1.5,<2.0\"]\nbuild-backend = \"maturin\"\n\n[project]\nname = \"my-project\"\ndescription = \"This is a test\"\nauthors = [\n { name = \"Arthur Dent\", email = \"authur@heartofgold.com\" },\n]\nlicense = { file = \"LICENSE\" }\nreadme = \"README.md\"\ndynamic = [\"version\"]\nrequires-python = \">=3.10\"\ndependencies = []\n\n[dependency-groups]\ndev = []\n\n[tool.maturin]\nmodule-name = \"my_project._my_project\"\nbinding = \"pyo3\"\nfeatures = [\"pyo3/extension-module\"]\n\n[tool.mypy]\ncheck_untyped_defs = true\ndisallow_untyped_defs = true\n\n[[tool.mypy.overrides]]\nmodule = [\"tests.*\"]\ndisallow_untyped_defs = false\n\n[tool.pytest.ini_options]\nminversion = \"6.0\"\naddopts = \"--cov=my_project --cov-report term-missing --no-cov-on-fail\"\n\n[tool.coverage.report]\nexclude_lines = [\n \"if __name__ == .__main__.:\",\n \"if TYPE_CHECKING:\",\n \"pragma: no cover\",\n]\n\n[tool.ruff]\nline-length = 100\nfix = true\n\n[tool.ruff.lint]\nselect = [\n \"E\", # pycodestyle\n \"B\", # flake8-bugbear\n \"W\", # Warning\n \"F\", # pyflakes\n \"UP\", # pyupgrade\n \"I001\", # unsorted-imports\n \"T201\", # print found\n \"T203\", # pprint found\n \"RUF022\", # Unsorted __all__\n \"RUF023\", # Unforted __slots__\n]\nignore=[\n # Recommended ignores by ruff when using formatter\n \"E501\",\n \"W191\",\n \"E111\",\n \"E114\",\n \"E117\",\n \"D206\",\n \"D300\",\n \"Q000\",\n \"Q001\",\n \"Q002\",\n \"Q003\",\n \"COM812\",\n \"COM819\",\n \"ISC001\",\n \"ISC002\",\n]\n" +"[build-system]\nrequires = [\"maturin>=1.5,<2.0\"]\nbuild-backend = \"maturin\"\n\n[project]\nname = \"my-project\"\ndescription = \"This is a test\"\nauthors = [\n { name = \"Arthur Dent\", email = \"authur@heartofgold.com\" },\n]\nlicense = { file = \"LICENSE\" }\nreadme = \"README.md\"\ndynamic = [\"version\"]\nrequires-python = \">=3.11\"\ndependencies = []\n\n[dependency-groups]\ndev = []\n\n[tool.maturin]\nmodule-name = \"my_project._my_project\"\nbinding = \"pyo3\"\nfeatures = [\"pyo3/extension-module\"]\n\n[tool.mypy]\ncheck_untyped_defs = true\ndisallow_untyped_defs = true\n\n[[tool.mypy.overrides]]\nmodule = [\"tests.*\"]\ndisallow_untyped_defs = false\n\n[tool.pytest.ini_options]\nminversion = \"6.0\"\naddopts = \"--cov=my_project --cov-report term-missing --no-cov-on-fail\"\n\n[tool.coverage.report]\nexclude_lines = [\n \"if __name__ == .__main__.:\",\n \"if TYPE_CHECKING:\",\n \"pragma: no cover\",\n]\n\n[tool.ruff]\nline-length = 100\nfix = true\n\n[tool.ruff.lint]\nselect = [\n \"E\", # pycodestyle\n \"B\", # flake8-bugbear\n \"W\", # Warning\n \"F\", # pyflakes\n \"UP\", # pyupgrade\n \"I001\", # unsorted-imports\n \"T201\", # print found\n \"T203\", # pprint found\n \"RUF022\", # Unsorted __all__\n \"RUF023\", # Unforted __slots__\n]\nignore=[\n # Recommended ignores by ruff when using formatter\n \"E501\",\n \"W191\",\n \"E111\",\n \"E114\",\n \"E117\",\n \"D206\",\n \"D300\",\n \"Q000\",\n \"Q001\",\n \"Q002\",\n \"Q003\",\n \"COM812\",\n \"COM819\",\n \"ISC001\",\n \"ISC002\",\n]\n" diff --git a/src/snapshots/python_project__project_generator__tests__save_pyproject_toml_file_mit_pyo3.snap b/src/snapshots/python_project__project_generator__tests__save_pyproject_toml_file_mit_pyo3.snap index ab2d3b4c..9d7bffb5 100644 --- a/src/snapshots/python_project__project_generator__tests__save_pyproject_toml_file_mit_pyo3.snap +++ b/src/snapshots/python_project__project_generator__tests__save_pyproject_toml_file_mit_pyo3.snap @@ -2,4 +2,4 @@ source: src/project_generator.rs expression: content --- -"[build-system]\nrequires = [\"maturin>=1.5,<2.0\"]\nbuild-backend = \"maturin\"\n\n[project]\nname = \"my-project\"\ndescription = \"This is a test\"\nauthors = [\n { name = \"Arthur Dent\", email = \"authur@heartofgold.com\" },\n]\nlicense = { file = \"LICENSE\" }\nreadme = \"README.md\"\ndynamic = [\"version\"]\nrequires-python = \">=3.10\"\ndependencies = []\n\n[dependency-groups]\ndev = []\n\n[tool.maturin]\nmodule-name = \"my_project._my_project\"\nbinding = \"pyo3\"\nfeatures = [\"pyo3/extension-module\"]\n\n[tool.mypy]\ncheck_untyped_defs = true\ndisallow_untyped_defs = true\n\n[[tool.mypy.overrides]]\nmodule = [\"tests.*\"]\ndisallow_untyped_defs = false\n\n[tool.pytest.ini_options]\nminversion = \"6.0\"\naddopts = \"--cov=my_project --cov-report term-missing --no-cov-on-fail\"\n\n[tool.coverage.report]\nexclude_lines = [\n \"if __name__ == .__main__.:\",\n \"if TYPE_CHECKING:\",\n \"pragma: no cover\",\n]\n\n[tool.ruff]\nline-length = 100\nfix = true\n\n[tool.ruff.lint]\nselect = [\n \"E\", # pycodestyle\n \"B\", # flake8-bugbear\n \"W\", # Warning\n \"F\", # pyflakes\n \"UP\", # pyupgrade\n \"I001\", # unsorted-imports\n \"T201\", # print found\n \"T203\", # pprint found\n \"RUF022\", # Unsorted __all__\n \"RUF023\", # Unforted __slots__\n]\nignore=[\n # Recommended ignores by ruff when using formatter\n \"E501\",\n \"W191\",\n \"E111\",\n \"E114\",\n \"E117\",\n \"D206\",\n \"D300\",\n \"Q000\",\n \"Q001\",\n \"Q002\",\n \"Q003\",\n \"COM812\",\n \"COM819\",\n \"ISC001\",\n \"ISC002\",\n]\n" +"[build-system]\nrequires = [\"maturin>=1.5,<2.0\"]\nbuild-backend = \"maturin\"\n\n[project]\nname = \"my-project\"\ndescription = \"This is a test\"\nauthors = [\n { name = \"Arthur Dent\", email = \"authur@heartofgold.com\" },\n]\nlicense = { file = \"LICENSE\" }\nreadme = \"README.md\"\ndynamic = [\"version\"]\nrequires-python = \">=3.11\"\ndependencies = []\n\n[dependency-groups]\ndev = []\n\n[tool.maturin]\nmodule-name = \"my_project._my_project\"\nbinding = \"pyo3\"\nfeatures = [\"pyo3/extension-module\"]\n\n[tool.mypy]\ncheck_untyped_defs = true\ndisallow_untyped_defs = true\n\n[[tool.mypy.overrides]]\nmodule = [\"tests.*\"]\ndisallow_untyped_defs = false\n\n[tool.pytest.ini_options]\nminversion = \"6.0\"\naddopts = \"--cov=my_project --cov-report term-missing --no-cov-on-fail\"\n\n[tool.coverage.report]\nexclude_lines = [\n \"if __name__ == .__main__.:\",\n \"if TYPE_CHECKING:\",\n \"pragma: no cover\",\n]\n\n[tool.ruff]\nline-length = 100\nfix = true\n\n[tool.ruff.lint]\nselect = [\n \"E\", # pycodestyle\n \"B\", # flake8-bugbear\n \"W\", # Warning\n \"F\", # pyflakes\n \"UP\", # pyupgrade\n \"I001\", # unsorted-imports\n \"T201\", # print found\n \"T203\", # pprint found\n \"RUF022\", # Unsorted __all__\n \"RUF023\", # Unforted __slots__\n]\nignore=[\n # Recommended ignores by ruff when using formatter\n \"E501\",\n \"W191\",\n \"E111\",\n \"E114\",\n \"E117\",\n \"D206\",\n \"D300\",\n \"Q000\",\n \"Q001\",\n \"Q002\",\n \"Q003\",\n \"COM812\",\n \"COM819\",\n \"ISC001\",\n \"ISC002\",\n]\n" diff --git a/src/snapshots/python_project__project_generator__tests__save_pyproject_toml_file_no_license_pyo3.snap b/src/snapshots/python_project__project_generator__tests__save_pyproject_toml_file_no_license_pyo3.snap index afa1dd13..4cdbc4e7 100644 --- a/src/snapshots/python_project__project_generator__tests__save_pyproject_toml_file_no_license_pyo3.snap +++ b/src/snapshots/python_project__project_generator__tests__save_pyproject_toml_file_no_license_pyo3.snap @@ -2,4 +2,4 @@ source: src/project_generator.rs expression: content --- -"[build-system]\nrequires = [\"maturin>=1.5,<2.0\"]\nbuild-backend = \"maturin\"\n\n[project]\nname = \"my-project\"\ndescription = \"This is a test\"\nauthors = [\n { name = \"Arthur Dent\", email = \"authur@heartofgold.com\" },\n]\nreadme = \"README.md\"\ndynamic = [\"version\"]\nrequires-python = \">=3.10\"\ndependencies = []\n\n[dependency-groups]\ndev = []\n\n[tool.maturin]\nmodule-name = \"my_project._my_project\"\nbinding = \"pyo3\"\nfeatures = [\"pyo3/extension-module\"]\n\n[tool.mypy]\ncheck_untyped_defs = true\ndisallow_untyped_defs = true\n\n[[tool.mypy.overrides]]\nmodule = [\"tests.*\"]\ndisallow_untyped_defs = false\n\n[tool.pytest.ini_options]\nminversion = \"6.0\"\naddopts = \"--cov=my_project --cov-report term-missing --no-cov-on-fail\"\n\n[tool.coverage.report]\nexclude_lines = [\n \"if __name__ == .__main__.:\",\n \"if TYPE_CHECKING:\",\n \"pragma: no cover\",\n]\n\n[tool.ruff]\nline-length = 100\nfix = true\n\n[tool.ruff.lint]\nselect = [\n \"E\", # pycodestyle\n \"B\", # flake8-bugbear\n \"W\", # Warning\n \"F\", # pyflakes\n \"UP\", # pyupgrade\n \"I001\", # unsorted-imports\n \"T201\", # print found\n \"T203\", # pprint found\n \"RUF022\", # Unsorted __all__\n \"RUF023\", # Unforted __slots__\n]\nignore=[\n # Recommended ignores by ruff when using formatter\n \"E501\",\n \"W191\",\n \"E111\",\n \"E114\",\n \"E117\",\n \"D206\",\n \"D300\",\n \"Q000\",\n \"Q001\",\n \"Q002\",\n \"Q003\",\n \"COM812\",\n \"COM819\",\n \"ISC001\",\n \"ISC002\",\n]\n" +"[build-system]\nrequires = [\"maturin>=1.5,<2.0\"]\nbuild-backend = \"maturin\"\n\n[project]\nname = \"my-project\"\ndescription = \"This is a test\"\nauthors = [\n { name = \"Arthur Dent\", email = \"authur@heartofgold.com\" },\n]\nreadme = \"README.md\"\ndynamic = [\"version\"]\nrequires-python = \">=3.11\"\ndependencies = []\n\n[dependency-groups]\ndev = []\n\n[tool.maturin]\nmodule-name = \"my_project._my_project\"\nbinding = \"pyo3\"\nfeatures = [\"pyo3/extension-module\"]\n\n[tool.mypy]\ncheck_untyped_defs = true\ndisallow_untyped_defs = true\n\n[[tool.mypy.overrides]]\nmodule = [\"tests.*\"]\ndisallow_untyped_defs = false\n\n[tool.pytest.ini_options]\nminversion = \"6.0\"\naddopts = \"--cov=my_project --cov-report term-missing --no-cov-on-fail\"\n\n[tool.coverage.report]\nexclude_lines = [\n \"if __name__ == .__main__.:\",\n \"if TYPE_CHECKING:\",\n \"pragma: no cover\",\n]\n\n[tool.ruff]\nline-length = 100\nfix = true\n\n[tool.ruff.lint]\nselect = [\n \"E\", # pycodestyle\n \"B\", # flake8-bugbear\n \"W\", # Warning\n \"F\", # pyflakes\n \"UP\", # pyupgrade\n \"I001\", # unsorted-imports\n \"T201\", # print found\n \"T203\", # pprint found\n \"RUF022\", # Unsorted __all__\n \"RUF023\", # Unforted __slots__\n]\nignore=[\n # Recommended ignores by ruff when using formatter\n \"E501\",\n \"W191\",\n \"E111\",\n \"E114\",\n \"E117\",\n \"D206\",\n \"D300\",\n \"Q000\",\n \"Q001\",\n \"Q002\",\n \"Q003\",\n \"COM812\",\n \"COM819\",\n \"ISC001\",\n \"ISC002\",\n]\n" diff --git a/src/snapshots/python_project__project_generator__tests__save_pyproject_toml_file_pyrefly.snap b/src/snapshots/python_project__project_generator__tests__save_pyproject_toml_file_pyrefly.snap index 94c05f78..ede92a3a 100644 --- a/src/snapshots/python_project__project_generator__tests__save_pyproject_toml_file_pyrefly.snap +++ b/src/snapshots/python_project__project_generator__tests__save_pyproject_toml_file_pyrefly.snap @@ -2,4 +2,4 @@ source: src/project_generator.rs expression: content --- -"[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"my-project\"\ndescription = \"This is a test\"\nauthors = [\n { name = \"Arthur Dent\", email = \"authur@heartofgold.com\" }\n]\nlicense = { file = \"LICENSE\" }\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\ndynamic = [\"version\"]\ndependencies = []\n\n[dependency-groups]\ndev = []\n\n[tool.hatch.version]\npath = \"my_project/_version.py\"\n\n[[tool.pyrefly.sub-config]]\nmatches = \"tests/**\"\ncheck-unannotated-defs = false\n\n[tool.pytest.ini_options]\nminversion = \"6.0\"\naddopts = \"--cov=my_project --cov-report term-missing --no-cov-on-fail\"\n\n[tool.coverage.report]\nexclude_lines = [\n \"if __name__ == .__main__.:\",\n \"if TYPE_CHECKING:\",\n \"pragma: no cover\",\n]\n\n[tool.ruff]\nline-length = 100\nfix = true\n\n[tool.ruff.lint]\nselect = [\n \"E\", # pycodestyle\n \"B\", # flake8-bugbear\n \"W\", # Warning\n \"F\", # pyflakes\n \"UP\", # pyupgrade\n \"I001\", # unsorted-imports\n \"T201\", # print found\n \"T203\", # pprint found\n \"RUF022\", # Unsorted __all__\n \"RUF023\", # Unforted __slots__\n]\nignore=[\n # Recommended ignores by ruff when using formatter\n \"E501\",\n \"W191\",\n \"E111\",\n \"E114\",\n \"E117\",\n \"D206\",\n \"D300\",\n \"Q000\",\n \"Q001\",\n \"Q002\",\n \"Q003\",\n \"COM812\",\n \"COM819\",\n \"ISC001\",\n \"ISC002\",\n]\n\n[tool.uv]\nadd-bounds = \"exact\"\n" +"[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"my-project\"\ndescription = \"This is a test\"\nauthors = [\n { name = \"Arthur Dent\", email = \"authur@heartofgold.com\" }\n]\nlicense = { file = \"LICENSE\" }\nreadme = \"README.md\"\nrequires-python = \">=3.11\"\ndynamic = [\"version\"]\ndependencies = []\n\n[dependency-groups]\ndev = []\n\n[tool.hatch.version]\npath = \"my_project/_version.py\"\n\n[[tool.pyrefly.sub-config]]\nmatches = \"tests/**\"\ncheck-unannotated-defs = false\n\n[tool.pytest.ini_options]\nminversion = \"6.0\"\naddopts = \"--cov=my_project --cov-report term-missing --no-cov-on-fail\"\n\n[tool.coverage.report]\nexclude_lines = [\n \"if __name__ == .__main__.:\",\n \"if TYPE_CHECKING:\",\n \"pragma: no cover\",\n]\n\n[tool.ruff]\nline-length = 100\nfix = true\n\n[tool.ruff.lint]\nselect = [\n \"E\", # pycodestyle\n \"B\", # flake8-bugbear\n \"W\", # Warning\n \"F\", # pyflakes\n \"UP\", # pyupgrade\n \"I001\", # unsorted-imports\n \"T201\", # print found\n \"T203\", # pprint found\n \"RUF022\", # Unsorted __all__\n \"RUF023\", # Unforted __slots__\n]\nignore=[\n # Recommended ignores by ruff when using formatter\n \"E501\",\n \"W191\",\n \"E111\",\n \"E114\",\n \"E117\",\n \"D206\",\n \"D300\",\n \"Q000\",\n \"Q001\",\n \"Q002\",\n \"Q003\",\n \"COM812\",\n \"COM819\",\n \"ISC001\",\n \"ISC002\",\n]\n\n[tool.uv]\nadd-bounds = \"exact\"\n" diff --git a/src/snapshots/python_project__project_generator__tests__save_pyproject_toml_file_pyrefly_fastapi.snap b/src/snapshots/python_project__project_generator__tests__save_pyproject_toml_file_pyrefly_fastapi.snap index 11690d1f..5a1935d8 100644 --- a/src/snapshots/python_project__project_generator__tests__save_pyproject_toml_file_pyrefly_fastapi.snap +++ b/src/snapshots/python_project__project_generator__tests__save_pyproject_toml_file_pyrefly_fastapi.snap @@ -2,4 +2,4 @@ source: src/project_generator.rs expression: content --- -"[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"my-project\"\ndescription = \"This is a test\"\nauthors = [\n { name = \"Arthur Dent\", email = \"authur@heartofgold.com\" }\n]\nlicense = { file = \"LICENSE\" }\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\ndynamic = [\"version\"]\ndependencies = []\n\n[dependency-groups]\ndev = []\n\n[tool.hatch.version]\npath = \"my_project/_version.py\"\n\n[tool.pyrefly]\nignore-missing-imports = [\n \"asyncpg.*\",\n]\n\n[[tool.pyrefly.sub-config]]\nmatches = \"tests/**\"\ncheck-unannotated-defs = false\n\n[tool.pytest.ini_options]\nminversion = \"6.0\"\naddopts = \"--cov=my_project --cov-report term-missing --no-cov-on-fail\"\n\n[tool.coverage.report]\nexclude_lines = [\n \"if __name__ == .__main__.:\",\n \"if TYPE_CHECKING:\",\n \"pragma: no cover\",\n]\n\n[tool.ruff]\nline-length = 100\nfix = true\n\n[tool.ruff.lint]\nselect = [\n \"E\", # pycodestyle\n \"B\", # flake8-bugbear\n \"W\", # Warning\n \"F\", # pyflakes\n \"UP\", # pyupgrade\n \"I001\", # unsorted-imports\n \"T201\", # print found\n \"T203\", # pprint found\n \"RUF022\", # Unsorted __all__\n \"RUF023\", # Unforted __slots__\n]\nignore=[\n # Recommended ignores by ruff when using formatter\n \"E501\",\n \"W191\",\n \"E111\",\n \"E114\",\n \"E117\",\n \"D206\",\n \"D300\",\n \"Q000\",\n \"Q001\",\n \"Q002\",\n \"Q003\",\n \"COM812\",\n \"COM819\",\n \"ISC001\",\n \"ISC002\",\n]\n\n[tool.uv]\nadd-bounds = \"exact\"\n" +"[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"my-project\"\ndescription = \"This is a test\"\nauthors = [\n { name = \"Arthur Dent\", email = \"authur@heartofgold.com\" }\n]\nlicense = { file = \"LICENSE\" }\nreadme = \"README.md\"\nrequires-python = \">=3.11\"\ndynamic = [\"version\"]\ndependencies = []\n\n[dependency-groups]\ndev = []\n\n[tool.hatch.version]\npath = \"my_project/_version.py\"\n\n[tool.pyrefly]\nignore-missing-imports = [\n \"asyncpg.*\",\n]\n\n[[tool.pyrefly.sub-config]]\nmatches = \"tests/**\"\ncheck-unannotated-defs = false\n\n[tool.pytest.ini_options]\nminversion = \"6.0\"\naddopts = \"--cov=my_project --cov-report term-missing --no-cov-on-fail\"\n\n[tool.coverage.report]\nexclude_lines = [\n \"if __name__ == .__main__.:\",\n \"if TYPE_CHECKING:\",\n \"pragma: no cover\",\n]\n\n[tool.ruff]\nline-length = 100\nfix = true\n\n[tool.ruff.lint]\nselect = [\n \"E\", # pycodestyle\n \"B\", # flake8-bugbear\n \"W\", # Warning\n \"F\", # pyflakes\n \"UP\", # pyupgrade\n \"I001\", # unsorted-imports\n \"T201\", # print found\n \"T203\", # pprint found\n \"RUF022\", # Unsorted __all__\n \"RUF023\", # Unforted __slots__\n]\nignore=[\n # Recommended ignores by ruff when using formatter\n \"E501\",\n \"W191\",\n \"E111\",\n \"E114\",\n \"E117\",\n \"D206\",\n \"D300\",\n \"Q000\",\n \"Q001\",\n \"Q002\",\n \"Q003\",\n \"COM812\",\n \"COM819\",\n \"ISC001\",\n \"ISC002\",\n]\n\n[tool.uv]\nadd-bounds = \"exact\"\n" diff --git a/src/snapshots/python_project__project_generator__tests__save_setuptools_pyproject_toml_file_apache_application.snap b/src/snapshots/python_project__project_generator__tests__save_setuptools_pyproject_toml_file_apache_application.snap index c000968c..7618ffd2 100644 --- a/src/snapshots/python_project__project_generator__tests__save_setuptools_pyproject_toml_file_apache_application.snap +++ b/src/snapshots/python_project__project_generator__tests__save_setuptools_pyproject_toml_file_apache_application.snap @@ -2,4 +2,4 @@ source: src/project_generator.rs expression: content --- -"[build-system]\nrequires = [\"setuptools\", \"wheel\"]\nbuild-backend = \"setuptools.build_meta\"\n\n[project]\nname = \"my-project\"\ndescription = \"This is a test\"\nauthors = [\n { name = \"Arthur Dent\", email = \"authur@heartofgold.com\" }\n]\nlicense = { text = \"Apache-2.0\" }\nrequires-python = \">=3.10\"\ndynamic = [\"version\", \"readme\"]\ndependencies = []\n\n[tool.setuptools.dynamic]\nversion = {attr = \"my_project.__version__\"}\nreadme = {file = [\"README.md\"]}\n\n[tool.setuptools.packages.find]\ninclude = [\"my_project*\"]\n\n[tool.setuptools.package-data]\nmy_project = [\"py.typed\"]\n\n[tool.mypy]\ncheck_untyped_defs = true\ndisallow_untyped_defs = true\n\n[[tool.mypy.overrides]]\nmodule = [\"tests.*\"]\ndisallow_untyped_defs = false\n\n[tool.pytest.ini_options]\nminversion = \"6.0\"\naddopts = \"--cov=my_project --cov-report term-missing --no-cov-on-fail\"\n\n[tool.coverage.report]\nexclude_lines = [\n \"if __name__ == .__main__.:\",\n \"if TYPE_CHECKING:\",\n \"pragma: no cover\",\n]\n\n[tool.ruff]\nline-length = 100\nfix = true\n\n[tool.ruff.lint]\nselect = [\n \"E\", # pycodestyle\n \"B\", # flake8-bugbear\n \"W\", # Warning\n \"F\", # pyflakes\n \"UP\", # pyupgrade\n \"I001\", # unsorted-imports\n \"T201\", # print found\n \"T203\", # pprint found\n \"RUF022\", # Unsorted __all__\n \"RUF023\", # Unforted __slots__\n]\nignore=[\n # Recommended ignores by ruff when using formatter\n \"E501\",\n \"W191\",\n \"E111\",\n \"E114\",\n \"E117\",\n \"D206\",\n \"D300\",\n \"Q000\",\n \"Q001\",\n \"Q002\",\n \"Q003\",\n \"COM812\",\n \"COM819\",\n \"ISC001\",\n \"ISC002\",\n]\n" +"[build-system]\nrequires = [\"setuptools\", \"wheel\"]\nbuild-backend = \"setuptools.build_meta\"\n\n[project]\nname = \"my-project\"\ndescription = \"This is a test\"\nauthors = [\n { name = \"Arthur Dent\", email = \"authur@heartofgold.com\" }\n]\nlicense = { text = \"Apache-2.0\" }\nrequires-python = \">=3.11\"\ndynamic = [\"version\", \"readme\"]\ndependencies = []\n\n[tool.setuptools.dynamic]\nversion = {attr = \"my_project.__version__\"}\nreadme = {file = [\"README.md\"]}\n\n[tool.setuptools.packages.find]\ninclude = [\"my_project*\"]\n\n[tool.setuptools.package-data]\nmy_project = [\"py.typed\"]\n\n[tool.mypy]\ncheck_untyped_defs = true\ndisallow_untyped_defs = true\n\n[[tool.mypy.overrides]]\nmodule = [\"tests.*\"]\ndisallow_untyped_defs = false\n\n[tool.pytest.ini_options]\nminversion = \"6.0\"\naddopts = \"--cov=my_project --cov-report term-missing --no-cov-on-fail\"\n\n[tool.coverage.report]\nexclude_lines = [\n \"if __name__ == .__main__.:\",\n \"if TYPE_CHECKING:\",\n \"pragma: no cover\",\n]\n\n[tool.ruff]\nline-length = 100\nfix = true\n\n[tool.ruff.lint]\nselect = [\n \"E\", # pycodestyle\n \"B\", # flake8-bugbear\n \"W\", # Warning\n \"F\", # pyflakes\n \"UP\", # pyupgrade\n \"I001\", # unsorted-imports\n \"T201\", # print found\n \"T203\", # pprint found\n \"RUF022\", # Unsorted __all__\n \"RUF023\", # Unforted __slots__\n]\nignore=[\n # Recommended ignores by ruff when using formatter\n \"E501\",\n \"W191\",\n \"E111\",\n \"E114\",\n \"E117\",\n \"D206\",\n \"D300\",\n \"Q000\",\n \"Q001\",\n \"Q002\",\n \"Q003\",\n \"COM812\",\n \"COM819\",\n \"ISC001\",\n \"ISC002\",\n]\n" diff --git a/src/snapshots/python_project__project_generator__tests__save_setuptools_pyproject_toml_file_mit_application.snap b/src/snapshots/python_project__project_generator__tests__save_setuptools_pyproject_toml_file_mit_application.snap index 3d274581..084f340f 100644 --- a/src/snapshots/python_project__project_generator__tests__save_setuptools_pyproject_toml_file_mit_application.snap +++ b/src/snapshots/python_project__project_generator__tests__save_setuptools_pyproject_toml_file_mit_application.snap @@ -2,4 +2,4 @@ source: src/project_generator.rs expression: content --- -"[build-system]\nrequires = [\"setuptools\", \"wheel\"]\nbuild-backend = \"setuptools.build_meta\"\n\n[project]\nname = \"my-project\"\ndescription = \"This is a test\"\nauthors = [\n { name = \"Arthur Dent\", email = \"authur@heartofgold.com\" }\n]\nlicense = { text = \"MIT\" }\nrequires-python = \">=3.10\"\ndynamic = [\"version\", \"readme\"]\ndependencies = []\n\n[tool.setuptools.dynamic]\nversion = {attr = \"my_project.__version__\"}\nreadme = {file = [\"README.md\"]}\n\n[tool.setuptools.packages.find]\ninclude = [\"my_project*\"]\n\n[tool.setuptools.package-data]\nmy_project = [\"py.typed\"]\n\n[tool.mypy]\ncheck_untyped_defs = true\ndisallow_untyped_defs = true\n\n[[tool.mypy.overrides]]\nmodule = [\"tests.*\"]\ndisallow_untyped_defs = false\n\n[tool.pytest.ini_options]\nminversion = \"6.0\"\naddopts = \"--cov=my_project --cov-report term-missing --no-cov-on-fail\"\n\n[tool.coverage.report]\nexclude_lines = [\n \"if __name__ == .__main__.:\",\n \"if TYPE_CHECKING:\",\n \"pragma: no cover\",\n]\n\n[tool.ruff]\nline-length = 100\nfix = true\n\n[tool.ruff.lint]\nselect = [\n \"E\", # pycodestyle\n \"B\", # flake8-bugbear\n \"W\", # Warning\n \"F\", # pyflakes\n \"UP\", # pyupgrade\n \"I001\", # unsorted-imports\n \"T201\", # print found\n \"T203\", # pprint found\n \"RUF022\", # Unsorted __all__\n \"RUF023\", # Unforted __slots__\n]\nignore=[\n # Recommended ignores by ruff when using formatter\n \"E501\",\n \"W191\",\n \"E111\",\n \"E114\",\n \"E117\",\n \"D206\",\n \"D300\",\n \"Q000\",\n \"Q001\",\n \"Q002\",\n \"Q003\",\n \"COM812\",\n \"COM819\",\n \"ISC001\",\n \"ISC002\",\n]\n" +"[build-system]\nrequires = [\"setuptools\", \"wheel\"]\nbuild-backend = \"setuptools.build_meta\"\n\n[project]\nname = \"my-project\"\ndescription = \"This is a test\"\nauthors = [\n { name = \"Arthur Dent\", email = \"authur@heartofgold.com\" }\n]\nlicense = { text = \"MIT\" }\nrequires-python = \">=3.11\"\ndynamic = [\"version\", \"readme\"]\ndependencies = []\n\n[tool.setuptools.dynamic]\nversion = {attr = \"my_project.__version__\"}\nreadme = {file = [\"README.md\"]}\n\n[tool.setuptools.packages.find]\ninclude = [\"my_project*\"]\n\n[tool.setuptools.package-data]\nmy_project = [\"py.typed\"]\n\n[tool.mypy]\ncheck_untyped_defs = true\ndisallow_untyped_defs = true\n\n[[tool.mypy.overrides]]\nmodule = [\"tests.*\"]\ndisallow_untyped_defs = false\n\n[tool.pytest.ini_options]\nminversion = \"6.0\"\naddopts = \"--cov=my_project --cov-report term-missing --no-cov-on-fail\"\n\n[tool.coverage.report]\nexclude_lines = [\n \"if __name__ == .__main__.:\",\n \"if TYPE_CHECKING:\",\n \"pragma: no cover\",\n]\n\n[tool.ruff]\nline-length = 100\nfix = true\n\n[tool.ruff.lint]\nselect = [\n \"E\", # pycodestyle\n \"B\", # flake8-bugbear\n \"W\", # Warning\n \"F\", # pyflakes\n \"UP\", # pyupgrade\n \"I001\", # unsorted-imports\n \"T201\", # print found\n \"T203\", # pprint found\n \"RUF022\", # Unsorted __all__\n \"RUF023\", # Unforted __slots__\n]\nignore=[\n # Recommended ignores by ruff when using formatter\n \"E501\",\n \"W191\",\n \"E111\",\n \"E114\",\n \"E117\",\n \"D206\",\n \"D300\",\n \"Q000\",\n \"Q001\",\n \"Q002\",\n \"Q003\",\n \"COM812\",\n \"COM819\",\n \"ISC001\",\n \"ISC002\",\n]\n" diff --git a/src/snapshots/python_project__project_generator__tests__save_setuptools_pyproject_toml_file_no_license_application.snap b/src/snapshots/python_project__project_generator__tests__save_setuptools_pyproject_toml_file_no_license_application.snap index 6a36ddeb..b583f271 100644 --- a/src/snapshots/python_project__project_generator__tests__save_setuptools_pyproject_toml_file_no_license_application.snap +++ b/src/snapshots/python_project__project_generator__tests__save_setuptools_pyproject_toml_file_no_license_application.snap @@ -2,4 +2,4 @@ source: src/project_generator.rs expression: content --- -"[build-system]\nrequires = [\"setuptools\", \"wheel\"]\nbuild-backend = \"setuptools.build_meta\"\n\n[project]\nname = \"my-project\"\ndescription = \"This is a test\"\nauthors = [\n { name = \"Arthur Dent\", email = \"authur@heartofgold.com\" }\n]\nrequires-python = \">=3.10\"\ndynamic = [\"version\", \"readme\"]\ndependencies = []\n\n[tool.setuptools.dynamic]\nversion = {attr = \"my_project.__version__\"}\nreadme = {file = [\"README.md\"]}\n\n[tool.setuptools.packages.find]\ninclude = [\"my_project*\"]\n\n[tool.setuptools.package-data]\nmy_project = [\"py.typed\"]\n\n[tool.mypy]\ncheck_untyped_defs = true\ndisallow_untyped_defs = true\n\n[[tool.mypy.overrides]]\nmodule = [\"tests.*\"]\ndisallow_untyped_defs = false\n\n[tool.pytest.ini_options]\nminversion = \"6.0\"\naddopts = \"--cov=my_project --cov-report term-missing --no-cov-on-fail\"\n\n[tool.coverage.report]\nexclude_lines = [\n \"if __name__ == .__main__.:\",\n \"if TYPE_CHECKING:\",\n \"pragma: no cover\",\n]\n\n[tool.ruff]\nline-length = 100\nfix = true\n\n[tool.ruff.lint]\nselect = [\n \"E\", # pycodestyle\n \"B\", # flake8-bugbear\n \"W\", # Warning\n \"F\", # pyflakes\n \"UP\", # pyupgrade\n \"I001\", # unsorted-imports\n \"T201\", # print found\n \"T203\", # pprint found\n \"RUF022\", # Unsorted __all__\n \"RUF023\", # Unforted __slots__\n]\nignore=[\n # Recommended ignores by ruff when using formatter\n \"E501\",\n \"W191\",\n \"E111\",\n \"E114\",\n \"E117\",\n \"D206\",\n \"D300\",\n \"Q000\",\n \"Q001\",\n \"Q002\",\n \"Q003\",\n \"COM812\",\n \"COM819\",\n \"ISC001\",\n \"ISC002\",\n]\n" +"[build-system]\nrequires = [\"setuptools\", \"wheel\"]\nbuild-backend = \"setuptools.build_meta\"\n\n[project]\nname = \"my-project\"\ndescription = \"This is a test\"\nauthors = [\n { name = \"Arthur Dent\", email = \"authur@heartofgold.com\" }\n]\nrequires-python = \">=3.11\"\ndynamic = [\"version\", \"readme\"]\ndependencies = []\n\n[tool.setuptools.dynamic]\nversion = {attr = \"my_project.__version__\"}\nreadme = {file = [\"README.md\"]}\n\n[tool.setuptools.packages.find]\ninclude = [\"my_project*\"]\n\n[tool.setuptools.package-data]\nmy_project = [\"py.typed\"]\n\n[tool.mypy]\ncheck_untyped_defs = true\ndisallow_untyped_defs = true\n\n[[tool.mypy.overrides]]\nmodule = [\"tests.*\"]\ndisallow_untyped_defs = false\n\n[tool.pytest.ini_options]\nminversion = \"6.0\"\naddopts = \"--cov=my_project --cov-report term-missing --no-cov-on-fail\"\n\n[tool.coverage.report]\nexclude_lines = [\n \"if __name__ == .__main__.:\",\n \"if TYPE_CHECKING:\",\n \"pragma: no cover\",\n]\n\n[tool.ruff]\nline-length = 100\nfix = true\n\n[tool.ruff.lint]\nselect = [\n \"E\", # pycodestyle\n \"B\", # flake8-bugbear\n \"W\", # Warning\n \"F\", # pyflakes\n \"UP\", # pyupgrade\n \"I001\", # unsorted-imports\n \"T201\", # print found\n \"T203\", # pprint found\n \"RUF022\", # Unsorted __all__\n \"RUF023\", # Unforted __slots__\n]\nignore=[\n # Recommended ignores by ruff when using formatter\n \"E501\",\n \"W191\",\n \"E111\",\n \"E114\",\n \"E117\",\n \"D206\",\n \"D300\",\n \"Q000\",\n \"Q001\",\n \"Q002\",\n \"Q003\",\n \"COM812\",\n \"COM819\",\n \"ISC001\",\n \"ISC002\",\n]\n" diff --git a/src/snapshots/python_project__project_generator__tests__save_uv_pyproject_toml_file_apache_application.snap b/src/snapshots/python_project__project_generator__tests__save_uv_pyproject_toml_file_apache_application.snap index f43a747e..3f485af7 100644 --- a/src/snapshots/python_project__project_generator__tests__save_uv_pyproject_toml_file_apache_application.snap +++ b/src/snapshots/python_project__project_generator__tests__save_uv_pyproject_toml_file_apache_application.snap @@ -2,4 +2,4 @@ source: src/project_generator.rs expression: content --- -"[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"my-project\"\ndescription = \"This is a test\"\nauthors = [\n { name = \"Arthur Dent\", email = \"authur@heartofgold.com\" }\n]\nlicense = { file = \"LICENSE\" }\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\ndynamic = [\"version\"]\ndependencies = []\n\n[dependency-groups]\ndev = []\n\n[tool.hatch.version]\npath = \"my_project/_version.py\"\n\n[tool.mypy]\ncheck_untyped_defs = true\ndisallow_untyped_defs = true\n\n[[tool.mypy.overrides]]\nmodule = [\"tests.*\"]\ndisallow_untyped_defs = false\n\n[tool.pytest.ini_options]\nminversion = \"6.0\"\naddopts = \"--cov=my_project --cov-report term-missing --no-cov-on-fail\"\n\n[tool.coverage.report]\nexclude_lines = [\n \"if __name__ == .__main__.:\",\n \"if TYPE_CHECKING:\",\n \"pragma: no cover\",\n]\n\n[tool.ruff]\nline-length = 100\nfix = true\n\n[tool.ruff.lint]\nselect = [\n \"E\", # pycodestyle\n \"B\", # flake8-bugbear\n \"W\", # Warning\n \"F\", # pyflakes\n \"UP\", # pyupgrade\n \"I001\", # unsorted-imports\n \"T201\", # print found\n \"T203\", # pprint found\n \"RUF022\", # Unsorted __all__\n \"RUF023\", # Unforted __slots__\n]\nignore=[\n # Recommended ignores by ruff when using formatter\n \"E501\",\n \"W191\",\n \"E111\",\n \"E114\",\n \"E117\",\n \"D206\",\n \"D300\",\n \"Q000\",\n \"Q001\",\n \"Q002\",\n \"Q003\",\n \"COM812\",\n \"COM819\",\n \"ISC001\",\n \"ISC002\",\n]\n\n[tool.uv]\nadd-bounds = \"exact\"\n" +"[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"my-project\"\ndescription = \"This is a test\"\nauthors = [\n { name = \"Arthur Dent\", email = \"authur@heartofgold.com\" }\n]\nlicense = { file = \"LICENSE\" }\nreadme = \"README.md\"\nrequires-python = \">=3.11\"\ndynamic = [\"version\"]\ndependencies = []\n\n[dependency-groups]\ndev = []\n\n[tool.hatch.version]\npath = \"my_project/_version.py\"\n\n[tool.mypy]\ncheck_untyped_defs = true\ndisallow_untyped_defs = true\n\n[[tool.mypy.overrides]]\nmodule = [\"tests.*\"]\ndisallow_untyped_defs = false\n\n[tool.pytest.ini_options]\nminversion = \"6.0\"\naddopts = \"--cov=my_project --cov-report term-missing --no-cov-on-fail\"\n\n[tool.coverage.report]\nexclude_lines = [\n \"if __name__ == .__main__.:\",\n \"if TYPE_CHECKING:\",\n \"pragma: no cover\",\n]\n\n[tool.ruff]\nline-length = 100\nfix = true\n\n[tool.ruff.lint]\nselect = [\n \"E\", # pycodestyle\n \"B\", # flake8-bugbear\n \"W\", # Warning\n \"F\", # pyflakes\n \"UP\", # pyupgrade\n \"I001\", # unsorted-imports\n \"T201\", # print found\n \"T203\", # pprint found\n \"RUF022\", # Unsorted __all__\n \"RUF023\", # Unforted __slots__\n]\nignore=[\n # Recommended ignores by ruff when using formatter\n \"E501\",\n \"W191\",\n \"E111\",\n \"E114\",\n \"E117\",\n \"D206\",\n \"D300\",\n \"Q000\",\n \"Q001\",\n \"Q002\",\n \"Q003\",\n \"COM812\",\n \"COM819\",\n \"ISC001\",\n \"ISC002\",\n]\n\n[tool.uv]\nadd-bounds = \"exact\"\n" diff --git a/src/snapshots/python_project__project_generator__tests__save_uv_pyproject_toml_file_mit_application.snap b/src/snapshots/python_project__project_generator__tests__save_uv_pyproject_toml_file_mit_application.snap index f43a747e..3f485af7 100644 --- a/src/snapshots/python_project__project_generator__tests__save_uv_pyproject_toml_file_mit_application.snap +++ b/src/snapshots/python_project__project_generator__tests__save_uv_pyproject_toml_file_mit_application.snap @@ -2,4 +2,4 @@ source: src/project_generator.rs expression: content --- -"[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"my-project\"\ndescription = \"This is a test\"\nauthors = [\n { name = \"Arthur Dent\", email = \"authur@heartofgold.com\" }\n]\nlicense = { file = \"LICENSE\" }\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\ndynamic = [\"version\"]\ndependencies = []\n\n[dependency-groups]\ndev = []\n\n[tool.hatch.version]\npath = \"my_project/_version.py\"\n\n[tool.mypy]\ncheck_untyped_defs = true\ndisallow_untyped_defs = true\n\n[[tool.mypy.overrides]]\nmodule = [\"tests.*\"]\ndisallow_untyped_defs = false\n\n[tool.pytest.ini_options]\nminversion = \"6.0\"\naddopts = \"--cov=my_project --cov-report term-missing --no-cov-on-fail\"\n\n[tool.coverage.report]\nexclude_lines = [\n \"if __name__ == .__main__.:\",\n \"if TYPE_CHECKING:\",\n \"pragma: no cover\",\n]\n\n[tool.ruff]\nline-length = 100\nfix = true\n\n[tool.ruff.lint]\nselect = [\n \"E\", # pycodestyle\n \"B\", # flake8-bugbear\n \"W\", # Warning\n \"F\", # pyflakes\n \"UP\", # pyupgrade\n \"I001\", # unsorted-imports\n \"T201\", # print found\n \"T203\", # pprint found\n \"RUF022\", # Unsorted __all__\n \"RUF023\", # Unforted __slots__\n]\nignore=[\n # Recommended ignores by ruff when using formatter\n \"E501\",\n \"W191\",\n \"E111\",\n \"E114\",\n \"E117\",\n \"D206\",\n \"D300\",\n \"Q000\",\n \"Q001\",\n \"Q002\",\n \"Q003\",\n \"COM812\",\n \"COM819\",\n \"ISC001\",\n \"ISC002\",\n]\n\n[tool.uv]\nadd-bounds = \"exact\"\n" +"[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"my-project\"\ndescription = \"This is a test\"\nauthors = [\n { name = \"Arthur Dent\", email = \"authur@heartofgold.com\" }\n]\nlicense = { file = \"LICENSE\" }\nreadme = \"README.md\"\nrequires-python = \">=3.11\"\ndynamic = [\"version\"]\ndependencies = []\n\n[dependency-groups]\ndev = []\n\n[tool.hatch.version]\npath = \"my_project/_version.py\"\n\n[tool.mypy]\ncheck_untyped_defs = true\ndisallow_untyped_defs = true\n\n[[tool.mypy.overrides]]\nmodule = [\"tests.*\"]\ndisallow_untyped_defs = false\n\n[tool.pytest.ini_options]\nminversion = \"6.0\"\naddopts = \"--cov=my_project --cov-report term-missing --no-cov-on-fail\"\n\n[tool.coverage.report]\nexclude_lines = [\n \"if __name__ == .__main__.:\",\n \"if TYPE_CHECKING:\",\n \"pragma: no cover\",\n]\n\n[tool.ruff]\nline-length = 100\nfix = true\n\n[tool.ruff.lint]\nselect = [\n \"E\", # pycodestyle\n \"B\", # flake8-bugbear\n \"W\", # Warning\n \"F\", # pyflakes\n \"UP\", # pyupgrade\n \"I001\", # unsorted-imports\n \"T201\", # print found\n \"T203\", # pprint found\n \"RUF022\", # Unsorted __all__\n \"RUF023\", # Unforted __slots__\n]\nignore=[\n # Recommended ignores by ruff when using formatter\n \"E501\",\n \"W191\",\n \"E111\",\n \"E114\",\n \"E117\",\n \"D206\",\n \"D300\",\n \"Q000\",\n \"Q001\",\n \"Q002\",\n \"Q003\",\n \"COM812\",\n \"COM819\",\n \"ISC001\",\n \"ISC002\",\n]\n\n[tool.uv]\nadd-bounds = \"exact\"\n" diff --git a/src/snapshots/python_project__project_generator__tests__save_uv_pyproject_toml_file_no_license_application.snap b/src/snapshots/python_project__project_generator__tests__save_uv_pyproject_toml_file_no_license_application.snap index e3b2c9d1..27ee3086 100644 --- a/src/snapshots/python_project__project_generator__tests__save_uv_pyproject_toml_file_no_license_application.snap +++ b/src/snapshots/python_project__project_generator__tests__save_uv_pyproject_toml_file_no_license_application.snap @@ -2,4 +2,4 @@ source: src/project_generator.rs expression: content --- -"[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"my-project\"\ndescription = \"This is a test\"\nauthors = [\n { name = \"Arthur Dent\", email = \"authur@heartofgold.com\" }\n]\nreadme = \"README.md\"\nrequires-python = \">=3.10\"\ndynamic = [\"version\"]\ndependencies = []\n\n[dependency-groups]\ndev = []\n\n[tool.hatch.version]\npath = \"my_project/_version.py\"\n\n[tool.mypy]\ncheck_untyped_defs = true\ndisallow_untyped_defs = true\n\n[[tool.mypy.overrides]]\nmodule = [\"tests.*\"]\ndisallow_untyped_defs = false\n\n[tool.pytest.ini_options]\nminversion = \"6.0\"\naddopts = \"--cov=my_project --cov-report term-missing --no-cov-on-fail\"\n\n[tool.coverage.report]\nexclude_lines = [\n \"if __name__ == .__main__.:\",\n \"if TYPE_CHECKING:\",\n \"pragma: no cover\",\n]\n\n[tool.ruff]\nline-length = 100\nfix = true\n\n[tool.ruff.lint]\nselect = [\n \"E\", # pycodestyle\n \"B\", # flake8-bugbear\n \"W\", # Warning\n \"F\", # pyflakes\n \"UP\", # pyupgrade\n \"I001\", # unsorted-imports\n \"T201\", # print found\n \"T203\", # pprint found\n \"RUF022\", # Unsorted __all__\n \"RUF023\", # Unforted __slots__\n]\nignore=[\n # Recommended ignores by ruff when using formatter\n \"E501\",\n \"W191\",\n \"E111\",\n \"E114\",\n \"E117\",\n \"D206\",\n \"D300\",\n \"Q000\",\n \"Q001\",\n \"Q002\",\n \"Q003\",\n \"COM812\",\n \"COM819\",\n \"ISC001\",\n \"ISC002\",\n]\n\n[tool.uv]\nadd-bounds = \"exact\"\n" +"[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"my-project\"\ndescription = \"This is a test\"\nauthors = [\n { name = \"Arthur Dent\", email = \"authur@heartofgold.com\" }\n]\nreadme = \"README.md\"\nrequires-python = \">=3.11\"\ndynamic = [\"version\"]\ndependencies = []\n\n[dependency-groups]\ndev = []\n\n[tool.hatch.version]\npath = \"my_project/_version.py\"\n\n[tool.mypy]\ncheck_untyped_defs = true\ndisallow_untyped_defs = true\n\n[[tool.mypy.overrides]]\nmodule = [\"tests.*\"]\ndisallow_untyped_defs = false\n\n[tool.pytest.ini_options]\nminversion = \"6.0\"\naddopts = \"--cov=my_project --cov-report term-missing --no-cov-on-fail\"\n\n[tool.coverage.report]\nexclude_lines = [\n \"if __name__ == .__main__.:\",\n \"if TYPE_CHECKING:\",\n \"pragma: no cover\",\n]\n\n[tool.ruff]\nline-length = 100\nfix = true\n\n[tool.ruff.lint]\nselect = [\n \"E\", # pycodestyle\n \"B\", # flake8-bugbear\n \"W\", # Warning\n \"F\", # pyflakes\n \"UP\", # pyupgrade\n \"I001\", # unsorted-imports\n \"T201\", # print found\n \"T203\", # pprint found\n \"RUF022\", # Unsorted __all__\n \"RUF023\", # Unforted __slots__\n]\nignore=[\n # Recommended ignores by ruff when using formatter\n \"E501\",\n \"W191\",\n \"E111\",\n \"E114\",\n \"E117\",\n \"D206\",\n \"D300\",\n \"Q000\",\n \"Q001\",\n \"Q002\",\n \"Q003\",\n \"COM812\",\n \"COM819\",\n \"ISC001\",\n \"ISC002\",\n]\n\n[tool.uv]\nadd-bounds = \"exact\"\n" diff --git a/src/utils.rs b/src/utils.rs index ee6fa369..0fbc2729 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -10,16 +10,6 @@ pub fn is_python_version_or_greater(version: &str, min_minor_version: i32) -> Re } } -pub fn is_allowed_fastapi_python_version(version: &str) -> Result { - let version_parts = split_version(version)?; - - if version_parts.0 >= 3 && version_parts.1 >= 11 { - Ok(true) - } else { - Ok(false) - } -} - fn split_version(version: &str) -> Result<(i32, i32)> { let split_version: Vec<&str> = version.split('.').collect(); if split_version.len() < 2 { @@ -47,31 +37,4 @@ mod tests { let result = is_python_version_or_greater("3.11", 11).unwrap(); assert!(result); } - - #[test] - fn test_python_311_310() { - let result = is_python_version_or_greater("3.10", 11).unwrap(); - assert!(!result); - } - - #[cfg(feature = "fastapi")] - #[test] - fn test_is_allowed_fastapi_python_version() { - let result = is_allowed_fastapi_python_version("3.11").unwrap(); - assert!(result); - } - - #[cfg(feature = "fastapi")] - #[test] - fn test_is_unallowed_major_fastapi_python_version() { - let result = is_allowed_fastapi_python_version("2.11").unwrap(); - assert!(!result); - } - - #[cfg(feature = "fastapi")] - #[test] - fn test_is_unallowed_minor_fastapi_python_version() { - let result = is_allowed_fastapi_python_version("3.10").unwrap(); - assert!(!result); - } }