Skip to content

Commit

Permalink
Adding markdown linting, update CI and pre-commit hooks and add githu…
Browse files Browse the repository at this point in the history
…b issue and PR templates (#73)

- Added a .markdownlint.yaml with linting rules. Currently the default.
- Added a makefile target to fix some simple linting errors and raise errors for unfixable issues.
- Added pre-commit hook.
- Added github issue and PR templates
- Updated CI to use pre-commit hooks
  • Loading branch information
akshaysubr authored Jul 20, 2023
1 parent ca84484 commit 25287d5
Show file tree
Hide file tree
Showing 16 changed files with 801 additions and 202 deletions.
85 changes: 85 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Bug Report
description: File a bug report for Modulus (Core)
title: "[BUG 🐛]: "
labels: ["bug"]

body:
- type: markdown
attributes:
value: |
Thanks for taking the time to help Modulus and fill out this bug report!
- By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/NVIDIA/modulus/blob/main/CONTRIBUTING.md)
- You also confirm that you have searched the [open bugs](https://github.com/NVIDIA/modulus/issues) and have found no duplicates for this request
- type: input
id: version
attributes:
label: Version
description: What version of Modulus are you running?
placeholder: "example: 0.1.0"
validations:
required: true

- type: dropdown
id: installation-method
attributes:
label: On which installation method(s) does this occur?
multiple: true
options:
- Docker
- Pip
- Source

- type: textarea
id: description
attributes:
label: Describe the issue
description: Please provide a complete and succinct description of the problem, including what you expected to happen.
placeholder: XYZ occurred, I expected QRS results
validations:
required: true

- type: textarea
id: mvr
attributes:
label: Minimum reproducible example
description: Please supply a [minimum reproducible code example](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) here.
render: shell

- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please paste relevant error and log output here
render: shell

- type: textarea
id: env-details
attributes:
label: Environment details
description: Please specify installation info
placeholder: |
+ Environment location: [Bare-metal, Docker, Cloud(specify cloud provider)]
+ If method of install is Docker, provide `docker pull` & `docker run` commands used
render: shell

- type: textarea
id: misc
attributes:
label: Other/Misc.
description: Please enter any other helpful information here.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Ask a Question
url: https://forums.developer.nvidia.com/c/physics-simulation/modulus-physics-ml-model-framework
about: Thanks for taking the time to ask us a question!
63 changes: 63 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Documentation Request
description: Request updates or additions to Modulus (Core) documentation
title: "[DOC 📚]: "
labels: ["doc"]

body:
- type: markdown
attributes:
value: |
Thanks for taking the time to help Modulus and improve our documentation!
- By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/NVIDIA/modulus/blob/main/CONTRIBUTING.md)
- You also confirm that you have searched the [open documentation issues](https://github.com/NVIDIA/modulus/issues) and have found no duplicates for this request
- type: dropdown
id: criticality
attributes:
label: How would you describe the priority of this documentation request
options:
- Critical (currently preventing usage)
- Medium
- Low (would be nice)
validations:
required: true

- type: dropdown
id: new_or_correction
attributes:
label: Is this for new documentation, or an update to existing docs?
options:
- New
- Update
validations:
required: true

- type: textarea
id: problem
attributes:
label: Describe the incorrect/future/missing documentation
placeholder: "Example: A code snippet mentions function foo(args) but I cannot find any documentation on it."
validations:
required: true

- type: textarea
id: search_locs
attributes:
label: If this is a correction, please provide a link to the incorrect documentation. If this is a new documentation request, please link to where you have looked.
placeholder: |
https://docs.nvidia.com/modulus/index.html
70 changes: 70 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Feature Request
description: Request new or improved functionality or changes to existing Modulus (Core) functionality
title: "[FEA 🚀]: "
labels: ["feature request"]

body:
- type: markdown
attributes:
value: |
Thanks for taking the time to help Modulus and fill out this feature request!
- By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/NVIDIA/modulus/blob/main/CONTRIBUTING.md)
- You also confirm that you have searched the [open documentation issues](https://github.com/NVIDIA/modulus/issues) and have found no duplicates for this request
- type: dropdown
id: new_or_improvement
attributes:
label: Is this a new feature, an improvement, or a change to existing functionality?
options:
- New Feature
- Improvement
- Change
validations:
required: true

- type: dropdown
id: criticality
attributes:
label: How would you describe the priority of this feature request
options:
- Critical (currently preventing usage)
- Medium
- Low (would be nice)
validations:
required: true

- type: textarea
id: problem
attributes:
label: Please provide a clear description of problem you would like to solve.
description: Real usage examples are especially helpful. If there is an existing function you use in a different library, please also provide a link.
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Describe any alternatives you have considered
description: List any other libraries, or approaches you have looked at or tried.
placeholder: I have looked at library xyz and qrs, but they do not offer GPU acceleration

- type: textarea
id: misc
attributes:
label: Additional context
description: Add any other context, code examples, or references to existing implementations about the feature request here.
18 changes: 18 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Modulus Pull Request

## Description
<!-- Provide a standalone description of changes in this PR. -->
<!-- Reference any issues closed by this PR with "closes #1234". -->
<!-- Note: The pull request title will be included in the CHANGELOG. -->

## Checklist

- [ ] I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/modulus/blob/main/CONTRIBUTING.md).
- [ ] New or existing tests cover these changes.
- [ ] The documentation is up to date with these changes.
- [ ] The [CHANGELOG.md](https://github.com/NVIDIA/modulus/blob/main/CHANGELOG.md) is
up to date with these changes.

## Dependencies

<!-- Call out any new dependencies needed if any -->
13 changes: 9 additions & 4 deletions .gitlab/issue_templates/bug.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Bug

For technical questions please refer to our [forum](https://forums.developer.nvidia.com/c/physics-simulation/modulus-physics-ml-model-framework/443).

Before submitting an issue, please review the existing issues to avoid duplicates.
Expand All @@ -14,10 +16,13 @@ Please try to provide a minimal reproducable example.
Error messages and stack traces are also helpful.

## System Info
Please copy and paste the output of PyTorch's [environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py). Alternatively, manually fill out the list below.

Please copy and paste the output of PyTorch's [environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py).
Alternatively, manually fill out the list below.

You can get the script and run it with:
```

```bash
wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
Expand All @@ -31,11 +36,11 @@ python collect_env.py
- Versions of any other relevant libraries:

## Modulus Info

Please fill out the list below:

- Modulus version:
- How Modulus is used (Docker image/ bare-metal installation):
- (If using OptiX) OptiX version:
- (If using OptiX) OptiX version:
- Exact command to reproduce:
- (If using Modulus Docker image): Exact docker-run command:

4 changes: 4 additions & 0 deletions .gitlab/issue_templates/documentation.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# Documentation

For technical questions please refer to our [forum](https://forums.developer.nvidia.com/c/physics-simulation/modulus-physics-ml-model-framework/443).

Before submitting an issue, please review the existing issues to avoid duplicates.

For documenation issues, please preface the title with [documentation].

## The documentation issue

A clear and concise description of what content in Modulus documentation is an issue.

## Suggest a potential alternative/fix

Tell us how we could improve the documentation in this regard.
11 changes: 9 additions & 2 deletions .gitlab/issue_templates/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Feature Request

For technical questions please refer to our [forum](https://forums.developer.nvidia.com/c/physics-simulation/modulus-physics-ml-model-framework/443).

Before submitting an issue, please review the existing issues to avoid duplicates.
Expand All @@ -6,10 +8,15 @@ For feature requests, please preface the title with [feature-request].

## The feature, motivation and pitch

A clear and concise description of the feature proposal. Please outline the motivation for the proposal. Is your feature request related to a specific problem? e.g., "I'm working on X and would like Y to be possible". If this is related to another issue, please link here too.
A clear and concise description of the feature proposal. Please outline the motivation
for the proposal. Is your feature request related to a specific problem? e.g., "I'm
working on X and would like Y to be possible". If this is related to another issue,
please link here too.

## Alternatives

A description of any alternative solutions or features you've considered, if any.

## Additional context
## Additional Context

Add any other context or screenshots about the feature request.
9 changes: 7 additions & 2 deletions .gitlab/issue_templates/security.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# Security

For technical questions please refer to our [forum](https://forums.developer.nvidia.com/c/physics-simulation/modulus-physics-ml-model-framework/443).

Before submitting an issue, please review the existing issues to avoid duplicates.

For security issues, please preface the title with [security].

## The security issue
If you believe you have found a security vulnerability in Modulus, we encourage you to let us know right away. We will investigate all legitimate reports and do our best to quickly fix the problem.
## The Security Issue

If you believe you have found a security vulnerability in Modulus, we encourage you to
let us know right away.
We will investigate all legitimate reports and do our best to quickly fix the problem.
36 changes: 12 additions & 24 deletions .gitlab/merge_request_templates/Default.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,18 @@
# Description
Describe in detail what your merge request does and why.
# Modulus Pull Request

For feature merge requests, please preface the title with [feature]. For bug fixes, please preface the title with [bug]. For others, please preface the title with [other].
## Description
<!-- Provide a standalone description of changes in this PR. -->
<!-- Reference any issues closed by this PR with "closes #1234". -->
<!-- Note: The pull request title will be included in the CHANGELOG. -->

## Link to issues
Specify the link to the issue that this merge request is addressing. Please note that every merge request requires a corresponding issue.
## Checklist

# MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

* [ ] I have evaluated the [MR acceptance checklist](https://docs.gitlab.com/ee/development/code_review.html#acceptance-checklist) for this MR.
* [ ] New or existing tests cover these changes.
* [ ] The documentation is up to date with these changes.
* [ ] CHANGELOG.md is updated with the new features or bug fixes and extra library dependencies added.
- [ ] I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/modulus/blob/main/CONTRIBUTING.md).
- [ ] New or existing tests cover these changes.
- [ ] The documentation is up to date with these changes.
- [ ] The [CHANGELOG.md](https://github.com/NVIDIA/modulus/blob/main/CHANGELOG.md) is
up to date with these changes.

## Dependencies
Please list the new dependencies together with the NVBug link for SWIPAT approval (A SWIPAT approval is required for each new dependency).

# Info population
Please do not make any changes to the rest of this template. Information will be populated automatically upon submission.

# Authors
Authors:
%{co_authored_by}

/assign me

# Resources
For technical questions please refer to our [forum](https://forums.developer.nvidia.com/c/physics-simulation/modulus-physics-ml-model-framework/443).
<!-- Call out any new dependencies needed if any -->
Loading

0 comments on commit 25287d5

Please sign in to comment.