Skip to content

scripts as a single top-level point of project automation. #239

Closed

Description

@lovelydinosaur

Generally across the encode projects I've been using GitHub's "Scripts to Rule Them All" pattern as a consistent style for project testing, linting, publishing etc...

It's benenficial from my POV, because it ends up that we can always just run scripts/install, or scripts/test from any project and expect that to perform the same kind of thing, even if we're using different tooling between projects. (eg. started adopting nox in some places, but not yet there accross the board.)

I'd like to do the same with httpx, while still keeping the niceness of nox (So eg. reintroduce a scripts/test, scripts/lint and scripts/publish.) but figure it's worth raising this for discussion first.

I'd also be quite keen on having a fast-feedback test suite being the default, with nox's run against multiple environments as an explicit case?

Any general thoughts here or should I just dive in and take a crack at this?

Activity

  1. florimondmanca commented on Aug 19, 2019

    @florimondmanca
    Contributor

    Sharing my personal workflow here:

    I'd say the scripts/install and scripts/lint scripts are rather straightforward and would be very helpful to have.

    As for tests, I've been running $ pytest instead of nox to run tests against my virtual environment. Nox is too heavy for quick feedback, but running a complete pytest suite is moderately cheap (~15s). I also sometimes filter tests based on which ones I'm trying to get to pass, e.g. pytest -k "test_something" or pytest tests/test_foo.py.

    So not sure whether scripts/test should default to pytest, or if it should also forward extra args for finer control?

  2. sethmlarson commented on Aug 19, 2019

    @sethmlarson
    Contributor

    We can add session.posargs to the test nox session so that you can be narrower in your test executions. :)

    I have no issue with having the extra scripts, I didn't realize it was an encode org-wide thing.

  3. lovelydinosaur commented on Aug 20, 2019

    @lovelydinosaur
    MemberAuthor

    I have no issue with having the extra scripts, I didn't realize it was an encode org-wide thing.

    Totally not a problem - I think nox is a fantastic addition here, so not a big issue having to do a bit of rejigging to get there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions