Skip to content

Commit

Permalink
setuptools => poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
RussTedrake committed Oct 5, 2023
1 parent b1b2a02 commit 3e8934b
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 523 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,7 @@ jobs:
run: |
apt-get update -o APT::Acquire::Retries=4 -qq
apt-get install -o APT::Acquire::Retries=4 -o Dpkg::Use-Pty=0 -qy --no-install-recommends python3-pip git xvfb
pip3 install underactuated
# Upgrade drake to the nightlies to avoid deprecation errors.
# TODO(russt): point to the nightly in setup.cfg, pending
# https://github.com/RobotLocomotion/drake/issues/18792
pip3 install --upgrade https://drake-packages.csail.mit.edu/drake/nightly/drake-0.0.20230903-cp310-cp310-manylinux_2_31_x86_64.whl
pip3 install underactuated --extra-index-url https://drake-packages.csail.mit.edu/whl/nightly/
shell: bash
- name: checkout
uses: actions/checkout@v2
Expand Down
6 changes: 2 additions & 4 deletions Developers.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@ for now a work-around is:

## To update the pip wheels

Update the version number in `setup.cfg`, then from the root directory, run:
Update the version number in `pyproject.toml`, then from the root directory, run:
```
rm -rf dist/*
python3 -m pip install --upgrade build twine
python3 -m build
python3 -m twine upload dist/* -u __token__
poetry publish --build
```

## Tips for developers
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in

This file was deleted.

2 changes: 1 addition & 1 deletion drake.html
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ <h1><a href="index.html" style="text-decoration:none;">Underactuated Robotics</a
<section><h1>Running on your own machine</h1>

<p>As you get more advanced, you will likely want to run (and extend) these examples on your own machine. On platforms that Drake supports (the latest two releases of Mac and Ubuntu), it should be as simple as running
<pre><code class="python">pip install underactuated</code></pre>
<pre><code class="python">pip install underactuated --extra-index-url https://drake-packages.csail.mit.edu/whl/nightly/</code></pre>
In general, I would strongly recommend running <code>pip</code>
commands in a <a
href="https://python-guide-cn.readthedocs.io/en/latest/dev/virtualenvs.html">virtualenv</a>.</p>
Expand Down
69 changes: 62 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,65 @@
[build-system]
requires = [
"setuptools>=42",
"wheel"
[tool.poetry]
name = "underactuated"
# Use e.g. 2023.10.4.rc0 if I need to release a release candidate.
# Use e.g. 2023.10.4.post1 if I need to rerelease on the same day.
version = "2023.10.5"
description = "MIT 6.821 - Underactuated Robotics"
authors = ["Russ Tedrake <russt@mit.edu>"]
license = "BSD License"
readme = "README.md"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: BSD License"
]
include = [
"LICENSE.txt",
"README.md",
"pyproject.toml",
"underactuated/**/*.jpg",
"underactuated/**/*.md",
"underactuated/**/*.mtl",
"underactuated/**/*.npy",
"underactuated/**/*.obj",
"underactuated/**/*.py",
"underactuated/**/*.sdf",
"underactuated/**/*.txt",
"underactuated/**/*.urdf",
"underactuated/**/*.xml",
"underactuated/**/*.yaml"
]
build-backend = "setuptools.build_meta"

exclude = [
"*.egg-info/**",
"**/__pycache__/**",
"**/*.bazel",
"**/test/**",
"bazel-*",
"htmlbook/**",
"data/**",
"solutions/**",
"figures/**"
]

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[[tool.poetry.source]]
name = "drake-nightly"
url = "https://drake-packages.csail.mit.edu/whl/nightly/"
priority = "explicit"

[tool.poetry.dependencies]
python = ">=3.8"
drake = { version = "==0.0.20231004", source = "drake-nightly" }
gradescope-utils = ">=0.4.0"
mpld3 = ">=0.5.1"
pydot = ">=1.3.0"
timeout-decorator = ">=0.4.1"

[tool.poetry.dev-dependencies]
# Add any development-specific dependencies here.

[tool.black]
line-length = 79
include = '\.ipynb?$|\.pyi?$'
Expand All @@ -17,11 +73,11 @@ exclude = '''
| dist
)/
'''

[tool.isort]
profile = "black"
multi_line_output = 3
line_length = 79
skip_glob = [".gitignore", "bazel*", ".history"]
[tool.autoflake]
in-place = true
recursive = true
Expand All @@ -30,4 +86,3 @@ ignore-init-module-imports = true
remove-all-unused-imports = true
remove-duplicate-keys = true
remove-unused-variables = true
exclude = ["bazel*", ".history"]
Loading

0 comments on commit 3e8934b

Please sign in to comment.