Skip to content

Commit

Permalink
v0.0.2 beta
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim-Salzmann committed Sep 2, 2023
1 parent d75f7ff commit 25b16a4
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 16 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish to PyPI

on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+-release

jobs:
build-n-publish:
name: Publish to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Install Requirements
run: |
python -m pip install --upgrade pip
pip install torch>=2.0 --index-url https://download.pytorch.org/whl/cpu # Ensure CPU torch version
pip install -r requirements_build.txt
- name: Build a source tarball
run: >-
python3 -m
build
--sdist
--outdir dist/
--no-isolation
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

5 changes: 4 additions & 1 deletion .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Publish to TestPyPI

on: push
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+-beta

jobs:
build-n-publish:
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ If you use this framework please cite our paper
```

## Installation
Tested on Ubuntu 20.04 and MacOS.

### Prerequisites
Python 3.9 or higher.
gcc, make and cmake.

### Installation
Make sure you have a working PyTorch installation in your python environment.
### Requirements
Independently if you install from source or via pip you will need to meet the following requirements:

- Working PyTorch installation in your python environment.\
`python -c "import torch; print(torch.__version__)"`

Install all build dependencies via

- All build dependencies installed via\
`pip install -r requirements_build.txt`

With the python environment activated install L4CasADi via
### Pip Install
`pip install l4casadi --no-build-isolation`

### From Source
- Clone the repository\
`git clone https://github.com/Tim-Salzmann/l4casadi.git`

- Build from source\
`pip install . --no-build-isolation`

The `--no-build-isolation` flag is required for L4CasADi to find and link against the installed PyTorch.
Expand Down
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "l4casadi"
version = "0.0.1"
version = "0.0.2"
authors = [
{ name="Tim Salzmann", email="[email protected]" },
]
Expand All @@ -27,9 +27,8 @@ dependencies = [
"casadi>=3.6",
]

#[project.urls]
#"Homepage" = "https://github.com/pypa/sampleproject"
#"Bug Tracker" = "https://github.com/pypa/sampleproject/issues"
[project.urls]
"Homepage" = "https://github.com/Tim-Salzmann/l4casadi"

[tool.setuptools]
packages = ["l4casadi", "l4casadi.template_generation"]

0 comments on commit 25b16a4

Please sign in to comment.