Skip to content

Commit

Permalink
Merge branch 'master' into adds_check_file_existence_to_uploader
Browse files Browse the repository at this point in the history
  • Loading branch information
neersighted committed Sep 18, 2022
2 parents 1fd7832 + a06381c commit 6a9cc86
Show file tree
Hide file tree
Showing 438 changed files with 28,756 additions and 20,971 deletions.
10 changes: 8 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
freebsd_instance:
image_family: freebsd-13-0
image_family: freebsd-13-1
cpu: 1
memory: 4G

test_task:
name: "Tests / FreeBSD / "
only_if: $CIRRUS_TAG == ''
skip: "!changesInclude('.cirrus.yml', 'poetry.lock', 'pyproject.toml', '**.json','**.py')"
env:
# `SHELL` environment variable is not set by default, so we explicitly set it to
# avoid failures on tests that depend on it.
SHELL: sh
matrix:
- PYTHON: python3.7
- PYTHON: python3.8
- PYTHON: python3.9
- PYTHON: python3.10
Expand All @@ -24,7 +30,7 @@ test_task:
- poetry config virtualenvs.in-project true
test_script:
- poetry install
- poetry run pytest -q --junitxml=junit.xml tests
- poetry run pytest -n auto -q --junitxml=junit.xml tests
on_failure:
annotate_failure_artifacts:
path: junit.xml
Expand Down
54 changes: 33 additions & 21 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,24 +1,36 @@
[flake8]
min_python_version = 3.7.0
max-line-length = 88
ignore = E501, E203, W503
ban-relative-imports = true
# flake8-use-fstring: https://github.com/MichaelKim0407/flake8-use-fstring#--percent-greedy-and---format-greedy
format-greedy = 1
inline-quotes = double
enable-extensions = TC, TC1
type-checking-exempt-modules = typing, typing-extensions
eradicate-whitelist-extend = ^-.*;
extend-ignore =
# E203: Whitespace before ':' (pycqa/pycodestyle#373)
E203,
# SIM106: Handle error-cases first
SIM106,
# ANN101: Missing type annotation for self in method
ANN101,
# ANN102: Missing type annotation for cls in classmethod
ANN102,
# PIE781: assign-and-return
PIE781,
# PIE798 no-unnecessary-class: Consider using a module for namespacing instead
PIE798,
per-file-ignores =
__init__.py:F401
tests/console/commands/debug/test_resolve.py:W291
exclude =
.git
__pycache__
setup.py
build
dist
releases
.venv
.tox
.mypy_cache
.pytest_cache
.vscode
.github
poetry/utils/_compat.py
poetry/utils/env_scripts/tags.py
tests/fixtures/
tests/repositories/fixtures/
tests/utils/fixtures/
# TC002: Move third-party import '...' into a type-checking block
__init__.py:TC002,
# ANN201: Missing return type annotation for public function
tests/test_*:ANN201
tests/**/test_*:ANN201
extend-exclude =
# Frozen and not subject to change in this repo:
get-poetry.py,
install-poetry.py,
# External to the project's coding standards:
tests/fixtures/*,
tests/**/fixtures/*,
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/---bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: "\U0001F41E Bug Report"
about: Did you find a bug?
title: ''
labels: Bug, Triage
labels: kind/bug, status/triage
assignees: ''

---
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/---documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: "\U0001F4DA Documentation"
about: Did you find errors, problems, or anything unintelligible in the docs (https://python-poetry.org/docs)?
title: ''
labels: Documentation, Triage
labels: area/docs, status/triage
assignees: ''

---
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/---everything-else.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ about: For questions and issues that do not fall in any of the other categories.
can include questions about Poetry's roadmap. For support questions, please post
on StackOverflow.
title: ''
labels: ''
labels: status/triage
assignees: ''

---
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/---feature-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: "\U0001F381 Feature Request"
about: Do you have ideas for new features and improvements?
title: ''
labels: Feature, Triage
labels: kind/feature, status/triage
assignees: ''

---
Expand Down
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ updates:
open-pull-requests-limit: 0
reviewers:
- "python-poetry/triage"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
36 changes: 36 additions & 0 deletions .github/workflows/backport.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Backport

on:
pull_request_target:
types:
- closed
- labeled

jobs:
backport:
name: Backport
runs-on: ubuntu-latest
# Only react to merged PRs for security reasons.
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
if: >
github.event.pull_request.merged
&& (
github.event.action == 'closed'
|| (
github.event.action == 'labeled'
&& contains(github.event.label.name, 'backport')
)
)
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.POETRY_TOKEN_APP_ID }}
private_key: ${{ secrets.POETRY_TOKEN_APP_KEY }}
- name: Generate backport
uses: tibdex/backport@v2
with:
github_token: ${{ steps.generate_token.outputs.token }}
title_template: "[<%= base %>] <%= title %>"
label_pattern: "^backport/(?<base>([^ ]+))$"
19 changes: 0 additions & 19 deletions .github/workflows/code-quality.yaml

This file was deleted.

75 changes: 75 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: "Documentation Preview"

on:
pull_request:
# allow repository maintainers to modify and test workflow
paths-ignore:
- "**"
- "!.github/workflows/docs.yml"
pull_request_target:
# enable runs for this workflow when labeled as documentation only
# prevent execution when the workflow itself is modified from a fork
types:
- labeled
- synchronize
paths-ignore:
- "**"
- "!docs/**"

jobs:
deploy:
name: Build & Deploy
runs-on: ubuntu-latest
if: |
(github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'impact/docs'))
|| (github.event_name != 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
steps:
- name: Checkout Website Source
uses: actions/checkout@v3
with:
repository: python-poetry/website

- name: Checkout Poetry Source
uses: actions/checkout@v3
with:
path: poetry
ref: ${{ github.event.pull_request.head.sha }}

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "18"

- name: Build Assets
run: npm ci && npm run prod

- name: Fetch Documentation
run: |
python -m pip install poetry
poetry install --only main
poetry run python bin/website build --local ./poetry
- name: Install Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.83.1'

- name: Build
run: hugo -v --minify

- name: Deploy
uses: amondnet/vercel-action@v25
id: vercel-action
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
scope: python-poetry
github-comment: true
working-directory: public
74 changes: 0 additions & 74 deletions .github/workflows/installer.yml

This file was deleted.

0 comments on commit 6a9cc86

Please sign in to comment.