Skip to content

Commit

Permalink
chore: Remove poetry.lock
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Dec 14, 2023
1 parent d6ba3e9 commit a1df490
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 1,546 deletions.
2 changes: 0 additions & 2 deletions .github/actions/install-tools/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ runs:
PIP_CONSTRAINT: ${{ inputs.constraints }}
run: |
pipx install poetry --verbose
pipx inject poetry poetry-plugin-export
pipx inject poetry poetry-dynamic-versioning[plugin]
poetry --version
poetry self show plugins
Expand All @@ -48,5 +47,4 @@ runs:
PIP_CONSTRAINT: ${{ inputs.constraints }}
run: |
pipx install nox
pipx inject nox nox-poetry
nox --version
1 change: 0 additions & 1 deletion .github/workflows/api-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ jobs:
pip install pip
pipx install griffe
pipx install nox
pipx inject nox nox-poetry
pipx list
- name: Set REF
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
griffe==0.38.0
pip==23.3.1
nox==2023.4.22
nox-poetry==1.0.3
poetry==1.7.1
poetry-plugin-export==1.6.0
poetry-dynamic-versioning==1.1.1
8 changes: 3 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
- tests/**
- docker-compose*.yml
- noxfile.py
- poetry.lock
- pyproject.toml
- .github/workflows/tests.yml
- .github/workflows/constraints.txt
Expand All @@ -23,7 +22,6 @@ on:
- tests/**
- docker-compose*.yml
- noxfile.py
- poetry.lock
- pyproject.toml
- .github/workflows/tests.yml
- .github/workflows/constraints.txt
Expand Down Expand Up @@ -113,7 +111,7 @@ jobs:
allow-prereleases: true
cache: pip
cache-dependency-path: |
poetry.lock
pyproject.toml
.github/workflows/constraints.txt
- name: Setup Python ${{ matrix.python-version }} (nightly)
Expand Down Expand Up @@ -165,7 +163,7 @@ jobs:
allow-prereleases: true
cache: pip
cache-dependency-path: |
poetry.lock
pyproject.toml
.github/workflows/constraints.txt
- name: Install tools
Expand Down Expand Up @@ -286,7 +284,7 @@ jobs:
cache: pip
allow-prereleases: true
cache-dependency-path: |
poetry.lock
pyproject.toml
.github/workflows/constraints.txt
- name: Install tools
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Poetry dependency manager
poetry.lock

# Temp files
*.temp.*

Expand Down
65 changes: 7 additions & 58 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,11 @@

import os
import shutil
import sys
from pathlib import Path
from textwrap import dedent

try:
from nox_poetry import Session, session
except ImportError:
message = f"""\
Nox failed to import the 'nox-poetry' package.
Please install it using the following command:
{sys.executable} -m pip install nox-poetry"""
raise SystemExit(dedent(message)) from None

GH_ACTIONS_ENV_VAR = "GITHUB_ACTIONS"

from nox import Session, session

FORCE_COLOR = "FORCE_COLOR"
TEST_DEPS = [
"coverage[toml]",
"faker",
"pytest",
"pytest-httpserver",
"pytest-subtests",
"python-dotenv",
"semver",
"tinydb",
]

package = "citric"

Expand All @@ -45,20 +25,7 @@
@session(python=all_python_versions, tags=["test"])
def tests(session: Session) -> None:
"""Execute pytest tests and compute coverage."""
deps = [*TEST_DEPS]
env = {"PIP_ONLY_BINARY": ":all:"}

if GH_ACTIONS_ENV_VAR in os.environ:
deps.append("pytest-github-actions-annotate-failures")

if session.python == "3.13":
env["PIP_NO_BINARY"] = "coverage,MarkupSafe"

if session.python.startswith("pypy"):
env["PIP_NO_BINARY"] = "MarkupSafe"

session.install(".", env=env)
session.install(*deps, env=env)
session.install(".[test]")
args = session.posargs or ["-m", "not integration_test"]

try:
Expand All @@ -71,12 +38,7 @@ def tests(session: Session) -> None:
@session(python=[main_cpython_version, main_pypy_version], tags=["test"])
def integration(session: Session) -> None:
"""Execute integration tests and compute coverage."""
deps = [*TEST_DEPS]
if GH_ACTIONS_ENV_VAR in os.environ:
deps.append("pytest-github-actions-annotate-failures")

session.install(".")
session.install(*deps)
session.install(".[test]")

args = [
"coverage",
Expand Down Expand Up @@ -104,7 +66,7 @@ def xdoctest(session: Session) -> None:
if FORCE_COLOR in os.environ:
args.append("--colored=1")

session.install(".")
session.install(".[test]")
session.install("xdoctest[colors]")
session.run("python", "-m", "xdoctest", *args)

Expand Down Expand Up @@ -134,20 +96,7 @@ def dependencies(session: Session) -> None:
def mypy(session: Session) -> None:
"""Type-check using mypy."""
args = session.posargs or locations
session.install(
".",
"faker",
"mypy",
"pytest",
"pytest-httpserver",
"pytest-subtests",
"python-dotenv",
"semver",
"sphinx",
"tinydb",
"types-requests",
"typing-extensions",
)
session.install(".[test,typing]")
session.run("mypy", *args)


Expand Down
Loading

0 comments on commit a1df490

Please sign in to comment.