Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move to poetry for dependency management; consolidate more settings into pyproject.toml #2187

Merged
merged 29 commits into from Jan 17, 2023

Commits on Dec 29, 2022

  1. first draft of moving to poetry for dependency management

     - also consolidating other settings to pyproject.toml when possible
    jclerman committed Dec 29, 2022
    Configuration menu
    Copy the full SHA
    c8e1f2e View commit details
    Browse the repository at this point in the history

Commits on Dec 30, 2022

  1. update to get docs and flake8 tox environments running.

     - both envs fail when run - not clear that the failures are new since they seem unrelated to my changes
    jclerman committed Dec 30, 2022
    Configuration menu
    Copy the full SHA
    debd140 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bd1d4c7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5609c41 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5fd8da2 View commit details
    Browse the repository at this point in the history
  5. remove "flake8" from list of extras; use "dev" instead. also use last…

    …est poetry-core.
    
     - poetry-core is at 1.4.0; require that to avoid risk of encountering old bugs
     - "flake8" was causing problems with pip during validate jobs, in which pip
       tried to do this:
    
        py37: install_package_deps> python -I -m pip install black==22.12.0 'flake8>=4.0.1; or extra == "flake8"' 'flakeheaven<4.0.0,>=3.2.1; or extra == "flake8"' 'importlib_metadata<5.0.0,>=4.2.0; python_version >= "3.7" and python_version < "3.8"' 'isodate<0.7.0,>=0.6.1' 'isort<6.0.0,>=5.10.0' mypy==0.991 'networkx<3.0.0,>=2.6.2; (python_full_version > "3.7.0" and python_version < "3.8") and extra == "networkx"' 'networkx<3.0.0,>=2.8.8; (python_version >= "3.8" and python_version < "4.0") and extra == "networkx"' 'pep8-naming<0.14.0,>=0.13.2; or extra == "flake8"' 'pyparsing<4.0.0,>=3.0.9' 'pytest-cov<5.0.0,>=4.0.0' 'pytest<8.0.0,>=7.1.3'
    
        and complained about:
    
        pip._vendor.packaging.markers.InvalidMarker: Invalid marker: 'or extra == "flake8"', parse error at 'or extra'
    jclerman committed Dec 30, 2022
    Configuration menu
    Copy the full SHA
    df3a293 View commit details
    Browse the repository at this point in the history

Commits on Dec 31, 2022

  1. install devcontainer development dependencies from pyproject.toml, in…

    …stead of requirements.txt files
    jclerman committed Dec 31, 2022
    Configuration menu
    Copy the full SHA
    7f04648 View commit details
    Browse the repository at this point in the history
  2. update Taskfile to use pyproject.toml & poetry to determine/install d…

    …ependencies
    
     - exception: docker:prepare task is not yet updated
    jclerman committed Dec 31, 2022
    Configuration menu
    Copy the full SHA
    a4d9d57 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    39184f5 View commit details
    Browse the repository at this point in the history

Commits on Jan 2, 2023

  1. Configuration menu
    Copy the full SHA
    d6a97ca View commit details
    Browse the repository at this point in the history

Commits on Jan 3, 2023

  1. Configuration menu
    Copy the full SHA
    16e61a4 View commit details
    Browse the repository at this point in the history
  2. poetry related changes:

    - `.github/workflows/validate.yaml`:
      - Cache the default `XDG_CACHE_HOME` instead of messing with
        `PIP_CACHE_DIR` and the variable. This simplifies caching quite a bit
        and also ensures caching works for poetry.
      - Install poetry for `extra-tasks`, so that poetry install works correctly.
      - Get an auth token in `extra-tasks` so we don't get hit by rate limiting.
    - `docs/conf.py`:
      - Disable nit picking on pre-python 3.7 as this causes problems with older sphinx.
    - `docs/developers.rst` and `docs/docs.rst`:
      - Incorporate poetry into instructions.
    - `docker-compose.yml`:
      - Set `POETRY_VIRTUALENVS_IN_PROJECT=1` so that the `.venv` goes into a docker
        volume instead of going to emphemeral storage.
    - `Dockerfile.devcontainer`
      - Don't install dependencies globally. With poetry, everyone should use
        poetry, and when using poetry the global python environment should not be
        used, so if people use the devcontainer correctly the global dependencies
        should have no effect.
    - `poetry.lock`
      - Ran `poetry lock` after changes to `pyproject.toml`, most notable change is
        the stuff added to the dev Poetry dependency group is no longer optional.
    - `pyproject.toml`:
      - Simplified the dependency constrains for `networkx` as this was causing
        problems with tox, as tox was running pip install with
        `'networkx<3.0.0,>=2.6.2; (python_version >= "3.7" and python_version <
        "3.8") and extra == "networkx"' 'networkx<3.0.0,>=2.8.8; (python_version >=
        "3.8" and python_version < "4.0") and extra == "networkx"'` and the `extra
        == "networkx"` here would never be true.
      - Added a `dev` poetry dependendcy group with everything that is needed for a
        sane development environment so that `poetry install` gets you a sane dev
        environment.
    - `Taskfile.yml`:
      - Changed the commands so that everything works as before but now instead runs things with poetry.
      - Removed the legacy venv handling and replaced it with poetry equivalents.
    - `tox.ini`:
      - Don't set nitpicky (`-n`) on the command line as it is being set
        conditionally on python version in `docs/conf.py` now.
    aucampia committed Jan 3, 2023
    Configuration menu
    Copy the full SHA
    46e30c2 View commit details
    Browse the repository at this point in the history

