Flexible test automation for Python

Overview

Nox - Flexible test automation for Python

nox is a command-line tool that automates testing in multiple Python environments, similar to tox. Unlike tox, Nox uses a standard Python file for configuration.

The latest documentation is available on Read the Docs.

The source code is available on GitHub.

Comments
  • feat: support users specifying an undeclared parametrization of python

    feat: support users specifying an undeclared parametrization of python

    Closes #158

    This adds coverage for --extra-python which allows for adding additional pythons for running python interpreters, not specified in the noxfile.

    opened by crwilcox 36
  • Add an option to skip install commands

    Add an option to skip install commands

    How would this feature be useful? Frequently you just want to re-run a particular session in a reused virtual environment as quickly as possible (e.g for unit tests, docs or linting). This is possible with --reuse-existing-virtualenvs, but session.install() still takes a second or two, which is not a lot, but still slower than just running pytest directly. Therefore, it would be useful to have an option for skipping session.install(), especially when executing sessions locally in a development loop.

    Describe the solution you'd like Add an inverse of the --install-only command.

    Describe alternatives you've considered

    • Use invoke within a manually created virtual environment (this is what I've been doing).
    • Just use a corresponding Python interpreter directly, e.g. .nox/<session_name>/bin/python -m pytest.
    • Accept the 1-2 second overhead, and take your time to sip on your favourite beverage :)
    enhancement help wanted Good first issue open collective eligible 
    opened by emilmelnikov 30
  • readthedocs broken

    readthedocs broken

    Describe the bug

    The docs are broken, the "stable" release did not build after the recent release (missing from changelog), with:

    AttributeError: 'HTMLParser' object has no attribute 'unescape'
    

    See https://readthedocs.org/projects/nox/builds/

    This should be fixable by setting a minimum version on some of the docs dependencies (why are those mixed with the test dependencies?) - readthedocs installs old versions of things by default, and then it's a no-op if you don't force an upgrade. Why they install a version of (something that uses HTML) that doesn't support Python 3.9+, I'm not sure, but forcing sphinx>=4 or something like that will likely fix the problem. Downgrading to Python 3.8 for the docs would fix it, too, but that's the wrong way to initially try to fix it.

    I would highly recommend enabling PR readthedocs builds (in the readthedocs settings), they are very handy for catching bugs in the docs builds.

    Also, it looks like "latest" hasn't built in a year or more, I'm guessing it was never changed to main from master, perhaps? It makes "latest" much older than "stable".

    docs 
    opened by henryiii 26
  • Alternate Nox config

    Alternate Nox config

    Been looking at nox and I believe it suites one of our projects needs which is currently using tox, though I would prefer to have more leeway, hence considering Nox.

    I'd prefer not to have a noxfile.py file on the root of our repo.

    Would you be willing to accept a PR which still defaults to noxfile.py but can look for alternative paths?

    At first I though about .nox/noxfile.py but I guess nuking the .nox directory to delete the virtualenvs is something users do a lot, so, perhaps:

    • .noxdir/conf.py for linux, ,_noxdir/conf.py for windows?
    • .noxconf/conf.py? I guess I would even be ok with a .noxfile without the .py extension.

    Of course, the purpose is not having to pass the alternate config on the nox CLI.

    Look at setup.cfg and/or pyproject.toml for a nox section where we can then define the path to the noxfile.py?

    Anyway, totally open for the alternative, but I wanted to ask before I set out to add support and it just gets rejected.

    enhancement needs clarification 
    opened by s0undt3ch 26
  • use base python installation (not virtual environment's Python) during python interpreter resolution

    use base python installation (not virtual environment's Python) during python interpreter resolution

    Describe the bug

    Current logic to determine which python interperter to use will use whichever is on the current PATH, which can be a virtual environment's python (venv or virtualenv) or a system installation.

    This can be problematic when creating new virtual environments, as pipx and probably others like pipenv must do.

    How to reproduce

    Run pipx's unit tests. Clone pipx, then run nox.

    >> nox
    nox > Running session unittests-3.6
    nox > Creating virtualenv using python3.6 in .nox/unittests-3-6
    nox > pip install .
    nox > python -m unittest discover
    E
    ======================================================================
    ERROR: tests.test_pipx (unittest.loader._FailedTest)
    ----------------------------------------------------------------------
    ImportError: Failed to import test module: tests.test_pipx
    Traceback (most recent call last):
      File "/usr/lib/python3.6/unittest/loader.py", line 428, in _find_test_path
        module = self._get_module_from_name(name)
      File "/usr/lib/python3.6/unittest/loader.py", line 369, in _get_module_from_name
        __import__(name)
      File "/home/csmith/git/pipx/tests/test_pipx.py", line 17, in <module>
        assert not hasattr(sys, "real_prefix"), "Tests cannot run under virtualenv"
    AssertionError: Tests cannot run under virtualenv
    
    
    ----------------------------------------------------------------------
    Ran 1 test in 0.000s
    
    FAILED (errors=1)
    
    

    Expected behavior

    The base python interpreter should be resolved rather than the virtual environment's python interpreter.

    Example implementations for interpreter resolution:

    • https://github.com/sarugaku/pythonfinder (this could potentially be used by nox but has lots of dependencies, https://github.com/sarugaku/pythonfinder/issues/78)
    • https://github.com/tox-dev/tox-venv/blob/master/src/tox_venv/hooks.py
    • https://github.com/theacodes/nox/pull/231#issuecomment-518347470 (for Windows)

    Note: https://github.com/theacodes/nox/issues/199 suggests using venv will fix this. I think this is necessary but not sufficient to create a new venv from within a virtual environment. (cc @pfmoore)

    enhancement help wanted 
    opened by cs01 25
  • Add a

    Add a "shared cache" directory

    Closes #72. Add an {envdir}/.shared directory (like @dhermes suggested), and create an API for accesing to it. I'm a bit new to the concept, so tell me if this is what you want :)

    CC @theacodes @cjolowicz

    opened by DiddiLeija 23
  • Resolve to interpreter 'python' in PATH if '--version' fits

    Resolve to interpreter 'python' in PATH if '--version' fits

    To fix #219

    TL;DR: Trying to implement the suggestion in https://github.com/theacodes/nox/issues/219#issuecomment-512933886, this PR adds a final check at the end of the property nox.virtualenv._resolved_interpreter which looks for an interpreter called "python" in the PATH, checks whether its --version fits the required version, and returns it as the resolved interpreter if it matches.

    Rationale

    As described in #219, sessions specifying the interpreter version (e.g. @nox.session(python='3.7')) don't find the existing matching python 3.7 if it is called "python" or "python.exe" and no python launcher ("py.exe") is available.

    The same sessions work when not specifying python='3.7', even if the used interpreter is actually python 3.7. If this happens, it makes it harder for collaborators on Unix/Windows to work on cross-platform libraries together (like nox or my current pet project) without temporarily adapting the noxfile to their own system (or their system to the noxfile).

    While the mechanisms applied in nox.virtualenvs do follow the Python guidelines, in practice, Anaconda installations on Windows, which are quite popular in my scientific/data-wrangling field, provide neither versioned interpreters (like 'python2', 'python27', 'python3', 'python37') nor a python launcher.

    For Anaconda-specific projects, the recent addition of conda environment support to nox is certainly very interesting. However, I am arguing from the perspective of cross-platform library development and would like to be able to provide a noxfile to my project which works on Unix and Windows, be it with Anaconda or with "proper" Python installations.

    One could argue that this is not noxs problem and should be fixed in Anaconda (and one would be right), but it is a pretty small addition and would in one step increase the reach for nox to everyone using Anaconda on Windows (which are quite a few people). And it would make it easier for me (and nox ;)) to find Windows contributors also.

    Implementation

    Added the check (with an extra module-level function for cleanliness), and some parametrised tests. I also fixed two incorrect return value mocks of py.path.local.sysfind (which returns None on not found, not False like in the mock return value), which my code initially tripped over because it checked for None.

    As the body of _resolved_interpreter is essentially a string of if-else conditionals, creating good tests was a bit of a challenge. I hope they're not too ugly. :)

    awaiting submitter action open collective eligible 
    opened by schuderer 23
  • Exclude combinations from parametrized matrix builds

    Exclude combinations from parametrized matrix builds

    I'm using the @parametrize decorator to create a build matrix, but i've got certain combinations I wish to exclude.

    right now i'm using a little escape hatch

    if valid_combination(*deps):
        run_tests(session, *deps)
    else:
        session.skip("unsupported combination")
    

    would be nice if Nox could provide an API for adding or removing 'cells' from the matrix (similarly to what you can do with github actions)

    enhancement help wanted open collective eligible 
    opened by danieleades 19
  • add venv as an option for venv_backend

    add venv as an option for venv_backend

    Summary

    This PR adds support for a different backend, venv. It adds a keyword argument to the VirtualEnv class, which defaults to False and is only true when the nox session has venv_backend=True.

    It also updates the resolution of the Python path, since using venv alone does not fix issues when creating a venv from within a virtual environment.

    The path resolution is modified to determine if a virtual environment is being used. If so, it tries to find the desired Python interpreter version in the base_prefix rather than anywhere on the system's PATH. Note that Windows was not tested, and probably will require some more changes.

    Test Plan

    # Create and enter virtual environment, then
    cd ~/git/nox
    pip install -e .
    cd ~/git/pipx
    # modify pipx's noxfile.py to have `venv_backend='venv'` for the unittests session
    nox -s unittests-3.6  # tests pass
    

    Additional context

    prefix: A string giving the site-specific directory prefix where the platform independent Python files are installed

    https://docs.python.org/3/library/sys.html#sys.prefix

    base_prefix: Set during Python startup, before site.py is run, to the same value as prefix. If not running in a virtual environment, the values will stay the same; if site.py finds that a virtual environment is in use, the values of prefix and exec_prefix will be changed to point to the virtual environment, whereas base_prefix and base_exec_prefix will remain pointing to the base Python installation (the one which the virtual environment was created from).

    https://docs.python.org/3/library/sys.html#sys.base_prefix

    Tox's implementation for venv support is included as a plugin in an additional package: https://github.com/tox-dev/tox-venv/blob/master/src/tox_venv/hooks.py


    fixes https://github.com/theacodes/nox/issues/199 cc @pfmoore

    opened by cs01 18
  • refactor: Drop `py` as a dependency

    refactor: Drop `py` as a dependency

    closes #583

    I picked up @henryiii's excellent work on #592, resolved the conflicts and the issue he described with shutil.which expecting a .exe.

    This should hopefully be everything needed to drop py.path, @henryiii I'd be grateful if you could check this out to see if I've solved the issue adequately as you have more of the context than me 🙂

    enhancement dependencies 
    opened by FollowTheProcess 17
  • Change default behavior for `--error-on-missing-interpreters`

    Change default behavior for `--error-on-missing-interpreters`

    Is it possible to improve --error-on-missing-interpreters with "principle of least surprise" in mind? We don't want onerous failures during local dev, but the two changes are proposed:

    • Mention the --error-on-missing-interpreters flag in the error / warning / success message if an interpreter was skipped
    • Change --error-on-missing-interpreters to default ON (instead of OFF) if we've detected the code is in CI (CI=true) or in an automated environment (sys.stdout.isatty()==False)

    Original Content (Original title: Test suite skipped with error "Python interpreter 3.8 not found.)

    Describe the bug

    The desired Python version was not available, the test suite is skipped entirely.

    2020-08-21T17:46:46.1946078Z ##[group]Run nox
    2020-08-21T17:46:46.1946291Z nox
    2020-08-21T17:46:46.1990422Z shell: /bin/bash -e {0}
    2020-08-21T17:46:46.1990565Z env:
    2020-08-21T17:46:46.1990705Z   pythonLocation: /opt/hostedtoolcache/Python/3.7.8/x64
    2020-08-21T17:46:46.1990822Z ##[endgroup]
    2020-08-21T17:46:46.2954365Z Running session tests-3.8
    2020-08-21T17:46:46.3002157Z Session tests-3.8 skipped: Python interpreter 3.8 not found.
    

    image

    How to reproduce

    import nox
    
    @nox.session(python=["3.7"])
    def tests(session):
        """Run pytest suite"""
        session.create_tmp()
        session.install("-r", "requirements-test.txt")
        tests = session.posargs or ["tests/"]
        session.run("pytest", *tests)
    
    # TODO: add lint, type checking, etc.
    
    $ cat .github/workflows/data_prep_tools_test.yml 
    # This workflow will install Python dependencies, run tests.
    # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
    
    name: test
    
    on:
      push:
        branches: [ master ]
      pull_request:
        branches: [ master ]
        
    defaults:
      run:
        working-directory: tools
    
    jobs:
      build:
    
        runs-on: ubuntu-latest
        strategy:
          matrix:
            python-version: [3.7]
    
        steps:
        - uses: actions/[email protected]
        - name: Set up Python ${{ matrix.python-version }}
          uses: actions/[email protected]
          with:
            python-version: ${{ matrix.python-version }}
        - name: Install dependencies
          run: |
            pip install nox
        - name: Test with nox
          run: |
            nox
    

    Expected behavior

    non-zero exit code

    enhancement help wanted open collective eligible 
    opened by broady 17
  • support micromamba as a backend

    support micromamba as a backend

    How would this feature be useful?

    I would like to be able to use micromamba along with mamba/conda/venv. It's a lot smaller/faster than mamba (that's why we use it in our Gitlab CI flows), and to my knowledge lacks no functionality that is required for nox backend purposes.

    Describe the solution you'd like

    No response

    Describe alternatives you've considered

    No response

    Anything else?

    No response

    enhancement 
    opened by yarnabrina 0
  • Compatibility with tox 4

    Compatibility with tox 4

    Current Behavior

    Tox 4 is now in release candidate 1 and it might make sense to take a look at how to support it here in tox_to_nox. Right now, tests results are:

    FAILED tests/test_tox_to_nox.py::test_trivial - AttributeError: module 'tox.c...
    FAILED tests/test_tox_to_nox.py::test_skipinstall - AttributeError: module 't...
    FAILED tests/test_tox_to_nox.py::test_usedevelop - AttributeError: module 'to...
    FAILED tests/test_tox_to_nox.py::test_commands - AttributeError: module 'tox....
    FAILED tests/test_tox_to_nox.py::test_deps - AttributeError: module 'tox.conf...
    FAILED tests/test_tox_to_nox.py::test_env - AttributeError: module 'tox.confi...
    FAILED tests/test_tox_to_nox.py::test_chdir - AttributeError: module 'tox.con...
    FAILED tests/test_tox_to_nox.py::test_dash_in_envname - AttributeError: modul...
    FAILED tests/test_tox_to_nox.py::test_non_identifier_in_envname - AttributeEr...
    FAILED tests/test_tox_to_nox.py::test_descriptions_into_docstrings - Attribut...
    

    All failures caused by

    def main() -> None:
            parser = argparse.ArgumentParser(description="Converts toxfiles to noxfiles.")
            parser.add_argument("--output", default="noxfile.py")
        
            args = parser.parse_args()
        
    >       config = tox.config.parseconfig([])
    E       AttributeError: module 'tox.config' has no attribute 'parseconfig'
    

    Expected Behavior

    It would be nice to have nox compatible with tox 4 when they release a final version.

    Steps To Reproduce

    Run nox tests with tox==4.0.0rc1

    Environment

    - OS:
    - Python:
    - Nox:
    

    Anything else?

    No response

    bug 
    opened by frenzymadness 2
  • Support a `NOXPYTHON` environment variable similar to `NOXSESSION`

    Support a `NOXPYTHON` environment variable similar to `NOXSESSION`

    How would this feature be useful?

    It'd save a few keystrokes and would work as a default for --pythons.

    Describe the solution you'd like

    Check for NOXPYTHON environment variable:

    NOXPYTHON=3.11 nox -s tests
    NOXPYTHON=3.10,3.11 nox -s tests
    

    While we're at it, it might make sense to also add env vars for --extra-pythons and --force-pythons.

    Describe alternatives you've considered

    Continue using --pythons, or include the Python version in NOXSESSION, i.e.

    NOXPYTHON=tests-3.10
    

    but this couples the default session with a Python version

    Anything else?

    No response

    enhancement 
    opened by edgarrmondragon 0
  • Add ability to list tags

    Add ability to list tags

    How would this feature be useful?

    When providing a Nox configuration for a team that may not be familiar with Nox, it would be good to give a simple command to list tags rather than have them look in the nox configuration or document them seperately.

    Describe the solution you'd like

    A new cli option, list-tags, which will list sessions by tag

    $ nox --list-tags
    
    lint:
      * flake8 -> Run flake8
      * pylint -> Run pylint
    format:
      * black -> Run black
      * isort -> Run isort
    check:
      * black -> Run black
      * flake8 -> Run flake8
      * isort -> Run isort 
      * pylint -> Run pylint
      * test -> Run tests
    

    Describe alternatives you've considered

    Tags could be added to the current list output, but, for larger projects, it may be unclear which sessions fall under which tags. Perhaps this could be solved by coloring the tags, but I think a tag view for list would be more useful.

    Instead of a separate command line option, it could be added to the bottom of the existing output.

    Anything else?

    No response

    enhancement 
    opened by avylove 1
  • pip doesn't give live output

    pip doesn't give live output

    Current Behavior

    When running a session with a lot of dependencies with --verbose, Nox will appear to hang after calling pip. Then will return all of the pip output at once. This breaks one of the fundamental rules of user interfaces, never make the user wonder what is happening.

    Expected Behavior

    Nox should provide realtime output from pip when --verbose is passed. There are several ways to do this. (Don't capture stdout/stderr, capture and print in loop until process is complete, call pip through Python). Probably this should be solved more generally than pip because there are other long-running commands people will want to run.

    Steps To Reproduce

    1. Create nox session with a lot of dependencies
    2. Run nox --verbose -s <session>
    3. Observer hang until pip completes

    Environment

    - OS: Ubuntu 20.04
    - Python: 3.8
    - Nox: 2022.8.7
    

    Anything else?

    No response

    bug 
    opened by avylove 0
Releases(2022.11.21)
  • 2022.11.21(Nov 21, 2022)

    We'd like to thank the following folks who contributed to this release:

    • @airtower-luna
    • @DiddiLeija
    • @FollowTheProcess
    • @henryiii
    • @hynek
    • @Julian
    • @nhtsai
    • @paw-lu

    New features:

    • Include Python 3.11 classifier & testing (#655)

    Improvements:

    • Fixed a few typos (#661, #660)
    • Drop dependency on py (#647)
    • nox.session.run now accepts a pathlib.Path for the command (#649)
    • Document nox.session.run's stdout and stderr arguments and add example of capturing output (#651)

    Bugfixes:

    • GitHub Action: replace deprecated set-output command (#668)
    • GitHub Action: point docs to 2022.8.7 not latest (#664)
    • Docs: fix argument passing in session.posargs example (#653)
    • Include GitHub action helper in MANIFEST.in (#645)

    Internal changes:

    • GitHub Action: move to 3.11 final (#667)
    • Cleanup Python 2 style code (#657)
    • Update tools used in pre-commit (#646, #656)
    Source code(tar.gz)
    Source code(zip)
  • 2022.8.7(Aug 8, 2022)

    We'd like to thank the following folks who contributed to this release:

    • @CN-M
    • @crwilcox
    • @DiddiLeija
    • @edgarrmondragon
    • @FollowTheProcess
    • @hauntsaninja
    • @henryiii
    • @johnthagen
    • @jwodder
    • @ktbarrett
    • @mayeut
    • @meowmeowmeowcat
    • @NickleDave
    • @raddessi
    • @zhanpon

    Removals:

    • Drop support for Python 3.6 (#526)
    • Disable running session.install outside a venv (#580)

    New features:

    • Official Nox GitHub Action (#594, #606, #609, #620, #629, #637, #632, #633)
    • Missing interpreters now error the session on CI by default (#567)
    • Allow configurable child shutdown timeouts (#565)
    • Add session tags (#627)
    • Add short -N alias for --no-reuse-existing-virtualenvs (#639)
    • Export session name in NOX_CURRENT_SESSION environment variable (#641)

    Improvements:

    • Add VENV_DIR to dev session in cookbook (#591)
    • Fix typo in tutorial.rst (#586)
    • Use consistent spelling for Nox in documentation (#581)
    • Support descriptions in tox-to-nox (#575)
    • Document that silent=True returns the command output (#578)
    • Support argcomplete v2 (#564)

    Bugfixes:

    • Fix incorrect FileNotFoundError in load_nox_module (#571)

    Internal changes:

    • Update the classifiers, documentation, and more to point to the new Winterbloom location (#587)
    • Support PEP 621 (pyproject.toml) (#616, #619)
    • Configure language code to avoid warning on sphinx build (#626)
    • Use latest GitHub action runners and include macOS (#613)
    • Jazz up the README with some badges/logo etc. (#605, #614)
    • Prefer type checking against Jinja2 (#610)
    • Introduce GitHub issue forms (#600, #603, #608)
    • Full strictness checking on mypy (#595, #596)
    • Drop 99% coverage threshold flag for 3.10 in noxfile (#593)
    • Create a requirements-dev.txt (#582)
    • Use myst-parser for Markdown docs (#561)
    Source code(tar.gz)
    Source code(zip)
  • 2022.1.7(Jan 7, 2022)

    Claudio Jolowicz, Diego Ramirez, and Tom Fleet have become maintainers of Nox. We'd like to thank the following folks who contributed to this release:

    • @brettcannon
    • @cjolowicz
    • @dhermes
    • @DiddiLeija
    • @FollowTheProcess
    • @franekmagiera
    • @henryiii
    • @jugmac00
    • @maciej-lech
    • @nawatts
    • @Tolker-KU

    New features:

    • Add mamba backend (#444, #448, #546, #551)
    • Add session.debug to show debug-level messages (#489)
    • Add cookbook page to the documentation (#483)
    • Add support for the FORCE_COLOR environment variable (#524, #548)
    • Allow using session.chdir() as a context manager (#543)
    • Deprecate use of session.install() without a valid backend (#537)

    Improvements:

    • Test against Python 3.10 (#495, $502, #506)
    • Add support for the channel option when using the conda backend (#522)
    • Show more specific error message when the --keywords expression contains a syntax error (#493)
    • Include reference to session.notify() in tutorial page (#500)
    • Document how session.run() fails and how to handle failures (#533)
    • Allow the list of sessions to be empty (#523)

    Bugfixes:

    • Fix broken temporary directory when using session.chdir() (#555, #556)
    • Set the CONDA_PREFIX environment variable (#538)
    • Fix bin directory for the conda backend on Windows (#535)

    Internal changes:

    • Replace deprecated load_module with exec_module (#498)
    • Include tests with source distributions (#552)
    • Add missing copyright notices (#509)
    • Use the new ReadTheDocs configurations (#527)
    • Bump the Python version used by ReadTheDocs to 3.8 (#496)
    • Improve the Sphinx config file (#499)
    • Update all linter versions (#528)
    • Add pre-commit and new checks (#530, #539)
    • Check MANIFEST.in during CI (#552)
    • Remove redundant LICENSE from MANIFEST.in (#505)
    • Make setuptools use the standard library's distutils to work around virtualenv bug. (#547, #549)
    • Use shlex.join() when logging a command (#490)
    • Use shutil.rmtree() over shelling out to rm -rf in noxfile (#519)
    • Fix missing Python 3.9 CI session (#529)
    • Unpin docs session and add --error-on-missing-interpreter to CI (#532)
    • Enable color output from Nox, pytest, and pre-commit during CI (#542)
    • Only run conda_tests session by default if user has conda installed (#521)
    • Update dependencies in requirements-conda-test.txt (#536)
    Source code(tar.gz)
    Source code(zip)
  • 2021.10.1(Oct 1, 2021)

    New features:

    • Add session.warn to output warnings (#482)
    • Add a shared session cache directory (#476)
    • Add session.invoked_from (#472)

    Improvements:

    • Conda logs now respect nox.options.verbose (#466)
    • Add session.notify example to docs (#467)
    • Add friendlier message if no noxfile.py is found (#463)
    • Show the noxfile.py docstring when using nox -l (#459)
    • Mention more projects that use Nox in the docs (#460)

    Internal changes:

    • Move configs into pyproject.toml or setup.cfg (flake8) (#484)
    • Decouple test_session_completer from project level noxfile (#480)
    • Run Flynt to convert str.format to f-strings (#464)
    • Add python 3.10.0-rc2 to GitHub Actions (#475, #479)
    • Simplify CI build (#461)
    • Use PEP 517 build system, remove setup.py, use setup.cfg (#456, #457, #458)
    • Upgrade to mypy 0.902 (#455)

    Special thanks to our contributors:

    • @henryiii
    • @cjolowicz
    • @FollowTheProcess
    • @franekmagiera
    • @DiddiLeija
    Source code(tar.gz)
    Source code(zip)
  • 2021.6.12(Jun 13, 2021)

    • Fix crash on Python 2 when reusing environments. (#450)
    • Hide staleness check behind a feature flag. (#451)
    • Group command-line options in --help message by function. (#442)
    • Avoid polluting tests with a .nox directory. (#445)
    Source code(tar.gz)
    Source code(zip)
  • 2021.6.6(Jun 6, 2021)

    • Add option --no-install to skip install commands in reused environments. (#432)
    • Add option --force-python as shorthand for --python and --extra-python. (#427)
    • Do not reuse environments if the interpreter or the environment type has changed. (#418, #425, #428)
    • Allow common variations in session names with parameters, such as double quotes instead of single quotes. Session names are considered equal if they produce the same Python AST. (#417, #434)
    • Preserve the order of parameters in session names. (#401)
    • Allow @nox.parametrize to select the session Python. (#413)
    • Allow passing posargs when scheduling another session via session.notify. (#397)
    • Prevent sessions from modifying each other's posargs. (#439)
    • Add nox.needs_version to specify Nox version requirements. (#388)
    • Add session.name to get the session name. (#386)
    • Gracefully shutdown child processes. (#393)
    • Decode command output using the system locale if UTF-8 decoding fails. (#380)
    • Fix creation of Conda environments when venv_params is used. (#420)
    • Various improvements to Nox's type annotations. (#376, #377, #378)
    • Remove outdated notes on Windows compatibility from the documentation. (#382)
    • Increase Nox's test coverage on Windows. (#300)
    • Avoid mypy searching for configuration files in other directories. (#402)
    • Replace AppVeyor and Travis CI by GitHub Actions. (#389, #390, #403)
    • Allow colorlog <7.0.0. (#431)
    • Drop contexter from test requirements. (#426)
    • Upgrade linters to the latest version. (#438)
    Source code(tar.gz)
    Source code(zip)
  • 2020.12.31(Jan 1, 2021)

    • Fix NoxColoredFormatter.format(#374)
    • Use conda remove to clean up existing conda environments (#373)
    • Support users specifying an undeclared parametrization of python via --extra-python (#361)
    • Support double-digit minor version in python keyword (#367)
    • Add py.typed to manifest.in (#360)
    • Update nox to latest supported python versions. (#362)
    • Decouple merging of --python with nox.options from --sessions and --keywords (#359)
    • Do not merge command-line options in place (#357)
    Source code(tar.gz)
    Source code(zip)
  • 2020.8.22(Aug 23, 2020)

    • conda_install and install args are now automatically double-quoted when needed. (#312)
    • Offline mode is now auto-detected by default by conda_install. This allows users to continue executing Nox sessions on already installed environments. (#314)
    • Fix the default paths for Conda on Windows where the python.exe found was not the correct one. (#310)
    • Add the --add-timestamp option (#323)
    • Add Session.run_always(). (#331)
    Source code(tar.gz)
    Source code(zip)
  • 2020.5.24(May 25, 2020)

    • Add new options for venv_backend, including the ability to set the backend globally. (#326)
    • Fix various typos in the documentation. (#325, #326, #281)
    • Add session.create_tmp. (#320)
    • Place all of Nox's command-line options into argparse groups. (#306)
    • Add the --pythons command-line option to allow specifying which versions of Python to run. (#304)
    • Add a significant amount of type annotations. (#297, #294, #290, #282, #274)
    • Stop building universal wheels since we don't support Python 2. (#293)
    • Add the ability to specify additional options for the virtualenv backend using venv_params. (#280)
    • Prefer importlib.metadata for metadata loading, removing our dependency on pkg_resources. (#277)
    • Add OmegaConf and Hydra to list of projects that use Nox. (#279)
    • Use a more accurate error message, along with the cause, if loading of noxfile runs into error. (#272)
    • Test against Python 3.8. (#270)
    • Fix a syntax highlighting mistake in configuration docs. (#268)
    • Use stdout.isatty to finalize color instead of stdin.isatty. (#267)
    Source code(tar.gz)
    Source code(zip)
  • 2019.11.9(Nov 10, 2019)

    • Fix example installation call for pip. (#259)
    • Allow colorlog 4. (#257)
    • Order Pythons in descending version in appveyor.yml. (#258)
    • Add link to GitHub Action for Nox. (#255)
    • Use double "`" for inline code. (#254)
    • Add types to _option_set.py. (#249)
    • Add type hints to tasks.py. (#241)
    • Fix typo (virtulenvs). (#247)
    • Replace flake8 sorter with isort. (#242)
    • Pass VIRTUAL_ENV environment variable to commands executed in a virtualenv. (#245)
    • Fix docs to show correct list for parametrize. (#244)
    • Add argcomplete dependency to conda test session. (#240)
    Source code(tar.gz)
    Source code(zip)
  • 2019.8.20(Aug 20, 2019)

    • Add interactive property to session. (#196)
    • Promote contributors to maintainers, add Open Collective details. (#201)
    • Fix funding external link. (#200)
    • Refactor how Nox defines and process options. (#187)
    • Fix typo in tutorial. (#194)
    • Use 'pytest' instead of 'py.test' in examples and configuration. (#193)
    • Fix some CSS issues on mobile. (#192)
    • Use short form of virtualenv path when creating the virtualenv. (#191)
    • Refresh tutorial and fixup small docs things. (#190)
    • Add the ability to give parametrized sessions a custom ID. (#186)
    • Make --list list all available sessions, not just the selected ones. (#185)
    • Allow providing a friendlier CLI name to sessions. (#170)
    • Add urllib3 to the list of projects that use Nox (#182)
    • Fix documentation link for Docker Cloud vs Hub (#179)
    Source code(tar.gz)
    Source code(zip)
  • 2019.5.30(May 30, 2019)

    • Add interactive property to session. (#196)
    • Promote contributors to maintainers, add Open Collective details. (#201)
    • Fix funding external link. (#200)
    • Refactor how Nox defines and process options. (#187)
    • Fix typo in tutorial. (#194)
    • Use 'pytest' instead of 'py.test' in examples and configuration. (#193)
    • Fix some CSS issues on mobile. (#192)
    • Use short form of virtualenv path when creating the virtualenv. (#191)
    • Refresh tutorial and fixup small docs things. (#190)
    • Add the ability to give parametrized sessions a custom ID. (#186)
    • Make --list list all available sessions, not just the selected ones. (#185)
    • Allow providing a friendlier CLI name to sessions. (#170)
    • Add urllib3 to the list of projects that use Nox (#182)
    • Fix documentation link for Docker Cloud vs Hub (#179)
    Source code(tar.gz)
    Source code(zip)
  • 2019.4.11(Apr 11, 2019)

    • Include changelog in documentation. (#177)
    • Use the relative path of the virtualenv in the "creating virtualenv" log message. (#176)
    • Allow not passing "--upgrade" to session.install and change its default behavior to not upgrade. (#172)
    • Expand environment variables when loading the noxfile from provided path. (#171)
    • Add documentation around using Docker to run Nox. (#164)
    • Don't colour output if NO_COLOR is set. (#163)
    • Fix tox casing to be consistent with their docs, remove `.`` from pytest. (#160)
    • Update issue templates.
    • Add CODE_OF_CONDUCT.md.
    • Add --install-only flag to install dependencies without running anything (#153)
    • Fix function name in docs. (#155)
    • Allow silent argument to be set in session.install. (#157)
    • Run sessions in the same order specified on the command line. (#152)
    Source code(tar.gz)
    Source code(zip)
  • 2018.10.17(Oct 17, 2018)

  • 2018.10.15(Oct 15, 2018)

    • Hide the python interpreter on sessions with only one. (#148)
    • Warn when programs not in the virtualenv are used, allow erroring and silencing the warning. (#147)
    • Add --warn-on-external-run flag and the "external" keyword arg to session.run. (#147)
    • Add nox.options which allows specifying command-line configuration in the Noxfile (#145)
    • Add python_requires (>= 3.5) to setup.py.
    Source code(tar.gz)
    Source code(zip)
  • 2018.10.9(Oct 10, 2018)

    Breaking changes:

    • Skip sessions with missing interpreters. Previously, missing interpreters would cause a failed session. Now they just cause a warning. The previous behavior can be used via --error-on-missing-interpreters. (#140)

    New features:

    • Add session.python property.

    Other changes:

    • Fix some warnings about escape sequences.
    • Group command line args by usage for readability.
    • Blacklist more Tox env vars in nox-to-tox.
    • Documentation fixes, spelling, etc. (#134)
    • Mention stickers in the contributors guide.
    • Mention Invoke as a Nox alternative.
    Source code(tar.gz)
    Source code(zip)
  • 2018.9.14(Sep 14, 2018)

    • Check for NOXSESSION environment variable (#121)
    • Fix typo in OpenCensus Python (#132)
    • Add new documentation art created by Andrea Caprotti
    • Add Python 3.7 to Travis CI (#129)
    Source code(tar.gz)
    Source code(zip)
  • 2018.8.28(Aug 28, 2018)

    Bugfixes:

    • Adding Session.__slots__. (#128)
    • Don't modify Virtualenv.interpreter in _resolved_interpreter. (#127)
    • Fix tox-to-nox template.
    • Add the ability to add descriptions to sessions. (#117)
    • Using more specific regex in _resolved_interpreter(). (#119)

    New features:

    • Adding support for 32-bit binaries on Windows. (#100)

    Internal/testing changes:

    • Storing platform.system() as global in nox.virtualenv. (#124)
    • Fix deploy script for Travis.
    • Run docs on travis. (#122)
    • Documentation style updates.
    Source code(tar.gz)
    Source code(zip)
  • 2018.8.23(Aug 24, 2018)

    Heads up! This is a very big release for Nox. Please read these release notes thoroughly and reach out to us on GitHub if you run into issues.

    Breaking changes and other important notes:

    • Nox is now published as "nox" on PyPI. This means that Nox is installed via pip install nox instead of nox-automation. Since the new release makes so many breaking changes, we won't be updating the old nox-automation package.
    • Nox's configuration file is now called noxfile.py instead of nox.py.
    • Nox no longer supports Python 2.7. You can still create and run Python 2.7 sessions, but Nox itself must be installed using Python 3.5+.
    • Nox's behavior has been changed from declarative to imperative. Session actions now run immediately. Existing code to setup session virtualenv, such as session.interpreter will break! Please consult the documention on how to use @nox.session(python=[...]) to configure virtualenvs for sessions.
    • Nox now uses CalVer for releases.
    • Support for the legacy naming convention (for example, session_tests) has been removed.

    Other changes:

    • Update colorlog dependency range.
    • Update installation command in contributing. (#101)
    • Remove Python 2.x object inheritance. (#109)
    • Fix python syntax error on docs. (#111)
    • Show additional links on PyPI. (#108)
    • Add contributors file. (#113)
    • Run sphinx with -W option. (#115)
    • Using os.pathsep instead of a hardcoded ':'. (#105)
    • Use a configuration file for readthedocs. (#107)
    • Add 'py' alias for nox.session(python=...).
    • Fix processing of numeric Python versions that specify a patch version.
    • Use Black to format code.
    • Support invoking Nox using python -m nox.
    • Produce better error message when sessions can't be found.
    • Fix missing links in README.rst.
    • Remove usage of future imports.
    • Remove usage of six.
    • Make session.install a simple alias for session.run.
    • Refactor nox.command.Command as nox.command.run, reducing complexity.
    • Add list of projects that use Nox.
    • Use witchhazel pygments theme.
    Source code(tar.gz)
    Source code(zip)
  • v0.19.1(Aug 1, 2018)

  • v0.19.0(Aug 1, 2018)

    • Add missing parameter in docs (#89)
    • Don't skip install commands when re-using existing virtualenvs. (#86)
    • Add --nocolor and --forcecolor options (#85)
    • Simulating unittest.mock backport in the Python 2 standard library. (#81)
    • Fixing tox-to-nox docs reference. (#80)
    • Removing patch of py.exe on AppVeyor. (#74)
    • Adding Python 3.6 to AppVeyor. (#69)
    • Adding AppVeyor badge to README. (#70)
    Source code(tar.gz)
    Source code(zip)
  • v0.18.2(Oct 12, 2017)

  • v0.18.1(Sep 20, 2017)

  • v0.18.0(Sep 18, 2017)

    • Blacklist problematic virtualenv environment variables (#49)
    • Use python -m virtualenv to invoke virtualenv (#47)
    • Making sure all Commands use run in __call__. (#48)
    • Addition of session.notify. (#39)
    • Refactor the list of sessions into a manifest class. (#38)
    • Changed some instances of session to be plural (#37)
    • Small documentation updates (#36)
    Source code(tar.gz)
    Source code(zip)
Owner
Stargirl Flowers
Open-source advocate ✨ Synth crafter ✨ PSF Fellow ✨ She/her
Stargirl Flowers
Show, Edit and Tell: A Framework for Editing Image Captions, CVPR 2020

Show, Edit and Tell: A Framework for Editing Image Captions | arXiv This contains the source code for Show, Edit and Tell: A Framework for Editing Ima

Fawaz Sammani 76 Nov 25, 2022
User-interest mock backend server implemnted using flask restful, and SQLAlchemy ORM confiugred with sqlite

Flask_Restful_SQLAlchemy_server User-interest mock backend server implemnted using flask restful, and SQLAlchemy ORM confiugred with sqlite. Backend b

Austin Weigel 1 Nov 17, 2022
Code for "SUGAR: Subgraph Neural Network with Reinforcement Pooling and Self-Supervised Mutual Information Mechanism"

SUGAR Code for "SUGAR: Subgraph Neural Network with Reinforcement Pooling and Self-Supervised Mutual Information Mechanism" Overview train.py: the cor

41 Nov 08, 2022
automate the procedure of 403 response code bypass

403bypasser automate the procedure of 403 response code bypass Description i notice a lot of #bugbountytips describe how to bypass 403 response code s

smackerdodi2 40 Dec 16, 2022
PyBuster A directory busting tool for web application penetration tester, written in python

PyBuster A directory busting tool for web application penetration tester, written in python. Supports custom wordlist,recursive search. Screenshots Pr

Anukul Pandey 4 Jan 30, 2022
The evaluator covering all of the metrics required by tasks within the DUE Benchmark.

DUE Evaluator The repository contains the evaluator covering all of the metrics required by tasks within the DUE Benchmark, i.e., set-based F1 (for KI

DUE Benchmark 4 Jan 21, 2022
Doing dirty (but extremely useful) things with equals.

Doing dirty (but extremely useful) things with equals. Documentation: dirty-equals.helpmanual.io Source Code: github.com/samuelcolvin/dirty-equals dir

Samuel Colvin 602 Jan 05, 2023
A mocking library for requests

httmock A mocking library for requests for Python 2.7 and 3.4+. Installation pip install httmock Or, if you are a Gentoo user: emerge dev-python/httm

Patryk Zawadzki 452 Dec 28, 2022
A Proof of concept of a modern python CLI with click, pydantic, rich and anyio

httpcli This project is a proof of concept of a modern python networking cli which can be simple and easy to maintain using some of the best packages

Kevin Tewouda 17 Nov 15, 2022
WIP SAT benchmarking tooling, written with only my personal use in mind.

SAT Benchmarking Some early work in progress tooling for running benchmarks and keeping track of the results when working on SAT solvers and related t

Jannis Harder 1 Dec 26, 2021
Sixpack is a language-agnostic a/b-testing framework

Sixpack Sixpack is a framework to enable A/B testing across multiple programming languages. It does this by exposing a simple API for client libraries

1.7k Dec 24, 2022
Turn any OpenAPI2/3 and Postman Collection file into an API server with mocking, transformations and validations.

Prism is a set of packages for API mocking and contract testing with OpenAPI v2 (formerly known as Swagger) and OpenAPI v3.x. Mock Servers: Life-like

Stoplight 3.3k Jan 05, 2023
This is a pytest plugin, that enables you to test your code that relies on a running MongoDB database

This is a pytest plugin, that enables you to test your code that relies on a running MongoDB database. It allows you to specify fixtures for MongoDB process and client.

Clearcode 19 Oct 21, 2022
Find index entries in $INDEX_ALLOCATION attributes

INDXRipper Find index entries in $INDEX_ALLOCATION attributes Timeline created using mactime.pl on the combined output of INDXRipper and fls. See: sle

32 Nov 05, 2022
Set your Dynaconf environment to testing when running pytest

pytest-dynaconf Set your Dynaconf environment to testing when running pytest. Installation You can install "pytest-dynaconf" via pip from PyPI: $ pip

David Baumgold 3 Mar 11, 2022
Ab testing - basically a statistical test in which two or more variants

Ab testing - basically a statistical test in which two or more variants

Buse Yıldırım 5 Mar 13, 2022
A wrapper for webdriver that is a jumping off point for web automation.

Webdriver Automation Plus ===================================== Description: Tests the user can save messages then find them in search and Saved items

1 Nov 08, 2021
A command-line tool and Python library and Pytest plugin for automated testing of RESTful APIs, with a simple, concise and flexible YAML-based syntax

1.0 Release See here for details about breaking changes with the upcoming 1.0 release: https://github.com/taverntesting/tavern/issues/495 Easier API t

909 Dec 15, 2022
Youtube Tool using selenium Python

YT-AutoLikeComment-AutoReportComment-AutoComment Youtube Tool using selenium Python Auto Comment Auto Like Comment Auto Report Comment Usage: 1. Insta

Rahul Joshua Damanik 1 Dec 13, 2021
HTTP traffic mocking and testing made easy in Python

pook Versatile, expressive and hackable utility library for HTTP traffic mocking and expectations made easy in Python. Heavily inspired by gock. To ge

Tom 305 Dec 23, 2022