diff --git a/.github/workflows/add_conference_to_project_and_close.yaml b/.github/workflows/add_conference_to_project_and_close.yaml index ae947c0..830773f 100644 --- a/.github/workflows/add_conference_to_project_and_close.yaml +++ b/.github/workflows/add_conference_to_project_and_close.yaml @@ -8,11 +8,11 @@ on: jobs: add-to-project: runs-on: ubuntu-latest - + steps: - name: close-issue if: ${{ github.event.label.name == 'conference' }} run: gh issue comment $ISSUE --body "Thank you for adding this event! \\n We'll happily consider it for the next episode. \\n\\n The Issue autocloses but we'll be reviewing it at https://github.com/users/kjaymiller/projects/4/views/3" && gh issue close $ISSUE env: ISSUE: ${{ github.event.issue.html_url }} - GH_TOKEN: ${{ secrets.ADD_TO_PROJECT_PAT }} \ No newline at end of file + GH_TOKEN: ${{ secrets.ADD_TO_PROJECT_PAT }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1cac603..7af5e1b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,15 +1,36 @@ name: Lint on: - push: - branches: - - main pull_request: jobs: - lint-with-pre-commit: + autoformat: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + with: + ref: ${{ github.head_ref }} + + - uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Install pre-commit + run: pip install pre-commit + + - name: Run autoformatters + run: pre-commit run autoformat --all-files || true + + - name: Commit autoformatting changes back to pull request + uses: devops-infra/action-commit-push@v0.9.0 + with: + commit_message: "Autoformat via GitHub Actions" + github_token: ${{ secrets.ADD_TO_PROJECT_PAT }} + + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 with: python-version: '3.10' @@ -17,5 +38,7 @@ jobs: - name: Install pre-commit run: pip install pre-commit - - name: Run pre-commit hooks + - name: Run linters + env: + SKIP: autoformat run: pre-commit run --all-files diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fc5b589..d67aa54 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,15 +5,19 @@ repos: rev: v4.3.0 hooks: - id: trailing-whitespace + alias: autoformat - id: end-of-file-fixer + alias: autoformat - id: check-yaml - id: requirements-txt-fixer + alias: autoformat files: requirements.in - repo: https://github.com/psf/black rev: 22.8.0 hooks: - id: black + alias: autoformat name: Format Python language_version: python3.10 @@ -21,6 +25,7 @@ repos: rev: 5.10.1 hooks: - id: isort + alias: autoformat name: Format Python imports args: - --profile=black @@ -29,6 +34,7 @@ repos: rev: 6.8.0 hooks: - id: pip-compile + alias: autoformat name: Compile Python requirements diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e122336..6eadba3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -39,7 +39,7 @@ To ensure that everyone is one the same page, please follow this process for all - `podcast` 3. Specify that you will work on this issue. This lets others know that someone is actively working on the project. -4. Fork the repository on your profile and make changes locally. +4. Fork the repository on your profile and make changes locally. #### If Wanting to Work on an Existing Issue @@ -57,14 +57,14 @@ We'll also use GitHub Actions to interact with issues as they relate to the asso Just adding a missing period here. -We'll also be using GH Actions to automate sending supporting content to our newsletter service (currently [ButtonDown](https://buttondown.email/)), and perhaps other services as we see fit. +We'll also be using GH Actions to automate sending supporting content to our newsletter service (currently [ButtonDown](https://buttondown.email/)), and perhaps other services as we see fit. You should submit a PR for a GitHub Actions if you believe the action will improve how we interact with our existing workflow. If you would like to pose a change to the existing workflow, please file and issue and wait for aggreement from the maintainers before working on the project. ## General Administration around GitHub -We use GitHub issues to communicate many changes that we would like to deploy to our website/podcast/newsletter and the inner workings of between them all. These may result in an issue with an `admin` label. +We use GitHub issues to communicate many changes that we would like to deploy to our website/podcast/newsletter and the inner workings of between them all. These may result in an issue with an `admin` label. These are often changes to issue/PR templates or documentation that communicates the intention of the project. @@ -72,7 +72,7 @@ You are more than invited to work on these issues. Following the guidance given ### Deployting to our third-party platforms via API -We have to authenticate with our third-party platforms to deploy content to them and this requires an API key and often subject to rate-limiting. +We have to authenticate with our third-party platforms to deploy content to them and this requires an API key and often subject to rate-limiting. If you are working on code that would connect to a Third Party, YOU MUST USE A TEST-CASE and mock the API call request and responses. diff --git a/requirements.in b/requirements.in index 79514a2..a7fb140 100644 --- a/requirements.in +++ b/requirements.in @@ -5,8 +5,8 @@ jinja2 markdown_it_py pip-tools pre-commit +pytailwindcss pytest pytest-cov pytest-httpx render_engine -pytailwindcss