Skip to content

Commit

Permalink
Apply updates from cookiecutter
Browse files Browse the repository at this point in the history
This automated commit applies the latest updates from our cookiecutters [1] to
this repo.

[1]: https://github.com/hypothesis/cookiecutters
  • Loading branch information
github-actions[bot] committed Sep 19, 2023
1 parent bbb0944 commit ed003fe
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 11 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ on:
- 'requirements/dev.txt'
- '.docker.env'
- '**/.gitignore'
- '.python-version'
- 'Dockerfile'
- 'LICENSE'
- '*.md'
Expand Down Expand Up @@ -93,7 +92,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: coverage
path: .coverage
path: .coverage.*
Coverage:
needs: tests
runs-on: ubuntu-latest
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/slack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Slack
on:
workflow_run:
workflows: [CI]
types: [completed]
branches: [main]
jobs:
on-failure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }} steps:
- name: Post to Slack
uses: slackapi/[email protected]
with:
channel-id: 'C4K6M7P5E'
slack-message: "A workflow run failed\n*Repo:* `${{ github.event.repository.full_name }}` (${{ github.event.repository.html_url }})\n*Workflow:* ${{ github.event.workflow.name }} (${{ github.event.workflow.html_url }})\n*Branch:* `${{ github.event.workflow_run.head_branch }}`\n*Commit:* `${{ github.event.workflow_run.head_commit.id }}`\n*Run:* ${{ github.event.workflow_run.html_url }}\n*Conclusion:* ${{ github.event.workflow_run.conclusion }}"
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ jobs = 0 # Use one process for CPU.
load-plugins = [
"pylint.extensions.bad_builtin",
"pylint.extensions.check_elif",
"pylint.extensions.comparetozero",
"pylint.extensions.docparams",
"pylint.extensions.emptystring",
"pylint.extensions.mccabe",
"pylint.extensions.overlapping_exceptions",
"pylint.extensions.redefined_variable_type",
Expand All @@ -91,8 +93,6 @@ enable = [
"deprecated-pragma",
"useless-suppression",
"use-symbolic-message-instead",
"use-implicit-booleaness-not-comparison-to-zero",
"use-implicit-booleaness-not-comparison-to-string"
]
disable = [
# Docstrings are encouraged but we don't want to enforce that everything
Expand Down
1 change: 0 additions & 1 deletion requirements/functests.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ factory-boy
pytest-factoryboy
h-matchers
webtest
filelock
2 changes: 1 addition & 1 deletion requirements/lint.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pip-sync-faster
-r tests.txt
-r functests.txt
toml # Needed for pydocstyle to support pyproject.toml.
pylint>=3.0.0a7
pylint
pydocstyle
pycodestyle
-r bddtests.txt
4 changes: 1 addition & 3 deletions requirements/tests.in
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
pip-tools
pip-sync-faster
-r prod.txt
pytest-coverage
coverage[toml]
pytest
factory-boy
pytest-factoryboy
h-matchers
httpretty
freezegun
aioresponses
pytest-xdist[psutil]
filelock
2 changes: 2 additions & 0 deletions tests/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ jobs = 0 # Use one process for CPU.
load-plugins = [
"pylint.extensions.bad_builtin",
"pylint.extensions.check_elif",
"pylint.extensions.comparetozero",
"pylint.extensions.docparams",
"pylint.extensions.emptystring",
"pylint.extensions.mccabe",
"pylint.extensions.overlapping_exceptions",
"pylint.extensions.redefined_variable_type",
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ setenv =
dev: SENTRY_ENVIRONMENT = {env:SENTRY_ENVIRONMENT:dev}
dev: NEW_RELIC_APP_NAME = {env:NEW_RELIC_APP_NAME:lms}
dev: NEW_RELIC_ENVIRONMENT = {env:NEW_RELIC_ENVIRONMENT:dev}
dev,tests,functests: PYTHONDEVMODE = {env:PYTHONDEVMODE:1}
tests,functests: PYTEST_PLUGINS = tests.pytest_plugins.factory_boy
dev: ALEMBIC_CONFIG = {env:ALEMBIC_CONFIG:conf/alembic.ini}
dev: DATABASE_URL = {env:DATABASE_URL:postgresql://postgres@localhost:5433/postgres}
tests: DATABASE_URL = {env:UNITTESTS_DATABASE_URL:postgresql://postgres@localhost:5433/lms_tests}
dev,tests,functests: PYTHONDEVMODE = {env:PYTHONDEVMODE:1}
functests: DATABASE_URL = {env:FUNCTESTS_DATABASE_URL:postgresql://postgres@localhost:5433/lms_functests}
# Make `import lms` work in `make shell`.
dev: PYTHONPATH = .
Expand Down Expand Up @@ -92,7 +92,7 @@ commands =
lint: pylint --rcfile=tests/pyproject.toml tests
lint: pydocstyle lms tests bin
lint: pycodestyle lms tests bin
tests: python -m pytest --cov --numprocesses logical --failed-first --new-first --no-header --quiet {posargs:tests/unit/}
tests: coverage run -m pytest --failed-first --new-first --no-header --quiet {posargs:tests/unit/}
functests: python -m pytest --failed-first --new-first --no-header --quiet {posargs:tests/functional/}
coverage: -coverage combine
coverage: coverage report
Expand Down

0 comments on commit ed003fe

Please sign in to comment.