Skip to content
This repository has been archived by the owner on Jul 3, 2023. It is now read-only.

remove dependency on pytest-runner #81

Merged
merged 1 commit into from
Feb 23, 2022
Merged

remove dependency on pytest-runner #81

merged 1 commit into from
Feb 23, 2022

Conversation

jameslamb
Copy link
Contributor

Proposes removing the setup-time dependency on pytest-runner and setuptools keyword setup_requires, both of which are deprecated and (I think) not used by this project.

This project's CI always uses python -m pytest, not python setup.py test, so I don't think this dependencies and setuptools.setup() argument are necessary.

See "Notes" below for more details.

Additions

N/A

Removals

  • removes setup_requires in setup.py, and list of dependencies passed to it

Changes

  • N/A

Testing

Ran the following to emulate CircleCI locally.

docker run \
   --rm \
    -v $(pwd):/usr/local/src \
    --workdir /usr/local/src \
   -it circleci/python:3.7 \
        /bin/bash

And then installed hamilton and ran its tests.

# install dependencies
sudo apt install graphviz
python -m venv venv || virtualenv venv
. venv/bin/activate
python --version
pip --version
pip install -r requirements-test.txt
pip install -r requirements.txt
pip install "dask[complete]"

# run tests
python -m pytest --cov=hamilton tests/
python -m pytest graph_adapter_tests/h_dask

Screenshots

N/A

Notes

From https://pypi.org/project/pytest-runner/#description

Deprecation Notice
pytest-runner depends on deprecated features of setuptools and relies on features that break security mechanisms in pip. For example setup_requires and tests_require bypass pip --require-hashes. See also pypa/setuptools#1684.

It is recommended that you:

  • Remove 'pytest-runner' from your setup_requires, preferably removing the setup_requires option.
  • Remove 'pytest' and any other testing requirements from tests_require, preferably removing the tests_requires option.

Todos

N/A

Checklist

  • PR has an informative and human-readable title
  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows the standards laid out in the TODO link to standards
  • Passes all existing automated tests
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future todos are captured in comments
  • Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)
  • Reviewers requested with the Reviewers tool ➡️

Testing checklist

Python

  • python 3.6
  • python 3.7

Copy link
Collaborator

@elijahbenizzy elijahbenizzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Still need to automate testing but it'll run when published to mainthis is great -- really appreciate the attention to detail.

@skrawcz skrawcz merged commit f62509d into stitchfix:main Feb 23, 2022
@jameslamb jameslamb deleted the simplify-dependencies branch February 23, 2022 15:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants