From 1ca9a56b9c7e3f192ab9ca7a537b0fe94135eaea Mon Sep 17 00:00:00 2001 From: Aaron Miller Date: Thu, 16 May 2024 23:51:51 -0700 Subject: [PATCH] [SymForce] Use uv for requirements For example: https://github.com/aaron-skydio/symforce/pull/4 Topic: sf-uv --- .github/workflows/ci.yml | 23 +- .github/workflows/docs.yml | 4 +- .github/workflows/solve_requirements.yml | 59 +++ .../workflows/test_editable_pip_install.yml | 6 +- CMakeLists.txt | 2 +- README.md | 8 +- requirements_build.txt | 30 ++ requirements_dev_py310.txt | 350 +++++++++++++++++ requirements_dev_py311.txt | 342 +++++++++++++++++ requirements_dev_py312.txt | 340 ++++++++++++++++ ...uirements.txt => requirements_dev_py38.txt | 158 ++++---- requirements_dev_py39.txt | 362 ++++++++++++++++++ setup.py | 5 +- test/symforce_requirements_test.py | 124 ++++-- 14 files changed, 1654 insertions(+), 159 deletions(-) create mode 100644 .github/workflows/solve_requirements.yml create mode 100644 requirements_build.txt create mode 100644 requirements_dev_py310.txt create mode 100644 requirements_dev_py311.txt create mode 100644 requirements_dev_py312.txt rename dev_requirements.txt => requirements_dev_py38.txt (71%) create mode 100644 requirements_dev_py39.txt diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 811312451..48a7f934d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -112,18 +112,11 @@ jobs: libgoogle-glog-dev \ libeigen3-dev - # NOTE(aaron): Some packages do not have a version that supports py3.8..py3.12 - - name: Fix py3.12 versions - if: ${{ matrix.python == 'python3.12' }} - run: | - sed -i 's|numba==0.58.1|numba~=0.59.0|g' dev_requirements.txt - sed -i 's|llvmlite==0.41.1|llvmlite~=0.42.0|g' dev_requirements.txt - sed -i 's|numpy==1.24.4|numpy~=1.26.0|g' dev_requirements.txt - sed -i 's|scipy==1.10.1|scipy~=1.12.0|g' dev_requirements.txt - sed -i 's|pandas==2.0.3|pandas~=2.2.0|g' dev_requirements.txt - - name: Install python dependencies - run: pip install -r dev_requirements.txt + run: | + PY_MINOR_VERSION=$(${{ matrix.python }} -c "import sys; print(sys.version_info.minor)") + ${{ matrix.python }} -m pip install pip==24.0 setuptools==69.5.1 + ${{ matrix.python }} -m pip install -r requirements_dev_py3${PY_MINOR_VERSION}.txt - name: Run cmake build run: | @@ -135,17 +128,11 @@ jobs: -D SYMFORCE_BUILD_BENCHMARKS=ON cmake --build build -j $(nproc) - # - lcmtypes need to be available for tests - # - Exact contents of dev_requirements.txt depend on python version. Need to update file to - # match current python version to avoid failure of corresponding gen test. symforce needs - # to be on the PYTHONPATH to run gen test in this manner. + # lcmtypes and symforce need to be available for tests - name: Run tests run: | pip install build/lcmtypes/python2.7 export PYTHONPATH=$PYTHONPATH:$(pwd) - ${{ matrix.python }} test/symforce_requirements_test.py --update - echo "Modifications made to requirements:" - git diff EXIT_CODE=0 ctest --test-dir build -j $(nproc) || EXIT_CODE=$? if [ $EXIT_CODE -ne 0 ]; then diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2d07be2c3..5f86347df 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -23,7 +23,9 @@ jobs: pandoc - name: Install python dependencies - run: pip install -r dev_requirements.txt + run: | + PY_MINOR_VERSION=$(python -c "import sys; print(sys.version_info.minor)") + python -m pip install -r requirements_dev_py3${PY_MINOR_VERSION}.txt - name: Run cmake build run: | diff --git a/.github/workflows/solve_requirements.yml b/.github/workflows/solve_requirements.yml new file mode 100644 index 000000000..d2cf9870f --- /dev/null +++ b/.github/workflows/solve_requirements.yml @@ -0,0 +1,59 @@ +name: Solve Pip Requirements + +on: + workflow_dispatch: + inputs: + upgrade: + required: true + type: boolean + description: Run `uv compile` with the `--upgrade` flag + default: false + +jobs: + solve: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + py_version: [8, 9, 10, 11, 12] + steps: + - name: Checkout + uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: '3.${{ matrix.py_version }}' + + - run: | + pip install uv + uv pip compile --all-extras --output-file=/tmp/requirements_bootstrap.txt pyproject.toml + uv venv + source .venv/bin/activate + uv pip install -r /tmp/requirements_bootstrap.txt + + - run: PYTHONPATH=$(pwd) python test/symforce_requirements_test.py --update + if: ${{ !github.event.inputs.upgrade }} + + - run: PYTHONPATH=$(pwd) python test/symforce_requirements_test.py --update --piptools_upgrade + if: ${{ github.event.inputs.upgrade }} + + - uses: actions/upload-artifact@v4 + with: + name: requirements_dev_py3${{ matrix.py_version }} + path: requirements_dev_py3${{ matrix.py_version }}.txt + + publish: + runs-on: ubuntu-latest + needs: solve + steps: + - uses: actions/checkout@v4 + + - uses: actions/download-artifact@v4 + with: + merge-multiple: true + + - uses: peter-evans/create-pull-request@v6 + with: + commit-message: Update Requirements + title: Update Requirements + body: "" diff --git a/.github/workflows/test_editable_pip_install.yml b/.github/workflows/test_editable_pip_install.yml index b82101faa..48e7bfc46 100644 --- a/.github/workflows/test_editable_pip_install.yml +++ b/.github/workflows/test_editable_pip_install.yml @@ -34,8 +34,10 @@ jobs: pip==${{ matrix.pip_version }} \ setuptools==${{ matrix.setuptools_version }} - - name: install dev_requirements.txt - run: python -m pip install -r dev_requirements.txt + - name: install requirements + run: | + PY_MINOR_VERSION=$(python -c "import sys; print(sys.version_info.minor)") + python -m pip install -r requirements_dev_py3${PY_MINOR_VERSION}.txt - name: editable install run: python -m pip install -v -e . diff --git a/CMakeLists.txt b/CMakeLists.txt index dfbe7a8b4..60362d28c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ # NOTE(aaron): This is the minimum version for policy range support, not sure if we need newer; # certainly no newer than 3.15 required. This will use NEW policies up to CMake 3.25; this should -# be the maximum tested CMake version, matching dev_requirements.txt +# be the maximum tested CMake version, matching requirements_dev.txt cmake_minimum_required(VERSION 3.19...3.25) if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.27) diff --git a/README.md b/README.md index 47ea5e16d..05b4d6c4c 100644 --- a/README.md +++ b/README.md @@ -567,7 +567,7 @@ pip install -e . You should then [verify your installation](#verify-your-installation). -___Note:___ `pip install .` will not install pinned versions of SymForce's dependencies, it'll install any compatible versions. It also won't install all packages required to run all of the SymForce tests and build all of the targets (e.g. building the docs or running the linters). If you want all packages required for that, you should `pip install .[dev]` instead (or one of the other groups of extra requirements in our `setup.py`). If you additionally want pinned versions of our dependencies, which are the exact versions guaranteed by CI to pass all of our tests, you can install them from `pip install -r dev_requirements.txt`. +___Note:___ `pip install .` will not install pinned versions of SymForce's dependencies, it'll install any compatible versions. It also won't install all packages required to run all of the SymForce tests and build all of the targets (e.g. building the docs or running the linters). If you want all packages required for that, you should `pip install .[dev]` instead (or one of the other groups of extra requirements in our `setup.py`). If you additionally want pinned versions of our dependencies, which are the exact versions guaranteed by CI to pass all of our tests, you can install them from `pip install -r requirements_dev_py3.txt`. _Note: Editable installs as root with the system python on Ubuntu (and other Debian derivatives) are broken on `setuptools<64.0.0`. This is a [bug in Debian](https://ffy00.github.io/blog/02-python-debian-and-the-install-locations/), not something in SymForce that we can fix. If this is your situation, either use a virtual environment, upgrade setuptools to a version `>=64.0.0`, or use a different installation method._ @@ -576,11 +576,13 @@ _Note: Editable installs as root with the system python on Ubuntu (and other Deb If you'll be modifying the C++ parts of SymForce, you should build with CMake directly instead - this method will not install SymForce into your Python environment, so you'll need to add it to your PYTHONPATH separately. -Install python requirements: +Install dependencies required to build and run SymForce: ```bash -pip install -r dev_requirements.txt +pip install -r requirements_build.txt ``` +___Note:___ `requirements_build` contains only packages required to build and run symforce, but not everything recommended to develop symforce, like to run the SymForce tests and linters. For that, install the full pinned requirements using `pip install -r requirements_dev_py3.txt` for your Python version. + Build SymForce (requires C++14 or later): ```bash mkdir build diff --git a/requirements_build.txt b/requirements_build.txt new file mode 100644 index 000000000..1141af678 --- /dev/null +++ b/requirements_build.txt @@ -0,0 +1,30 @@ +# This file was autogenerated by uv via the following command: +# python test/symforce_requirements_test.py --update +clang-format + # via symforce (pyproject.toml) +cmake + # via symforce (pyproject.toml) +cython + # via symforce (pyproject.toml) +graphviz + # via symforce (pyproject.toml) +jinja2 + # via symforce (pyproject.toml) +numpy + # via symforce (pyproject.toml) +pip + # via symforce (pyproject.toml) +ruff + # via symforce (pyproject.toml) +scipy + # via symforce (pyproject.toml) +setuptools + # via symforce (pyproject.toml) +file:./third_party/skymarshal + # via symforce (pyproject.toml) +file:./gen/python + # via symforce (pyproject.toml) +sympy + # via symforce (pyproject.toml) +wheel + # via symforce (pyproject.toml) diff --git a/requirements_dev_py310.txt b/requirements_dev_py310.txt new file mode 100644 index 000000000..7e710adf6 --- /dev/null +++ b/requirements_dev_py310.txt @@ -0,0 +1,350 @@ +# This file was autogenerated by uv via the following command: +# python test/symforce_requirements_test.py --update +alabaster==0.7.16 + # via sphinx +argh==0.31.2 + # via + # symforce (pyproject.toml) + # skymarshal +astroid==3.2.1 + # via pylint +asttokens==2.4.1 + # via stack-data +attrs==23.2.0 + # via + # jsonschema + # referencing +babel==2.15.0 + # via sphinx +beautifulsoup4==4.12.3 + # via + # furo + # nbconvert +bleach==6.1.0 + # via nbconvert +breathe==4.35.0 + # via symforce (pyproject.toml) +certifi==2024.2.2 + # via requests +charset-normalizer==3.3.2 + # via requests +clang-format==18.1.5 + # via symforce (pyproject.toml) +cmake==3.26.4 + # via symforce (pyproject.toml) +comm==0.2.2 + # via ipykernel +contourpy==1.2.1 + # via matplotlib +coverage==7.5.1 + # via symforce (pyproject.toml) +cycler==0.12.1 + # via matplotlib +cython==0.29.37 + # via symforce (pyproject.toml) +debugpy==1.8.1 + # via ipykernel +decorator==5.1.1 + # via ipython +defusedxml==0.7.1 + # via nbconvert +dill==0.3.8 + # via pylint +docutils==0.21.2 + # via + # breathe + # myst-parser + # nbsphinx + # sphinx +exceptiongroup==1.2.1 + # via ipython +executing==2.0.1 + # via stack-data +fastjsonschema==2.19.1 + # via nbformat +fonttools==4.51.0 + # via matplotlib +furo==2024.5.6 + # via symforce (pyproject.toml) +graphviz==0.20.3 + # via symforce (pyproject.toml) +idna==3.7 + # via requests +imagesize==1.4.1 + # via sphinx +ipykernel==6.29.4 + # via symforce (pyproject.toml) +ipython==8.24.0 + # via ipykernel +ipython-genutils==0.2.0 + # via symforce (pyproject.toml) +isort==5.13.2 + # via pylint +jedi==0.19.1 + # via ipython +jinja2==3.1.4 + # via + # symforce (pyproject.toml) + # myst-parser + # nbconvert + # nbsphinx + # skymarshal + # sphinx +jsonschema==4.22.0 + # via nbformat +jsonschema-specifications==2023.12.1 + # via jsonschema +jupyter-client==8.6.1 + # via + # ipykernel + # nbclient +jupyter-core==5.7.2 + # via + # ipykernel + # jupyter-client + # nbclient + # nbconvert + # nbformat +jupyterlab-pygments==0.3.0 + # via nbconvert +kiwisolver==1.4.5 + # via matplotlib +lazy-object-proxy==1.10.0 + # via symforce (pyproject.toml) +llvmlite==0.42.0 + # via numba +markdown-it-py==3.0.0 + # via + # mdit-py-plugins + # myst-parser +markupsafe==2.1.5 + # via + # jinja2 + # nbconvert +matplotlib==3.9.0 + # via symforce (pyproject.toml) +matplotlib-inline==0.1.7 + # via + # ipykernel + # ipython +mccabe==0.7.0 + # via pylint +mdit-py-plugins==0.4.1 + # via myst-parser +mdurl==0.1.2 + # via markdown-it-py +mistune==3.0.2 + # via nbconvert +mpmath==1.3.0 + # via sympy +mypy==1.8.0 + # via symforce (pyproject.toml) +mypy-extensions==1.0.0 + # via mypy +myst-parser==3.0.1 + # via symforce (pyproject.toml) +nbclient==0.10.0 + # via nbconvert +nbconvert==7.16.4 + # via nbsphinx +nbformat==5.10.4 + # via + # nbclient + # nbconvert + # nbsphinx + # nbstripout +nbsphinx==0.9.4 + # via symforce (pyproject.toml) +nbstripout==0.7.1 + # via symforce (pyproject.toml) +nest-asyncio==1.6.0 + # via ipykernel +numba==0.59.1 + # via symforce (pyproject.toml) +numpy==1.26.4 + # via + # symforce (pyproject.toml) + # contourpy + # matplotlib + # numba + # pandas + # scipy + # skymarshal + # symforce-sym +packaging==24.0 + # via + # ipykernel + # matplotlib + # nbconvert + # plotly + # sphinx +pandas==2.2.2 + # via symforce (pyproject.toml) +pandocfilters==1.5.1 + # via nbconvert +parso==0.8.4 + # via jedi +pexpect==4.9.0 + # via ipython +pillow==10.3.0 + # via matplotlib +pip==24.0 + # via symforce (pyproject.toml) +platformdirs==4.2.2 + # via + # jupyter-core + # pylint +plotly==5.22.0 + # via symforce (pyproject.toml) +ply==3.11 + # via skymarshal +prompt-toolkit==3.0.43 + # via ipython +psutil==5.9.8 + # via ipykernel +ptyprocess==0.7.0 + # via pexpect +pure-eval==0.2.2 + # via stack-data +pybind11-stubgen==0.16.2 + # via symforce (pyproject.toml) +pygments==2.18.0 + # via + # furo + # ipython + # nbconvert + # sphinx +pylint==3.2.0 + # via symforce (pyproject.toml) +pyparsing==3.1.2 + # via matplotlib +python-dateutil==2.9.0.post0 + # via + # jupyter-client + # matplotlib + # pandas +pytz==2024.1 + # via pandas +pyyaml==6.0.1 + # via myst-parser +pyzmq==26.0.3 + # via + # ipykernel + # jupyter-client +referencing==0.35.1 + # via + # jsonschema + # jsonschema-specifications +requests==2.31.0 + # via sphinx +rpds-py==0.18.1 + # via + # jsonschema + # referencing +ruff==0.3.7 + # via symforce (pyproject.toml) +scipy==1.13.0 + # via symforce (pyproject.toml) +setuptools==69.5.1 + # via symforce (pyproject.toml) +six==1.16.0 + # via + # asttokens + # bleach + # python-dateutil +file:./third_party/skymarshal + # via symforce (pyproject.toml) +snowballstemmer==2.2.0 + # via sphinx +soupsieve==2.5 + # via beautifulsoup4 +sphinx==7.3.7 + # via + # symforce (pyproject.toml) + # breathe + # furo + # myst-parser + # nbsphinx + # sphinx-basic-ng + # sphinx-copybutton + # sphinxext-opengraph +sphinx-basic-ng==1.0.0b2 + # via furo +sphinx-copybutton==0.5.2 + # via symforce (pyproject.toml) +sphinxcontrib-applehelp==1.0.8 + # via sphinx +sphinxcontrib-devhelp==1.0.6 + # via sphinx +sphinxcontrib-htmlhelp==2.0.5 + # via sphinx +sphinxcontrib-jsmath==1.0.1 + # via sphinx +sphinxcontrib-qthelp==1.0.7 + # via sphinx +sphinxcontrib-serializinghtml==1.1.10 + # via sphinx +sphinxext-opengraph==0.9.1 + # via symforce (pyproject.toml) +stack-data==0.6.3 + # via ipython +file:./gen/python + # via symforce (pyproject.toml) +sympy==1.11.1 + # via symforce (pyproject.toml) +tenacity==8.3.0 + # via plotly +tinycss2==1.3.0 + # via nbconvert +tomli==2.0.1 + # via + # mypy + # pylint + # sphinx +tomlkit==0.12.5 + # via pylint +tornado==6.4 + # via + # ipykernel + # jupyter-client +traitlets==5.14.3 + # via + # comm + # ipykernel + # ipython + # jupyter-client + # jupyter-core + # matplotlib-inline + # nbclient + # nbconvert + # nbformat + # nbsphinx +types-jinja2==2.11.9 + # via symforce (pyproject.toml) +types-markupsafe==1.1.10 + # via types-jinja2 +types-requests==2.31.0.20240406 + # via symforce (pyproject.toml) +types-setuptools==69.5.0.20240513 + # via symforce (pyproject.toml) +typing-extensions==4.11.0 + # via + # astroid + # ipython + # mypy +tzdata==2024.1 + # via pandas +urllib3==2.2.1 + # via + # requests + # types-requests +uv==0.1.44 + # via symforce (pyproject.toml) +wcwidth==0.2.13 + # via prompt-toolkit +webencodings==0.5.1 + # via + # bleach + # tinycss2 +wheel==0.43.0 + # via symforce (pyproject.toml) diff --git a/requirements_dev_py311.txt b/requirements_dev_py311.txt new file mode 100644 index 000000000..3c31841fa --- /dev/null +++ b/requirements_dev_py311.txt @@ -0,0 +1,342 @@ +# This file was autogenerated by uv via the following command: +# python test/symforce_requirements_test.py --update +alabaster==0.7.16 + # via sphinx +argh==0.31.2 + # via + # symforce (pyproject.toml) + # skymarshal +astroid==3.2.1 + # via pylint +asttokens==2.4.1 + # via stack-data +attrs==23.2.0 + # via + # jsonschema + # referencing +babel==2.15.0 + # via sphinx +beautifulsoup4==4.12.3 + # via + # furo + # nbconvert +bleach==6.1.0 + # via nbconvert +breathe==4.35.0 + # via symforce (pyproject.toml) +certifi==2024.2.2 + # via requests +charset-normalizer==3.3.2 + # via requests +clang-format==18.1.5 + # via symforce (pyproject.toml) +cmake==3.26.4 + # via symforce (pyproject.toml) +comm==0.2.2 + # via ipykernel +contourpy==1.2.1 + # via matplotlib +coverage==7.5.1 + # via symforce (pyproject.toml) +cycler==0.12.1 + # via matplotlib +cython==0.29.37 + # via symforce (pyproject.toml) +debugpy==1.8.1 + # via ipykernel +decorator==5.1.1 + # via ipython +defusedxml==0.7.1 + # via nbconvert +dill==0.3.8 + # via pylint +docutils==0.21.2 + # via + # breathe + # myst-parser + # nbsphinx + # sphinx +executing==2.0.1 + # via stack-data +fastjsonschema==2.19.1 + # via nbformat +fonttools==4.51.0 + # via matplotlib +furo==2024.5.6 + # via symforce (pyproject.toml) +graphviz==0.20.3 + # via symforce (pyproject.toml) +idna==3.7 + # via requests +imagesize==1.4.1 + # via sphinx +ipykernel==6.29.4 + # via symforce (pyproject.toml) +ipython==8.24.0 + # via ipykernel +ipython-genutils==0.2.0 + # via symforce (pyproject.toml) +isort==5.13.2 + # via pylint +jedi==0.19.1 + # via ipython +jinja2==3.1.4 + # via + # symforce (pyproject.toml) + # myst-parser + # nbconvert + # nbsphinx + # skymarshal + # sphinx +jsonschema==4.22.0 + # via nbformat +jsonschema-specifications==2023.12.1 + # via jsonschema +jupyter-client==8.6.1 + # via + # ipykernel + # nbclient +jupyter-core==5.7.2 + # via + # ipykernel + # jupyter-client + # nbclient + # nbconvert + # nbformat +jupyterlab-pygments==0.3.0 + # via nbconvert +kiwisolver==1.4.5 + # via matplotlib +lazy-object-proxy==1.10.0 + # via symforce (pyproject.toml) +llvmlite==0.42.0 + # via numba +markdown-it-py==3.0.0 + # via + # mdit-py-plugins + # myst-parser +markupsafe==2.1.5 + # via + # jinja2 + # nbconvert +matplotlib==3.9.0 + # via symforce (pyproject.toml) +matplotlib-inline==0.1.7 + # via + # ipykernel + # ipython +mccabe==0.7.0 + # via pylint +mdit-py-plugins==0.4.1 + # via myst-parser +mdurl==0.1.2 + # via markdown-it-py +mistune==3.0.2 + # via nbconvert +mpmath==1.3.0 + # via sympy +mypy==1.8.0 + # via symforce (pyproject.toml) +mypy-extensions==1.0.0 + # via mypy +myst-parser==3.0.1 + # via symforce (pyproject.toml) +nbclient==0.10.0 + # via nbconvert +nbconvert==7.16.4 + # via nbsphinx +nbformat==5.10.4 + # via + # nbclient + # nbconvert + # nbsphinx + # nbstripout +nbsphinx==0.9.4 + # via symforce (pyproject.toml) +nbstripout==0.7.1 + # via symforce (pyproject.toml) +nest-asyncio==1.6.0 + # via ipykernel +numba==0.59.1 + # via symforce (pyproject.toml) +numpy==1.26.4 + # via + # symforce (pyproject.toml) + # contourpy + # matplotlib + # numba + # pandas + # scipy + # skymarshal + # symforce-sym +packaging==24.0 + # via + # ipykernel + # matplotlib + # nbconvert + # plotly + # sphinx +pandas==2.2.2 + # via symforce (pyproject.toml) +pandocfilters==1.5.1 + # via nbconvert +parso==0.8.4 + # via jedi +pexpect==4.9.0 + # via ipython +pillow==10.3.0 + # via matplotlib +pip==24.0 + # via symforce (pyproject.toml) +platformdirs==4.2.2 + # via + # jupyter-core + # pylint +plotly==5.22.0 + # via symforce (pyproject.toml) +ply==3.11 + # via skymarshal +prompt-toolkit==3.0.43 + # via ipython +psutil==5.9.8 + # via ipykernel +ptyprocess==0.7.0 + # via pexpect +pure-eval==0.2.2 + # via stack-data +pybind11-stubgen==0.16.2 + # via symforce (pyproject.toml) +pygments==2.18.0 + # via + # furo + # ipython + # nbconvert + # sphinx +pylint==3.2.0 + # via symforce (pyproject.toml) +pyparsing==3.1.2 + # via matplotlib +python-dateutil==2.9.0.post0 + # via + # jupyter-client + # matplotlib + # pandas +pytz==2024.1 + # via pandas +pyyaml==6.0.1 + # via myst-parser +pyzmq==26.0.3 + # via + # ipykernel + # jupyter-client +referencing==0.35.1 + # via + # jsonschema + # jsonschema-specifications +requests==2.31.0 + # via sphinx +rpds-py==0.18.1 + # via + # jsonschema + # referencing +ruff==0.3.7 + # via symforce (pyproject.toml) +scipy==1.13.0 + # via symforce (pyproject.toml) +setuptools==69.5.1 + # via symforce (pyproject.toml) +six==1.16.0 + # via + # asttokens + # bleach + # python-dateutil +file:./third_party/skymarshal + # via symforce (pyproject.toml) +snowballstemmer==2.2.0 + # via sphinx +soupsieve==2.5 + # via beautifulsoup4 +sphinx==7.3.7 + # via + # symforce (pyproject.toml) + # breathe + # furo + # myst-parser + # nbsphinx + # sphinx-basic-ng + # sphinx-copybutton + # sphinxext-opengraph +sphinx-basic-ng==1.0.0b2 + # via furo +sphinx-copybutton==0.5.2 + # via symforce (pyproject.toml) +sphinxcontrib-applehelp==1.0.8 + # via sphinx +sphinxcontrib-devhelp==1.0.6 + # via sphinx +sphinxcontrib-htmlhelp==2.0.5 + # via sphinx +sphinxcontrib-jsmath==1.0.1 + # via sphinx +sphinxcontrib-qthelp==1.0.7 + # via sphinx +sphinxcontrib-serializinghtml==1.1.10 + # via sphinx +sphinxext-opengraph==0.9.1 + # via symforce (pyproject.toml) +stack-data==0.6.3 + # via ipython +file:./gen/python + # via symforce (pyproject.toml) +sympy==1.11.1 + # via symforce (pyproject.toml) +tenacity==8.3.0 + # via plotly +tinycss2==1.3.0 + # via nbconvert +tomlkit==0.12.5 + # via pylint +tornado==6.4 + # via + # ipykernel + # jupyter-client +traitlets==5.14.3 + # via + # comm + # ipykernel + # ipython + # jupyter-client + # jupyter-core + # matplotlib-inline + # nbclient + # nbconvert + # nbformat + # nbsphinx +types-jinja2==2.11.9 + # via symforce (pyproject.toml) +types-markupsafe==1.1.10 + # via types-jinja2 +types-requests==2.31.0.20240406 + # via symforce (pyproject.toml) +types-setuptools==69.5.0.20240513 + # via symforce (pyproject.toml) +typing-extensions==4.11.0 + # via + # ipython + # mypy +tzdata==2024.1 + # via pandas +urllib3==2.2.1 + # via + # requests + # types-requests +uv==0.1.44 + # via symforce (pyproject.toml) +wcwidth==0.2.13 + # via prompt-toolkit +webencodings==0.5.1 + # via + # bleach + # tinycss2 +wheel==0.43.0 + # via symforce (pyproject.toml) diff --git a/requirements_dev_py312.txt b/requirements_dev_py312.txt new file mode 100644 index 000000000..3b9223399 --- /dev/null +++ b/requirements_dev_py312.txt @@ -0,0 +1,340 @@ +# This file was autogenerated by uv via the following command: +# python test/symforce_requirements_test.py --update +alabaster==0.7.16 + # via sphinx +argh==0.31.2 + # via + # symforce (pyproject.toml) + # skymarshal +astroid==3.2.1 + # via pylint +asttokens==2.4.1 + # via stack-data +attrs==23.2.0 + # via + # jsonschema + # referencing +babel==2.15.0 + # via sphinx +beautifulsoup4==4.12.3 + # via + # furo + # nbconvert +bleach==6.1.0 + # via nbconvert +breathe==4.35.0 + # via symforce (pyproject.toml) +certifi==2024.2.2 + # via requests +charset-normalizer==3.3.2 + # via requests +clang-format==18.1.5 + # via symforce (pyproject.toml) +cmake==3.26.4 + # via symforce (pyproject.toml) +comm==0.2.2 + # via ipykernel +contourpy==1.2.1 + # via matplotlib +coverage==7.5.1 + # via symforce (pyproject.toml) +cycler==0.12.1 + # via matplotlib +cython==0.29.37 + # via symforce (pyproject.toml) +debugpy==1.8.1 + # via ipykernel +decorator==5.1.1 + # via ipython +defusedxml==0.7.1 + # via nbconvert +dill==0.3.8 + # via pylint +docutils==0.21.2 + # via + # breathe + # myst-parser + # nbsphinx + # sphinx +executing==2.0.1 + # via stack-data +fastjsonschema==2.19.1 + # via nbformat +fonttools==4.51.0 + # via matplotlib +furo==2024.5.6 + # via symforce (pyproject.toml) +graphviz==0.20.3 + # via symforce (pyproject.toml) +idna==3.7 + # via requests +imagesize==1.4.1 + # via sphinx +ipykernel==6.29.4 + # via symforce (pyproject.toml) +ipython==8.24.0 + # via ipykernel +ipython-genutils==0.2.0 + # via symforce (pyproject.toml) +isort==5.13.2 + # via pylint +jedi==0.19.1 + # via ipython +jinja2==3.1.4 + # via + # symforce (pyproject.toml) + # myst-parser + # nbconvert + # nbsphinx + # skymarshal + # sphinx +jsonschema==4.22.0 + # via nbformat +jsonschema-specifications==2023.12.1 + # via jsonschema +jupyter-client==8.6.1 + # via + # ipykernel + # nbclient +jupyter-core==5.7.2 + # via + # ipykernel + # jupyter-client + # nbclient + # nbconvert + # nbformat +jupyterlab-pygments==0.3.0 + # via nbconvert +kiwisolver==1.4.5 + # via matplotlib +lazy-object-proxy==1.10.0 + # via symforce (pyproject.toml) +llvmlite==0.42.0 + # via numba +markdown-it-py==3.0.0 + # via + # mdit-py-plugins + # myst-parser +markupsafe==2.1.5 + # via + # jinja2 + # nbconvert +matplotlib==3.9.0 + # via symforce (pyproject.toml) +matplotlib-inline==0.1.7 + # via + # ipykernel + # ipython +mccabe==0.7.0 + # via pylint +mdit-py-plugins==0.4.1 + # via myst-parser +mdurl==0.1.2 + # via markdown-it-py +mistune==3.0.2 + # via nbconvert +mpmath==1.3.0 + # via sympy +mypy==1.8.0 + # via symforce (pyproject.toml) +mypy-extensions==1.0.0 + # via mypy +myst-parser==3.0.1 + # via symforce (pyproject.toml) +nbclient==0.10.0 + # via nbconvert +nbconvert==7.16.4 + # via nbsphinx +nbformat==5.10.4 + # via + # nbclient + # nbconvert + # nbsphinx + # nbstripout +nbsphinx==0.9.4 + # via symforce (pyproject.toml) +nbstripout==0.7.1 + # via symforce (pyproject.toml) +nest-asyncio==1.6.0 + # via ipykernel +numba==0.59.1 + # via symforce (pyproject.toml) +numpy==1.26.4 + # via + # symforce (pyproject.toml) + # contourpy + # matplotlib + # numba + # pandas + # scipy + # skymarshal + # symforce-sym +packaging==24.0 + # via + # ipykernel + # matplotlib + # nbconvert + # plotly + # sphinx +pandas==2.2.2 + # via symforce (pyproject.toml) +pandocfilters==1.5.1 + # via nbconvert +parso==0.8.4 + # via jedi +pexpect==4.9.0 + # via ipython +pillow==10.3.0 + # via matplotlib +pip==24.0 + # via symforce (pyproject.toml) +platformdirs==4.2.2 + # via + # jupyter-core + # pylint +plotly==5.22.0 + # via symforce (pyproject.toml) +ply==3.11 + # via skymarshal +prompt-toolkit==3.0.43 + # via ipython +psutil==5.9.8 + # via ipykernel +ptyprocess==0.7.0 + # via pexpect +pure-eval==0.2.2 + # via stack-data +pybind11-stubgen==0.16.2 + # via symforce (pyproject.toml) +pygments==2.18.0 + # via + # furo + # ipython + # nbconvert + # sphinx +pylint==3.2.0 + # via symforce (pyproject.toml) +pyparsing==3.1.2 + # via matplotlib +python-dateutil==2.9.0.post0 + # via + # jupyter-client + # matplotlib + # pandas +pytz==2024.1 + # via pandas +pyyaml==6.0.1 + # via myst-parser +pyzmq==26.0.3 + # via + # ipykernel + # jupyter-client +referencing==0.35.1 + # via + # jsonschema + # jsonschema-specifications +requests==2.31.0 + # via sphinx +rpds-py==0.18.1 + # via + # jsonschema + # referencing +ruff==0.3.7 + # via symforce (pyproject.toml) +scipy==1.13.0 + # via symforce (pyproject.toml) +setuptools==69.5.1 + # via symforce (pyproject.toml) +six==1.16.0 + # via + # asttokens + # bleach + # python-dateutil +file:./third_party/skymarshal + # via symforce (pyproject.toml) +snowballstemmer==2.2.0 + # via sphinx +soupsieve==2.5 + # via beautifulsoup4 +sphinx==7.3.7 + # via + # symforce (pyproject.toml) + # breathe + # furo + # myst-parser + # nbsphinx + # sphinx-basic-ng + # sphinx-copybutton + # sphinxext-opengraph +sphinx-basic-ng==1.0.0b2 + # via furo +sphinx-copybutton==0.5.2 + # via symforce (pyproject.toml) +sphinxcontrib-applehelp==1.0.8 + # via sphinx +sphinxcontrib-devhelp==1.0.6 + # via sphinx +sphinxcontrib-htmlhelp==2.0.5 + # via sphinx +sphinxcontrib-jsmath==1.0.1 + # via sphinx +sphinxcontrib-qthelp==1.0.7 + # via sphinx +sphinxcontrib-serializinghtml==1.1.10 + # via sphinx +sphinxext-opengraph==0.9.1 + # via symforce (pyproject.toml) +stack-data==0.6.3 + # via ipython +file:./gen/python + # via symforce (pyproject.toml) +sympy==1.11.1 + # via symforce (pyproject.toml) +tenacity==8.3.0 + # via plotly +tinycss2==1.3.0 + # via nbconvert +tomlkit==0.12.5 + # via pylint +tornado==6.4 + # via + # ipykernel + # jupyter-client +traitlets==5.14.3 + # via + # comm + # ipykernel + # ipython + # jupyter-client + # jupyter-core + # matplotlib-inline + # nbclient + # nbconvert + # nbformat + # nbsphinx +types-jinja2==2.11.9 + # via symforce (pyproject.toml) +types-markupsafe==1.1.10 + # via types-jinja2 +types-requests==2.31.0.20240406 + # via symforce (pyproject.toml) +types-setuptools==69.5.0.20240513 + # via symforce (pyproject.toml) +typing-extensions==4.11.0 + # via mypy +tzdata==2024.1 + # via pandas +urllib3==2.2.1 + # via + # requests + # types-requests +uv==0.1.44 + # via symforce (pyproject.toml) +wcwidth==0.2.13 + # via prompt-toolkit +webencodings==0.5.1 + # via + # bleach + # tinycss2 +wheel==0.43.0 + # via symforce (pyproject.toml) diff --git a/dev_requirements.txt b/requirements_dev_py38.txt similarity index 71% rename from dev_requirements.txt rename to requirements_dev_py38.txt index bfe9c388c..5da3da58e 100644 --- a/dev_requirements.txt +++ b/requirements_dev_py38.txt @@ -1,21 +1,12 @@ -# -# This file is autogenerated by pip-compile with Python 3.8 -# by the following command: -# +# This file was autogenerated by uv via the following command: # python test/symforce_requirements_test.py --update -# ---index-url https://pypi.python.org/simple - -# Create a requirement incompatible with python < 3.8 -symforce_requires_python_38_or_higher___your_python_version_is_incompatible; python_version < '3.8' - alabaster==0.7.13 # via sphinx argh==0.31.2 # via + # symforce (pyproject.toml) # skymarshal - # symforce (setup.py) -astroid==3.1.0 +astroid==3.2.1 # via pylint asttokens==2.4.1 # via stack-data @@ -23,7 +14,7 @@ attrs==23.2.0 # via # jsonschema # referencing -babel==2.14.0 +babel==2.15.0 # via sphinx backcall==0.2.0 # via ipython @@ -34,29 +25,25 @@ beautifulsoup4==4.12.3 bleach==6.1.0 # via nbconvert breathe==4.35.0 - # via symforce (setup.py) -build==1.2.1 - # via pip-tools + # via symforce (pyproject.toml) certifi==2024.2.2 # via requests charset-normalizer==3.3.2 # via requests -clang-format==18.1.4 - # via symforce (setup.py) -click==8.1.7 - # via pip-tools +clang-format==18.1.5 + # via symforce (pyproject.toml) cmake==3.26.4 - # via symforce (setup.py) + # via symforce (pyproject.toml) comm==0.2.2 # via ipykernel contourpy==1.1.1 # via matplotlib -coverage==7.5.0 - # via symforce (setup.py) +coverage==7.5.1 + # via symforce (pyproject.toml) cycler==0.12.1 # via matplotlib cython==0.29.37 - # via symforce (setup.py) + # via symforce (pyproject.toml) debugpy==1.8.1 # via ipykernel decorator==5.1.1 @@ -77,17 +64,16 @@ fastjsonschema==2.19.1 # via nbformat fonttools==4.51.0 # via matplotlib -furo==2024.1.29 - # via symforce (setup.py) +furo==2024.5.6 + # via symforce (pyproject.toml) graphviz==0.20.3 - # via symforce (setup.py) + # via symforce (pyproject.toml) idna==3.7 # via requests imagesize==1.4.1 # via sphinx importlib-metadata==7.1.0 # via - # build # jupyter-client # nbconvert # numba @@ -98,24 +84,24 @@ importlib-resources==6.4.0 # jsonschema-specifications # matplotlib ipykernel==6.29.4 - # via symforce (setup.py) + # via symforce (pyproject.toml) ipython==8.12.3 # via ipykernel ipython-genutils==0.2.0 - # via symforce (setup.py) + # via symforce (pyproject.toml) isort==5.13.2 # via pylint jedi==0.19.1 # via ipython -jinja2==3.1.3 +jinja2==3.1.4 # via + # symforce (pyproject.toml) # myst-parser # nbconvert # nbsphinx # skymarshal # sphinx - # symforce (setup.py) -jsonschema==4.21.1 +jsonschema==4.22.0 # via nbformat jsonschema-specifications==2023.12.1 # via jsonschema @@ -135,7 +121,7 @@ jupyterlab-pygments==0.3.0 kiwisolver==1.4.5 # via matplotlib lazy-object-proxy==1.10.0 - # via symforce (setup.py) + # via symforce (pyproject.toml) llvmlite==0.41.1 # via numba markdown-it-py==3.0.0 @@ -147,14 +133,14 @@ markupsafe==2.1.5 # jinja2 # nbconvert matplotlib==3.7.5 - # via symforce (setup.py) + # via symforce (pyproject.toml) matplotlib-inline==0.1.7 # via # ipykernel # ipython mccabe==0.7.0 # via pylint -mdit-py-plugins==0.4.0 +mdit-py-plugins==0.4.1 # via myst-parser mdurl==0.1.2 # via markdown-it-py @@ -163,14 +149,14 @@ mistune==3.0.2 mpmath==1.3.0 # via sympy mypy==1.8.0 - # via symforce (setup.py) + # via symforce (pyproject.toml) mypy-extensions==1.0.0 # via mypy -myst-parser==3.0.0 - # via symforce (setup.py) +myst-parser==3.0.1 + # via symforce (pyproject.toml) nbclient==0.10.0 # via nbconvert -nbconvert==7.16.3 +nbconvert==7.16.4 # via nbsphinx nbformat==5.10.4 # via @@ -178,34 +164,33 @@ nbformat==5.10.4 # nbconvert # nbsphinx # nbstripout -nbsphinx==0.9.3 - # via symforce (setup.py) +nbsphinx==0.9.4 + # via symforce (pyproject.toml) nbstripout==0.7.1 - # via symforce (setup.py) + # via symforce (pyproject.toml) nest-asyncio==1.6.0 # via ipykernel numba==0.58.1 - # via symforce (setup.py) + # via symforce (pyproject.toml) numpy==1.24.4 # via + # symforce (pyproject.toml) # contourpy # matplotlib # numba # pandas # scipy # skymarshal - # symforce (setup.py) # symforce-sym packaging==24.0 # via - # build # ipykernel # matplotlib # nbconvert # plotly # sphinx pandas==2.0.3 - # via symforce (setup.py) + # via symforce (pyproject.toml) pandocfilters==1.5.1 # via nbconvert parso==0.8.4 @@ -216,16 +201,16 @@ pickleshare==0.7.5 # via ipython pillow==10.3.0 # via matplotlib -pip-tools==7.4.1 - # via symforce (setup.py) +pip==24.0 + # via symforce (pyproject.toml) pkgutil-resolve-name==1.3.10 # via jsonschema -platformdirs==4.2.1 +platformdirs==4.2.2 # via # jupyter-core # pylint -plotly==5.21.0 - # via symforce (setup.py) +plotly==5.22.0 + # via symforce (pyproject.toml) ply==3.11 # via skymarshal prompt-toolkit==3.0.43 @@ -237,21 +222,17 @@ ptyprocess==0.7.0 pure-eval==0.2.2 # via stack-data pybind11-stubgen==0.16.2 - # via symforce (setup.py) -pygments==2.17.2 + # via symforce (pyproject.toml) +pygments==2.18.0 # via # furo # ipython # nbconvert # sphinx -pylint==3.1.0 - # via symforce (setup.py) +pylint==3.2.0 + # via symforce (pyproject.toml) pyparsing==3.1.2 # via matplotlib -pyproject-hooks==1.0.0 - # via - # build - # pip-tools python-dateutil==2.9.0.post0 # via # jupyter-client @@ -263,37 +244,40 @@ pytz==2024.1 # pandas pyyaml==6.0.1 # via myst-parser -pyzmq==26.0.2 +pyzmq==26.0.3 # via # ipykernel # jupyter-client -referencing==0.34.0 +referencing==0.35.1 # via # jsonschema # jsonschema-specifications requests==2.31.0 # via sphinx -rpds-py==0.18.0 +rpds-py==0.18.1 # via # jsonschema # referencing ruff==0.3.7 - # via symforce (setup.py) + # via symforce (pyproject.toml) scipy==1.10.1 - # via symforce (setup.py) + # via symforce (pyproject.toml) +setuptools==69.5.1 + # via symforce (pyproject.toml) six==1.16.0 # via # asttokens # bleach # python-dateutil file:./third_party/skymarshal - # via symforce (setup.py) + # via symforce (pyproject.toml) snowballstemmer==2.2.0 # via sphinx soupsieve==2.5 # via beautifulsoup4 sphinx==7.1.2 # via + # symforce (pyproject.toml) # breathe # furo # myst-parser @@ -301,11 +285,10 @@ sphinx==7.1.2 # sphinx-basic-ng # sphinx-copybutton # sphinxext-opengraph - # symforce (setup.py) sphinx-basic-ng==1.0.0b2 # via furo sphinx-copybutton==0.5.2 - # via symforce (setup.py) + # via symforce (pyproject.toml) sphinxcontrib-applehelp==1.0.4 # via sphinx sphinxcontrib-devhelp==1.0.2 @@ -319,25 +302,22 @@ sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 # via sphinx sphinxext-opengraph==0.9.1 - # via symforce (setup.py) + # via symforce (pyproject.toml) stack-data==0.6.3 # via ipython file:./gen/python - # via symforce (setup.py) + # via symforce (pyproject.toml) sympy==1.11.1 - # via symforce (setup.py) -tenacity==8.2.3 + # via symforce (pyproject.toml) +tenacity==8.3.0 # via plotly tinycss2==1.3.0 # via nbconvert tomli==2.0.1 # via - # build # mypy - # pip-tools # pylint - # pyproject-hooks -tomlkit==0.12.4 +tomlkit==0.12.5 # via pylint tornado==6.4 # via @@ -356,13 +336,13 @@ traitlets==5.14.3 # nbformat # nbsphinx types-jinja2==2.11.9 - # via symforce (setup.py) + # via symforce (pyproject.toml) types-markupsafe==1.1.10 # via types-jinja2 types-requests==2.31.0.20240406 - # via symforce (setup.py) -types-setuptools==69.5.0.20240423 - # via symforce (setup.py) + # via symforce (pyproject.toml) +types-setuptools==69.5.0.20240513 + # via symforce (pyproject.toml) typing-extensions==4.11.0 # via # astroid @@ -375,6 +355,8 @@ urllib3==2.2.1 # via # requests # types-requests +uv==0.1.44 + # via symforce (pyproject.toml) wcwidth==0.2.13 # via prompt-toolkit webencodings==0.5.1 @@ -382,20 +364,8 @@ webencodings==0.5.1 # bleach # tinycss2 wheel==0.43.0 - # via - # pip-tools - # symforce (setup.py) -zipp==3.18.1 + # via symforce (pyproject.toml) +zipp==3.18.2 # via # importlib-metadata # importlib-resources - -# The following packages are considered to be unsafe in a requirements file: -pip==24.0 - # via - # pip-tools - # symforce (setup.py) -setuptools==69.5.1 - # via - # pip-tools - # symforce (setup.py) diff --git a/requirements_dev_py39.txt b/requirements_dev_py39.txt new file mode 100644 index 000000000..798eb739f --- /dev/null +++ b/requirements_dev_py39.txt @@ -0,0 +1,362 @@ +# This file was autogenerated by uv via the following command: +# python test/symforce_requirements_test.py --update +alabaster==0.7.16 + # via sphinx +argh==0.31.2 + # via + # symforce (pyproject.toml) + # skymarshal +astroid==3.2.1 + # via pylint +asttokens==2.4.1 + # via stack-data +attrs==23.2.0 + # via + # jsonschema + # referencing +babel==2.15.0 + # via sphinx +beautifulsoup4==4.12.3 + # via + # furo + # nbconvert +bleach==6.1.0 + # via nbconvert +breathe==4.35.0 + # via symforce (pyproject.toml) +certifi==2024.2.2 + # via requests +charset-normalizer==3.3.2 + # via requests +clang-format==18.1.5 + # via symforce (pyproject.toml) +cmake==3.26.4 + # via symforce (pyproject.toml) +comm==0.2.2 + # via ipykernel +contourpy==1.2.1 + # via matplotlib +coverage==7.5.1 + # via symforce (pyproject.toml) +cycler==0.12.1 + # via matplotlib +cython==0.29.37 + # via symforce (pyproject.toml) +debugpy==1.8.1 + # via ipykernel +decorator==5.1.1 + # via ipython +defusedxml==0.7.1 + # via nbconvert +dill==0.3.8 + # via pylint +docutils==0.21.2 + # via + # breathe + # myst-parser + # nbsphinx + # sphinx +exceptiongroup==1.2.1 + # via ipython +executing==2.0.1 + # via stack-data +fastjsonschema==2.19.1 + # via nbformat +fonttools==4.51.0 + # via matplotlib +furo==2024.5.6 + # via symforce (pyproject.toml) +graphviz==0.20.3 + # via symforce (pyproject.toml) +idna==3.7 + # via requests +imagesize==1.4.1 + # via sphinx +importlib-metadata==7.1.0 + # via + # jupyter-client + # nbconvert + # sphinx +importlib-resources==6.4.0 + # via matplotlib +ipykernel==6.29.4 + # via symforce (pyproject.toml) +ipython==8.18.1 + # via ipykernel +ipython-genutils==0.2.0 + # via symforce (pyproject.toml) +isort==5.13.2 + # via pylint +jedi==0.19.1 + # via ipython +jinja2==3.1.4 + # via + # symforce (pyproject.toml) + # myst-parser + # nbconvert + # nbsphinx + # skymarshal + # sphinx +jsonschema==4.22.0 + # via nbformat +jsonschema-specifications==2023.12.1 + # via jsonschema +jupyter-client==8.6.1 + # via + # ipykernel + # nbclient +jupyter-core==5.7.2 + # via + # ipykernel + # jupyter-client + # nbclient + # nbconvert + # nbformat +jupyterlab-pygments==0.3.0 + # via nbconvert +kiwisolver==1.4.5 + # via matplotlib +lazy-object-proxy==1.10.0 + # via symforce (pyproject.toml) +llvmlite==0.42.0 + # via numba +markdown-it-py==3.0.0 + # via + # mdit-py-plugins + # myst-parser +markupsafe==2.1.5 + # via + # jinja2 + # nbconvert +matplotlib==3.9.0 + # via symforce (pyproject.toml) +matplotlib-inline==0.1.7 + # via + # ipykernel + # ipython +mccabe==0.7.0 + # via pylint +mdit-py-plugins==0.4.1 + # via myst-parser +mdurl==0.1.2 + # via markdown-it-py +mistune==3.0.2 + # via nbconvert +mpmath==1.3.0 + # via sympy +mypy==1.8.0 + # via symforce (pyproject.toml) +mypy-extensions==1.0.0 + # via mypy +myst-parser==3.0.1 + # via symforce (pyproject.toml) +nbclient==0.10.0 + # via nbconvert +nbconvert==7.16.4 + # via nbsphinx +nbformat==5.10.4 + # via + # nbclient + # nbconvert + # nbsphinx + # nbstripout +nbsphinx==0.9.4 + # via symforce (pyproject.toml) +nbstripout==0.7.1 + # via symforce (pyproject.toml) +nest-asyncio==1.6.0 + # via ipykernel +numba==0.59.1 + # via symforce (pyproject.toml) +numpy==1.26.4 + # via + # symforce (pyproject.toml) + # contourpy + # matplotlib + # numba + # pandas + # scipy + # skymarshal + # symforce-sym +packaging==24.0 + # via + # ipykernel + # matplotlib + # nbconvert + # plotly + # sphinx +pandas==2.2.2 + # via symforce (pyproject.toml) +pandocfilters==1.5.1 + # via nbconvert +parso==0.8.4 + # via jedi +pexpect==4.9.0 + # via ipython +pillow==10.3.0 + # via matplotlib +pip==24.0 + # via symforce (pyproject.toml) +platformdirs==4.2.2 + # via + # jupyter-core + # pylint +plotly==5.22.0 + # via symforce (pyproject.toml) +ply==3.11 + # via skymarshal +prompt-toolkit==3.0.43 + # via ipython +psutil==5.9.8 + # via ipykernel +ptyprocess==0.7.0 + # via pexpect +pure-eval==0.2.2 + # via stack-data +pybind11-stubgen==0.16.2 + # via symforce (pyproject.toml) +pygments==2.18.0 + # via + # furo + # ipython + # nbconvert + # sphinx +pylint==3.2.0 + # via symforce (pyproject.toml) +pyparsing==3.1.2 + # via matplotlib +python-dateutil==2.9.0.post0 + # via + # jupyter-client + # matplotlib + # pandas +pytz==2024.1 + # via pandas +pyyaml==6.0.1 + # via myst-parser +pyzmq==26.0.3 + # via + # ipykernel + # jupyter-client +referencing==0.35.1 + # via + # jsonschema + # jsonschema-specifications +requests==2.31.0 + # via sphinx +rpds-py==0.18.1 + # via + # jsonschema + # referencing +ruff==0.3.7 + # via symforce (pyproject.toml) +scipy==1.13.0 + # via symforce (pyproject.toml) +setuptools==69.5.1 + # via symforce (pyproject.toml) +six==1.16.0 + # via + # asttokens + # bleach + # python-dateutil +file:./third_party/skymarshal + # via symforce (pyproject.toml) +snowballstemmer==2.2.0 + # via sphinx +soupsieve==2.5 + # via beautifulsoup4 +sphinx==7.3.7 + # via + # symforce (pyproject.toml) + # breathe + # furo + # myst-parser + # nbsphinx + # sphinx-basic-ng + # sphinx-copybutton + # sphinxext-opengraph +sphinx-basic-ng==1.0.0b2 + # via furo +sphinx-copybutton==0.5.2 + # via symforce (pyproject.toml) +sphinxcontrib-applehelp==1.0.8 + # via sphinx +sphinxcontrib-devhelp==1.0.6 + # via sphinx +sphinxcontrib-htmlhelp==2.0.5 + # via sphinx +sphinxcontrib-jsmath==1.0.1 + # via sphinx +sphinxcontrib-qthelp==1.0.7 + # via sphinx +sphinxcontrib-serializinghtml==1.1.10 + # via sphinx +sphinxext-opengraph==0.9.1 + # via symforce (pyproject.toml) +stack-data==0.6.3 + # via ipython +file:./gen/python + # via symforce (pyproject.toml) +sympy==1.11.1 + # via symforce (pyproject.toml) +tenacity==8.3.0 + # via plotly +tinycss2==1.3.0 + # via nbconvert +tomli==2.0.1 + # via + # mypy + # pylint + # sphinx +tomlkit==0.12.5 + # via pylint +tornado==6.4 + # via + # ipykernel + # jupyter-client +traitlets==5.14.3 + # via + # comm + # ipykernel + # ipython + # jupyter-client + # jupyter-core + # matplotlib-inline + # nbclient + # nbconvert + # nbformat + # nbsphinx +types-jinja2==2.11.9 + # via symforce (pyproject.toml) +types-markupsafe==1.1.10 + # via types-jinja2 +types-requests==2.31.0.20240406 + # via symforce (pyproject.toml) +types-setuptools==69.5.0.20240513 + # via symforce (pyproject.toml) +typing-extensions==4.11.0 + # via + # astroid + # ipython + # mypy + # pylint +tzdata==2024.1 + # via pandas +urllib3==2.2.1 + # via + # requests + # types-requests +uv==0.1.44 + # via symforce (pyproject.toml) +wcwidth==0.2.13 + # via prompt-toolkit +webencodings==0.5.1 + # via + # bleach + # tinycss2 +wheel==0.43.0 + # via symforce (pyproject.toml) +zipp==3.18.2 + # via + # importlib-metadata + # importlib-resources diff --git a/setup.py b/setup.py index 5523fbd55..f4d6f6830 100644 --- a/setup.py +++ b/setup.py @@ -453,8 +453,6 @@ def fixed_readme() -> str: "jinja2~=3.0", "mypy~=1.8.0", "numba", - # 6.13 fixes pip >=23.1 support - "pip-tools>=6.13", # NOTE(aaron): v1.0 changed lots of things, we'll need to update and regenerate "pybind11-stubgen<1.0", "pylint", @@ -464,7 +462,8 @@ def fixed_readme() -> str: "types-jinja2", "types-requests", "types-setuptools", + "uv", ], - "_setup": setup_requirements, + "setup": setup_requirements, }, ) diff --git a/test/symforce_requirements_test.py b/test/symforce_requirements_test.py index 65098ff6b..6ff91fd3c 100644 --- a/test/symforce_requirements_test.py +++ b/test/symforce_requirements_test.py @@ -7,48 +7,60 @@ import os import re import sys -import textwrap from symforce import path_util from symforce import python_util from symforce import typing as T from symforce.test_util import TestCase -from symforce.test_util import symengine_only +from symforce.test_util import sympy_only class SymforceRequirementsTest(TestCase): """ - Tests pip requirements + Generates pinned pip requirements for all python versions, and tests that solving for + requirements gives the same result as the checked-in requirements files. + + Running this on a given version of python only checks or updates requirements for the running + python version. CI runs this test on all supported versions of python. + + To update the requirements files, trigger the solve_requirements GitHub Action, either on main + to solve with no changes to dependencies (in e.g. setup.py or pyproject.toml), or on a branch + with changes to dependencies. The action will create a PR against the branch it was triggered + on with the solved requirements files. """ - # Pass the --upgrade flag to piptools? - _PIPTOOLS_UPGRADE = False + # Pass the --upgrade flag to uv compile? + _UV_UPGRADE = False @staticmethod def main(*args: T.Any, **kwargs: T.Any) -> None: """ Call this to run all tests in scope. """ - if "--piptools_upgrade" in sys.argv: - SymforceRequirementsTest._PIPTOOLS_UPGRADE = True - sys.argv.remove("--piptools_upgrade") + if "--uv_upgrade" in sys.argv: + SymforceRequirementsTest._UV_UPGRADE = True + sys.argv.remove("--uv_upgrade") TestCase.main(*args, **kwargs) - @symengine_only - def test_requirements(self) -> None: - output_dir = self.make_output_dir("sf_requirements_test_") + @sympy_only + def test_dev_requirements(self) -> None: + output_dir = self.make_output_dir("sf_requirements_test_dev_") - output_requirements_file = output_dir / "dev_requirements.txt" - symforce_requirements_file = path_util.symforce_root() / "dev_requirements.txt" + version = sys.version_info.minor + + output_requirements_file = output_dir / f"requirements_dev_py3{version}.txt" + symforce_requirements_file = ( + path_util.symforce_root() / f"requirements_dev_py3{version}.txt" + ) local_requirements_map = { - "skymarshal @ file://localhost/{}/third_party/skymarshal": "file:./third_party/skymarshal", - "symforce-sym @ file://localhost/{}/gen/python": "file:./gen/python", + "skymarshal @ file://{}/third_party/skymarshal": "file:./third_party/skymarshal", + "symforce-sym @ file://{}/gen/python": "file:./gen/python", } # Copy the symforce requirements file into the temp directory - # This is necessary so piptools has current versions of the packages already in the list + # This is necessary so uv has current versions of the packages already in the list if symforce_requirements_file.exists(): requirements_contents = symforce_requirements_file.read_text() @@ -63,27 +75,25 @@ def test_requirements(self) -> None: output_requirements_file.write_text(requirements_contents) - maybe_piptools_upgrade = ["--upgrade"] if self._PIPTOOLS_UPGRADE else [] + # Do not use the cache if not upgrading (for hermeticity) + maybe_uv_upgrade = ["--upgrade"] if self._UV_UPGRADE else ["--no-cache"] asyncio.run( python_util.execute_subprocess( [ - sys.executable, - "-m", - "piptools", + "uv", + "pip", "compile", + "--all-extras", f"--output-file={output_requirements_file}", - "--index-url=https://pypi.python.org/simple", - "--allow-unsafe", - "--extra=dev", - "--extra=_setup", + "pyproject.toml", ] - + maybe_piptools_upgrade, + + maybe_uv_upgrade, cwd=path_util.symforce_root(), env=dict( os.environ, - # Compile command to put in the header of dev_requirements.txt - CUSTOM_COMPILE_COMMAND="python test/symforce_requirements_test.py --update", + # Compile command to put in the header of requirements.txt + UV_CUSTOM_COMPILE_COMMAND="python test/symforce_requirements_test.py --update", ), ) ) @@ -93,22 +103,62 @@ def test_requirements(self) -> None: for key, value in local_requirements_map.items(): requirements_contents = re.sub(key.format(".*"), value, requirements_contents) - # Inject the python version requirement - sentinel = "--index-url https://pypi.python.org/simple\n" - version_requirement = textwrap.dedent( - """ - # Create a requirement incompatible with python < 3.8 - symforce_requires_python_38_or_higher___your_python_version_is_incompatible; python_version < '3.8' - """ + output_requirements_file.write_text(requirements_contents) + + self.compare_or_update_file( + path_util.symforce_data_root() / f"requirements_dev_py3{version}.txt", + output_requirements_file, ) - requirements_contents = requirements_contents.replace( - sentinel, sentinel + version_requirement + + @sympy_only + def test_build_requirements(self) -> None: + """ + Generate requirements_build.txt + """ + output_dir = self.make_output_dir("sf_requirements_test_build_") + output_requirements_file = output_dir / "requirements_build.txt" + + local_requirements_map = { + "skymarshal @ file://{}/third_party/skymarshal": "file:./third_party/skymarshal", + "symforce-sym @ file://{}/gen/python": "file:./gen/python", + } + + asyncio.run( + python_util.execute_subprocess( + [ + "uv", + "pip", + "compile", + "--no-deps", + "--extra=setup", + "--no-cache", + f"--output-file={output_requirements_file}", + "pyproject.toml", + ], + cwd=path_util.symforce_root(), + env=dict( + os.environ, + # Compile command to put in the header of requirements.txt + UV_CUSTOM_COMPILE_COMMAND="python test/symforce_requirements_test.py --update", + ), + ) + ) + + # Reverse path rewrite back to relative paths + requirements_contents = output_requirements_file.read_text() + for key, value in local_requirements_map.items(): + requirements_contents = re.sub(key.format(".*"), value, requirements_contents) + + # Strip version numbers + requirements_contents = re.sub( + r"==[+-\.a-zA-Z0-9]+$", "", requirements_contents, flags=re.MULTILINE ) output_requirements_file.write_text(requirements_contents) self.compare_or_update_file( - path_util.symforce_data_root() / "dev_requirements.txt", output_requirements_file + path_util.symforce_data_root() / "requirements_build.txt", + output_requirements_file, )