Skip to content
Open
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
17 changes: 5 additions & 12 deletions docs/source/plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,24 +133,17 @@ creation.
)
LOG.info(f"Successfully installed conda packages for {envname}")

``edgetest-conda/setup.cfg``
``edgetest-conda/pyproject.toml``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code-block:: ini
.. code-block:: toml
:emphasize-lines: 11-13

[metadata]
[project]
name = edgetest-conda
...
dependencies = [ "edgetest>=2021.11.0" ]

[options]
packages = find:
...
install_requires =
edgetest>=2021.11.0

[options.entry_points]
edgetest =
conda = edgetest_conda.plugin
entry-points."edgetest"."conda" = "edgetest_conda.plugin"

The ``options.entry_points`` section here creates the link between ``edgetest`` and your plugin.
5 changes: 2 additions & 3 deletions docs/source/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ Project support type

``edgetest`` works with the following types of projects:

- ``pyproject.toml``
- ``setup.cfg``
- and ``requirements.txt``
- ``pyproject.toml``, and
- ``requirements.txt``


Usage
Expand Down
215 changes: 14 additions & 201 deletions docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ Configuration file
Suppose you want to test upgrades for a subset of your dependencies. Instead of letting ``edgetest``
parse your requirements file, you can create a configuration file:

.. code-block:: ini
.. code-block:: toml

[edgetest.envs.pandas]
upgrade =
pandas
[[tool.edgetest.env]]
name = "pandas"
upgrade = [ "pandas" ]

Then run

.. code-block:: console

$ edgetest -c edgetest.cfg
$ edgetest -c edgetest.toml

This command will

Expand All @@ -29,26 +29,16 @@ This command will

.. important::

This configuration file can be a standalone file which is distinct from the ``setup.cfg`` or ``pyproject.toml``
configurations. Just note it must have a ``edgetest.envs`` otherwise it expects a PEP 517-style ``setup.cfg``
This configuration file can be a standalone file, distinct from ``pyproject.toml``.



``setup.cfg`` and ``pyproject.toml`` Configuration
``pyproject.toml`` Configuration
--------------------------------------------------

You can also specify your testing environment through ``setup.cfg`` or ``pyproject.toml``:
You can also specify your testing environment through ``pyproject.toml``:

.. tabs::

.. tab:: .cfg

.. code-block:: ini

[edgetest.envs.pandas]
upgrade =
pandas

.. tab:: .toml (legacy)

.. code-block:: toml
Expand All @@ -72,14 +62,6 @@ your requirements might look like this:

.. tabs::

.. tab:: .cfg

.. code-block:: ini

[options]
install_requires =
pandas

.. tab:: .toml

.. code-block:: toml
Expand All @@ -89,16 +71,10 @@ your requirements might look like this:
"pandas",
]

To point to ``setup.cfg`` or ``pyproject.toml``, supply the location of the file as your ``--config``:
To point to ``pyproject.toml``, supply the location of the file as your ``--config``:

.. tabs::

.. tab:: .cfg

.. code-block:: console

$ edgetest -c path/to/setup.cfg

.. tab:: .toml

.. code-block:: console
Expand All @@ -107,7 +83,7 @@ To point to ``setup.cfg`` or ``pyproject.toml``, supply the location of the file

.. important::

Using ``setup.cfg`` or ``pyproject.toml`` will allow you to upgrade optional installations.
Using ``pyproject.toml`` will allow you to upgrade optional installations.


Installing extras
Expand All @@ -118,19 +94,7 @@ call as follows:

.. tabs::

.. tab:: .cfg

Add an ``extras`` list to your environment:

.. code-block:: ini

[edgetest.envs.pandas]
upgrade =
pandas
extras =
tests

.. tab:: .toml (legacy)
.. tab:: .toml (legacy)

Add an ``extras`` list to your environment:

Expand Down Expand Up @@ -168,17 +132,6 @@ To specify the python version for your virtual environments, modify your configu

.. tabs::

.. tab:: .cfg

Add ``python_version`` to your environment:

.. code-block:: ini

[edgetest.envs.pandas]
upgrade =
pandas
python_version = "3.13"

.. tab:: .toml (legacy)

Add ``python_version`` to your environment:
Expand Down Expand Up @@ -207,20 +160,6 @@ To customize your test command, modify the configuration or CLI call as follows:

.. tabs::

.. tab:: .cfg

Add a ``command`` key to your environment:

.. code-block:: ini

