# This issue template was adapted from the NumPy project
# under the BSD 3-Clause "New" or "Revised" License.
# Copyright (c) 2005-2022, NumPy Developers.
# All rights reserved.

name: Bug report
description: Report a bug. For security vulnerabilities see Report a security vulnerability in the templates.
title: "BUG: <Please write a comprehensive title after the 'BUG: ' prefix>"
labels: [bug]

body:
- type: markdown
  attributes:
    value: >
      Thank you for taking the time to file a bug report. Before creating a new
      issue, please make sure to take a few minutes to check the issue tracker
      for existing issues about the bug. If you do not face a bug but rather a 
      general question, please create a discussion thread at 
      [Discussion](https://github.com/pymc-devs/pytensor/discussions)

- type: textarea
  attributes:
    label: "Describe the issue:"
  validations:
    required: true

- type: textarea
  attributes:
    label: "Reproducable code example:"
    description: >
      A short code example that reproduces the problem/missing feature. It
      should be self-contained, i.e., can be copy-pasted into the Python
      interpreter or run as-is via `python myproblem.py`.
    placeholder: |
      import pytensor
      import pytensor.tensor as pt
      << your code here >>
    render: python
  validations:
    required: true

- type: textarea
  attributes:
    label: "Error message:"
    description: >
      Please include the full error message below.
    placeholder: |
      <details>
      << Full traceback starting from `Traceback: ...` >>
      </details>
    render: shell

- type: textarea
  attributes:
    label: "PyTensor version information:"
    description: >
      PyTensor Version:
      Python Version:
      Operating system:
      How did you install pytensor: (conda/pip)
      Specific config for the issue if any
      (you may use `python -c "import pytensor; print(pytensor.config)"` 
      to get it and enclose in `<details>` `</details>`)
    placeholder: |
      <details>
      configuration information
      </details>
  validations:
    required: true

- type: textarea
  attributes:
    label: "Context for the issue:"
    description: |
      Please explain how this issue affects your work or why it should be prioritized.
    placeholder: |
      << your explanation here >>
  validations:
    required: false
