Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
23 changes: 23 additions & 0 deletions dev.README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@


## Nox

#### Install Nox

```sh
pipx install --suffix "@gsheet-tools" nox --python python3.12
```
- If Alias Required :
- pipx install <package_name> --alias <desired_alias> --python python3.12

#### Run Nox

Run
```sh
nox@gsheet-tools -s test_python_versions
```

Run and update nox-output.log
```sh
nox@gsheet-tools -s test_python_versions &> output.log
```
33 changes: 33 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
"""Nox configuration file for automating testing tasks.

This script defines the Nox sessions for testing the project across multiple
Python versions. It uses `pytest` as the test runner and includes support for
generating test coverage reports.

Attributes:
python_versions (list): A list of Python versions to test against.
"""

import nox

# Define the Python versions you want to test with
# NOTE: Use pyenv for maintaining multiple Python versions
python_versions = ["3.10", "3.11", "3.12", "3.13"]

@nox.session(python=python_versions)
def test_python_versions(session: nox.Session):
"""Run tests across multiple Python versions.

This session installs the project, along with the required dependencies
for testing, and then runs the test suite using `pytest`.

Args:
session (nox.Session): The Nox session object.
"""
# Install Self
session.install(f".")
# Install additional dependencies required for testing
session.install("pytest") # Pytest: Test runner
session.install("pytest-cov")
# Run Pytest
session.run("pytest")
2 changes: 2 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[pytest]
addopts = --cov=gsheet_tools --cov-report=term-missing