Skip to content

Commit

Permalink
Release 0.7.2
Browse files Browse the repository at this point in the history
* Replace pdm with uv. This speeds up EOS installs by 4x.
* Use exact dependency versions in pyproject.toml
  • Loading branch information
aangelos28 committed Feb 12, 2025
1 parent ddb3c26 commit eb4d6ec
Show file tree
Hide file tree
Showing 14 changed files with 3,815 additions and 3,862 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,18 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: '3.10'

- uses: pdm-project/setup-pdm@v4
name: Set up PDM
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: "3.10"
allow-python-prereleases: false
cache: true
cache-dependency-path: |
./pdm.lock
enable-cache: true

- name: Install dependencies
run: pdm install --group docs --no-default
- name: Install the project
run: uv sync --all-extras --dev

- name: Build docs
run: pdm run docs-build-gh
run: uv run docs-build-gh

- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
project = "eos"
copyright = "2025, UNC Robotics"
author = "Angelos Angelopoulos"
release = "0.7.1"
release = "0.7.2"

extensions = [
"sphinx.ext.autodoc",
Expand Down
21 changes: 9 additions & 12 deletions docs/user-guide/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@ We recommend a central computer that is easily accessible.
EOS also requires a PostgreSQL database and a MinIO object storage server.
We provide a Docker Compose file that can set up all of these services for you.

1. Install PDM
1. Install uv
^^^^^^^^^^^^^^
PDM is used as the project manager for EOS, making it easier to install dependencies and build it.
uv is used as the dependency manager for EOS. It installs dependencies extremely fast.

See the `PDM documentation <https://pdm-project.org/en/latest/>`_ for more information or if you encounter any issues.
See the `uv documentation <https://docs.astral.sh/uv/>`_ for more information or if you encounter any issues.

.. tab-set::

.. tab-item:: Linux/Mac

.. code-block:: shell
curl -sSL https://pdm-project.org/install-pdm.py | python3 -
curl -LsSf https://astral.sh/uv/install.sh | sh
.. tab-item:: Windows

.. code-block:: shell
(Invoke-WebRequest -Uri https://pdm-project.org/install-pdm.py -UseBasicParsing).Content | py -
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
2. Clone the EOS Repository
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -42,21 +42,18 @@ See the `PDM documentation <https://pdm-project.org/en/latest/>`_ for more infor
3. Make a Virtual Environment
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
We create a virtual environment to isolate the dependencies of EOS from the rest of the system. The virtual environment
is created in a ``env`` directory inside the EOS repository directory. Feel free to use PDM to manage the virtual
environment instead. Other sections of the documentation will assume that you are using a virtual environment located
inside the EOS repository directory.
We create a virtual environment to isolate the dependencies of EOS from the rest of the system.

.. code-block:: shell
cd eos # Navigate to the cloned repository
python3 -m venv env
source env/bin/activate
uv venv
source .venv/bin/activate
4. Install Dependencies
^^^^^^^^^^^^^^^^^^^^^^^
Navigate to the cloned repository and run:

.. code-block:: shell
pdm install
uv sync
3,806 changes: 0 additions & 3,806 deletions pdm.lock

This file was deleted.

65 changes: 33 additions & 32 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "eos"
version = "0.7.1"
version = "0.7.2"
description = "The Experiment Orchestration System (EOS) is a comprehensive software framework and runtime for laboratory automation."
keywords = ["automation", "science", "lab", "experiment", "orchestration", "distributed", "infrastructure"]
authors = [
Expand All @@ -22,25 +22,25 @@ classifiers = [
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
"ray[default]~=2.42.0",
"typer~=0.15.1",
"rich~=13.9.4",
"jinja2~=3.1.5",
"PyYAML~=6.0.2",
"networkx~=3.4.2",
"sqlalchemy~=2.0.38",
"alembic~=1.14.1",
"psycopg[binary]~=3.2.3",
"asyncpg~=0.30.0",
"pydantic~=2.10.6",
"bofire[optimization]~=0.0.16",
"pandas~=2.2.3",
"numpy~=1.26.2",
"litestar[standard]~=2.14.0",
"minio~=7.2.15",
"ray[default]==2.42.0",
"typer==0.15.1",
"rich==13.9.4",
"jinja2==3.1.5",
"PyYAML==6.0.2",
"networkx==3.4.2",
"sqlalchemy==2.0.38",
"alembic==1.14.1",
"psycopg[binary]==3.2.3",
"asyncpg==0.30.0",
"pydantic==2.10.6",
"bofire[optimization]==0.0.16",
"pandas==2.2.3",
"numpy==1.26.2",
"litestar[standard]==2.14.0",
"minio==7.2.15",
]

[project.optional-dependencies]
[dependency-groups]
dev = [
"aiosqlite",
"ruff",
Expand All @@ -58,26 +58,27 @@ docs = [
"pydata-sphinx-theme",
]

[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.uv]
default-groups = ["dev", "docs"]

[tool.pdm.build]
includes = ["eos"]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.pdm.scripts]
test = "pytest"
test-with-cov = "pytest --cov=eos"
cov-report = "coverage html"
lint = "ruff check eos tests"
format = "black ."
docs-build = "sphinx-build docs docs/_build"
docs-build-gh = { shell = "sphinx-build docs docs/_build && touch docs/_build/.nojekyll" }
docs-serve = "sphinx-autobuild docs docs/_build/ -j auto --watch eos --watch docs --port 8002"
[tool.hatch.build.targets.wheel]
packages = ["eos"]

[project.scripts]
eos = "eos.eos:eos_app"

test = "scripts.test:main"
test-with-cov = "scripts.test_with_cov:main"
lint = "scripts.lint:main"
format = "scripts.format:main"
docs-build = "scripts.docs_build:main"
docs-build-gh = "scripts.docs_build_gh:main"
docs-serve = "scripts.docs_serve:main"

[tool.black]
line-length = 120
extend-exclude = "eos/database/_migrations/versions/"
Expand Down
9 changes: 9 additions & 0 deletions scripts/cov_report.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import subprocess


def main():
subprocess.run(["coverage", "html"], check=True)


if __name__ == "__main__":
main()
14 changes: 14 additions & 0 deletions scripts/docs_build.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import subprocess
from pathlib import Path


def main():
docs_dir = Path("docs")
build_dir = docs_dir / "_build"

cmd = ["sphinx-build", str(docs_dir), str(build_dir)]
subprocess.run(cmd, check=True)


if __name__ == "__main__":
main()
17 changes: 17 additions & 0 deletions scripts/docs_build_gh.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import subprocess
from pathlib import Path


def main():
docs_dir = Path("docs")
build_dir = docs_dir / "_build"
nojekyll_file = build_dir / ".nojekyll"

cmd = ["sphinx-build", str(docs_dir), str(build_dir)]
subprocess.run(cmd, check=True)

nojekyll_file.touch(exist_ok=True)


if __name__ == "__main__":
main()
26 changes: 26 additions & 0 deletions scripts/docs_serve.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import subprocess
from pathlib import Path


def main():
docs_dir = Path("docs")
build_dir = docs_dir / "_build"

cmd = [
"sphinx-autobuild",
str(docs_dir),
str(build_dir),
"-j",
"auto",
"--watch",
"eos",
"--watch",
"docs",
"--port",
"8002",
]
subprocess.run(cmd, check=True)


if __name__ == "__main__":
main()
9 changes: 9 additions & 0 deletions scripts/format.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import subprocess


def main():
subprocess.run(["black", "."], check=True)


if __name__ == "__main__":
main()
9 changes: 9 additions & 0 deletions scripts/lint.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import subprocess


def main():
subprocess.run(["ruff", "check", "eos", "tests"])


if __name__ == "__main__":
main()
11 changes: 11 additions & 0 deletions scripts/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import subprocess
import sys


def main():
cmd = ["pytest"] + sys.argv[1:]
subprocess.run(cmd, check=True)


if __name__ == "__main__":
main()
9 changes: 9 additions & 0 deletions scripts/test_with_cov.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import subprocess


def main():
subprocess.run(["pytest", "--cov=eos"], check=True)


if __name__ == "__main__":
main()
Loading

0 comments on commit eb4d6ec

Please sign in to comment.