Skip to content

Commit

Permalink
Prepare new version
Browse files Browse the repository at this point in the history
  • Loading branch information
tetov committed Feb 14, 2020
1 parent 1133376 commit 3f0940c
Show file tree
Hide file tree
Showing 25 changed files with 71 additions and 85 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,11 @@ deploy:
skip_cleanup: true
on:
tags: true
- provider: releases
skip_cleanup: true
api-key: $GITHUB_TOKEN
file_glob: true
file: dist/*
on:
tags: true

11 changes: 5 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

### Added
## \[0.1.13\] \[2020-10-14\]

### Changed
- Fixes for tkinter file dialog in `compas_rcf.utils.ui`

### Removed
- `compas_rcf.fabrication.abb_rcf_runner` renamed to `compas_rcf.fabrication.abb_runner`.
- Typos in `abb_runner` fixed.
- Trying to set up imports better between modules
- Fixes for tkinter file dialog in `compas_rcf.utils.ui`.

## \[0.1.12\] \[2020-10-13\]

Expand Down
6 changes: 0 additions & 6 deletions docs/api/compas_rcf.abb.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/api/compas_rcf.fabrication.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/api/compas_rcf.ur.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/api/compas_rcf.utils.rst

This file was deleted.

2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.doctest",
'sphinx.ext.extlinks',
"sphinx.ext.intersphinx",
"sphinx.ext.mathjax",
"sphinx.ext.napoleon",
Expand All @@ -60,7 +61,6 @@
# autosummary options

autosummary_generate = True
autosummary_imported_members = True

# napoleon options

Expand Down
10 changes: 6 additions & 4 deletions docs/examples/create_bullets_read_write_json.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
*******************************************************************************
ClayBullet object creator and JSON read & write
==================================
*******************************************************************************

Found :download:`here <./create_bullets_read_write_json.gh>`.
.. note
Found :download:`here <./create_bullets_read_write_json.gh>`.
Requires ``compas_rcf`` installed and available from inside Rhino. Follow the
installation steps in the :doc:`../getting_started.rst`.
installation steps in the :doc:`../getting_started`.

Includes
--------

- Components to create :class:compas_rcf.fabrication.ClayBullet objects as
- Components to create :class:`compas_rcf.fabrication.ClayBullet` objects as
well as reading and writing them to a json file
25 changes: 25 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@
compas_rcf
********************************************************************************

python module for MAS DFAB project Rapid Clay Formations

COMPAS
======

compas_rcf is part is built on top of `compas`_, `compas_fab`_ and
`compas_rrc`_.

Note on compatibility
=====================

Installation of the package requires Python \>\= 3.6.

Big parts are compatible with IronPython 2.7 (to be run inside Rhino plugin
Grasshopper).

The modules that require Python \>\= 3.6 should raise an exception on import.

Documentation
=============

.. toctree::
:maxdepth: 3
:titlesonly:
Expand All @@ -13,3 +34,7 @@ compas_rcf
changelog
authors
license

.. _`compas`: https://compas-dev.github.io/
.. _`compas_fab`: https://gramaziokohler.github.io/compas_fab/
.. _`compas_rrc`: https://bitbucket.org/ethrfl/compas_rrc/
7 changes: 2 additions & 5 deletions docs/api.rst → docs/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ API Reference
********************************************************************************

.. toctree::
:maxdepth: 1
:maxdepth: 2

api/compas_rcf.abb
api/compas_rcf.fabrication
api/compas_rcf.ur
api/compas_rcf.utils
reference/compas_rcf

2 changes: 2 additions & 0 deletions docs/reference/compas_rcf.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.. automodule:: compas_rcf
:members:
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ known_first_party = "compas_rcf"
known_third_party = "compas,compas_fab,compas_rrc,Rhino"
default_section = "THIRDPARTY"
forced_separate = "test_compas"
not_skip = "__init__.py"
add_imports = "__future__.absolute_import,__future__.division,__future__.print_function"
force_adds = true
skip = "_version.py"
Expand Down
6 changes: 1 addition & 5 deletions src/compas_rcf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
python module for MAS DFAB project Rapid Clay Formations
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import os

HERE = os.path.dirname(__file__)
Expand Down Expand Up @@ -41,4 +37,4 @@
__license__ = "MIT License"
__email__ = "anton@tetov.se"

__all__ = ["HOME", "DATA", "DOCS", "TEMP"]
__all__ = ["HOME", "DATA", "DOCS", "TEMP", "__version__"]
3 changes: 0 additions & 3 deletions src/compas_rcf/abb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,3 @@
This package should be used for any helpers or utilities we might require.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
8 changes: 1 addition & 7 deletions src/compas_rcf/fabrication/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,5 @@
digital fabrication method. It also contains fabrication objects, most significantly
:class:`compas_rcf.fabrication.ClayBullet` which is our data representation of our
discrete building blocks.
"""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from .clay_obj import * # noqa: F401,F403
from .network import * # noqa: F401,F403
"""
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def send_grip_release(client, do_state):
do_state : int (0 or 1)
Value to set DO to
"""
if CONF.is_target_real:
if CONF.target == "real":
client.send(WaitTime(CONF.tool.wait_before_io))
client.send(SetDigital(CONF.tool.io_needles_pin, do_state))
client.send(WaitTime(CONF.tool.wait_after_io))
Expand Down Expand Up @@ -123,7 +123,9 @@ def initial_setup(client):
logging.debug("Acceleration values set.")

# Set Max Speed
client.send(SetMaxSpeed(CONF.speed.speed_override, CONF.speed.speed_max_tcp))
client.send(
SetMaxSpeed(CONF.speed_values.speed_override, CONF.speed_values.speed_max_tcp)
)
logging.debug("Speed set.")

# Initial configuration
Expand Down
2 changes: 2 additions & 0 deletions src/compas_rcf/fabrication/clay_obj.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
if IPY:
import Rhino.Geometry as rg

__all__ = ["ClayBullet", "check_id_collision"]


class ClayBullet(object):
"""Simple Clay Cylinder.
Expand Down
19 changes: 2 additions & 17 deletions src/compas_rcf/fabrication/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

from compas_rcf.abb.helpers import zone_dict

__all__ = ["ZoneDataTemplate", "abb_rcf_conf_template", "fabrication_conf"]


class ZoneDataTemplate(confuse.Template):
def __init__(self, default=confuse.REQUIRED):
Expand Down Expand Up @@ -60,21 +62,4 @@ def convert(self, value, view):
},
}


def get_numerical_zone_value(zone_data):
"""Take input and return numerical zone data.
Parameters
----------
zone_value : str, float or int
Either zone data in mm or one of RAPID's defined variable names for zone data
Returns
-------
float or int
zone data in mm
"""
return zone_dict[zone_data.upper()]


fabrication_conf = confuse.LazyConfig("FabricationRunner", __name__)
2 changes: 2 additions & 0 deletions src/compas_rcf/fabrication/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

from compas.datastructures import Network

__all__ = ["ClayStructure"]


class ClayStructure(Network):
def __init__(self, clay_bullets):
Expand Down
2 changes: 2 additions & 0 deletions src/compas_rcf/fabrication/ur_fabrication_non_interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
from compas_rcf.ur.visualize_urscript import visualize_urscript
from compas_rcf.utils.util_funcs import list_elem_w_index_wrap

__all__ = ["ur_clay_shooting"]

# UR movement
ROBOT_L_SPEED = 0.6 # m/s
ROBOT_ACCEL = 0.8 # m/s2
Expand Down
3 changes: 0 additions & 3 deletions src/compas_rcf/ur/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,3 @@
for fabrication.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
2 changes: 2 additions & 0 deletions src/compas_rcf/ur/visualize_urscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
from compas_rcf.utils.compas_to_rhino import cgframe_to_rgplane
from compas_rcf.utils.compas_to_rhino import matrix_to_rgtransform

__all__ = ["visualize_urscript"]


def visualize_urscript(script):
M = [
Expand Down
8 changes: 2 additions & 6 deletions src/compas_rcf/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,5 @@
"""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

from .util_funcs import * # noqa: F401,F403
from compas_rcf.utils.json_ import * # noqa F401,F403
from compas_rcf.utils.util_funcs import * # noqa F401,F403
4 changes: 3 additions & 1 deletion src/compas_rcf/utils/json_.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

import json

from compas_rcf.fabrication import ClayBullet
from compas_rcf.fabrication.clay_obj import ClayBullet

all = ["load_bullets"]


def load_bullets(file_path):
Expand Down
2 changes: 2 additions & 0 deletions src/compas_rcf/utils/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
from colorama import init
from confuse import ConfigTypeError

__all__ = ["open_file_dialog", "print_conf_w_colors", "clear_screen"]

root = Tk()
root.withdraw()

Expand Down

0 comments on commit 3f0940c

Please sign in to comment.