[edgetest.envs.pandas]
upgrade =
pandas
extras =
tests
command =
pytest tests -m 'not integration'

.. tab:: .toml (legacy)

Add a ``command`` key to your environment:
Expand Down Expand Up @@ -266,22 +205,6 @@ To specify additional ``pip`` dependencies, modify as follows:

.. tabs::

.. tab:: .cfg

Add a ``deps`` list:

.. code-block:: ini

[edgetest.envs.pandas]
upgrade =
pandas
extras =
tests
command =
pytest tests -m "not integration"
deps =
scikit-learn

.. tab:: .toml (legacy)

Add a ``deps`` list:
Expand Down Expand Up @@ -334,57 +257,6 @@ you can specify those under the ``edgetest`` section of your configuration:

.. tabs::

.. tab:: .cfg

.. code-block:: ini

[edgetest]
extras =
tests
command =
pytest tests -m 'not integration'

[edgetest.envs.pandas]
upgrade =
pandas

[edgetest.envs.numpy]
upgrade =
numpy

.. important::

You can combine your configuration file with ``requirements.txt``. If you have the following
configuration file:

.. code-block:: ini

[options]
install_requires =

[edgetest]
extras =
tests
command =
pytest tests -m 'not integration'

and the following requirements file:

.. code-block:: text

pandas>=0.25.1,<=1.0.0
scikit-learn>=0.23.0,<=0.24.2


the following CLI call

.. code-block:: console

$ edgetest -c edgetest.cfg -r requirements.txt

will apply the default arguments to each environment.


.. tab:: .toml (legacy)

.. code-block:: toml
Expand Down Expand Up @@ -423,26 +295,6 @@ in your testing project directory:

.. tabs::

.. tab:: .cfg

.. code-block:: ini

[edgetest.envs.pandas]
package_dir = ../mypackage
upgrade =
pandas

[edgetest.envs.numpy]
package_dir = ../myotherpackage
upgrade =
numpy

After running

.. code-block:: console

$ edgetest -c path/to/edgetest.cfg

.. tab:: .toml (legacy)

.. code-block:: toml
Expand Down Expand Up @@ -507,16 +359,6 @@ in the ``uv`` documentation `here <https://docs.astral.sh/uv/reference/cli/#uv-p

.. tabs::

.. tab:: .cfg

Add ``exclude_newer`` to your environment or default configuration:

.. code-block:: ini

[edgetest]
exclude_newer =
3 days

.. tab:: .toml (legacy)

Add ``exclude_newer`` to your environment or default configuration:
Expand Down Expand Up @@ -559,15 +401,6 @@ Exporting an upgraded config file

.. tabs::

.. tab:: .cfg

This will overwrite your current ``setup.cfg`` file with the updated requirements.

.. code-block:: console

$ edgetest -c /path/to/setup.cfg --export


.. tab:: .toml

This will overwrite your current ``pyproject.toml`` file with the updated requirements.
Expand All @@ -594,14 +427,14 @@ For instance, ``snowflake-connector-python[pandas]>=2.2.8,<2.3.9`` might be repl

.. tabs::

.. tab:: Configuration file (cfg/toml)
.. tab:: Configuration file (toml)

Include the correct ``--requirements`` filepath and use ``--export``:

.. code-block:: console

$ edgetest \
-c path/to/edgetest.cfg \
-c path/to/edgetest.toml \
--requirements requirements.txt \
--export

Expand Down Expand Up @@ -629,18 +462,10 @@ Testing lower bounds of packages
This feature is experimental and may change in future releases. Limited functionality is available.

Suppose you want to test if a new feature is compatible with dependencies' lower bounds.
You can use an edgetest environment to test the lower bounds of dependencies in your ``setup.cfg`` or ``pyproject.toml`` as follows:
You can use an edgetest environment to test the lower bounds of dependencies in your ``pyproject.toml`` as follows:

.. tabs::

.. tab:: .cfg

.. code-block:: ini

[edgetest.envs.pandas_lower]
lower =
pandas

.. tab:: .toml (legacy)

.. code-block:: toml
Expand Down Expand Up @@ -669,18 +494,6 @@ For example, if your project configuration looks like this:

.. tabs::

.. tab:: .cfg

.. code-block:: ini

[options]
install_requires =
pandas>=0.24.3

[edgetest.envs.pandas_lower]
lower =
pandas

.. tab:: .toml (legacy)

.. code-block:: toml
Expand Down
Loading
Loading