From c0dd238bce1a24928956393cade5ce6fd34e87c9 Mon Sep 17 00:00:00 2001 From: Sam Cunliffe Date: Wed, 7 Oct 2026 14:11:33 +0100 Subject: [PATCH] Simplify `test_package_generation`. And remove the regression test + regression data. --- .../.github/ISSUE_TEMPLATE/bug_report.yml | 63 - .../.github/ISSUE_TEMPLATE/config.yml | 2 - .../.github/ISSUE_TEMPLATE/documentation.yml | 27 - .../ISSUE_TEMPLATE/feature_request.yml | 34 - .../.github/ISSUE_TEMPLATE/question.yml | 24 - .../.github/schemas/github-issue-forms.json | 2377 ----------------- .../.github/workflows/docs.yml | 54 - .../.github/workflows/linting.yml | 33 - .../.github/workflows/tests.yml | 43 - tests/data/test_package_generation/.gitignore | 163 -- .../.markdownlint.yaml | 2 - .../.pre-commit-config.yaml | 60 - .../data/test_package_generation/CITATION.cff | 10 - tests/data/test_package_generation/LICENSE.md | 20 - tests/data/test_package_generation/README.md | 126 - .../test_package_generation/docs/LICENSE.md | 3 - .../data/test_package_generation/docs/api.md | 3 - .../test_package_generation/docs/index.md | 3 - tests/data/test_package_generation/mkdocs.yml | 63 - .../test_package_generation/pyproject.toml | 154 -- .../src/cookiecutter_test/__init__.py | 18 - .../tests/test_dummy.py | 6 - tests/test_package_generation.py | 92 +- 23 files changed, 24 insertions(+), 3356 deletions(-) delete mode 100644 tests/data/test_package_generation/.github/ISSUE_TEMPLATE/bug_report.yml delete mode 100644 tests/data/test_package_generation/.github/ISSUE_TEMPLATE/config.yml delete mode 100644 tests/data/test_package_generation/.github/ISSUE_TEMPLATE/documentation.yml delete mode 100644 tests/data/test_package_generation/.github/ISSUE_TEMPLATE/feature_request.yml delete mode 100644 tests/data/test_package_generation/.github/ISSUE_TEMPLATE/question.yml delete mode 100644 tests/data/test_package_generation/.github/schemas/github-issue-forms.json delete mode 100644 tests/data/test_package_generation/.github/workflows/docs.yml delete mode 100644 tests/data/test_package_generation/.github/workflows/linting.yml delete mode 100644 tests/data/test_package_generation/.github/workflows/tests.yml delete mode 100644 tests/data/test_package_generation/.gitignore delete mode 100644 tests/data/test_package_generation/.markdownlint.yaml delete mode 100644 tests/data/test_package_generation/.pre-commit-config.yaml delete mode 100644 tests/data/test_package_generation/CITATION.cff delete mode 100644 tests/data/test_package_generation/LICENSE.md delete mode 100644 tests/data/test_package_generation/README.md delete mode 100644 tests/data/test_package_generation/docs/LICENSE.md delete mode 100644 tests/data/test_package_generation/docs/api.md delete mode 100644 tests/data/test_package_generation/docs/index.md delete mode 100644 tests/data/test_package_generation/mkdocs.yml delete mode 100644 tests/data/test_package_generation/pyproject.toml delete mode 100644 tests/data/test_package_generation/src/cookiecutter_test/__init__.py delete mode 100644 tests/data/test_package_generation/tests/test_dummy.py diff --git a/tests/data/test_package_generation/.github/ISSUE_TEMPLATE/bug_report.yml b/tests/data/test_package_generation/.github/ISSUE_TEMPLATE/bug_report.yml deleted file mode 100644 index 073866e0..00000000 --- a/tests/data/test_package_generation/.github/ISSUE_TEMPLATE/bug_report.yml +++ /dev/null @@ -1,63 +0,0 @@ ---- -name: Bug Report -description: Create a Report to Help us Improve -labels: - - bug -body: - - id: describe - type: textarea - attributes: - label: Describe the Bug - description: A clear and concise description of what the bug is. - validations: - required: true - - id: reproduce - type: textarea - attributes: - label: To Reproduce - description: >- - A minimal working example of code to reproduce the unexpected behaviour, - this will render as `Python` code so no need for backticks. - value: |- - import cookiecutter_test - - ... - render: Python - validations: - required: true - - id: expected - type: textarea - attributes: - label: Expected Behaviour - description: >- - A clear and concise description of what you expected to happen. - validations: - required: true - - id: actual - type: textarea - attributes: - label: Actual Behaviour - description: >- - Be a specific and detailed as you can. Paste any output or stack traces - of errors you receive. - validations: - required: true - - id: version - type: input - attributes: - label: Version In Use - description: |- - Can be found by - ```sh - python -c "import cookiecutter_test; print(cookiecutter_test.__version__)" - ``` - validations: - required: true - - id: additional - type: textarea - attributes: - label: Additional Context - value: |- - - Python version: - - Operating system: - render: Markdown diff --git a/tests/data/test_package_generation/.github/ISSUE_TEMPLATE/config.yml b/tests/data/test_package_generation/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index bd9dfe4e..00000000 --- a/tests/data/test_package_generation/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -blank_issues_enabled: false diff --git a/tests/data/test_package_generation/.github/ISSUE_TEMPLATE/documentation.yml b/tests/data/test_package_generation/.github/ISSUE_TEMPLATE/documentation.yml deleted file mode 100644 index 582c191c..00000000 --- a/tests/data/test_package_generation/.github/ISSUE_TEMPLATE/documentation.yml +++ /dev/null @@ -1,27 +0,0 @@ ---- -name: Documentation -description: How Can We Improve the Documentation -labels: - - documentation -body: - - id: section - type: textarea - attributes: - label: Which Section of the Documentation Needs Improving? - description: Please provide a link (if it is a specific page). - validations: - required: true - - id: problem - type: textarea - attributes: - label: What Can be Improved About This Section - description: Is it incomplete, incorrect or difficult to understand? - validations: - required: true - - id: suggestions - type: textarea - attributes: - label: How to Improve This Section - description: >- - Do you have any specific suggestions we could take to improve the - documentation? diff --git a/tests/data/test_package_generation/.github/ISSUE_TEMPLATE/feature_request.yml b/tests/data/test_package_generation/.github/ISSUE_TEMPLATE/feature_request.yml deleted file mode 100644 index 8e1ad7fe..00000000 --- a/tests/data/test_package_generation/.github/ISSUE_TEMPLATE/feature_request.yml +++ /dev/null @@ -1,34 +0,0 @@ ---- -name: Feature Request -description: Suggest a Way to Improve This Project -labels: - - enhancement -body: - - id: problem - type: textarea - attributes: - label: Is Your Feature Request Related to a Problem? Please Describe - description: A clear and concise description of what the problem is. - placeholder: I'm always frustrated when [...] - validations: - required: true - - id: solution - type: textarea - attributes: - label: Describe the Solution You'd Like - description: A clear and concise description of what you want to happen. - validations: - required: true - - id: alternatives - type: textarea - attributes: - label: Describe Alternatives You've Considered - description: >- - A clear and concise description of any alternative solutions or features - you've considered. - - id: additional - type: textarea - attributes: - label: Additional Context - description: >- - Add any other context or screenshots about the feature request here. diff --git a/tests/data/test_package_generation/.github/ISSUE_TEMPLATE/question.yml b/tests/data/test_package_generation/.github/ISSUE_TEMPLATE/question.yml deleted file mode 100644 index a2bef2ea..00000000 --- a/tests/data/test_package_generation/.github/ISSUE_TEMPLATE/question.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -name: Question -description: General Questions About Using Cookiecutter Test -labels: - - question -body: - - id: topic - type: dropdown - attributes: - label: What is the Topic of Your Question - description: Please indicate the topic in the title of your question. - options: - - Documentation - - Installation - - Usage - - Other - validations: - required: true - - id: question - type: textarea - attributes: - label: Add Your Question Below - validations: - required: true diff --git a/tests/data/test_package_generation/.github/schemas/github-issue-forms.json b/tests/data/test_package_generation/.github/schemas/github-issue-forms.json deleted file mode 100644 index b890ff13..00000000 --- a/tests/data/test_package_generation/.github/schemas/github-issue-forms.json +++ /dev/null @@ -1,2377 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - - "$id": "https://json.schemastore.org/github-issue-forms.json", - - "$comment": "https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms", - - "additionalProperties": false, - - "definitions": { - "type": { - "description": "A form item type\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#keys", - - "type": "string", - - "enum": ["checkboxes", "dropdown", "input", "markdown", "textarea"] - }, - - "id": { - "type": "string", - - "pattern": "^[a-zA-Z0-9_-]+$", - - "examples": ["SampleId"] - }, - - "validations": { - "title": "validation options", - - "type": "object", - - "properties": { - "required": { - "description": "Specify whether require a form item", - - "type": "boolean", - - "default": false - } - }, - - "additionalProperties": false - }, - - "assignee": { - "type": "string", - - "maxLength": 39, - - "pattern": "^[a-zA-Z0-9](-?[a-zA-Z0-9])*$", - - "examples": ["SampleAssignee"] - }, - - "label": { - "type": "string", - - "minLength": 1, - - "examples": ["Sample label"] - }, - - "description": { - "type": "string", - - "default": "", - - "examples": ["Sample description"] - }, - - "placeholder": { - "type": "string", - - "default": "", - - "examples": ["Sample placeholder"] - }, - - "value": { - "type": "string", - - "minLength": 1, - - "examples": ["Sample value"] - }, - - "form_item": { - "title": "form item", - - "description": "A form item\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#about-githubs-form-schema", - - "type": "object", - - "required": ["type"], - - "properties": { - "type": { - "$ref": "#/definitions/type" - } - }, - - "allOf": [ - { - "if": { - "properties": { - "type": { - "const": "markdown" - } - } - }, - - "then": { - "$comment": "For `additionalProperties` to work `type` must also be present here.", - - "title": "markdown", - - "description": "Markdown\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#markdown", - - "type": "object", - - "required": ["type", "attributes"], - - "properties": { - "type": { - "$ref": "#/definitions/type" - }, - - "attributes": { - "title": "markdown attributes", - - "description": "Markdown attributes\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#attributes", - - "type": "object", - - "required": ["value"], - - "properties": { - "value": { - "description": "A markdown code\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#attributes", - - "type": "string", - - "minLength": 1, - - "examples": ["Sample code"] - } - }, - - "additionalProperties": false - } - }, - - "additionalProperties": false - } - }, - - { - "if": { - "properties": { - "type": { - "const": "textarea" - } - } - }, - - "then": { - "$comment": "For `additionalProperties` to work `type` must also be present here.", - - "title": "textarea", - - "description": "Textarea\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#textarea", - - "type": "object", - - "required": ["type", "attributes"], - - "properties": { - "type": { - "$ref": "#/definitions/type" - }, - - "id": { - "$ref": "#/definitions/id", - - "description": "A textarea id\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#keys" - }, - - "attributes": { - "title": "textarea attributes", - - "description": "Textarea attributes\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#attributes-1", - - "type": "object", - - "required": ["label"], - - "properties": { - "label": { - "$ref": "#/definitions/label", - - "description": "A short textarea description\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#attributes-1" - }, - - "description": { - "$ref": "#/definitions/description", - - "description": "A long textarea description\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#attributes-1" - }, - - "placeholder": { - "$ref": "#/definitions/placeholder", - - "description": "A textarea placeholder\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#attributes-1" - }, - - "value": { - "$ref": "#/definitions/value", - - "description": "A textarea value\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#attributes-1" - }, - - "render": { - "description": "A textarea syntax highlighting mode\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#attributes-1", - - "type": "string", - - "enum": [ - "1C Enterprise", - - "4D", - - "ABAP CDS", - - "ABAP", - - "ABNF", - - "AFDKO", - - "AGS Script", - - "AIDL", - - "AL", - - "AMPL", - - "ANTLR", - - "API Blueprint", - - "APL", - - "ASL", - - "ASN.1", - - "ASP.NET", - - "ATS", - - "ActionScript", - - "Ada", - - "Alloy", - - "Alpine Abuild", - - "Altium Designer", - - "AngelScript", - - "Ant Build System", - - "ApacheConf", - - "Apex", - - "Apollo Guidance Computer", - - "AppleScript", - - "Arc", - - "AsciiDoc", - - "AspectJ", - - "Assembly", - - "Astro", - - "Asymptote", - - "Augeas", - - "AutoHotkey", - - "AutoIt", - - "AutoIt3", - - "AutoItScript", - - "Avro IDL", - - "Awk", - - "BASIC", - - "Ballerina", - - "Batchfile", - - "Beef", - - "Befunge", - - "BibTeX", - - "Bicep", - - "Bison", - - "BitBake", - - "Blade", - - "BlitzBasic", - - "BlitzMax", - - "Boo", - - "Boogie", - - "Brainfuck", - - "Brightscript", - - "Browserslist", - - "C", - - "C#", - - "C++", - - "C-ObjDump", - - "C2hs Haskell", - - "CIL", - - "CLIPS", - - "CMake", - - "COBOL", - - "CODEOWNERS", - - "COLLADA", - - "CSON", - - "CSS", - - "CSV", - - "CUE", - - "CWeb", - - "Cabal Config", - - "Cabal", - - "Cap'n Proto", - - "Carto", - - "CartoCSS", - - "Ceylon", - - "Chapel", - - "Charity", - - "ChucK", - - "Cirru", - - "Clarion", - - "Classic ASP", - - "Clean", - - "Click", - - "Clojure", - - "Closure Templates", - - "Cloud Firestore Security Rules", - - "CoNLL", - - "CoNLL-U", - - "CoNLL-X", - - "ColdFusion CFC", - - "ColdFusion", - - "Common Lisp", - - "Common Workflow Language", - - "Component Pascal", - - "Containerfile", - - "Cool", - - "Coq", - - "Cpp-ObjDump", - - "Crystal", - - "Csound Document", - - "Csound Score", - - "Csound", - - "Cuda", - - "Cue Sheet", - - "Cycript", - - "Cython", - - "D-ObjDump", - - "DIGITAL Command Language", - - "DM", - - "DTrace", - - "Dafny", - - "Darcs Patch", - - "Dart", - - "DataWeave", - - "Dhall", - - "Diff", - - "Dlang", - - "Dockerfile", - - "Dogescript", - - "Dylan", - - "E", - - "E-mail", - - "EBNF", - - "ECL", - - "ECLiPSe", - - "EJS", - - "EQ", - - "Eagle", - - "Earthly", - - "Easybuild", - - "Ecere Projects", - - "EditorConfig", - - "Eiffel", - - "Elixir", - - "Elm", - - "Emacs Lisp", - - "EmberScript", - - "Erlang", - - "F#", - - "F*", - - "FIGfont", - - "FIGlet Font", - - "FLUX", - - "Factor", - - "Fancy", - - "Fantom", - - "Faust", - - "Fennel", - - "Filebench WML", - - "Filterscript", - - "Fluent", - - "Formatted", - - "Forth", - - "Fortran Free Form", - - "Fortran", - - "FreeBasic", - - "Frege", - - "Futhark", - - "G-code", - - "GAML", - - "GAMS", - - "GAP", - - "GCC Machine Description", - - "GDB", - - "GDScript", - - "GEDCOM", - - "GLSL", - - "GN", - - "Game Maker Language", - - "Gemfile.lock", - - "Genie", - - "Genshi", - - "Gentoo Eclass", - - "Gerber Image", - - "Gettext Catalog", - - "Gherkin", - - "Git Config", - - "Glyph Bitmap Distribution Format", - - "Glyph", - - "Gnuplot", - - "Go Checksums", - - "Go Module", - - "Go", - - "Golo", - - "Gosu", - - "Grace", - - "Gradle", - - "Grammatical Framework", - - "Graph Modeling Language", - - "GraphQL", - - "Graphviz (DOT)", - - "Groovy Server Pages", - - "Groovy", - - "HAProxy", - - "HCL", - - "HTML", - - "HTML+ECR", - - "HTML+EEX", - - "HTML+ERB", - - "HTML+PHP", - - "HTML+Razor", - - "HTTP", - - "HXML", - - "Hack", - - "Haml", - - "Handlebars", - - "Harbour", - - "HashiCorp Configuration Language", - - "Haskell", - - "Haxe", - - "HiveQL", - - "HolyC", - - "Hy", - - "IDL", - - "IGOR Pro", - - "IPython Notebook", - - "Idris", - - "Ignore List", - - "ImageJ Macro", - - "Inform 7", - - "Io", - - "Ioke", - - "Isabelle ROOT", - - "Isabelle", - - "J", - - "JAR Manifest", - - "JFlex", - - "JSON with Comments", - - "JSON", - - "JSON5", - - "JSONLD", - - "JSONiq", - - "Jasmin", - - "Java Properties", - - "Java Server Pages", - - "Java", - - "JavaScript", - - "JavaScript+ERB", - - "Jest Snapshot", - - "Jinja", - - "Jison Lex", - - "Jison", - - "Jolie", - - "Jsonnet", - - "Julia", - - "Jupyter Notebook", - - "Kaitai Struct", - - "KakouneScript", - - "KiCad Layout", - - "KiCad Legacy Layout", - - "KiCad Schematic", - - "Kit", - - "Kotlin", - - "Kusto", - - "LFE", - - "LLVM", - - "LOLCODE", - - "LSL", - - "LTspice Symbol", - - "LabVIEW", - - "Lark", - - "Lasso", - - "Lean", - - "Less", - - "Lex", - - "LilyPond", - - "Limbo", - - "Linker Script", - - "Linux Kernel Module", - - "Liquid", - - "Literate Agda", - - "Literate CoffeeScript", - - "Literate Haskell", - - "LiveScript", - - "Logos", - - "Logtalk", - - "LookML", - - "LoomScript", - - "Lua", - - "M", - - "M4", - - "M4Sugar", - - "MATLAB", - - "MAXScript", - - "MLIR", - - "MQL4", - - "MQL5", - - "MTML", - - "MUF", - - "Macaulay2", - - "Makefile", - - "Mako", - - "Markdown", - - "Marko", - - "Mathematica", - - "Max", - - "Mercury", - - "Meson", - - "Metal", - - "Microsoft Developer Studio Project", - - "Microsoft Visual Studio Solution", - - "MiniD", - - "Mirah", - - "Modelica", - - "Modula-2", - - "Modula-3", - - "Module Management System", - - "Monkey", - - "Moocode", - - "MoonScript", - - "Motoko", - - "Motorola 68K Assembly", - - "Muse", - - "Myghty", - - "NASL", - - "NCL", - - "NEON", - - "NPM Config", - - "NSIS", - - "NWScript", - - "Nearley", - - "Nemerle", - - "NeoSnippet", - - "NetLinx", - - "NetLinx+ERB", - - "NetLogo", - - "NewLisp", - - "Nextflow", - - "Nginx", - - "Ninja", - - "Nit", - - "Nix", - - "NumPy", - - "Nunjucks", - - "ObjDump", - - "Object Data Instance Notation", - - "ObjectScript", - - "Objective-C", - - "Objective-C++", - - "Objective-J", - - "Odin", - - "Omgrofl", - - "Opa", - - "Opal", - - "Open Policy Agent", - - "OpenCL", - - "OpenEdge ABL", - - "OpenQASM", - - "OpenRC runscript", - - "OpenSCAD", - - "OpenStep Property List", - - "OpenType Feature File", - - "Org", - - "Ox", - - "Oxygene", - - "Oz", - - "P4", - - "PEG.js", - - "PHP", - - "PLpgSQL", - - "POV-Ray SDL", - - "Pan", - - "Papyrus", - - "Parrot Assembly", - - "Parrot Internal Representation", - - "Parrot", - - "Pascal", - - "Pawn", - - "Pep8", - - "Perl", - - "Pickle", - - "PicoLisp", - - "PigLatin", - - "Pike", - - "PlantUML", - - "Pod 6", - - "Pod", - - "PogoScript", - - "Pony", - - "PostCSS", - - "PostScript", - - "PowerShell", - - "Prisma", - - "Processing", - - "Proguard", - - "Prolog", - - "Promela", - - "Propeller Spin", - - "Protocol Buffer", - - "Protocol Buffers", - - "Public Key", - - "Pug", - - "Puppet", - - "Pure Data", - - "PureBasic", - - "PureScript", - - "Python", - - "Q#", - - "QMake", - - "Qt Script", - - "Quake", - - "R", - - "RAML", - - "RDoc", - - "REALbasic", - - "REXX", - - "RMarkdown", - - "RPC", - - "RPM Spec", - - "Racket", - - "Ragel", - - "Raw token data", - - "ReScript", - - "Readline Config", - - "Reason", - - "Rebol", - - "Record Jar", - - "Red", - - "Redirect Rules", - - "Regular Expression", - - "RenderScript", - - "Rich Text Format", - - "Ring", - - "Riot", - - "RobotFramework", - - "Roff", - - "Rouge", - - "Rscript", - - "Ruby", - - "Rust", - - "SAS", - - "SCSS", - - "SELinux Kernel Policy Language", - - "SELinux Policy", - - "SMT", - - "SPARQL", - - "SQF", - - "SQL", - - "SQLPL", - - "SRecode Template", - - "SSH Config", - - "STON", - - "SVG", - - "SWIG", - - "Sage", - - "SaltStack", - - "Sass", - - "Scala", - - "Scaml", - - "Scheme", - - "Scilab", - - "Self", - - "ShaderLab", - - "Shell", - - "ShellCheck Config", - - "Sieve", - - "Singularity", - - "Slash", - - "Slice", - - "Slim", - - "SmPL", - - "Smalltalk", - - "SnipMate", - - "Solidity", - - "Soong", - - "SourcePawn", - - "Spline Font Database", - - "Squirrel", - - "Stan", - - "Standard ML", - - "Starlark", - - "StringTemplate", - - "Stylus", - - "SubRip Text", - - "SugarSS", - - "SuperCollider", - - "Svelte", - - "Swift", - - "SystemVerilog", - - "TI Program", - - "TLA", - - "TOML", - - "TSQL", - - "TSV", - - "TSX", - - "TXL", - - "Tcl", - - "Tcsh", - - "TeX", - - "Tea", - - "Terra", - - "Texinfo", - - "Text", - - "TextMate Properties", - - "Textile", - - "Thrift", - - "Turing", - - "Turtle", - - "Twig", - - "Type Language", - - "TypeScript", - - "UltiSnip", - - "UltiSnips", - - "Unified Parallel C", - - "Unity3D Asset", - - "Unix Assembly", - - "Uno", - - "UnrealScript", - - "Ur", - - "Ur/Web", - - "UrWeb", - - "V", - - "VBA", - - "VCL", - - "VHDL", - - "Vala", - - "Valve Data Format", - - "Verilog", - - "Vim Help File", - - "Vim Script", - - "Vim Snippet", - - "Visual Basic .NET", - - "Vue", - - "Wavefront Material", - - "Wavefront Object", - - "Web Ontology Language", - - "WebAssembly", - - "WebVTT", - - "Wget Config", - - "Wikitext", - - "Windows Registry Entries", - - "Wollok", - - "World of Warcraft Addon Data", - - "X BitMap", - - "X Font Directory Index", - - "X PixMap", - - "X10", - - "XC", - - "XCompose", - - "XML Property List", - - "XML", - - "XPages", - - "XProc", - - "XQuery", - - "XS", - - "XSLT", - - "Xojo", - - "Xonsh", - - "Xtend", - - "YAML", - - "YANG", - - "YARA", - - "YASnippet", - - "Yacc", - - "ZAP", - - "ZIL", - - "Zeek", - - "ZenScript", - - "Zephir", - - "Zig", - - "Zimpl", - - "abl", - - "abuild", - - "acfm", - - "aconf", - - "actionscript 3", - - "actionscript3", - - "ada2005", - - "ada95", - - "adobe composite font metrics", - - "adobe multiple font metrics", - - "advpl", - - "ags", - - "ahk", - - "altium", - - "amfm", - - "amusewiki", - - "apache", - - "apkbuild", - - "arexx", - - "as3", - - "asm", - - "asp", - - "aspx", - - "aspx-vb", - - "ats2", - - "au3", - - "autoconf", - - "b3d", - - "bash session", - - "bash", - - "bat", - - "batch", - - "bazel", - - "blitz3d", - - "blitzplus", - - "bmax", - - "bplus", - - "bro", - - "bsdmake", - - "byond", - - "bzl", - - "c++-objdump", - - "c2hs", - - "cURL Config", - - "cake", - - "cakescript", - - "cfc", - - "cfm", - - "cfml", - - "chpl", - - "clipper", - - "coccinelle", - - "coffee", - - "coffee-script", - - "coldfusion html", - - "console", - - "cperl", - - "cpp", - - "csharp", - - "csound-csd", - - "csound-orc", - - "csound-sco", - - "cucumber", - - "curlrc", - - "cwl", - - "dcl", - - "delphi", - - "desktop", - - "dircolors", - - "django", - - "dosbatch", - - "dosini", - - "dpatch", - - "dtrace-script", - - "eC", - - "ecr", - - "editor-config", - - "edn", - - "eeschema schematic", - - "eex", - - "elisp", - - "emacs muse", - - "emacs", - - "email", - - "eml", - - "erb", - - "fb", - - "fish", - - "flex", - - "foxpro", - - "fsharp", - - "fstar", - - "ftl", - - "fundamental", - - "gf", - - "git-ignore", - - "gitattributes", - - "gitconfig", - - "gitignore", - - "gitmodules", - - "go mod", - - "go sum", - - "go.mod", - - "go.sum", - - "golang", - - "groff", - - "gsp", - - "hbs", - - "heex", - - "help", - - "html+django", - - "html+jinja", - - "html+ruby", - - "htmlbars", - - "htmldjango", - - "hylang", - - "i7", - - "ignore", - - "igor", - - "igorpro", - - "ijm", - - "inc", - - "inform7", - - "inputrc", - - "irc logs", - - "irc", - - "java server page", - - "jq", - - "jruby", - - "js", - - "jsonc", - - "jsp", - - "kak", - - "kakscript", - - "keyvalues", - - "ksy", - - "lassoscript", - - "latex", - - "leex", - - "lhaskell", - - "lhs", - - "lisp", - - "litcoffee", - - "live-script", - - "ls", - - "m2", - - "m68k", - - "mIRC Script", - - "macruby", - - "mail", - - "make", - - "man page", - - "man", - - "man-page", - - "manpage", - - "markojs", - - "max/msp", - - "maxmsp", - - "mbox", - - "mcfunction", - - "mdoc", - - "mediawiki", - - "mf", - - "mma", - - "mumps", - - "mupad", - - "nanorc", - - "nasm", - - "ne-on", - - "nesC", - - "nette object notation", - - "nginx configuration file", - - "nixos", - - "njk", - - "node", - - "npmrc", - - "nroff", - - "nush", - - "nvim", - - "obj-c", - - "obj-c++", - - "obj-j", - - "objc", - - "objc++", - - "objectivec", - - "objectivec++", - - "objectivej", - - "objectpascal", - - "objj", - - "octave", - - "odin-lang", - - "odinlang", - - "oncrpc", - - "ooc", - - "openedge", - - "openrc", - - "osascript", - - "pandoc", - - "pasm", - - "pcbnew", - - "perl-6", - - "perl6", - - "pir", - - "plain text", - - "posh", - - "postscr", - - "pot", - - "pov-ray", - - "povray", - - "progress", - - "protobuf", - - "pwsh", - - "pycon", - - "pyrex", - - "python3", - - "q", - - "ql", - - "qsharp", - - "ragel-rb", - - "ragel-ruby", - - "rake", - - "raw", - - "razor", - - "rb", - - "rbx", - - "reStructuredText", - - "readline", - - "red/system", - - "redirects", - - "regex", - - "regexp", - - "renpy", - - "rhtml", - - "robots txt", - - "robots", - - "robots.txt", - - "rpcgen", - - "rs", - - "rs-274x", - - "rss", - - "rst", - - "rusthon", - - "salt", - - "saltstate", - - "sed", - - "sepolicy", - - "sh", - - "shell-script", - - "shellcheckrc", - - "sml", - - "snippet", - - "sourcemod", - - "soy", - - "specfile", - - "splus", - - "squeak", - - "terraform", - - "tl", - - "tm-properties", - - "troff", - - "ts", - - "udiff", - - "vb .net", - - "vb.net", - - "vb6", - - "vbnet", - - "vdf", - - "vim", - - "vimhelp", - - "viml", - - "visual basic 6", - - "visual basic for applications", - - "visual basic", - - "vlang", - - "wasm", - - "wast", - - "wdl", - - "wgetrc", - - "wiki", - - "winbatch", - - "wisp", - - "wl", - - "wolfram lang", - - "wolfram language", - - "wolfram", - - "wsdl", - - "xBase", - - "xbm", - - "xdr", - - "xhtml", - - "xml+genshi", - - "xml+kid", - - "xpm", - - "xsd", - - "xsl", - - "xten", - - "yas", - - "yml", - - "zsh" - ] - } - }, - - "additionalProperties": false - }, - - "validations": { - "$ref": "#/definitions/validations", - - "title": "textarea validations", - - "description": "Textarea validations\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#validations" - } - }, - - "additionalProperties": false - } - }, - - { - "if": { - "properties": { - "type": { - "const": "input" - } - } - }, - - "then": { - "$comment": "For `additionalProperties` to work `type` must also be present here.", - - "title": "input", - - "description": "Input\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#input", - - "type": "object", - - "required": ["type", "attributes"], - - "properties": { - "type": { - "$ref": "#/definitions/type" - }, - - "id": { - "$ref": "#/definitions/id", - - "description": "An input id\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#keys" - }, - - "attributes": { - "title": "input attributes", - - "description": "Input attributes\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#attributes-2", - - "type": "object", - - "required": ["label"], - - "properties": { - "label": { - "$ref": "#/definitions/label", - - "description": "A short input description\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#attributes-2" - }, - - "description": { - "$ref": "#/definitions/description", - - "description": "A long input description\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#attributes-2" - }, - - "placeholder": { - "$ref": "#/definitions/placeholder", - - "description": "An input placeholder\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#attributes-2" - }, - - "value": { - "$ref": "#/definitions/value", - - "description": "An input value\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#attributes-2" - } - }, - - "additionalProperties": false - }, - - "validations": { - "$ref": "#/definitions/validations", - - "title": "input validations", - - "description": "Input validations\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#validations-1" - } - }, - - "additionalProperties": false - } - }, - - { - "if": { - "properties": { - "type": { - "const": "dropdown" - } - } - }, - - "then": { - "$comment": "For `additionalProperties` to work `type` must also be present here.", - - "title": "dropdown", - - "description": "dropdown\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#dropdown", - - "type": "object", - - "required": ["type", "attributes"], - - "properties": { - "type": { - "$ref": "#/definitions/type" - }, - - "id": { - "$ref": "#/definitions/id", - - "description": "A dropdown id\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#keys" - }, - - "attributes": { - "title": "dropdown attributes", - - "description": "Dropdown attributes\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#attributes-3", - - "type": "object", - - "required": ["label", "options"], - - "properties": { - "label": { - "$ref": "#/definitions/label", - - "description": "A short dropdown description\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#attributes-3" - }, - - "description": { - "$ref": "#/definitions/description", - - "description": "A long dropdown description\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#attributes-3" - }, - - "multiple": { - "description": "Specify whether allow a multiple choices\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#attributes-3", - - "type": "boolean", - - "default": false - }, - - "options": { - "description": "Dropdown choices\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#attributes-3", - - "type": "array", - - "minItems": 1, - - "uniqueItems": true, - - "items": { - "type": "string", - - "minLength": 1, - - "examples": ["Sample choice"] - } - }, - - "default": { - "description": "Index of the default option\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#attributes-3", - - "type": "integer", - - "examples": [0] - } - }, - - "additionalProperties": false - }, - - "validations": { - "$ref": "#/definitions/validations", - - "title": "dropdown validations", - - "description": "Dropdown validations\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#validations-2" - } - }, - - "additionalProperties": false - } - }, - - { - "if": { - "properties": { - "type": { - "const": "checkboxes" - } - } - }, - - "then": { - "$comment": "For `additionalProperties` to work `type` must also be present here.", - - "title": "checkboxes", - - "description": "Checkboxes\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#checkboxes", - - "type": "object", - - "required": ["type", "attributes"], - - "properties": { - "type": { - "$ref": "#/definitions/type" - }, - - "id": { - "$ref": "#/definitions/id", - - "description": "Checkbox list id\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#keys" - }, - - "attributes": { - "title": "checkbox list attributes", - - "description": "Checkbox list attributes\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#attributes-4", - - "type": "object", - - "required": ["label", "options"], - - "properties": { - "label": { - "$ref": "#/definitions/label", - - "description": "A short checkbox list description\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#attributes-4" - }, - - "description": { - "$ref": "#/definitions/description", - - "description": "A long checkbox list description\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#attributes-4" - }, - - "options": { - "description": "Checkbox list choices\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#attributes-4", - - "type": "array", - - "minItems": 1, - - "items": { - "title": "checkbox list choice", - - "description": "Checkbox list choice\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#attributes-4", - - "type": "object", - - "required": ["label"], - - "properties": { - "label": { - "description": "A short checkbox list choice description\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#attributes-4", - - "type": "string", - - "minLength": 1, - - "examples": ["Sample label"] - }, - - "required": { - "description": "Specify whether a choice is required\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#attributes-4", - - "type": "boolean", - - "default": false - } - }, - - "additionalProperties": false - } - } - }, - - "additionalProperties": false - } - }, - - "additionalProperties": false - } - } - ] - } - }, - - "properties": { - "name": { - "description": "An issue template name\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms#top-level-syntax", - - "type": "string", - - "minLength": 1, - - "examples": ["Sample name"] - }, - - "description": { - "description": "An issue template description\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms#top-level-syntax", - - "type": "string", - - "minLength": 1, - - "examples": ["Sample description"] - }, - - "body": { - "description": "An issue template body\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms#top-level-syntax", - - "type": "array", - - "minItems": 1, - - "items": { - "$ref": "#/definitions/form_item" - } - }, - - "assignees": { - "description": "An issue template assignees\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms#top-level-syntax", - - "oneOf": [ - { - "$ref": "#/definitions/assignee" - }, - - { - "type": "array", - - "minItems": 1, - - "uniqueItems": true, - - "items": { - "$ref": "#/definitions/assignee" - } - } - ] - }, - - "labels": { - "description": "An issue template labels\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms#top-level-syntax", - - "type": "array", - - "minItems": 1, - - "uniqueItems": true, - - "items": { - "type": "string", - - "minLength": 1, - - "examples": [ - "Sample label", - - "bug", - - "documentation", - - "duplicate", - - "enhancement", - - "good first issue", - - "help wanted", - - "invalid", - - "question", - - "wontfix" - ] - } - }, - - "title": { - "description": "An issue template title\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms#top-level-syntax", - - "type": "string", - - "minLength": 1, - - "examples": ["Sample title", "Bug: ", "Feature: "] - } - }, - - "required": ["name", "description", "body"], - - "title": "GitHub issue forms config file schema", - - "type": "object" -} diff --git a/tests/data/test_package_generation/.github/workflows/docs.yml b/tests/data/test_package_generation/.github/workflows/docs.yml deleted file mode 100644 index 93b493b8..00000000 --- a/tests/data/test_package_generation/.github/workflows/docs.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Documentation - -on: - push: - branches: - - main - pull_request: - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout source - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - - name: Cache tox - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 - with: - path: .tox - key: tox-${{ hashFiles('pyproject.toml') }} - - - name: Set up Python - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 - with: - python-version: "3.x" - cache: "pip" - cache-dependency-path: "pyproject.toml" - - - name: Install tox - run: python -m pip install tox - - - name: Build HTML documentation with tox - run: tox -e docs - - - name: Upload built docs as artifact - id: deployment - uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 - with: - path: site - - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - permissions: - pages: write - id-token: write - runs-on: ubuntu-latest - needs: build - if: github.event_name != 'pull_request' - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0 diff --git a/tests/data/test_package_generation/.github/workflows/linting.yml b/tests/data/test_package_generation/.github/workflows/linting.yml deleted file mode 100644 index 85ec9970..00000000 --- a/tests/data/test_package_generation/.github/workflows/linting.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Linting - -on: - push: - branches: - - main - pull_request: - -jobs: - linting: - runs-on: ubuntu-latest - steps: - - name: Checkout source - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - - name: Cache prek - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 - with: - path: ~/.cache/prek - key: prek-${{ hashFiles('.pre-commit-config.yaml') }} - - - name: Set up python - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 - with: - python-version: "3.x" - cache: pip - cache-dependency-path: pyproject.toml - - - name: Install dependencies - run: python -m pip install prek - - - name: Run prek - run: prek run --all-files --color always --verbose diff --git a/tests/data/test_package_generation/.github/workflows/tests.yml b/tests/data/test_package_generation/.github/workflows/tests.yml deleted file mode 100644 index da9c526f..00000000 --- a/tests/data/test_package_generation/.github/workflows/tests.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Tests - -on: - push: - branches: - - main - pull_request: - paths-ignore: - - "**.md" - -jobs: - tests: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: - - "3.11" - - "3.12" - - "3.13" - - "3.14" - - steps: - - name: Checkout source - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - - name: Cache tox - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 - with: - path: .tox - key: tox-${{hashFiles('pyproject.toml') }} - - - name: Set up python - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 - with: - python-version: ${{ matrix.python-version }} - cache: pip - cache-dependency-path: pyproject.toml - - - name: Install dependencies - run: python -m pip install tox tox-gh - - - name: Test with tox - run: tox run diff --git a/tests/data/test_package_generation/.gitignore b/tests/data/test_package_generation/.gitignore deleted file mode 100644 index 6a566013..00000000 --- a/tests/data/test_package_generation/.gitignore +++ /dev/null @@ -1,163 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -*.py,cover -.hypothesis/ -.pytest_cache/ -cover/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -.pybuilder/ -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -# For a library or package, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# .python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# poetry -# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. -# This is especially recommended for binary packages to ensure reproducibility, and is more -# commonly ignored for libraries. -# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control -#poetry.lock - -# pdm -# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. -#pdm.lock -# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it -# in version control. -# https://pdm.fming.dev/#use-with-ide -.pdm.toml - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# pytype static type analyzer -.pytype/ - -# Cython debug symbols -cython_debug/ - -# PyCharm -# JetBrains specific template is maintained in a separate JetBrains.gitignore that can -# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore -# and can be added to the global gitignore or merged into this file. For a more nuclear -# option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ - -# package version -_version.py diff --git a/tests/data/test_package_generation/.markdownlint.yaml b/tests/data/test_package_generation/.markdownlint.yaml deleted file mode 100644 index 02907b2b..00000000 --- a/tests/data/test_package_generation/.markdownlint.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -MD013: false diff --git a/tests/data/test_package_generation/.pre-commit-config.yaml b/tests/data/test_package_generation/.pre-commit-config.yaml deleted file mode 100644 index 451c91a1..00000000 --- a/tests/data/test_package_generation/.pre-commit-config.yaml +++ /dev/null @@ -1,60 +0,0 @@ -repos: - - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.19 - hooks: - - id: ruff-check - - id: ruff-format - - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.49.1 - hooks: - - id: markdownlint-fix - args: - - --dot - - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.5.6 - hooks: - - id: forbid-tabs - - repo: https://github.com/pappasam/toml-sort - rev: v0.24.4 - hooks: - - id: toml-sort-fix - - repo: https://github.com/astral-sh/ty-pre-commit - rev: v0.0.79 - hooks: - - id: ty - args: - - --group=typechecking - - --isolated - - --no-default-groups - - repo: https://github.com/rbubley/mirrors-prettier - rev: v3.8.4 - hooks: - - id: prettier - args: - - --quote-props=as-needed - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v6.0.0 - hooks: - - id: check-case-conflict - - id: check-docstring-first - - id: check-merge-conflict - - id: check-toml - - id: end-of-file-fixer - - id: mixed-line-ending - args: - - --fix=lf - - id: trailing-whitespace - - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.38.0 - hooks: - # Schemas taken from https://www.schemastore.org/json/ - - id: check-jsonschema - name: "Validate GitHub issue templates" - files: ^\.github/ISSUE_TEMPLATE/.*\.yml$ - exclude: ^\.github/ISSUE_TEMPLATE/config\.yml$ - args: - [ - "--verbose", - "--schemafile", - ".github/schemas/github-issue-forms.json", - ] diff --git a/tests/data/test_package_generation/CITATION.cff b/tests/data/test_package_generation/CITATION.cff deleted file mode 100644 index 1cae98c2..00000000 --- a/tests/data/test_package_generation/CITATION.cff +++ /dev/null @@ -1,10 +0,0 @@ -cff-version: 1.2.0 -message: "If you use this software, please cite it as below." -type: software -authors: - - family-names: "Ator" - given-names: "Eva Lu" - email: "eva.lu.ator@ucl.ac.uk" -repository-code: "https://github.com/test-user/cookiecutter-test" -title: "Cookiecutter Test: description" -license: "MIT" diff --git a/tests/data/test_package_generation/LICENSE.md b/tests/data/test_package_generation/LICENSE.md deleted file mode 100644 index 5b015b78..00000000 --- a/tests/data/test_package_generation/LICENSE.md +++ /dev/null @@ -1,20 +0,0 @@ -# MIT License - -Copyright (c) 2026 Eva Lu Ator - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tests/data/test_package_generation/README.md b/tests/data/test_package_generation/README.md deleted file mode 100644 index 77b805d2..00000000 --- a/tests/data/test_package_generation/README.md +++ /dev/null @@ -1,126 +0,0 @@ -# Cookiecutter Test - -[![prek](https://img.shields.io/badge/prek-enabled-brightgreen?logo=prek&logoColor=white)](https://github.com/j178/prek) -[![Tests status][tests-badge]][tests-link] -[![Linting status][linting-badge]][linting-link] -[![Documentation status][documentation-badge]][documentation-link] -[![License][license-badge]](./LICENSE.md) - - -[tests-badge]: https://github.com/test-user/cookiecutter-test/actions/workflows/tests.yml/badge.svg -[tests-link]: https://github.com/test-user/cookiecutter-test/actions/workflows/tests.yml -[linting-badge]: https://github.com/test-user/cookiecutter-test/actions/workflows/linting.yml/badge.svg -[linting-link]: https://github.com/test-user/cookiecutter-test/actions/workflows/linting.yml -[documentation-badge]: https://github.com/test-user/cookiecutter-test/actions/workflows/docs.yml/badge.svg -[documentation-link]: https://github.com/test-user/cookiecutter-test/actions/workflows/docs.yml -[license-badge]: https://img.shields.io/badge/License-MIT-yellow.svg - - -description - -This project is developed in collaboration with the -[Centre for Advanced Research Computing](https://ucl.ac.uk/arc), University -College London. - -## About - -### Project Team - -Eva Lu Ator ([eva.lu.ator@ucl.ac.uk](mailto:eva.lu.ator@ucl.ac.uk)) - - - -### Research Software Engineering Contact - -Centre for Advanced Research Computing, University College London -([arc.collaborations@ucl.ac.uk](mailto:arc.collaborations@ucl.ac.uk)) - -## Built With - - - -- [Framework 1](https://something.com) -- [Framework 2](https://something.com) -- [Framework 3](https://something.com) - -## Getting Started - -### Prerequisites - - - -`cookiecutter-test` requires Python 3.11–3.14. - -### Installation - - - -We recommend installing in a project specific virtual environment created using -a environment management tool such as -[uv](https://docs.astral.sh/uv/). To install the latest -development version of `cookiecutter-test` using `uv pip` in the currently active -environment run - -```sh -uv pip install git+https://github.com/test-user/cookiecutter-test.git -``` - -Alternatively create a local clone of the repository with - -```sh -git clone https://github.com/test-user/cookiecutter-test.git -``` - -and then install in editable mode by running - -```sh -uv pip install -e . -``` - -### Running Locally - -How to run the application on your local system. - -### Running Tests - - - -Tests can be run across all compatible Python versions in isolated environments -using [`tox`](https://tox.wiki/en/latest/) by running - -```sh -tox -``` - -To run tests manually in a Python environment with `pytest` installed run - -```sh -pytest tests -``` - -again from the root of the repository. - -### Building Documentation - -The MkDocs HTML documentation can be built locally by running - -```sh -tox -e docs -``` - -from the root of the repository. The built documentation will be written to -`site`. - -Alternatively to build and preview the documentation locally, in a Python -environment with the `docs` dependency group installed, run - -```sh -mkdocs serve -``` - -## Roadmap - -- [x] Initial Research -- [ ] Minimum viable product <-- You are Here -- [ ] Alpha Release -- [ ] Feature-Complete Release diff --git a/tests/data/test_package_generation/docs/LICENSE.md b/tests/data/test_package_generation/docs/LICENSE.md deleted file mode 100644 index 75b899af..00000000 --- a/tests/data/test_package_generation/docs/LICENSE.md +++ /dev/null @@ -1,3 +0,0 @@ - - -{! include-markdown "../LICENSE.md" !} diff --git a/tests/data/test_package_generation/docs/api.md b/tests/data/test_package_generation/docs/api.md deleted file mode 100644 index e39bfc57..00000000 --- a/tests/data/test_package_generation/docs/api.md +++ /dev/null @@ -1,3 +0,0 @@ -# API reference - -::: cookiecutter_test diff --git a/tests/data/test_package_generation/docs/index.md b/tests/data/test_package_generation/docs/index.md deleted file mode 100644 index e8a17ad1..00000000 --- a/tests/data/test_package_generation/docs/index.md +++ /dev/null @@ -1,3 +0,0 @@ - - -{! include-markdown "../README.md" rewrite-relative-urls=false !} diff --git a/tests/data/test_package_generation/mkdocs.yml b/tests/data/test_package_generation/mkdocs.yml deleted file mode 100644 index d3abb6a7..00000000 --- a/tests/data/test_package_generation/mkdocs.yml +++ /dev/null @@ -1,63 +0,0 @@ -site_name: "Cookiecutter Test" -site_description: "Documentation website for Cookiecutter Test" -site_author: "Eva Lu Ator" -copyright: "Copyright © 2026 Eva Lu Ator" -repo_url: "https://github.com/test-user/cookiecutter-test/" -repo_name: "test-user/cookiecutter-test" -edit_uri: edit/main/docs/ - -validation: - omitted_files: warn - absolute_links: warn - unrecognized_links: warn - -theme: - name: "material" - features: - - content.action.edit - palette: - - media: "(prefers-color-scheme)" - toggle: - icon: material/brightness-auto - name: Switch to light mode - - media: "(prefers-color-scheme: light)" - scheme: default - toggle: - icon: material/brightness-7 - name: Switch to dark mode - - media: "(prefers-color-scheme: dark)" - scheme: slate - toggle: - icon: material/brightness-4 - name: Switch to system preference - icon: - repo: fontawesome/brands/github - -nav: - - Overview: index.md - - API reference: api.md - - License: LICENSE.md - -markdown_extensions: - - pymdownx.tasklist - -plugins: - - search - - mkdocstrings: - default_handler: python - handlers: - python: - inventories: - - "https://docs.python.org/3/objects.inv" - options: - docstring_style: google - show_submodules: true - paths: [src] - - include-markdown: - opening_tag: "{!" - closing_tag: "!}" - -extra: - social: - - icon: fontawesome/brands/github - link: "https://github.com/test-user" diff --git a/tests/data/test_package_generation/pyproject.toml b/tests/data/test_package_generation/pyproject.toml deleted file mode 100644 index 92fbc13c..00000000 --- a/tests/data/test_package_generation/pyproject.toml +++ /dev/null @@ -1,154 +0,0 @@ -[build-system] -build-backend = "setuptools.build_meta" -requires = [ - "setuptools", - "setuptools-scm", -] - -[dependency-groups] -dev = [ - "build", - "prek", - "ruff", - "tox", - "twine", - "ty", -] -docs = [ - "mkdocs-include-markdown-plugin", - "mkdocs-material", - "mkdocs<2", - "mkdocstrings", - "mkdocstrings-python", -] -test = [ - "pytest", - "pytest-cov", -] -typechecking = [ - "pytest", -] - -[project] -authors = [ - {email = "eva.lu.ator@ucl.ac.uk", name = "Eva Lu Ator"}, -] -classifiers = [ - "Operating System :: POSIX", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: 3.14", - "Typing :: Typed", -] -dependencies = [ -] -description = "description" -dynamic = [ - "version", -] -keywords = [ -] -license = "MIT" -license-files = [ - "LICENSE.md", -] -name = "cookiecutter-test" -readme = "README.md" -requires-python = ">=3.11" -urls.homepage = "https://github.com/test-user/cookiecutter-test" - -[tool.coverage] -report = {sort = "cover"} -run = {branch = true, parallel = true, source = [ - "cookiecutter-test", -]} -paths.source = [ - "src", - ".tox*/*/lib/python*/site-packages", -] - -[tool.pytest.ini_options] -addopts = [ - "--color=yes", - "--import-mode=importlib", - "--verbose", -] -testpaths = [ - "tests", -] - -[tool.ruff] -fix = true -force-exclude = true -lint.ignore = [ - "COM812", # trailing commas (ruff-format recommended) - "D203", # no-blank-line-before-class - "D212", # multi-line-summary-first-line - "D407", # removed dashes lines under sections - "D417", # argument description in docstring (unreliable) - "ISC001", # simplify implicit str concatenation (ruff-format recommended) -] -lint.per-file-ignores = {"tests*" = [ - "INP001", # File is part of an implicit namespace package. - "S101", # Use of `assert` detected -]} -lint.select = [ - "ALL", -] -lint.isort.known-first-party = [ - "cookiecutter_test", -] -lint.mccabe.max-complexity = 18 -lint.pep8-naming.classmethod-decorators = [ - "classmethod", -] - -[tool.setuptools_scm] -local_scheme = "no-local-version" -write_to = "src/cookiecutter_test/_version.py" - -[tool.tomlsort] -all = true -spaces_indent_inline_array = 4 -trailing_comma_inline_array = true -overrides."project.classifiers".inline_arrays = false -overrides."tool.coverage.paths.source".inline_arrays = false -overrides."tool.tox.env.docs.commands".inline_arrays = false -overrides."tool.tox.env_run_base.commands".inline_arrays = false - -[tool.tox] -env_list = [ - "py311", - "py312", - "py313", - "py314", -] -env_run_base = {commands = [ - [ - "pytest", - "--cov", - "--cov-report=xml", - ], -], dependency_groups = [ - "test", -]} -env.docs = {commands = [ - [ - "mkdocs", - "build", - "--strict", - ], -], dependency_groups = [ - "docs", -]} -gh.python."3.11" = ["py311"] -gh.python."3.12" = ["py312"] -gh.python."3.13" = ["py313"] -gh.python."3.14" = ["py314"] - -[tool.ty] -analysis.respect-type-ignore-comments = false -terminal.error-on-warning = true diff --git a/tests/data/test_package_generation/src/cookiecutter_test/__init__.py b/tests/data/test_package_generation/src/cookiecutter_test/__init__.py deleted file mode 100644 index a37fbaec..00000000 --- a/tests/data/test_package_generation/src/cookiecutter_test/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -"""cookiecutter_test package.""" - -from ._version import __version__ # noqa: F401 - - -def example_function(argument: str, keyword_argument: str = "default") -> str: - """ - Concatenate string arguments - an example function docstring. - - Args: - argument: An argument. - keyword_argument: A keyword argument with a default value. - - Returns: - The concatenation of `argument` and `keyword_argument`. - - """ - return argument + keyword_argument diff --git a/tests/data/test_package_generation/tests/test_dummy.py b/tests/data/test_package_generation/tests/test_dummy.py deleted file mode 100644 index 0c1c580e..00000000 --- a/tests/data/test_package_generation/tests/test_dummy.py +++ /dev/null @@ -1,6 +0,0 @@ -"""An example set of tests.""" - - -def test_stupid_example() -> None: - """Test is merely a placeholder.""" - assert True diff --git a/tests/test_package_generation.py b/tests/test_package_generation.py index daa85be0..8e8806fe 100644 --- a/tests/test_package_generation.py +++ b/tests/test_package_generation.py @@ -1,9 +1,6 @@ """Checks that the cookiecutter works.""" -import difflib -import os import pathlib -import shutil import subprocess import typing @@ -11,79 +8,38 @@ import pytest_venv # type: ignore[import-not-found] -def get_all_files_folders(root_path: pathlib.Path) -> set[pathlib.Path]: - """ - Get all files and folders under a directory. - - The paths are returned relative to the root path given. - __pycache__ directories and .DS_Store files are ignored. - """ - file_set: set[pathlib.Path] = set() - for dirpath, _, filenames in os.walk(root_path): - dirpath_path = pathlib.Path(dirpath).relative_to(root_path) - if dirpath_path.name == "__pycache__": - continue - - # Add this directory - file_set.update((dirpath_path,)) - # Add any files in it - for filename in filenames: - if filename == ".DS_Store": - continue - file_set.update((dirpath_path / filename,)) - - return file_set - - def test_package_generation( default_config_with: typing.Callable, generate_package: typing.Callable, ) -> None: - """Test package generation.""" - # Not having a git repo makes it easier to check in/out reference - # data files to the main python-tooling git repository + """ + Test package generation works. + + Ensures that the template can be cookiecut, and that the default project name is as + expected from the default config fixture. + """ config = default_config_with(initialise_git_repository="False") - _, test_project_dir = generate_package(config=config) + result, test_project_dir = generate_package(config=config) - expected_package_dir = ( - pathlib.Path(__file__).parent / "data" / "test_package_generation" - ) + assert result.returncode == 0, result.stderr assert test_project_dir.exists(), "Project directory does not exist." - actual_files = get_all_files_folders(test_project_dir) - expected_files = get_all_files_folders(expected_package_dir) - - assert actual_files == expected_files - - # Check diff between actual and expected file contents - diff = "" - for file in actual_files: - actual_file = test_project_dir / file - expected_file = expected_package_dir / file - - if actual_file.is_dir(): - continue - - with actual_file.open() as f1, expected_file.open() as f2: - diff += "".join( - difflib.unified_diff( - f1.readlines(), - f2.readlines(), - fromfile=str(actual_file), - tofile=str(expected_file), - ), - ) - - if diff: - shutil.rmtree(expected_package_dir) - shutil.move(test_project_dir, expected_package_dir) - msg = ( - "Non-zero diff between generated files and expected files.\n" - "Test data files have been modified with new content.\n" - "Diff is:\n" - f"{diff}" - ) - raise RuntimeError(msg) + expected = ( + pathlib.Path("README.md"), + pathlib.Path("pyproject.toml"), + pathlib.Path("docs/index.md"), + pathlib.Path("src/cookiecutter_test/__init__.py"), + ) + for file in expected: + assert (test_project_dir / file).is_file(), f"Missing generated file: {file}" + + readme_text = (test_project_dir / "README.md").read_text() + pyproject_text = (test_project_dir / "pyproject.toml").read_text() + package_text = (test_project_dir / "src/cookiecutter_test/__init__.py").read_text() + assert "# Cookiecutter Test" in readme_text + assert 'name = "cookiecutter-test"' in pyproject_text + assert 'description = "description"' in pyproject_text + assert '"cookiecutter_test package."' in package_text def test_pip_installable(