You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
-37Lines changed: 0 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -210,16 +210,12 @@ ALWAYS check whether an existing function already covers your use case before im
210
210
-`call_backend_subprocess()` (`usethis._backend.dispatch`) — Dispatch a subprocess call to the appropriate backend.
211
211
-`is_poetry_available()` (`usethis._backend.poetry.available`) — Check if the `poetry` command is available in the current environment.
212
212
-`call_poetry_subprocess()` (`usethis._backend.poetry.call`) — Run a subprocess using the Poetry command-line tool.
213
-
-`_frozen_poetry_lock()` (`usethis._backend.poetry.call`) — Preserve the state of poetry.lock across the enclosed block.
214
-
-`_noop_context()` (`usethis._backend.poetry.call`) — A no-op context manager used when frozen mode is not applicable.
215
213
-`add_dep_to_group_via_poetry()` (`usethis._backend.poetry.deps`) — Add a dependency to the named group using Poetry.
216
214
-`remove_dep_from_group_via_poetry()` (`usethis._backend.poetry.deps`) — Remove a dependency from the named group using Poetry.
217
215
-`is_poetry_used()` (`usethis._backend.poetry.detect`) — Check if Poetry is being used in the project.
218
-
-`_get_poetry_python_constraint()` (`usethis._backend.poetry.init`) — Get a bounded Python version constraint for Poetry projects.
219
216
-`ensure_pyproject_toml_via_poetry()` (`usethis._backend.poetry.init`) — Create a pyproject.toml file using `poetry init`.
220
217
-`opinionated_poetry_init()` (`usethis._backend.poetry.init`) — Subprocess `poetry init` with opinionated arguments.
221
218
-`is_uv_available()` (`usethis._backend.uv.available`) — Check if the `uv` command is available in the current environment.
222
-
-`_is_uv_a_dep()` (`usethis._backend.uv.available`) — Check if uv is declared as a project dependency or in a dependency group.
223
219
-`call_uv_subprocess()` (`usethis._backend.uv.call`) — Run a subprocess using the uv command-line tool.
224
220
-`add_default_groups_via_uv()` (`usethis._backend.uv.call`) — Add default groups using the uv command-line tool.
225
221
-`add_dep_to_group_via_uv()` (`usethis._backend.uv.deps`) — Add a dependency to the named group using uv.
@@ -240,7 +236,6 @@ ALWAYS check whether an existing function already covers your use case before im
240
236
-`err_print()` (`usethis._console`) — Print a ✗ error message to stderr (red).
241
237
-`warn_print()` (`usethis._console`) — Print a ⚠ warning message (yellow; deduplicated).
242
238
-`get_icon_mode()` (`usethis._console`) — Detect terminal's icon support level.
243
-
-`_get_icon()` (`usethis._console`) — Get the appropriate icon based on terminal capabilities.
244
239
-`add_author()` (`usethis._core.author`) — Add an author entry to the project metadata in pyproject.toml.
245
240
-`get_pre_commit_badge()` (`usethis._core.badge`) — Return the pre-commit badge.
246
241
-`get_pypi_badge()` (`usethis._core.badge`) — Return the PyPI version badge for the project.
@@ -252,15 +247,12 @@ ALWAYS check whether an existing function already covers your use case before im
252
247
-`get_usethis_badge()` (`usethis._core.badge`) — Return the usethis badge.
253
248
-`get_badge_order()` (`usethis._core.badge`) — Return the canonical ordered list of all supported badges.
254
249
-`add_badge()` (`usethis._core.badge`) — Add a badge to the README.md file in the correct position.
255
-
-`_get_prerequisites()` (`usethis._core.badge`) — Get the prerequisites for a badge.
256
250
-`is_blank()` (`usethis._core.badge`) — Return True if the line is empty or contains only whitespace.
257
251
-`is_header()` (`usethis._core.badge`) — Return True if the line is a Markdown header.
258
252
-`is_badge()` (`usethis._core.badge`) — Return True if the line looks like a Markdown badge (heuristic).
259
253
-`remove_badge()` (`usethis._core.badge`) — Remove a badge from the README.md file.
260
254
-`browse_pypi()` (`usethis._core.browse`) — Open or display the PyPI project page URL for a package.
261
255
-`use_docstyle()` (`usethis._core.docstyle`) — Configure the docstring style convention for the project using Ruff.
262
-
-`_rich_status()` (`usethis._core.list`) — Get richly formatted status.
263
-
-`_rich_category()` (`usethis._core.list`) — Get richly formatted category.
264
256
-`show_usage_table()` (`usethis._core.list`) — Show the usage table.
265
257
-`get_usage_table()` (`usethis._core.list`) — Get the usage table.
266
258
-`add_readme()` (`usethis._core.readme`) — Add a README.md file to the project.
@@ -285,12 +277,10 @@ ALWAYS check whether an existing function already covers your use case before im
285
277
-`use_pytest()` (`usethis._core.tool`) — Add and configure the pytest testing framework.
286
278
-`use_requirements_txt()` (`usethis._core.tool`) — Add and configure a requirements.txt file exported from the uv lockfile.
287
279
-`use_ruff()` (`usethis._core.tool`) — Add Ruff to the project.
288
-
-`_get_basic_rule_config()` (`usethis._core.tool`) — Get the basic rule config for Ruff.
289
280
-`use_tach()` (`usethis._core.tool`) — Add and configure the Tach architecture enforcement tool.
290
281
-`use_ty()` (`usethis._core.tool`) — Add and configure the ty type checker tool.
291
282
-`get_project_deps()` (`usethis._deps`) — Get all project dependencies.
292
283
-`get_dep_groups()` (`usethis._deps`) — Get all dependency groups from pyproject.toml.
293
-
-`_merge_deps()` (`usethis._deps`) — Merge two dependency lists, avoiding duplicates by name.
294
284
-`get_deps_from_group()` (`usethis._deps`) — Get the list of dependencies in a named dependency group.
295
285
-`register_default_group()` (`usethis._deps`) — Register a group in the default-groups configuration if it's not already there.
296
286
-`add_default_groups()` (`usethis._deps`) — Register the given dependency groups as default groups in the package manager configuration.
@@ -300,42 +290,27 @@ ALWAYS check whether an existing function already covers your use case before im
300
290
-`remove_deps_from_group()` (`usethis._deps`) — Remove dependencies from the named group if present.
301
291
-`is_dep_in_any_group()` (`usethis._deps`) — Check if a dependency exists in any dependency group.
302
292
-`add_deps_to_group()` (`usethis._deps`) — Add dependencies to a named group using PEP 735 dependency groups.
303
-
-`_register_poetry_default_group()` (`usethis._deps`) — Ensure a poetry dependency group is installed by default (non-optional).
304
-
-`_get_poetry_default_groups()` (`usethis._deps`) — Get the list of poetry dependency groups that are installed by default.
305
293
-`is_pre_commit_used()` (`usethis._detect.pre_commit`) — Check if pre-commit is being used in the project.
306
294
-`is_readme_used()` (`usethis._detect.readme`) — Check if the README.md file is used.
307
295
-`next_breaking_version()` (`usethis._fallback`) — Get the next breaking version for a version string, following semver.
308
296
-`get_project_name_from_dir()` (`usethis._file.dir`) — Derive a valid project name from the current directory name.
309
-
-`_itermatches()` (`usethis._file.ini.io_`) — Iterate through an iterable and find all matches for a key.
310
-
-`_ensure_newline()` (`usethis._file.ini.io_`) — Add a newline to the INI file.
311
297
-`deep_merge()` (`usethis._file.merge`) — Recursively merge source into target in place, returning target.
312
298
-`print_keys()` (`usethis._file.print_`) — Convert a list of keys to a string.
313
299
-`get_project_deps()` (`usethis._file.pyproject_toml.deps`) — Get all project dependencies from [project.dependencies].
314
300
-`get_dep_groups()` (`usethis._file.pyproject_toml.deps`) — Get all dependency groups from [dependency-groups].
315
301
-`get_poetry_project_deps()` (`usethis._file.pyproject_toml.deps`) — Get project dependencies from [tool.poetry.dependencies].
316
302
-`get_poetry_dep_groups()` (`usethis._file.pyproject_toml.deps`) — Get dependency groups from [tool.poetry.group.*.dependencies].
317
-
-`_parse_poetry_deps()` (`usethis._file.pyproject_toml.deps`) — Parse a Poetry dependencies table into a list of Dependency objects.
318
303
-`get_name()` (`usethis._file.pyproject_toml.name`) — Get the project name from pyproject.toml.
319
304
-`get_description()` (`usethis._file.pyproject_toml.name`) — Get the project description from pyproject.toml.
320
305
-`get_project_dict()` (`usethis._file.pyproject_toml.project`) — Get the contents of the [project] section from pyproject.toml.
321
306
-`get_requires_python()` (`usethis._file.pyproject_toml.requires_python`) — Get the requires-python constraint from pyproject.toml.
322
307
-`get_required_minor_python_versions()` (`usethis._file.pyproject_toml.requires_python`) — Get Python minor versions that match the project's requires-python constraint.
323
-
-`_get_minimum_minor_python_version_tuple()` (`usethis._file.pyproject_toml.requires_python`) — Get the minimum (major, minor) Python version from requires-python specifier.
324
-
-`_get_maximum_minor_python_version_tuple()` (`usethis._file.pyproject_toml.requires_python`) — Get the maximum (major, minor) Python version from requires-python specifier.
325
-
-`_get_maximum_python_minor_version()` (`usethis._file.pyproject_toml.requires_python`) — Get the hard-coded maximum minor version for a given Python major version.
326
308
-`ensure_pyproject_validity()` (`usethis._file.pyproject_toml.valid`) — Ensure pyproject.toml has a valid structure, adding missing required fields.
327
309
-`prepare_pyproject_write()` (`usethis._file.pyproject_toml.write`) — Prepare the pyproject.toml file for a subprocess that will modify it.
328
-
-`_set_value_in_existing()` (`usethis._file.toml.io_`) — Set a new value in an existing container.
329
-
-`_validate_keys()` (`usethis._file.toml.io_`) — Validate the keys.
330
-
-`_raise_already_set()` (`usethis._file.toml.io_`) — Raise an error if the configuration is already set.
331
-
-`_validate_keys()` (`usethis._file.yaml.io_`) — Validate the keys.
332
310
-`get_yaml_document()` (`usethis._file.yaml.io_`) — Get a YAML document representation from a string or file-like object.
333
311
-`update_ruamel_yaml_map()` (`usethis._file.yaml.update`) — Update the values of a ruamel.yaml map in-place using a diff-like algorithm.
334
312
-`lcs_list_update()` (`usethis._file.yaml.update`) — Update in-place using a longest common subsequence solver.
335
-
-`_shared_id_sequences()` (`usethis._file.yaml.update`) — Map list elements to integers which are equal iff the objects are with `__eq__`.
336
313
-`project_init()` (`usethis._init`) — Initialize the project by creating the pyproject.toml and project structure.
337
-
-`_create_project_structure()` (`usethis._init`) — Create the standard project structure files.
338
-
-`_regularize_package_name()` (`usethis._init`) — Regularize the package name to be suitable for Python packaging.
339
314
-`write_simple_requirements_txt()` (`usethis._init`) — Write a simple requirements.txt file with -e . and any project dependencies.
340
315
-`ensure_dep_declaration_file()` (`usethis._init`) — Ensure that the file where dependencies are declared exists, if necessary.
341
316
-`ensure_pyproject_toml()` (`usethis._init`) — Ensure that a pyproject.toml file exists, creating it if necessary.
@@ -345,7 +320,6 @@ ALWAYS check whether an existing function already covers your use case before im
-`add_repo()` (`usethis._integrations.pre_commit.hooks`) — Add a pre-commit repo configuration to the pre-commit configuration file.
347
322
-`insert_repo()` (`usethis._integrations.pre_commit.hooks`) — Insert a repo into the list of repos after the named predecessor hook.
348
-
-`_report_adding_repo()` (`usethis._integrations.pre_commit.hooks`) — Append a repo to the end of the existing repos with message.
349
323
-`add_placeholder_hook()` (`usethis._integrations.pre_commit.hooks`) — Add a placeholder hook to the pre-commit configuration with instructions for the user.
-`get_hook_ids()` (`usethis._integrations.pre_commit.hooks`) — Get the list of hook IDs currently configured in the pre-commit configuration file.
@@ -356,34 +330,23 @@ ALWAYS check whether an existing function already covers your use case before im
356
330
-`get_minimum_pre_commit_version()` (`usethis._integrations.pre_commit.version`) — Get the declared minimum supported pre-commit version from the configuration.
357
331
-`has_pyproject_toml_declared_build_system()` (`usethis._integrations.project.build`) — Check if a build system is declared in the project.
358
332
-`get_layered_architectures()` (`usethis._integrations.project.imports`) — Get the suggested layers for a package.
359
-
-`_get_child_dependencies()` (`usethis._integrations.project.imports`) — For each child submodule, give a set of the sibling submodules it depends on.
360
333
-`augment_pythonpath()` (`usethis._integrations.project.imports`) — Temporarily add a directory to the Python path.
361
334
-`get_source_dir_str()` (`usethis._integrations.project.layout`) — Get the source directory as a string ('src' or '.').
362
335
-`get_license_id()` (`usethis._integrations.project.license`) — Get the SPDX license identifier for the current project.
363
-
-`_get_license_from_file()` (`usethis._integrations.project.license`) — Try to detect the license from common license files at the project root.
364
-
-`_get_license_from_pyproject_field()` (`usethis._integrations.project.license`) — Try to detect the license from pyproject.toml `project.license` field.
365
-
-`_resolve_license_table()` (`usethis._integrations.project.license`) — Resolve a PEP 621 license table to an SPDX identifier.
366
-
-`_get_license_from_classifiers()` (`usethis._integrations.project.license`) — Try to detect the license from pyproject.toml `project.classifiers`.
367
336
-`get_project_name()` (`usethis._integrations.project.name`) — The project name, from pyproject.toml if available or fallback to heuristics.
368
337
-`get_importable_packages()` (`usethis._integrations.project.packages`) — Get the names of packages in the source directory that can be imported.
369
-
-`_get_packages_in_dir()` (`usethis._integrations.project.packages`) — Get the names of packages in the given directory.
370
-
-`_is_excluded()` (`usethis._integrations.project.packages`) — Check if the given name is excluded from importable packages.
371
338
-`fancy_model_dump()` (`usethis._integrations.pydantic.dump`) — Like `pydantic.model_dump` but with bespoke formatting options.
372
339
-`add_pytest_dir()` (`usethis._integrations.pytest.core`) — Create the tests directory and conftest.py if they do not already exist.
373
340
-`add_example_test()` (`usethis._integrations.pytest.core`) — Create an example test file in the tests directory if it does not already exist.
374
341
-`remove_pytest_dir()` (`usethis._integrations.pytest.core`) — Remove the tests directory if it contains only managed files.
375
342
-`get_readme_path()` (`usethis._integrations.readme.path`) — Return the path to the README file, searching for common README filenames.
376
343
-`get_markdown_readme_path()` (`usethis._integrations.readme.path`) — Return the path to the Markdown README file, raising an error if it is not Markdown.
377
344
-`get_sonar_project_properties()` (`usethis._integrations.sonarqube.config`) — Get contents for (or from) the sonar-project.properties file.
378
-
-`_validate_project_key()` (`usethis._integrations.sonarqube.config`) — Validate the SonarQube project key.
379
345
-`parallel()` (`usethis._pipeweld.containers`) — Create a Parallel pipeline composition from the given components.
380
346
-`series()` (`usethis._pipeweld.containers`) — Create a Series pipeline composition from the given components.
381
347
-`depgroup()` (`usethis._pipeweld.containers`) — Create a DepGroup pipeline composition tied to a named configuration group.
382
-
-`_get_instructions_for_insertion()` (`usethis._pipeweld.func`) — Get the instructions to insert a component after the given step.
383
348
-`get_endpoint()` (`usethis._pipeweld.func`) — Get the last step name (endpoint) from a pipeline component.
384
349
-`get_predecessor()` (`usethis._pipeweld.func`) — Find the step that immediately precedes `step` in a pipeline component.
385
-
-`_extract_ordered_steps()` (`usethis._pipeweld.func`) — Extract all step names from a component in depth-first order.
386
-
-`_linearize_component()` (`usethis._pipeweld.func`) — Flatten a pipeline component to a linear list of step names.
387
350
-`call_subprocess()` (`usethis._subprocess`) — Run a subprocess and return its stdout, raising SubprocessFailedError on failure.
388
351
-`ensure_managed_file_exists()` (`usethis._tool.config`) — Ensure a file manager's managed file exists.
389
352
-`is_likely_used()` (`usethis._tool.heuristics`) — Determine whether a tool is likely used in the current project.
0 commit comments