Skip to content

Commit

Permalink
fix mutable defaults in dataclasses; fix pypi installation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
justagist committed Aug 7, 2024
1 parent b03d95c commit 8debac8
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [push, workflow_dispatch]
jobs:
# Auto-publish when version is increased
publish-job:
# Only publish on `publish` branch
# Only publish on `main` branch
if: github.ref == 'refs/heads/publish'
runs-on: ubuntu-latest
environment: release
Expand All @@ -16,4 +16,4 @@ jobs:
with:
pypi-token: ${{ secrets.PYPI_API_TOKEN }}
gh-token: ${{ secrets.GITHUB_TOKEN }}
parse-changelog: true
parse-changelog: true
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [0.0.2] - 2024-08-08

### Fixes

- Pypi installation issues
- mutable defaults in dataclass fields

## [0.0.1] - 2024-08-08

### Adds
Expand Down
5 changes: 3 additions & 2 deletions pixi.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 9 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[project]
name = "pyrcf"
version = "0.0.1"
version = "0.0.2"
authors = [{ name = "Saif Sidhik", email = "[email protected]" }]
description = "A Python Robot Control Framework for quickly prototyping control algorithms for different robot embodiments."
readme = "README.md"

requires-python = ">= 3.10"
dependencies = [
"pybullet>=3.2.6,<4",
"pin>=2.7.0,<3",
Expand All @@ -15,6 +15,13 @@ dependencies = [
"numpy>=1.26",
]

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[tool.setuptools.packages.find]
include = ["pyrcf", "pyrcf.*"] # Add this line with wildcard

[tool.pixi.project]
channels = ["conda-forge"]
platforms = ["linux-64"]
Expand Down Expand Up @@ -53,12 +60,6 @@ test = [
Source = "https://github.com/justagist/pyrcf"
Home = "https://github.com/justagist/pyrcf"

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[tool.setuptools.packages.find]
include = ["pyrcf"]

# Environments
[tool.pixi.environments]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Callable, Any, Tuple
from functools import partial
from dataclasses import dataclass
from dataclasses import dataclass, field
import numpy as np

from ....core.types import GlobalMotionPlan
Expand Down Expand Up @@ -97,8 +97,8 @@ class GamePadAnalogStickMappings:

@dataclass
class GamePadMappings:
button_mappings: GamePadButtonMappings = GamePadButtonMappings()
analog_mappings: GamePadAnalogStickMappings = GamePadAnalogStickMappings()
button_mappings: GamePadButtonMappings = field(default_factory=GamePadButtonMappings)
analog_mappings: GamePadAnalogStickMappings = field(default_factory=GamePadAnalogStickMappings)


def toggle_mapping(
Expand Down

0 comments on commit 8debac8

Please sign in to comment.