Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for GitHub tokens, warning for password stored #1

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
0db07bc
Remove executable bits from Python files without shebangs
hroncok Oct 5, 2020
b0d9086
utils: fix canonical package name regex
abn Oct 13, 2020
fa52260
Fix PEP 508 representation of dependency w/o extras
abn Oct 16, 2020
727907d
Ignore dev dependencies for PEP 517 builds
roxchkplusony Oct 22, 2020
7004040
Make sdist deterministic by setting gzip mtime to 0
achow101 Oct 24, 2020
d61b964
actions: remove use of set-env command
abn Nov 18, 2020
abe9fe5
Extend the wheel Tag regex in tests to match cp3_10 and cp310
hroncok Nov 18, 2020
79bc4cb
Simplify temporary_directory and use safe_rmtree (#119)
Dec 31, 2020
8997e3a
Demonstrate that the wheel builder does not close wheels explicitly
kurtmckee Jan 7, 2021
124a879
Explicitly close the wheel temp file after it's written
kurtmckee Jan 7, 2021
832b10b
Fix #3258
Jan 13, 2021
b2d24fd
Black formatting
Jan 13, 2021
7e30405
fix incorrect type hints and add missing ones
finswimmer Oct 18, 2020
cdc45d1
Update packaging dep to v20.8
gi0baro Jan 18, 2021
38ba900
Update GH test workflow
gi0baro Jan 18, 2021
0160212
Add & to author name regex, resolve #3485 (#120)
ShayNehmad-RecoLabs Jan 25, 2021
b5a1b1f
Merge pull request #125 from gi0baro/packaging-20-8
sdispater Jan 29, 2021
8570e2e
Merge pull request #124 from cognitedata/fix-3285
sdispater Jan 29, 2021
4db39a6
Merge pull request #122 from kurtmckee/fix-poetry-3545
sdispater Jan 29, 2021
8e425a5
Merge pull request #105 from achow101/det-sdist
sdispater Jan 29, 2021
fdea1a3
Merge branch 'master' into improvement/type-hinting
sdispater Jan 29, 2021
76e64cb
Merge pull request #104 from finswimmer/improvement/type-hinting
sdispater Jan 29, 2021
bbd545e
Ensure dependency string is PEP 508 compliant (#103)
abn Jan 31, 2021
c0d7e52
fix (core.version.helpers): add python 3.9.* to list of PYTHON_VERSIO…
finswimmer Feb 2, 2021
cb2ce46
Fix constraint upper bound including prereleases (#128)
sdispater Feb 3, 2021
d7b1682
chore: packaging 20.9, Universal2 wheels on Apple Silicon (#129)
henryiii Feb 3, 2021
1034515
Revert changes to canonicalize_name (#132)
sdispater Feb 5, 2021
e5d09cd
Update dependencies
sdispater Feb 5, 2021
fc95204
Bump version to 1.0.1
sdispater Feb 5, 2021
a8fc290
Merge pull request #133 from python-poetry/release-1.0.1
sdispater Feb 5, 2021
1b11c78
"Dependency" needs to be imported outside TYPE_CHECKING only section …
finswimmer Feb 5, 2021
e9580ac
Update 1.0.1 change log
sdispater Feb 5, 2021
a706ee2
Bump version to 1.0.2
sdispater Feb 5, 2021
4bc9bde
Merge pull request #135 from python-poetry/release-1.0.2
sdispater Feb 5, 2021
b103125
Modernize code base (#131)
sdispater Mar 3, 2021
d0b8f3f
Make the Factory class more pluggable
sdispater Jul 3, 2020
5924c57
vendoring: split sync and update make targets
abn Sep 26, 2020
9a8cd00
deps: update vendoring python constraint
abn Mar 12, 2021
5d5251c
package: do not default to develop
abn Oct 6, 2020
97102e0
Default include formats to both sdist and wheel.
kasteph Nov 27, 2020
b4ec173
use uri for direct reference directory dependencies
AndrewGuenther Mar 22, 2021
748157e
Improve PEP-440 support for versions
abn Sep 4, 2020
dd1d7ad
tests: add PEP-440 comparison examples
abn Mar 22, 2021
0cded29
pep440: add helper methods and fixes
abn Mar 25, 2021
345d6a4
pep440: fix bugs
abn Mar 25, 2021
ea8d99f
Update pyproject to include compat
abn Mar 25, 2021
c11cb9a
pep440: ensure epoch is retained on version bumps
abn Mar 27, 2021
2af8f99
pyproject: minor improvement to handling of data
abn Mar 27, 2021
f3e3792
schema: add support for source.links boolean
abn Mar 27, 2021
bfc6008
ci: expand python coverage for integration tests
abn Mar 25, 2021
a7c6e2c
ci: expand test matrix for integration tests
abn Mar 25, 2021
e6c5443
ci: add experimental support for python 3.10
abn Mar 25, 2021
25f6ded
ci: skip pypy for integration tests
abn Mar 25, 2021
9e51c35
tests: fix py3.6 compat issues in integration suite
abn Mar 27, 2021
43047f1
package: add python 3.10 to available python list
abn Mar 27, 2021
c22421a
update development dependencies
abn Mar 27, 2021
d677150
ci: switch to pip install when installing poetry
abn Mar 27, 2021
28b7a07
Let poetry use default branch if none is specified. Resolves: python-…
david-fortini Mar 22, 2021
bd772c6
Revert "Let poetry use default branch if none is specified. Resolves:…
abn Mar 28, 2021
8855eeb
ci: add downstreap pipeline
abn Mar 28, 2021
395f832
lark: lazy load parsers (#150)
abn Mar 30, 2021
b7ecfd1
Update dependencies
sdispater Mar 29, 2021
4d666b2
Bump version to 1.1.0a1
sdispater Mar 29, 2021
4a2ccc3
Merge pull request #151 from python-poetry/release-1.1.0a1
sdispater Mar 30, 2021
8996496
pep440: replace lark in favour of regex (#152)
abn Mar 31, 2021
f5c6b64
pep440: support upper bound post/local release comparisons (#157)
abn Apr 2, 2021
8d5e5c5
Fix an error when handling single digit Python markers
sdispater Apr 2, 2021
716375e
pep440: support post/local for semver allows (#158)
abn Apr 8, 2021
8290b1f
Bump version to 1.1.0a2
sdispater Apr 2, 2021
3f978e7
Merge pull request #161 from python-poetry/release-1.1.0a2
sdispater Apr 8, 2021
d3e6073
Fix dependency markers not being copied in with_constraint()
sdispater Apr 9, 2021
a01c556
deps: relax compatibility requirement constraints (#164)
abn Apr 9, 2021
871e10e
Bump version to 1.1.0a3
sdispater Apr 9, 2021
4c6dc0d
Merge pull request #166 from python-poetry/release-1.1.0a3
sdispater Apr 9, 2021
d3e5139
pep440: preserve leading zeros in local segment
kasteph Apr 10, 2021
bddf441
ci: update test scripts to use install-poetry.py
abn Apr 10, 2021
015e05d
ci: cleanup release workflow
abn Apr 10, 2021
f478ec3
Use deterministic time for generated sdist files
abn Mar 22, 2021
44167a5
pre-commit: add json checks
abn Apr 20, 2021
fe476e0
fix(packages/dependency): add space after filename for file dependenc…
Apr 26, 2021
915479f
fix (vcs.git): allow `+` in user name
finswimmer Oct 5, 2020
9ff7a7e
change (vcs.git): make all arguments optional for `ParsedUrl`
finswimmer Oct 5, 2020
6bbc256
new (vcs.git): add property `is_unsafe` to `ParsedUrl` to return a bo…
finswimmer Oct 5, 2020
e54923e
Add test for x-oauth github url
setu4993 Nov 22, 2020
e2fd7f4
Add warning, tests for when password is stored
setu4993 Nov 22, 2020
710c664
Set optional args to ParsedUrl to None as default
setu4993 Apr 28, 2021
75f18a0
Add missing format vars for ParsedUrl
setu4993 Apr 28, 2021
15233b3
Apply black
setu4993 Apr 28, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .github/workflows/downstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Poetry Downstream Tests

on:
pull_request: {}
push:
branches: [master]

jobs:
Tests:
name: ${{ matrix.os }} / ${{ matrix.python-version }}
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
os: [Ubuntu]
python-version: [3.9]
experimental: [false]
steps:
- uses: actions/checkout@v2
with:
path: poetry-core

- uses: actions/checkout@v2
with:
repository: python-poetry/poetry
path: poetry

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Get full python version
id: full-python-version
shell: bash
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")

- name: Install poetry
shell: bash
run: pip install poetry

- name: Configure poetry
shell: bash
run: poetry config virtualenvs.in-project true

- name: Set up cache
uses: actions/cache@v2
id: cache
with:
path: ./poetry/.venv
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}

- name: Ensure cache is healthy
if: steps.cache.outputs.cache-hit == 'true'
shell: bash
working-directory: ./poetry
run: timeout 10s poetry run pip --version >/dev/null 2>&1 || rm -rf .venv

- name: Update poetry-core version
shell: bash
working-directory: ./poetry
run: |
poetry add ../poetry-core
git diff

# TODO: mark run as success even when this fails and add comment to PR instead
- name: Run poetry test suite
shell: bash
working-directory: ./poetry
run: poetry run pytest
12 changes: 10 additions & 2 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,23 @@ on: [push, pull_request]

jobs:
Tests:
name: ${{ matrix.os }} / ${{ matrix.python-version }}
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
python-version: [3.8]
os: [Ubuntu, MacOS, Windows]
python-version: [3.6, 3.7, 3.8, 3.9]
experimental: [false]
include:
- os: Ubuntu
python-version: "3.10.0-alpha - 3.10.0"
experimental: true
steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

Expand Down
139 changes: 31 additions & 108 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,125 +6,48 @@ on:
- '*.*.*'

jobs:

Linux:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Get tag
id: tag
run: |
echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install and set up Poetry
run: |
curl -fsS -o get-poetry.py https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py
python get-poetry.py --preview -y
- name: Build distributions
run: |
source $HOME/.poetry/env
poetry build -vvv
- name: Upload distribution artifacts
uses: actions/upload-artifact@v1
with:
name: pendulum-dist
path: dist

MacOS:
runs-on: macos-latest

steps:
- uses: actions/checkout@v2
- name: Get tag
id: tag
run: |
echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install and set up Poetry
run: |
curl -fsS -o get-poetry.py https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py
python get-poetry.py --preview -y
- name: Build distributions
run: |
source $HOME/.poetry/env
poetry build -vvv
- name: Upload distribution artifacts
uses: actions/upload-artifact@v1
with:
name: pendulum-dist
path: dist

Windows:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- name: Get tag
id: tag
shell: bash
run: |
echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install and setup Poetry
run: |
Invoke-WebRequest https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -O get-poetry.py
python get-poetry.py --preview -y
- name: Build distributions
run: |
$env:Path += ";$env:Userprofile\.poetry\bin"
poetry build -vvv
- name: Upload distribution artifact
uses: actions/upload-artifact@v1
with:
name: pendulum-dist
path: dist

Release:
needs: [Linux, MacOS, Windows]
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Get tag
id: tag
run: |
echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
- name: Download distribution artifact
uses: actions/download-artifact@master
run: echo ::set-output name=tag::${GITHUB_REF#refs/tags/}

- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
name: pendulum-dist
path: dist
- name: Install and set up Poetry
run: |
curl -fsS -o get-poetry.py https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py
python get-poetry.py --preview -y
- name: Check distributions
python-version: "3.9"

- name: Install Poetry
run: |
ls -la dist
- name: Publish to PyPI
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
curl -sL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py \
| python - -y

- name: Update PATH
run: echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Build project for distribution
run: poetry build

- name: Check Version
id: check-version
run: |
source $HOME/.poetry/env
poetry publish
[[ "$(poetry version --short)" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] \
|| echo ::set-output name=prerelease::true

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
uses: ncipollo/release-action@v1
with:
tag_name: ${{ steps.tag.outputs.tag }}
release_name: ${{ steps.tag.outputs.tag }}
artifacts: "dist/*"
token: ${{ secrets.GITHUB_TOKEN }}
draft: false
prerelease: false
prerelease: steps.check-version.outputs.prerelease == 'true'

- name: Publish to PyPI
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: poetry publish
50 changes: 30 additions & 20 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,25 @@ on:
branches: [master]

jobs:
Tests:
tests:
name: ${{ matrix.os }} / ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}-latest
runs-on: "${{ matrix.os }}-latest"
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
os: [Ubuntu, MacOS, Windows]
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9.0-rc.1, pypy2, pypy3]
exclude:
python-version: [3.6, 3.7, 3.8, 3.9]
experimental: [false]
bootstrap-args: [""]
include:
- os: Ubuntu
python-version: pypy2
- os: MacOS
python-version: pypy2
- os: MacOS
python-version: pypy3
- os: Windows
python-version: pypy2
- os: Windows
python-version: pypy3
experimental: false
- os: Ubuntu
python-version: "3.10.0-alpha - 3.10.0"
experimental: true
bootstrap-args: "--git https://github.com/python-poetry/poetry.git"
fail-fast: false
steps:
- uses: actions/checkout@v2

Expand All @@ -32,24 +33,33 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Get full python version
- name: Get full Python version
id: full-python-version
shell: bash
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")

- name: Install poetry
- name: Bootstrap poetry
shell: bash
run: |
curl -fsS -o get-poetry.py https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py
python get-poetry.py --preview -y
echo "::set-env name=PATH::$HOME/.poetry/bin:$PATH"
curl -sL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py \
| python - -y ${{ matrix.bootstrap-args }}

- name: Update PATH
if: ${{ matrix.os != 'Windows' }}
shell: bash
run: echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Update Path for Windows
if: ${{ matrix.os == 'Windows' }}
shell: bash
run: echo "$APPDATA\Python\Scripts" >> $GITHUB_PATH

- name: Configure poetry
shell: bash
run: poetry config virtualenvs.in-project true

- name: Set up cache
uses: actions/cache@v1
uses: actions/cache@v2
id: cache
with:
path: .venv
Expand All @@ -58,12 +68,12 @@ jobs:
- name: Ensure cache is healthy
if: steps.cache.outputs.cache-hit == 'true'
shell: bash
run: timeout 10s poetry run pip --version >/dev/null 2>&1 || rm -rf .venv
run: timeout 10s poetry run pip --version || rm -rf .venv

- name: Install dependencies
shell: bash
run: poetry install

- name: Run pytest
shell: bash
run: poetry run pytest -q tests
run: poetry run python -m pytest -p no:sugar -q tests/
19 changes: 14 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
repos:
- repo: https://github.com/psf/black
rev: 19.10b0
rev: 20.8b1
hooks:
- id: black
exclude: ^poetry/core/_vendor

- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.3
rev: 3.9.1
hooks:
- id: flake8
exclude: |
Expand All @@ -16,8 +16,8 @@ repos:
| ^poetry/core/_vendor
)

- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.4.2
- repo: https://github.com/timothycrosley/isort
rev: 5.8.0
hooks:
- id: isort
additional_dependencies: [toml]
Expand All @@ -28,7 +28,7 @@ repos:
)

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
rev: v3.4.0
hooks:
- id: trailing-whitespace
exclude: |
Expand All @@ -44,3 +44,12 @@ repos:
)
- id: debug-statements
exclude: ^poetry/core/_vendor

- id: check-json
exclude: ^poetry/core/_vendor

- id: pretty-format-json
exclude: ^poetry/core/_vendor
args:
- --no-sort-keys
- --autofix
Loading