Commits on Jan 4, 2023

  1. Merge pull request #1 from aucampia/switch-to-poetry

    poetry related changes
    jclerman committed Jan 4, 2023
    Configuration menu
    Copy the full SHA
    6aa9d6d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c873a53 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7341453 View commit details
    Browse the repository at this point in the history

Commits on Jan 10, 2023

  1. Move dev dependencies from extras into poetry dep groups

    This is mainly so that poetry export is sane, but also because the extras should
    not be polluted with things that peope who use the wheel don't want or use.
    
    Other changes:
    
    - GitHub Actions:
      - Use `abatilo/actions-poetry` instead of `snok/install-poetry` as snok does
        not work well on Windows.
      - Install poetry before running tox so tox can call poetry.
      - Fix caching on Windows and MacOS
    - Add requirements files for poetry so its versions is managed by dependabot and
      so that the same version can be used in multiple contexts.
    - Add requirements file for Sphinx version used in readthedocs.
    - The problem with nitpicky was related to sphinx 4, not to python 3.7. So
      nitpicky is now disabled on Sphinx <= 5.
    - `test/test_literal/test_xmlliterals.py`: Only run html5lib test when html5lib
      is present.
    - Check poetry and poetry.lock from `.pre-commit-config.yaml`.
    - Changed `.readthedocs.yaml` to use poetry.
    - Added an `extra` for lxml.
    aucampia committed Jan 10, 2023
    Configuration menu
    Copy the full SHA
    fe43722 View commit details
    Browse the repository at this point in the history

Commits on Jan 11, 2023

  1. Configuration menu
    Copy the full SHA
    fa1cc18 View commit details
    Browse the repository at this point in the history
  2. Revert "chown mounted container volumes"

    This reverts commit fa1cc18.
    edmondchuc committed Jan 11, 2023
    Configuration menu
    Copy the full SHA
    8c113cd View commit details
    Browse the repository at this point in the history
  3. Merge pull request #2 from aucampia/switch-to-poetry

    Move dev dependencies from extras into poetry dep groups
    jclerman committed Jan 11, 2023
    Configuration menu
    Copy the full SHA
    9539db6 View commit details
    Browse the repository at this point in the history

Commits on Jan 12, 2023

  1. test: minimum versions

    This adds a tox environment and GHA test matrix entry for testing the
    lowest allowed versions of dependencies.
    aucampia committed Jan 12, 2023
    Configuration menu
    Copy the full SHA
    95021f6 View commit details
    Browse the repository at this point in the history

Commits on Jan 13, 2023

  1. Merge pull request #4 from aucampia/switch-to-poetry

    test minimum versions and decrease the lower bounds for dependencies to earliest versions that pass
    jclerman committed Jan 13, 2023
    Configuration menu
    Copy the full SHA
    c154844 View commit details
    Browse the repository at this point in the history

Commits on Jan 16, 2023

  1. Add chown for container volumes

    edmondchuc authored and aucampia committed Jan 16, 2023
    Configuration menu
    Copy the full SHA
    ead5864 View commit details
    Browse the repository at this point in the history
  2. Revert "Add chown for container volumes"

    This reverts commit a4da002.
    edmondchuc authored and aucampia committed Jan 16, 2023
    Configuration menu
    Copy the full SHA
    76d82c7 View commit details
    Browse the repository at this point in the history
  3. Add separate docker-compose for devcontainer. Add postCreateCommand t…

    …o install poetry with all extras flag.
    edmondchuc authored and aucampia committed Jan 16, 2023
    Configuration menu
    Copy the full SHA
    be4bba6 View commit details
    Browse the repository at this point in the history
  4. Use one docker-compose.yml with a new 'run' service to run one-off co…

    …mmands inside the devcontainer with docker volumes from the host
    edmondchuc authored and aucampia committed Jan 16, 2023
    Configuration menu
    Copy the full SHA
    1832327 View commit details
    Browse the repository at this point in the history
  5. change local state directories

    This should avoid interference between different containers and the host
    environment.
    aucampia committed Jan 16, 2023
    Configuration menu
    Copy the full SHA
    2cee383 View commit details
    Browse the repository at this point in the history
  6. Merge pull request #5 from aucampia/switch-to-poetry

    Fix devcontainer stuff
    jclerman committed Jan 16, 2023
    Configuration menu
    Copy the full SHA
    20e4b17 View commit details
    Browse the repository at this point in the history
  7. bump versions

    aucampia committed Jan 16, 2023
    Configuration menu
    Copy the full SHA
    0a5db59 View commit details
    Browse the repository at this point in the history

Commits on Jan 17, 2023

  1. build: fix comment

    change `Black` -> `isort` in isort config.
    aucampia committed Jan 17, 2023
    Configuration menu
    Copy the full SHA
    807ad03 View commit details
    Browse the repository at this point in the history