diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 3671b97..b2bf433 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,13 +1,11 @@ --- name: Bug report about: Create a report to help us improve -title: '' +title: "" labels: bug -assignees: '' - +assignees: "" --- - **Description** A clear and concise description of what the bug is. @@ -21,9 +19,10 @@ A clear and concise description of what you expected to happen. If applicable, add screenshots to help explain your problem. **Environment** - - OS: - - Python version: - - Python env/venv: + +- OS: +- Python version: +- Python env/venv: **Additional context** Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/documentation_issue.md b/.github/ISSUE_TEMPLATE/documentation_issue.md index 109cbf0..ab69dee 100644 --- a/.github/ISSUE_TEMPLATE/documentation_issue.md +++ b/.github/ISSUE_TEMPLATE/documentation_issue.md @@ -1,10 +1,9 @@ --- name: Documentation issue about: Create a report to improve documenation -title: '' +title: "" labels: documentation -assignees: '' - +assignees: "" --- **Description** diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 229493e..d883b8f 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,13 +1,11 @@ --- name: Feature request about: Suggest an idea for this project -title: '' +title: "" labels: enhancement -assignees: '' - +assignees: "" --- - **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 99272cc..f353a3a 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,11 +1,15 @@ # Description + # Changes Made + # Related Issues + # Additional Notes + diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml index 57d66ff..e6ec55b 100644 --- a/.github/workflows/flake8.yml +++ b/.github/workflows/flake8.yml @@ -1,25 +1,25 @@ name: flake8 ⚙️ -on: [ push, pull_request ] +on: [push, pull_request] jobs: main: runs-on: ubuntu-latest steps: - - name: Setup Python - uses: actions/setup-python@v1 - with: - python-version: 3.8 - architecture: x64 - - name: Checkout repository - uses: actions/checkout@master - - name: Install flake8 - run: pip install flake8 flake8-nb - - name: run flake8 ⚙️ - run: | - find . -type f -name "*.py" | xargs flake8 - - name: run flake8-notebook ⚙️ - if: '!cancelled()' - run: | - find . -type f -name "*.ipynb" | xargs flake8-nb + - name: Setup Python + uses: actions/setup-python@v1 + with: + python-version: 3.8 + architecture: x64 + - name: Checkout repository + uses: actions/checkout@master + - name: Install flake8 + run: pip install flake8 flake8-nb + - name: run flake8 ⚙️ + run: | + find . -type f -name "*.py" | xargs flake8 + - name: run flake8-notebook ⚙️ + if: "!cancelled()" + run: | + find . -type f -name "*.ipynb" | xargs flake8-nb diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..6893622 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,57 @@ +minimum_pre_commit_version: "2.9.0" +ci: + autoupdate_schedule: monthly +repos: + - repo: meta + hooks: + - id: check-useless-excludes + - repo: local + hooks: + - id: forbid-symlinks + name: Forbid symlinks + entry: Forbid symlinks + language: fail + types: [symlink] + - repo: https://github.com/Lucas-C/pre-commit-hooks + rev: v1.5.1 + hooks: + - id: forbid-crlf + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: check-case-conflict + - id: check-executables-have-shebangs + - id: check-merge-conflict + - id: check-shebang-scripts-are-executable + - id: destroyed-symlinks + - id: detect-private-key + - id: end-of-file-fixer + exclude_types: [svg] + - id: fix-byte-order-marker + - id: mixed-line-ending + + - repo: https://github.com/pre-commit/mirrors-prettier + rev: "v4.0.0-alpha.8" + hooks: + - id: prettier + - repo: https://github.com/ikamensh/flynt + rev: "1.0.1" + hooks: + - id: flynt + - repo: https://github.com/astral-sh/ruff-pre-commit + # Ruff version. + rev: v0.5.0 + hooks: + # Run the linter. + - id: ruff + types_or: [python, pyi, jupyter] + args: [--fix] + # Run the formatter. + - id: ruff-format + types_or: [python, pyi, jupyter] + # Remove stale jupyter notebook outputs + # For extra options see https://github.com/kynan/nbstripout?tab=readme-ov-file#configuration-files + - repo: https://github.com/kynan/nbstripout + rev: 0.7.1 + hooks: + - id: nbstripout diff --git a/README.md b/README.md index 1661fa2..3c7865e 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # CGS Repository Template + Template repository for all CGS GitHub repositories