diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml new file mode 100644 index 0000000..23d3d99 --- /dev/null +++ b/.github/workflows/build-and-test.yml @@ -0,0 +1,45 @@ +# +# This source file is part of the Daneshjou Lab projects +# +# SPDX-FileCopyrightText: 2025 Stanford University and the project authors (see CONTRIBUTORS.md) +# +# SPDX-License-Identifier: MIT +# + +name: Build and Test + +on: + push: + branches: + - main + pull_request: + workflow_dispatch: + workflow_call: + +jobs: + pylint: + name: PyLint + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10"] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + - name: Install Infrastructure + run: | + pip install -r requirements.txt + pip install pylint + - name: Analysing the code with pylint + run: | + pylint $(git ls-files '*.py') + black_lint: + name: Black Code Formatter Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + - name: Install Black + run: pip install black[jupyter] + - name: Check code formatting with Black + run: black . --exclude '\.ipynb$' diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml new file mode 100644 index 0000000..c74fa09 --- /dev/null +++ b/.github/workflows/pull_request.yml @@ -0,0 +1,37 @@ +# +# This source file is part of the Daneshjou Lab projects +# +# SPDX-FileCopyrightText: 2025 Stanford University and the project authors (see CONTRIBUTORS.md) +# +# SPDX-License-Identifier: MIT +# + +name: Pull Request + +on: + pull_request: + workflow_dispatch: + +jobs: + reuse_action: + name: REUSE Compliance Check + uses: DaneshjouLab/.github/.github/workflows/reuse.yml@main + markdown_link_check: + name: Markdown Link Check + uses: DaneshjouLab/.github/.github/workflows/markdown-link-check.yml@main + yamllint: + name: YAML Lint Check + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + + - name: Install yamllint + run: pip install yamllint + + - name: Run yamllint with custom config + run: yamllint -c .yamllint .github/workflows/*.yml diff --git a/.reuse/dep5.txt b/.reuse/dep5.txt new file mode 100644 index 0000000..9d6c7d7 --- /dev/null +++ b/.reuse/dep5.txt @@ -0,0 +1,6 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + +Files: tests/* +Copyright: 2025 Stanford University and the project authors (see CONTRIBUTORS.md) +License: MIT +Comment: All files are part of the Daneshjou Lab projects.