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
Original file line number Diff line number Diff line change
Expand Up @@ -1624,9 +1624,9 @@ packages:
requires_python: '>=3.8.0'
- kind: pypi
name: pyrcf
version: 0.0.1
version: 0.0.2
path: .
sha256: 58c1ce39281ec730f5c726fe7812bc80ffc0fa312597572cb2564bb877693495
sha256: c15504b9901b9c0e3f45ac3e2aa50a36bd38f4fdb29aa711402e894df97a143c
requires_dist:
- pybullet>=3.2.6,<4
- pin>=2.7.0,<3
Expand All @@ -1642,6 +1642,7 @@ packages:
- hypothesis>=6.82,<=6.108.5 ; extra == 'test'
- ruff>=0.0.280,<=0.5.5 ; extra == 'test'
- coverage>=7.2.7,<=7.6.0 ; extra == 'test'
requires_python: '>=3.10'
editable: true
- kind: pypi
name: pytest
Expand Down
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.