From c22a4c86fb13c64f3542baf8b0b912d9109bc65e Mon Sep 17 00:00:00 2001 From: Stephen Kent Date: Fri, 25 Feb 2022 13:14:54 -0800 Subject: [PATCH 1/3] Set requests to be a package dependency --- poetry.lock | 12 ++++++------ pyproject.toml | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/poetry.lock b/poetry.lock index fe47a27..9dcc8b5 100644 --- a/poetry.lock +++ b/poetry.lock @@ -46,7 +46,7 @@ uvloop = ["uvloop (>=0.15.2)"] name = "certifi" version = "2021.10.8" description = "Python package for providing Mozilla's CA Bundle." -category = "dev" +category = "main" optional = false python-versions = "*" @@ -54,7 +54,7 @@ python-versions = "*" name = "charset-normalizer" version = "2.0.12" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -category = "dev" +category = "main" optional = false python-versions = ">=3.5.0" @@ -147,7 +147,7 @@ pyflakes = ">=2.4.0,<2.5.0" name = "idna" version = "3.3" description = "Internationalized Domain Names in Applications (IDNA)" -category = "dev" +category = "main" optional = false python-versions = ">=3.5" @@ -396,7 +396,7 @@ six = ">=1.5" name = "requests" version = "2.27.1" description = "Python HTTP for Humans." -category = "dev" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" @@ -530,7 +530,7 @@ typing-extensions = ">=3.7.4" name = "urllib3" version = "1.26.8" description = "HTTP library with thread-safe connection pooling, file post, and more." -category = "dev" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4" @@ -560,7 +560,7 @@ testing = ["coverage (>=4)", "coverage-enable-subprocess (>=1)", "flaky (>=3)", [metadata] lock-version = "1.1" python-versions = "^3.8" -content-hash = "8b6c45bab9aa9eb1649068cfe834425e93e69c03121ecd905941f18f3776e2b3" +content-hash = "d9585dfbbbd109e3955c927744b02eae8e5d760af41363072bea9ee348175a43" [metadata.files] atomicwrites = [ diff --git a/pyproject.toml b/pyproject.toml index 4d007bc..a27556e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,6 +21,7 @@ classifiers = [ python = "^3.8" dataclasses-json = "^0.5.6" python-dateutil = "^2.8.2" +requests = "^2.27.1" [tool.poetry.dev-dependencies] black = "*" From 866337d3232be5378fbe2c24b884fa0091bc66de Mon Sep 17 00:00:00 2001 From: Stephen Kent Date: Fri, 25 Feb 2022 13:19:18 -0800 Subject: [PATCH 2/3] Install poetry-dynamic-versioning in CI environment --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d98b365..b6c981a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,9 @@ jobs: poetry-version: ${{ matrix.poetry-version }} - name: 🐍 Install dependencies - run: poetry install + run: | + pip install poetry-dynamic-versioning + poetry install - name: 🔥 Test run: poetry run tox From 690a9cf70ad0629650913226f34a39bc431e9a05 Mon Sep 17 00:00:00 2001 From: Stephen Kent Date: Fri, 25 Feb 2022 13:24:00 -0800 Subject: [PATCH 3/3] Restrict Test PyPI publishing to git tags --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6c981a..689b1ab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,7 +52,10 @@ jobs: - name: 🔼 Publish to Test PyPI uses: pypa/gh-action-pypi-publish@master - if: env.ENABLE_TEST_PYPI_PUBLISH + if: | + env.ENABLE_TEST_PYPI_PUBLISH && + github.event_name == 'push' && + startsWith(github.ref, 'refs/tags') with: password: ${{ secrets.TEST_PYPI_API_TOKEN }} repository_url: https://test.pypi.org/legacy/