From a9931d430e227df28d92996647bf97f7aa4a13d8 Mon Sep 17 00:00:00 2001 From: Daniel Fremont Date: Sat, 24 Feb 2024 14:51:35 -0800 Subject: [PATCH 01/17] upgrade to Tox 4; document how to use it --- docs/developing.rst | 15 +++++++++++++++ pyproject.toml | 2 +- tox.ini | 3 ++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/developing.rst b/docs/developing.rst index 044f88ced..97bdfe8e0 100644 --- a/docs/developing.rst +++ b/docs/developing.rst @@ -58,6 +58,21 @@ If you're running the test suite on a headless server or just want to stop windo popping up during testing, use the :command:`--no-graphics` option to skip graphical tests. +Prior to finalizing a PR or other substantial changes, it's a good idea to run the test suite under all major versions of Python that Scenic supports, in fresh virtual environments. +You can do this automatically with the command :command:`tox`, which by default will test all supported major versions both with and without optional dependencies (this will take a long time). +Some variations: + +* :command:`tox -p` will run the various combinations in parallel. + +* :command:`tox -m basic` skips testing installations with the optional dependencies. + +* :command:`tox -- --fast` only runs the "fast" tests. In general, any arguments after the :command:`--` will get passed to ``pytest``. For example, + +* :command:`tox -- tests/syntax/test_specifiers.py` only runs the tests in the given file. + +See the `Tox `_ website for more information about the available options and how to configure Tox. + + .. _debugging: Debugging diff --git a/pyproject.toml b/pyproject.toml index 796b96bd9..23ed55d81 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,7 +79,7 @@ dev = [ "isort ~= 5.11", "pre-commit ~= 3.0", "pytest-cov >= 3.0.0", - "tox ~= 3.14", + "tox ~= 4.0", ] [project.urls] diff --git a/tox.ini b/tox.ini index 365ce524a..e08482b81 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,7 @@ [tox] -isolated_build = true envlist = py{38,39,310,311,312}{,-extras} +labels = + basic = py{38,39,310,311,312} [testenv] extras = From a3ed9e2757882ff63279c0b62f3c7362f3927454 Mon Sep 17 00:00:00 2001 From: Armando Banuelos Date: Mon, 4 Mar 2024 16:50:38 -0800 Subject: [PATCH 02/17] feat: adding ISSUE_TEMPLATE to facilitate issue triage --- .../workflows/ISSUE_TEMPLATE/issue_report.md | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/ISSUE_TEMPLATE/issue_report.md diff --git a/.github/workflows/ISSUE_TEMPLATE/issue_report.md b/.github/workflows/ISSUE_TEMPLATE/issue_report.md new file mode 100644 index 000000000..cc2cf0665 --- /dev/null +++ b/.github/workflows/ISSUE_TEMPLATE/issue_report.md @@ -0,0 +1,29 @@ +### Issue Type +- [x] **Bug Report** +- [ ] **Feature Request** +- [ ] **Question** + +### System Details +1. Python Version: + +2. Scenic Version: + +3. Full Stack Trace: + +4. OS: + + +### Description + + +### Steps to Reproduce (***Bug Report only***) + + +### Expected Behavior + + +### Actual Behavior + + +### Additional Information + \ No newline at end of file From f9cb0f06ee27914030bf178e3b5d68d5aefd2c94 Mon Sep 17 00:00:00 2001 From: Armando Banuelos Date: Wed, 6 Mar 2024 19:30:55 -0800 Subject: [PATCH 03/17] feat: adding new issue templates --- .../workflows/ISSUE_TEMPLATE/bug_report.yaml | 66 +++++++++++++++++++ .github/workflows/ISSUE_TEMPLATE/config.yaml | 5 ++ .../ISSUE_TEMPLATE/documentation.yaml | 33 ++++++++++ .../ISSUE_TEMPLATE/feature_request.yaml | 31 +++++++++ .../workflows/ISSUE_TEMPLATE/issue_report.md | 29 -------- .../ISSUE_TEMPLATE/simulator_failure.yaml | 50 ++++++++++++++ .../ISSUE_TEMPLATE/test_failure.yaml | 60 +++++++++++++++++ 7 files changed, 245 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/ISSUE_TEMPLATE/bug_report.yaml create mode 100644 .github/workflows/ISSUE_TEMPLATE/config.yaml create mode 100644 .github/workflows/ISSUE_TEMPLATE/documentation.yaml create mode 100644 .github/workflows/ISSUE_TEMPLATE/feature_request.yaml delete mode 100644 .github/workflows/ISSUE_TEMPLATE/issue_report.md create mode 100644 .github/workflows/ISSUE_TEMPLATE/simulator_failure.yaml create mode 100644 .github/workflows/ISSUE_TEMPLATE/test_failure.yaml diff --git a/.github/workflows/ISSUE_TEMPLATE/bug_report.yaml b/.github/workflows/ISSUE_TEMPLATE/bug_report.yaml new file mode 100644 index 000000000..768338ea4 --- /dev/null +++ b/.github/workflows/ISSUE_TEMPLATE/bug_report.yaml @@ -0,0 +1,66 @@ +name: Bug Report +description: Create a report to help us reproduce and fix a bug +labels: ["type: bug", "status: triage"] + +body: + - type: markdown + attributes: + value: > + #### Thank you for contributing! Before reporting a bug, please make sure it has no duplicate and/or has already been addressed by searching through [the existing and past issues](https://github.com/BerkeleyLearnVerify/Scenic/issues) + + - type: textarea + attributes: + label: System Details + description: | + Please provide the following system information to help us diagnose the bug. + placeholder: | + 1. Python Version: `python --version` + 2. Scenic Version: `scenic --version` + 3. Operating System / Platform: get from system preferences + + Example: + 1. Python Version: Python 3.11.7 + 2. Scenic Version: Scenic 3.0.0b2 + 3. Operating System / Platform: Apple M2 Pro macOS Sonoma 14.2.1 + validations: + required: true + + - type: textarea + attributes: + label: Detailed Description + description: | + Please provide a clear and concise description of what the bug is and paste the error log below. Please rerun your simulation error with the `-b` parameter for a full stack trace. + It helps improving readability if the error log is wrapped in ```` ```triple quotes blocks``` ````. + placeholder: | + A clear and concise description of what the bug is. You can rerun your Scenic simulation with `-b` to get a full stack trace. + + ``` + # error full stack trace + ``` + validations: + required: true + + - type: textarea + attributes: + label: Steps To Reproduce + description: | + Please provide a minimal example to help us reproduce the bug. Code should be wrapped with ```` ```triple quotes blocks``` ```` to improve readability. If the code is too long, please attach as a file or create and link a public gist: https://gist.github.com. + Related data files (images, videos, etc) should be attached below as well. If the data files are too big, feel free to upload them to a online drive, share them and put the link below. + placeholder: | + 1. First step to reproduce bug + 2. Second step, etc + ... + ``` + # sample code to reproduce the bug + ``` + validations: + required: true + + - type: checkboxes + attributes: + label: Issue Submission Checklist + options: + - label: I report the issue, it's not a question + required: true + - label: I checked the open issues, forum, etc. and have not found any solution + - label: There is reproducer code and related data files (videos, images, online drive links, etc) \ No newline at end of file diff --git a/.github/workflows/ISSUE_TEMPLATE/config.yaml b/.github/workflows/ISSUE_TEMPLATE/config.yaml new file mode 100644 index 000000000..aad874b05 --- /dev/null +++ b/.github/workflows/ISSUE_TEMPLATE/config.yaml @@ -0,0 +1,5 @@ +blank_issues_enabled: true +contact_links: + - name: Questions + url: https://scenic-lang.readthedocs.io/ + about: Ask questions and discuss with Scenic community members \ No newline at end of file diff --git a/.github/workflows/ISSUE_TEMPLATE/documentation.yaml b/.github/workflows/ISSUE_TEMPLATE/documentation.yaml new file mode 100644 index 000000000..a4d8bf4a5 --- /dev/null +++ b/.github/workflows/ISSUE_TEMPLATE/documentation.yaml @@ -0,0 +1,33 @@ +name: Documentation +description: Report an issue or enhancement related to https://scenic-lang.readthedocs.io/ +labels: ["type: documentation", "status: triage"] + +body: +- type: markdown + attributes: + value: > + #### Thank you for contributing! Before submitting a doc issue, please make sure it has no duplicate and/or has already been addressed by searching through [the existing and past issues](https://github.com/BerkeleyLearnVerify/Scenic/issues) + +- type: textarea + attributes: + label: Describe the doc issue or enhancement + description: > + Please provide a clear and concise description of what content in https://scenic-lang.readthedocs.io/ is an issue or needs enhancement. + placeholder: | + Link to location in the docs: https://scenic-lang.readthedocs.io/ + validations: + required: true +- type: textarea + attributes: + label: Fix suggestion + description: > + Tell us how we could improve the documentation in this regard. + + - type: checkboxes + attributes: + label: Issue Submission Checklist + options: + - label: I report the issue, it's not a question + required: true + - label: I checked the open issues, forum, etc. and have not found any solution + - label: There is reproducer code and related data files (videos, images, online drive links, etc) \ No newline at end of file diff --git a/.github/workflows/ISSUE_TEMPLATE/feature_request.yaml b/.github/workflows/ISSUE_TEMPLATE/feature_request.yaml new file mode 100644 index 000000000..939710021 --- /dev/null +++ b/.github/workflows/ISSUE_TEMPLATE/feature_request.yaml @@ -0,0 +1,31 @@ +name: Feature Request +description: Submit a request for a new Scenic features +labels: ["type: feature", "status: triage"] + +body: +- type: markdown + attributes: + value: > + #### Thank you for contributing! Before submitting a feature request, please make sure it has no duplicate and/or has already been addressed by searching through [the existing and past issues](https://github.com/BerkeleyLearnVerify/Scenic/issues) + +- type: textarea + attributes: + label: Describe the feature and motivation + description: | + Please provide a clear and concise proposal of the feature and outline the motivation. + validations: + required: true +- type: textarea + attributes: + label: Additional context + description: | + Add any other context, such as pseudo code, links, diagram, screenshots, to help the community better understand the feature request. + +- type: checkboxes +attributes: +label: Issue Submission Checklist +options: + - label: I report the issue, it's not a question + required: true + - label: I checked the open issues, forum, etc. and have not found any solution + - label: There is reproducer code and related data files (videos, images, online drive links, etc) \ No newline at end of file diff --git a/.github/workflows/ISSUE_TEMPLATE/issue_report.md b/.github/workflows/ISSUE_TEMPLATE/issue_report.md deleted file mode 100644 index cc2cf0665..000000000 --- a/.github/workflows/ISSUE_TEMPLATE/issue_report.md +++ /dev/null @@ -1,29 +0,0 @@ -### Issue Type -- [x] **Bug Report** -- [ ] **Feature Request** -- [ ] **Question** - -### System Details -1. Python Version: - -2. Scenic Version: - -3. Full Stack Trace: - -4. OS: - - -### Description - - -### Steps to Reproduce (***Bug Report only***) - - -### Expected Behavior - - -### Actual Behavior - - -### Additional Information - \ No newline at end of file diff --git a/.github/workflows/ISSUE_TEMPLATE/simulator_failure.yaml b/.github/workflows/ISSUE_TEMPLATE/simulator_failure.yaml new file mode 100644 index 000000000..a7e84da98 --- /dev/null +++ b/.github/workflows/ISSUE_TEMPLATE/simulator_failure.yaml @@ -0,0 +1,50 @@ +name: Simulator Failure +description: A failure regarding Scenic interaction with a simulator +labels: ["type: simulator", "status: triage"] + +body: + - type: markdown + attributes: + value: > + #### Thank you for contributing! Before reporting a simulator failure, please make sure it has no duplicate and/or has already been addressed by searching through [the existing and past issues](https://github.com/BerkeleyLearnVerify/Scenic/issues) + + - type: textarea + attributes: + label: Simulator Details + description: | + Please provide the following simulator information to help us diagnose the issue. + placeholder: | + 1. Simulator Version: simulator details + 2. Operating System / Platform: get from system preferences + + Example: + 1. Simulator Version: CARLA 0.9.14 + 2. Operating System / Platform: Apple M2 Pro macOS Sonoma 14.2.1 + validations: + required: true + + - type: textarea + attributes: + label: Detailed Description + description: | + Please provide a clear and concise description of what the bug is and paste the error log below. Please rerun your simulation error with the `-b` parameter for a full stack trace. + It helps improving readability if the error log is wrapped in ```` ```triple quotes blocks``` ````. + + Related data files (images, videos, etc) should be attached below as well. If the data files are too big, feel free to upload them to a online drive, share them and put the link below. + placeholder: | + A clear and concise description of what the bug is. You can rerun your Scenic simulation with `-b` to get a full stack trace. + + ``` + # error full stack trace + ``` + validations: + required: true + + - type: checkboxes + attributes: + label: Issue Submission Checklist + options: + - label: I report the issue, it's not a question + required: true + - label: I checked the open issues, forum, etc. and have not found any solution + - label: There is reproducer code and related data files (videos, images, online drive links, etc) \ No newline at end of file diff --git a/.github/workflows/ISSUE_TEMPLATE/test_failure.yaml b/.github/workflows/ISSUE_TEMPLATE/test_failure.yaml new file mode 100644 index 000000000..2099faa6f --- /dev/null +++ b/.github/workflows/ISSUE_TEMPLATE/test_failure.yaml @@ -0,0 +1,60 @@ +name: Test Failure +description: A test failure in CI +labels: ["type: test", "status: triage"] + +body: + - type: markdown + attributes: + value: > + #### Thank you for contributing! Before reporting a test failure, please make sure it has no duplicate and/or has already been addressed by searching through [the existing and past issues](https://github.com/BerkeleyLearnVerify/Scenic/issues) + + - type: input + id: link + attributes: + label: CI Link + description: A link to a Github Actions or Jenkins job with the failure + validations: + required: true + - type: dropdown + id: reproducible + attributes: + label: Does it reproduce? + options: + - "Yes" + - "No" + - "Didn't try" + validations: + required: true + + - type: input + id: branches + attributes: + label: Applicable branches + description: Branch names this failure has occurred on + validations: + required: true + + - type: input + id: history + attributes: + label: Failure history + description: Link to build stats and possible indication of when this started failing and how often + validations: + required: false + + - type: textarea + id: excerpt + attributes: + label: Failure excerpt + description: Please add a brief description of the error or exception that has occurred + validations: + required: true + + - type: checkboxes + attributes: + label: Issue Submission Checklist + options: + - label: I report the issue, it's not a question + required: true + - label: I checked the open issues, forum, etc. and have not found any solution + - label: There is reproducer code and related data files (videos, images, online drive links, etc) \ No newline at end of file From 0f62918cf02fc24a0a7cc3fc0b0cea61ae4907fc Mon Sep 17 00:00:00 2001 From: Armando Banuelos Date: Wed, 6 Mar 2024 19:42:48 -0800 Subject: [PATCH 04/17] fix: reformatting yaml files and re-editing checklist items --- .../workflows/ISSUE_TEMPLATE/bug_report.yaml | 96 ++++++++++--------- .../ISSUE_TEMPLATE/documentation.yaml | 54 ++++++----- .../ISSUE_TEMPLATE/feature_request.yaml | 53 +++++----- .../ISSUE_TEMPLATE/simulator_failure.yaml | 50 ---------- .../ISSUE_TEMPLATE/test_failure.yaml | 22 ++--- 5 files changed, 115 insertions(+), 160 deletions(-) delete mode 100644 .github/workflows/ISSUE_TEMPLATE/simulator_failure.yaml diff --git a/.github/workflows/ISSUE_TEMPLATE/bug_report.yaml b/.github/workflows/ISSUE_TEMPLATE/bug_report.yaml index 768338ea4..d1026af6a 100644 --- a/.github/workflows/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/workflows/ISSUE_TEMPLATE/bug_report.yaml @@ -1,66 +1,68 @@ name: Bug Report description: Create a report to help us reproduce and fix a bug -labels: ["type: bug", "status: triage"] +labels: + - "type: bug" + - "status: triage" body: - type: markdown attributes: - value: > - #### Thank you for contributing! Before reporting a bug, please make sure it has no duplicate and/or has already been addressed by searching through [the existing and past issues](https://github.com/BerkeleyLearnVerify/Scenic/issues) + value: > + #### Thank you for contributing! Before reporting a bug, please make sure it has no duplicate and/or has already been addressed by searching through [the existing and past issues](https://github.com/BerkeleyLearnVerify/Scenic/issues) - type: textarea attributes: - label: System Details - description: | - Please provide the following system information to help us diagnose the bug. - placeholder: | - 1. Python Version: `python --version` - 2. Scenic Version: `scenic --version` - 3. Operating System / Platform: get from system preferences - - Example: - 1. Python Version: Python 3.11.7 - 2. Scenic Version: Scenic 3.0.0b2 - 3. Operating System / Platform: Apple M2 Pro macOS Sonoma 14.2.1 - validations: - required: true + label: System Details + description: | + Please provide the following system information to help us diagnose the bug. + placeholder: | + 1. Python Version: `python --version` + 2. Scenic Version: `scenic --version` + 3. Operating System / Platform: get from system preferences + + Example: + 1. Python Version: Python 3.11.7 + 2. Scenic Version: Scenic 3.0.0b2 + 3. Operating System / Platform: Apple M2 Pro macOS Sonoma 14.2.1 + validations: + required: true - type: textarea attributes: - label: Detailed Description - description: | - Please provide a clear and concise description of what the bug is and paste the error log below. Please rerun your simulation error with the `-b` parameter for a full stack trace. - It helps improving readability if the error log is wrapped in ```` ```triple quotes blocks``` ````. - placeholder: | - A clear and concise description of what the bug is. You can rerun your Scenic simulation with `-b` to get a full stack trace. - - ``` - # error full stack trace - ``` - validations: - required: true + label: Detailed Description + description: | + Please provide a clear and concise description of what the bug is and paste the error log below. Please rerun your simulation error with the `-b` parameter for a full stack trace. + It helps improving readability if the error log is wrapped in ```triple quotes blocks```. + placeholder: | + A clear and concise description of what the bug is. You can rerun your Scenic simulation with `-b` to get a full stack trace. + + ``` + # error full stack trace + ``` + validations: + required: true - type: textarea attributes: - label: Steps To Reproduce - description: | - Please provide a minimal example to help us reproduce the bug. Code should be wrapped with ```` ```triple quotes blocks``` ```` to improve readability. If the code is too long, please attach as a file or create and link a public gist: https://gist.github.com. - Related data files (images, videos, etc) should be attached below as well. If the data files are too big, feel free to upload them to a online drive, share them and put the link below. - placeholder: | - 1. First step to reproduce bug - 2. Second step, etc - ... - ``` - # sample code to reproduce the bug - ``` - validations: - required: true + label: Steps To Reproduce + description: | + Please provide a minimal example to help us reproduce the bug. Code should be wrapped with ```triple quotes blocks``` to improve readability. If the code is too long, please attach as a file or create and link a public gist: https://gist.github.com. + Related data files (images, videos, etc.) should be attached below as well. If the data files are too big, feel free to upload them to an online drive, share them, and put the link below. + placeholder: | + 1. First step to reproduce bug + 2. Second step, etc + ... + ``` + # sample code to reproduce the bug + ``` + validations: + required: true - type: checkboxes attributes: - label: Issue Submission Checklist - options: - - label: I report the issue, it's not a question + label: Issue Submission Checklist + options: + - label: I report the issue, it's not a question required: true - - label: I checked the open issues, forum, etc. and have not found any solution - - label: There is reproducer code and related data files (videos, images, online drive links, etc) \ No newline at end of file + - label: I checked the open issues, forum, etc. and have not found any solution + - label: There is reproducer code and related data files (videos, images, online drive links, etc) diff --git a/.github/workflows/ISSUE_TEMPLATE/documentation.yaml b/.github/workflows/ISSUE_TEMPLATE/documentation.yaml index a4d8bf4a5..f0742837c 100644 --- a/.github/workflows/ISSUE_TEMPLATE/documentation.yaml +++ b/.github/workflows/ISSUE_TEMPLATE/documentation.yaml @@ -1,33 +1,35 @@ name: Documentation description: Report an issue or enhancement related to https://scenic-lang.readthedocs.io/ -labels: ["type: documentation", "status: triage"] +labels: + - "type: documentation" + - "status: triage" body: -- type: markdown - attributes: - value: > - #### Thank you for contributing! Before submitting a doc issue, please make sure it has no duplicate and/or has already been addressed by searching through [the existing and past issues](https://github.com/BerkeleyLearnVerify/Scenic/issues) + - type: markdown + attributes: + value: > + #### Thank you for contributing! Before submitting a doc issue, please make sure it has no duplicate and/or has already been addressed by searching through [the existing and past issues](https://github.com/BerkeleyLearnVerify/Scenic/issues) -- type: textarea - attributes: - label: Describe the doc issue or enhancement - description: > - Please provide a clear and concise description of what content in https://scenic-lang.readthedocs.io/ is an issue or needs enhancement. - placeholder: | - Link to location in the docs: https://scenic-lang.readthedocs.io/ - validations: - required: true -- type: textarea - attributes: - label: Fix suggestion - description: > - Tell us how we could improve the documentation in this regard. + - type: textarea + attributes: + label: Describe the doc issue or enhancement + description: > + Please provide a clear and concise description of what content in https://scenic-lang.readthedocs.io/ is an issue or needs enhancement. + placeholder: | + Link to location in the docs: https://scenic-lang.readthedocs.io/ + validations: + required: true + + - type: textarea + attributes: + label: Fix suggestion + description: > + Tell us how we could improve the documentation in this regard. - type: checkboxes - attributes: - label: Issue Submission Checklist - options: - - label: I report the issue, it's not a question - required: true - - label: I checked the open issues, forum, etc. and have not found any solution - - label: There is reproducer code and related data files (videos, images, online drive links, etc) \ No newline at end of file + attributes: + label: Issue Submission Checklist + options: + - label: I report the issue, it's not a question + required: true + - label: I checked the open issues, forum, etc. and have not found any solution diff --git a/.github/workflows/ISSUE_TEMPLATE/feature_request.yaml b/.github/workflows/ISSUE_TEMPLATE/feature_request.yaml index 939710021..9dadfdbb5 100644 --- a/.github/workflows/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/workflows/ISSUE_TEMPLATE/feature_request.yaml @@ -1,31 +1,32 @@ name: Feature Request -description: Submit a request for a new Scenic features -labels: ["type: feature", "status: triage"] +description: Submit a request for new Scenic features +labels: + - "type: feature" + - "status: triage" body: -- type: markdown - attributes: - value: > - #### Thank you for contributing! Before submitting a feature request, please make sure it has no duplicate and/or has already been addressed by searching through [the existing and past issues](https://github.com/BerkeleyLearnVerify/Scenic/issues) + - type: markdown + attributes: + value: > + #### Thank you for contributing! Before submitting a feature request, please make sure it has no duplicate and/or has already been addressed by searching through [the existing and past issues](https://github.com/BerkeleyLearnVerify/Scenic/issues) -- type: textarea - attributes: - label: Describe the feature and motivation - description: | - Please provide a clear and concise proposal of the feature and outline the motivation. - validations: - required: true -- type: textarea - attributes: - label: Additional context - description: | - Add any other context, such as pseudo code, links, diagram, screenshots, to help the community better understand the feature request. + - type: textarea + attributes: + label: Describe the feature and motivation + description: | + Please provide a clear and concise proposal of the feature and outline the motivation. + validations: + required: true -- type: checkboxes -attributes: -label: Issue Submission Checklist -options: - - label: I report the issue, it's not a question - required: true - - label: I checked the open issues, forum, etc. and have not found any solution - - label: There is reproducer code and related data files (videos, images, online drive links, etc) \ No newline at end of file + - type: textarea + attributes: + label: Additional context + description: | + Add any other context, such as pseudo code, links, diagrams, screenshots, to help the community better understand the feature request. + + - type: checkboxes + attributes: + label: Issue Submission Checklist + options: + - label: I checked the open issues, forum, etc. and have not found any solution + - label: There is reproducer code and related data files (videos, images, online drive links, etc) diff --git a/.github/workflows/ISSUE_TEMPLATE/simulator_failure.yaml b/.github/workflows/ISSUE_TEMPLATE/simulator_failure.yaml deleted file mode 100644 index a7e84da98..000000000 --- a/.github/workflows/ISSUE_TEMPLATE/simulator_failure.yaml +++ /dev/null @@ -1,50 +0,0 @@ -name: Simulator Failure -description: A failure regarding Scenic interaction with a simulator -labels: ["type: simulator", "status: triage"] - -body: - - type: markdown - attributes: - value: > - #### Thank you for contributing! Before reporting a simulator failure, please make sure it has no duplicate and/or has already been addressed by searching through [the existing and past issues](https://github.com/BerkeleyLearnVerify/Scenic/issues) - - - type: textarea - attributes: - label: Simulator Details - description: | - Please provide the following simulator information to help us diagnose the issue. - placeholder: | - 1. Simulator Version: simulator details - 2. Operating System / Platform: get from system preferences - - Example: - 1. Simulator Version: CARLA 0.9.14 - 2. Operating System / Platform: Apple M2 Pro macOS Sonoma 14.2.1 - validations: - required: true - - - type: textarea - attributes: - label: Detailed Description - description: | - Please provide a clear and concise description of what the bug is and paste the error log below. Please rerun your simulation error with the `-b` parameter for a full stack trace. - It helps improving readability if the error log is wrapped in ```` ```triple quotes blocks``` ````. - - Related data files (images, videos, etc) should be attached below as well. If the data files are too big, feel free to upload them to a online drive, share them and put the link below. - placeholder: | - A clear and concise description of what the bug is. You can rerun your Scenic simulation with `-b` to get a full stack trace. - - ``` - # error full stack trace - ``` - validations: - required: true - - - type: checkboxes - attributes: - label: Issue Submission Checklist - options: - - label: I report the issue, it's not a question - required: true - - label: I checked the open issues, forum, etc. and have not found any solution - - label: There is reproducer code and related data files (videos, images, online drive links, etc) \ No newline at end of file diff --git a/.github/workflows/ISSUE_TEMPLATE/test_failure.yaml b/.github/workflows/ISSUE_TEMPLATE/test_failure.yaml index 2099faa6f..096e483b9 100644 --- a/.github/workflows/ISSUE_TEMPLATE/test_failure.yaml +++ b/.github/workflows/ISSUE_TEMPLATE/test_failure.yaml @@ -1,11 +1,13 @@ name: Test Failure description: A test failure in CI -labels: ["type: test", "status: triage"] +labels: + - "type: test" + - "status: triage" body: - - type: markdown + - type: markdown attributes: - value: > + value: > #### Thank you for contributing! Before reporting a test failure, please make sure it has no duplicate and/or has already been addressed by searching through [the existing and past issues](https://github.com/BerkeleyLearnVerify/Scenic/issues) - type: input @@ -15,6 +17,7 @@ body: description: A link to a Github Actions or Jenkins job with the failure validations: required: true + - type: dropdown id: reproducible attributes: @@ -30,7 +33,7 @@ body: id: branches attributes: label: Applicable branches - description: Branch names this failure has occurred on + description: Branch names this failure has occurred on validations: required: true @@ -51,10 +54,7 @@ body: required: true - type: checkboxes - attributes: - label: Issue Submission Checklist - options: - - label: I report the issue, it's not a question - required: true - - label: I checked the open issues, forum, etc. and have not found any solution - - label: There is reproducer code and related data files (videos, images, online drive links, etc) \ No newline at end of file + attributes: + label: Issue Submission Checklist + options: + - label: I checked the open issues, forum, etc. and have not found any solution From 36c49bc13718ffe7e72093ad8856112ffa0cb0c8 Mon Sep 17 00:00:00 2001 From: Armando Banuelos Date: Wed, 6 Mar 2024 19:47:12 -0800 Subject: [PATCH 05/17] feat: adding simular as option to bug report --- .github/workflows/ISSUE_TEMPLATE/bug_report.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ISSUE_TEMPLATE/bug_report.yaml b/.github/workflows/ISSUE_TEMPLATE/bug_report.yaml index d1026af6a..2f5f9c3e5 100644 --- a/.github/workflows/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/workflows/ISSUE_TEMPLATE/bug_report.yaml @@ -15,15 +15,22 @@ body: label: System Details description: | Please provide the following system information to help us diagnose the bug. + 1. Python Version + 2. Scenic Version + 3. Operating System / Platform + 4. Simulator Version (Optional, only applies if bug is simular specific) + placeholder: | 1. Python Version: `python --version` 2. Scenic Version: `scenic --version` 3. Operating System / Platform: get from system preferences + 4. Simulator Version: simulator version Example: 1. Python Version: Python 3.11.7 2. Scenic Version: Scenic 3.0.0b2 3. Operating System / Platform: Apple M2 Pro macOS Sonoma 14.2.1 + 4. Simulator Version: CARLA 0.9.14 validations: required: true From b491f9f3601c698222dad697aaaecab019eb743a Mon Sep 17 00:00:00 2001 From: Armando Banuelos Date: Thu, 7 Mar 2024 11:14:16 -0800 Subject: [PATCH 06/17] feat: adding pull request template --- .github/workflows/PULL_REQUEST_TEMPLATE.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/PULL_REQUEST_TEMPLATE.md diff --git a/.github/workflows/PULL_REQUEST_TEMPLATE.md b/.github/workflows/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..885fb852c --- /dev/null +++ b/.github/workflows/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,19 @@ +## Pull Request + +### Description + + +### Jira Ticket + + +### Issue Link + + +### Checklist +- [ ] I have tested the changes locally by running `pytest` +- [ ] I have added or updated relevant documentation +- [ ] I have formatted my code with `black` and `isort` by running `make format` +- [ ] I have added test cases (if applicable) + +### Additional Notes + \ No newline at end of file From 042a1dc3006499960c8154e4db9d921ff722b3c6 Mon Sep 17 00:00:00 2001 From: Armando Banuelos Date: Thu, 7 Mar 2024 11:17:50 -0800 Subject: [PATCH 07/17] fix: re-editing markdown --- .github/workflows/PULL_REQUEST_TEMPLATE.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/PULL_REQUEST_TEMPLATE.md b/.github/workflows/PULL_REQUEST_TEMPLATE.md index 885fb852c..5f13338df 100644 --- a/.github/workflows/PULL_REQUEST_TEMPLATE.md +++ b/.github/workflows/PULL_REQUEST_TEMPLATE.md @@ -1,5 +1,3 @@ -## Pull Request - ### Description From 0a3935379f589a8dc2d39ff0ae7d514c8ef43162 Mon Sep 17 00:00:00 2001 From: Armando Banuelos Date: Fri, 8 Mar 2024 10:36:17 -0800 Subject: [PATCH 08/17] fix: removing test failure as discussed with Daniel --- .../ISSUE_TEMPLATE/test_failure.yaml | 60 ------------------- 1 file changed, 60 deletions(-) delete mode 100644 .github/workflows/ISSUE_TEMPLATE/test_failure.yaml diff --git a/.github/workflows/ISSUE_TEMPLATE/test_failure.yaml b/.github/workflows/ISSUE_TEMPLATE/test_failure.yaml deleted file mode 100644 index 096e483b9..000000000 --- a/.github/workflows/ISSUE_TEMPLATE/test_failure.yaml +++ /dev/null @@ -1,60 +0,0 @@ -name: Test Failure -description: A test failure in CI -labels: - - "type: test" - - "status: triage" - -body: - - type: markdown - attributes: - value: > - #### Thank you for contributing! Before reporting a test failure, please make sure it has no duplicate and/or has already been addressed by searching through [the existing and past issues](https://github.com/BerkeleyLearnVerify/Scenic/issues) - - - type: input - id: link - attributes: - label: CI Link - description: A link to a Github Actions or Jenkins job with the failure - validations: - required: true - - - type: dropdown - id: reproducible - attributes: - label: Does it reproduce? - options: - - "Yes" - - "No" - - "Didn't try" - validations: - required: true - - - type: input - id: branches - attributes: - label: Applicable branches - description: Branch names this failure has occurred on - validations: - required: true - - - type: input - id: history - attributes: - label: Failure history - description: Link to build stats and possible indication of when this started failing and how often - validations: - required: false - - - type: textarea - id: excerpt - attributes: - label: Failure excerpt - description: Please add a brief description of the error or exception that has occurred - validations: - required: true - - - type: checkboxes - attributes: - label: Issue Submission Checklist - options: - - label: I checked the open issues, forum, etc. and have not found any solution From 168b870883a3fa8a9084e0ebac9b0216ba6791ad Mon Sep 17 00:00:00 2001 From: Armando Banuelos Date: Fri, 8 Mar 2024 10:38:49 -0800 Subject: [PATCH 09/17] fix: updating PR template based on feedback --- .github/workflows/PULL_REQUEST_TEMPLATE.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/PULL_REQUEST_TEMPLATE.md b/.github/workflows/PULL_REQUEST_TEMPLATE.md index 5f13338df..7e42da70a 100644 --- a/.github/workflows/PULL_REQUEST_TEMPLATE.md +++ b/.github/workflows/PULL_REQUEST_TEMPLATE.md @@ -1,17 +1,15 @@ ### Description -### Jira Ticket - - ### Issue Link ### Checklist -- [ ] I have tested the changes locally by running `pytest` +- [ ] I have tested the changes locally via `pytest` and/or other means - [ ] I have added or updated relevant documentation -- [ ] I have formatted my code with `black` and `isort` by running `make format` +- [ ] I have auto formatted the code to black and istio conventions - [ ] I have added test cases (if applicable) ### Additional Notes - \ No newline at end of file + + \ No newline at end of file From 20961e33f8dc3b80720e722234e1bb46105213cc Mon Sep 17 00:00:00 2001 From: Armando Banuelos Date: Tue, 12 Mar 2024 15:25:55 -0700 Subject: [PATCH 10/17] fix: addressing first round of feedback --- .github/workflows/ISSUE_TEMPLATE/bug_report.yaml | 14 +++++++------- .../workflows/ISSUE_TEMPLATE/documentation.yaml | 6 +++--- .../workflows/ISSUE_TEMPLATE/feature_request.yaml | 5 ++--- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ISSUE_TEMPLATE/bug_report.yaml b/.github/workflows/ISSUE_TEMPLATE/bug_report.yaml index 2f5f9c3e5..30fbbe443 100644 --- a/.github/workflows/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/workflows/ISSUE_TEMPLATE/bug_report.yaml @@ -8,7 +8,7 @@ body: - type: markdown attributes: value: > - #### Thank you for contributing! Before reporting a bug, please make sure it has no duplicate and/or has already been addressed by searching through [the existing and past issues](https://github.com/BerkeleyLearnVerify/Scenic/issues) + #### Thank you for contributing! Before reporting a bug, please make sure it has no duplicate and has not already been addressed by searching through [the existing and past issues](https://github.com/BerkeleyLearnVerify/Scenic/issues) - type: textarea attributes: @@ -18,7 +18,7 @@ body: 1. Python Version 2. Scenic Version 3. Operating System / Platform - 4. Simulator Version (Optional, only applies if bug is simular specific) + 4. Simulator Version (Optional, only applies if bug is simulator specific) placeholder: | 1. Python Version: `python --version` @@ -38,7 +38,7 @@ body: attributes: label: Detailed Description description: | - Please provide a clear and concise description of what the bug is and paste the error log below. Please rerun your simulation error with the `-b` parameter for a full stack trace. + Please provide a clear and concise description of what the bug is and paste the error log below. Please rerun your simulation error with the **`-b`** parameter for a full stack trace. It helps improving readability if the error log is wrapped in ```triple quotes blocks```. placeholder: | A clear and concise description of what the bug is. You can rerun your Scenic simulation with `-b` to get a full stack trace. @@ -53,8 +53,8 @@ body: attributes: label: Steps To Reproduce description: | - Please provide a minimal example to help us reproduce the bug. Code should be wrapped with ```triple quotes blocks``` to improve readability. If the code is too long, please attach as a file or create and link a public gist: https://gist.github.com. - Related data files (images, videos, etc.) should be attached below as well. If the data files are too big, feel free to upload them to an online drive, share them, and put the link below. + Please provide a minimal example to help us reproduce the bug. Code should be wrapped with ```triple quotes blocks``` to improve readability. + If it is not possible to reproduce the bug with a short self-contained Scenic or Python file, for example if a specific mesh is required, you can attach any required files below or include a link to them. placeholder: | 1. First step to reproduce bug 2. Second step, etc @@ -69,7 +69,7 @@ body: attributes: label: Issue Submission Checklist options: - - label: I report the issue, it's not a question + - label: I am reporting an issue, not asking a question required: true - label: I checked the open issues, forum, etc. and have not found any solution - - label: There is reproducer code and related data files (videos, images, online drive links, etc) + - label: I have provided all necessary code, etc. to reproduce the issue diff --git a/.github/workflows/ISSUE_TEMPLATE/documentation.yaml b/.github/workflows/ISSUE_TEMPLATE/documentation.yaml index f0742837c..6c7be09f1 100644 --- a/.github/workflows/ISSUE_TEMPLATE/documentation.yaml +++ b/.github/workflows/ISSUE_TEMPLATE/documentation.yaml @@ -8,13 +8,13 @@ body: - type: markdown attributes: value: > - #### Thank you for contributing! Before submitting a doc issue, please make sure it has no duplicate and/or has already been addressed by searching through [the existing and past issues](https://github.com/BerkeleyLearnVerify/Scenic/issues) + #### Thank you for contributing! Before submitting a doc issue, please make sure it has no duplicate and has not already been addressed by searching through [the existing and past issues](https://github.com/BerkeleyLearnVerify/Scenic/issues) - type: textarea attributes: label: Describe the doc issue or enhancement description: > - Please provide a clear and concise description of what content in https://scenic-lang.readthedocs.io/ is an issue or needs enhancement. + Please provide a clear and concise description of what content in https://scenic-lang.readthedocs.io/ has an issue or needs enhancement. placeholder: | Link to location in the docs: https://scenic-lang.readthedocs.io/ validations: @@ -30,6 +30,6 @@ body: attributes: label: Issue Submission Checklist options: - - label: I report the issue, it's not a question + - label: I am reporting an issue, not asking a question required: true - label: I checked the open issues, forum, etc. and have not found any solution diff --git a/.github/workflows/ISSUE_TEMPLATE/feature_request.yaml b/.github/workflows/ISSUE_TEMPLATE/feature_request.yaml index 9dadfdbb5..795229d10 100644 --- a/.github/workflows/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/workflows/ISSUE_TEMPLATE/feature_request.yaml @@ -8,7 +8,7 @@ body: - type: markdown attributes: value: > - #### Thank you for contributing! Before submitting a feature request, please make sure it has no duplicate and/or has already been addressed by searching through [the existing and past issues](https://github.com/BerkeleyLearnVerify/Scenic/issues) + #### Thank you for contributing! Before submitting a feature request, please make sure it has no duplicate and has not already been addressed by searching through [the existing and past issues](https://github.com/BerkeleyLearnVerify/Scenic/issues) - type: textarea attributes: @@ -28,5 +28,4 @@ body: attributes: label: Issue Submission Checklist options: - - label: I checked the open issues, forum, etc. and have not found any solution - - label: There is reproducer code and related data files (videos, images, online drive links, etc) + - label: I checked the open issues, forum, etc. and have not found any solution \ No newline at end of file From 6d62d9cfe237735546495a4e4043703b151e775c Mon Sep 17 00:00:00 2001 From: Armando Banuelos Date: Tue, 12 Mar 2024 15:27:55 -0700 Subject: [PATCH 11/17] fix: addressing first round of feedback --- .github/workflows/PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/PULL_REQUEST_TEMPLATE.md b/.github/workflows/PULL_REQUEST_TEMPLATE.md index 7e42da70a..7dc981b71 100644 --- a/.github/workflows/PULL_REQUEST_TEMPLATE.md +++ b/.github/workflows/PULL_REQUEST_TEMPLATE.md @@ -7,7 +7,7 @@ ### Checklist - [ ] I have tested the changes locally via `pytest` and/or other means - [ ] I have added or updated relevant documentation -- [ ] I have auto formatted the code to black and istio conventions +- [ ] I have autoformatted the code with black and isort - [ ] I have added test cases (if applicable) ### Additional Notes From a539e6e967bdc7c3e9106710e58ece16c424229e Mon Sep 17 00:00:00 2001 From: Armando Banuelos Date: Wed, 13 Mar 2024 16:22:47 -0700 Subject: [PATCH 12/17] fix: adding email --- .github/workflows/ISSUE_TEMPLATE/config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ISSUE_TEMPLATE/config.yaml b/.github/workflows/ISSUE_TEMPLATE/config.yaml index aad874b05..8314c99ae 100644 --- a/.github/workflows/ISSUE_TEMPLATE/config.yaml +++ b/.github/workflows/ISSUE_TEMPLATE/config.yaml @@ -1,5 +1,5 @@ blank_issues_enabled: true contact_links: - name: Questions - url: https://scenic-lang.readthedocs.io/ - about: Ask questions and discuss with Scenic community members \ No newline at end of file + email: evin@ucsc.edu + about: Send your questions via email \ No newline at end of file From ec256a71131368e4497971210ddef48e148dce2b Mon Sep 17 00:00:00 2001 From: Armando Banuelos Date: Wed, 13 Mar 2024 17:20:23 -0700 Subject: [PATCH 13/17] fix: fixing syntax for issue template --- .github/workflows/ISSUE_TEMPLATE/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ISSUE_TEMPLATE/config.yaml b/.github/workflows/ISSUE_TEMPLATE/config.yaml index 8314c99ae..d791e866b 100644 --- a/.github/workflows/ISSUE_TEMPLATE/config.yaml +++ b/.github/workflows/ISSUE_TEMPLATE/config.yaml @@ -1,5 +1,5 @@ blank_issues_enabled: true contact_links: - name: Questions - email: evin@ucsc.edu + url: malito:evin@ucsc.edu about: Send your questions via email \ No newline at end of file From bcc0b5cf2e86597a6864616249c478719411261b Mon Sep 17 00:00:00 2001 From: Armando Banuelos Date: Thu, 14 Mar 2024 10:07:51 -0700 Subject: [PATCH 14/17] fix: typo --- .github/workflows/ISSUE_TEMPLATE/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ISSUE_TEMPLATE/config.yaml b/.github/workflows/ISSUE_TEMPLATE/config.yaml index d791e866b..cc0068897 100644 --- a/.github/workflows/ISSUE_TEMPLATE/config.yaml +++ b/.github/workflows/ISSUE_TEMPLATE/config.yaml @@ -1,5 +1,5 @@ blank_issues_enabled: true contact_links: - name: Questions - url: malito:evin@ucsc.edu + url: mailto:evin@ucsc.edu about: Send your questions via email \ No newline at end of file From fcaf3ec2cc9b724f0b8fd6bbd7e4ea60c00f10f5 Mon Sep 17 00:00:00 2001 From: Armando Banuelos Date: Thu, 14 Mar 2024 10:57:55 -0700 Subject: [PATCH 15/17] fix: moving out of workflow directory and fixing yml syntax, also adding ordering to files --- .../bug_report.yaml => ISSUE_TEMPLATE/1-bug.yml} | 12 ++++++------ .../documentation.yaml => ISSUE_TEMPLATE/2-docs.yml} | 0 .../3-feature.yml} | 4 ++-- .github/ISSUE_TEMPLATE/config.yaml | 5 +++++ .github/{workflows => }/PULL_REQUEST_TEMPLATE.md | 0 .github/workflows/ISSUE_TEMPLATE/config.yaml | 5 ----- 6 files changed, 13 insertions(+), 13 deletions(-) rename .github/{workflows/ISSUE_TEMPLATE/bug_report.yaml => ISSUE_TEMPLATE/1-bug.yml} (95%) rename .github/{workflows/ISSUE_TEMPLATE/documentation.yaml => ISSUE_TEMPLATE/2-docs.yml} (100%) rename .github/{workflows/ISSUE_TEMPLATE/feature_request.yaml => ISSUE_TEMPLATE/3-feature.yml} (96%) create mode 100644 .github/ISSUE_TEMPLATE/config.yaml rename .github/{workflows => }/PULL_REQUEST_TEMPLATE.md (100%) delete mode 100644 .github/workflows/ISSUE_TEMPLATE/config.yaml diff --git a/.github/workflows/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/1-bug.yml similarity index 95% rename from .github/workflows/ISSUE_TEMPLATE/bug_report.yaml rename to .github/ISSUE_TEMPLATE/1-bug.yml index 30fbbe443..ea401adbf 100644 --- a/.github/workflows/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/1-bug.yml @@ -31,8 +31,8 @@ body: 2. Scenic Version: Scenic 3.0.0b2 3. Operating System / Platform: Apple M2 Pro macOS Sonoma 14.2.1 4. Simulator Version: CARLA 0.9.14 - validations: - required: true + validations: + required: true - type: textarea attributes: @@ -46,8 +46,8 @@ body: ``` # error full stack trace ``` - validations: - required: true + validations: + required: true - type: textarea attributes: @@ -62,8 +62,8 @@ body: ``` # sample code to reproduce the bug ``` - validations: - required: true + validations: + required: true - type: checkboxes attributes: diff --git a/.github/workflows/ISSUE_TEMPLATE/documentation.yaml b/.github/ISSUE_TEMPLATE/2-docs.yml similarity index 100% rename from .github/workflows/ISSUE_TEMPLATE/documentation.yaml rename to .github/ISSUE_TEMPLATE/2-docs.yml diff --git a/.github/workflows/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/3-feature.yml similarity index 96% rename from .github/workflows/ISSUE_TEMPLATE/feature_request.yaml rename to .github/ISSUE_TEMPLATE/3-feature.yml index 795229d10..301315521 100644 --- a/.github/workflows/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/3-feature.yml @@ -15,8 +15,8 @@ body: label: Describe the feature and motivation description: | Please provide a clear and concise proposal of the feature and outline the motivation. - validations: - required: true + validations: + required: true - type: textarea attributes: diff --git a/.github/ISSUE_TEMPLATE/config.yaml b/.github/ISSUE_TEMPLATE/config.yaml new file mode 100644 index 000000000..10c272d82 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yaml @@ -0,0 +1,5 @@ +blank_issues_enabled: true +contact_links: + - name: Questions + url: https://forms.gle/uUhQNuPzQrvvBFJX9 + about: Send your questions via this Google Form \ No newline at end of file diff --git a/.github/workflows/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md similarity index 100% rename from .github/workflows/PULL_REQUEST_TEMPLATE.md rename to .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/workflows/ISSUE_TEMPLATE/config.yaml b/.github/workflows/ISSUE_TEMPLATE/config.yaml deleted file mode 100644 index cc0068897..000000000 --- a/.github/workflows/ISSUE_TEMPLATE/config.yaml +++ /dev/null @@ -1,5 +0,0 @@ -blank_issues_enabled: true -contact_links: - - name: Questions - url: mailto:evin@ucsc.edu - about: Send your questions via email \ No newline at end of file From f0694d22e4f78cfac821a87d3ca6da312b16a667 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armando=20Ba=C3=B1uelos?= <32311654+abanuelo@users.noreply.github.com> Date: Fri, 15 Mar 2024 12:48:08 -0700 Subject: [PATCH 16/17] feat: adding code cov for PyTest including statement & branch coverage (#217) * feat: adding code coverage for pytests including statement and branch coverage * fix: allowing for timeout warning in dynamics with code coverage * fix: black reformat for behaviors.py * fix: adding coverage only to non-testing files but allowing pytest to run all pytests from src and examples folder * fix: removing minimal threshold and adding skipping src/simulators for codecov * feat: adding coverage workflow * fix: addressing first round of feedback * fix: coverage to run * fix: readding __init__.py files * feat: adding codecov to run-coverage workflow * fix: addressing second round of feedback * fix: addressing third round of feedback * fix: removing coverage.json and unnecessary ommitted files --------- Co-authored-by: Armando Banuelos Co-authored-by: Armando Banuelos Co-authored-by: Armando Banuelos --- .coveragerc | 9 +++- .github/workflows/run-coverage.yml | 65 +++++++++++++++++++++++++++ .gitignore | 1 + codecov.yml | 21 +++++++++ pyproject.toml | 4 ++ src/scenic/core/dynamics/behaviors.py | 3 +- 6 files changed, 101 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/run-coverage.yml create mode 100644 codecov.yml diff --git a/.coveragerc b/.coveragerc index 4987b253e..b2920e991 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,7 +1,12 @@ # .coveragerc to control coverage.py [run] +branch = True omit = - src/scenic/simulators/webots/WBT*.py + src/scenic/simulators/carla/* + src/scenic/simulators/gta/* + src/scenic/simulators/lgsvl/* + src/scenic/simulators/webots/* + src/scenic/simulators/xplane/* [report] # Regexes for lines to exclude from consideration @@ -20,3 +25,5 @@ exclude_lines = @(abc\.)?abstractmethod ignore_errors = True +show_missing = True +precision = 2 \ No newline at end of file diff --git a/.github/workflows/run-coverage.yml b/.github/workflows/run-coverage.yml new file mode 100644 index 000000000..7ec93f84f --- /dev/null +++ b/.github/workflows/run-coverage.yml @@ -0,0 +1,65 @@ +name: run_coverage + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + workflow_dispatch: + inputs: + ref: + description: Git ref on which to run the tests. + type: string + required: true + workflow_call: + inputs: + ref: + description: Git ref on which to run the tests. + type: string + +jobs: + coverage: + strategy: + fail-fast: true + matrix: + python-version: ["3.11"] + os: [ubuntu-latest] + extras: ["test-full"] + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout given ref + uses: actions/checkout@v3 + if: inputs.ref != '' + with: + ref: ${{ inputs.ref }} + + - name: Checkout current branch + uses: actions/checkout@v3 + if: inputs.ref == '' + with: + ref: ${{ github.ref }} + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + cache: 'pip' + + - name: Update pip + run: | + python -m pip install --upgrade pip + + - name: Install Scenic and dependencies + run: | + python -m pip install -e ".[${{ matrix.extras }}]" + + - name: Run and report code coverage + run: | + pytest --cov --cov-report json + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + slug: BerkeleyLearnVerify/Scenic \ No newline at end of file diff --git a/.gitignore b/.gitignore index 702d62a1f..7cfc6c7df 100644 --- a/.gitignore +++ b/.gitignore @@ -66,6 +66,7 @@ coverage.xml *.cover .hypothesis/ .pytest_cache/ +coverage.json # Translations *.mo diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 000000000..5cecf4809 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,21 @@ +codecov: + coverage: + precision: 2 + round: down + range: "70...100" + status: + project: + default: + target: 80% + threshold: 1% + changes: + target: 80% + threshold: 1% + comment: + layout: "reach, diff, flags, files" + behavior: default + require_ci_to_pass: true +cli: + plugins: + pycoverage: + report_type: "json" \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 23ed55d81..e69b47d05 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,6 +57,7 @@ guideways = [ ] test = [ # minimum dependencies for running tests (used for tox virtualenvs) "pytest >= 7.0.0, <8", + "pytest-cov >= 3.0.0", "pytest-randomly ~= 3.2", ] test-full = [ # like 'test' but adds dependencies for optional features @@ -121,3 +122,6 @@ extend_skip_glob = [ [tool.pytest.ini_options] norecursedirs = ["examples"] + +[tool.coverage.run] +source = ["src"] \ No newline at end of file diff --git a/src/scenic/core/dynamics/behaviors.py b/src/scenic/core/dynamics/behaviors.py index afb33ca93..7c12ef7c2 100644 --- a/src/scenic/core/dynamics/behaviors.py +++ b/src/scenic/core/dynamics/behaviors.py @@ -95,7 +95,8 @@ def _step(self): assert self._runningIterator def alarmHandler(signum, frame): - if sys.gettrace(): + # NOTE: if using pytest-cov, sys.gettrace() set to CTracer(), but we still want timeout warnings enabled + if sys.gettrace() and "coverage" not in str(type(sys.gettrace())): return # skip the warning if we're in the debugger warnings.warn( f"the behavior {self} is taking a long time to take an action; " From d5a21fc781b7c36ee1c4c0019c858b516fd0b193 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armando=20Ba=C3=B1uelos?= <32311654+abanuelo@users.noreply.github.com> Date: Fri, 15 Mar 2024 12:48:20 -0700 Subject: [PATCH 17/17] feat: editing bug templates, adding to gitignore, and rename config yaml (#221) Co-authored-by: Armando Banuelos --- .github/ISSUE_TEMPLATE/1-bug.yml | 14 ++++---------- .github/ISSUE_TEMPLATE/{config.yaml => config.yml} | 2 +- .gitignore | 3 +++ 3 files changed, 8 insertions(+), 11 deletions(-) rename .github/ISSUE_TEMPLATE/{config.yaml => config.yml} (67%) diff --git a/.github/ISSUE_TEMPLATE/1-bug.yml b/.github/ISSUE_TEMPLATE/1-bug.yml index ea401adbf..d84707fdb 100644 --- a/.github/ISSUE_TEMPLATE/1-bug.yml +++ b/.github/ISSUE_TEMPLATE/1-bug.yml @@ -15,22 +15,16 @@ body: label: System Details description: | Please provide the following system information to help us diagnose the bug. - 1. Python Version - 2. Scenic Version - 3. Operating System / Platform - 4. Simulator Version (Optional, only applies if bug is simulator specific) + 1. Python Version (e.g. Python 3.11.7) + 2. Scenic Version (e.g. Scenic 3.0.0b2) + 3. Operating System / Platform (e.g. Apple M2 Pro macOS Sonoma 14.2.1) + 4. Simulator Version (Optional, only applies if bug is simulator specific) (e.g. CARLA 0.9.14) placeholder: | 1. Python Version: `python --version` 2. Scenic Version: `scenic --version` 3. Operating System / Platform: get from system preferences 4. Simulator Version: simulator version - - Example: - 1. Python Version: Python 3.11.7 - 2. Scenic Version: Scenic 3.0.0b2 - 3. Operating System / Platform: Apple M2 Pro macOS Sonoma 14.2.1 - 4. Simulator Version: CARLA 0.9.14 validations: required: true diff --git a/.github/ISSUE_TEMPLATE/config.yaml b/.github/ISSUE_TEMPLATE/config.yml similarity index 67% rename from .github/ISSUE_TEMPLATE/config.yaml rename to .github/ISSUE_TEMPLATE/config.yml index 10c272d82..427eb214e 100644 --- a/.github/ISSUE_TEMPLATE/config.yaml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -2,4 +2,4 @@ blank_issues_enabled: true contact_links: - name: Questions url: https://forms.gle/uUhQNuPzQrvvBFJX9 - about: Send your questions via this Google Form \ No newline at end of file + about: Send your questions via Google Form \ No newline at end of file diff --git a/.gitignore b/.gitignore index 7cfc6c7df..31bd1e964 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,9 @@ poetry.lock *.sublime-project *.sublime-workspace +# VSCode files +*.vscode + # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod]