Skip to content

Commit

Permalink
feat(ci): Set up auto-deployment to PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswmackey authored and Chris Mackey committed Mar 23, 2020
1 parent 1fc20cc commit c22ca19
Show file tree
Hide file tree
Showing 8 changed files with 86 additions and 12 deletions.
13 changes: 13 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/github",
[
"@semantic-release/exec",
{
"publishCmd": "bash deploy.sh"
}
]
]
}
25 changes: 25 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
language: python

python:
- "3.6"

jobs:
include:
- stage: test
install:
- pip install -r dev-requirements.txt
script:
- python ./pass_tests.py
- stage: deploy
if: branch = master AND (NOT type IN (pull_request))
before_install:
- nvm install lts/* --latest-npm
python:
- "3.6"
install:
- pip install -r dev-requirements.txt
- npm install @semantic-release/exec
script:
- git config --global user.email "[email protected]"
- git config --global user.name "ladybugbot"
- npx semantic-release
18 changes: 6 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
[![Build Status](https://travis-ci.org/ladybug-tools/honeybee-grasshopper-core.svg?branch=master)](https://travis-ci.org/ladybug-tools/honeybee-grasshopper-core)

[![IronPython](https://img.shields.io/badge/ironpython-2.7-red.svg)](https://github.com/IronLanguages/ironpython2/releases/tag/ipy-2.7.8/)

# honeybee-grasshopper-core
:honeybee: :green_book: Core Honeybee plugin for Grasshopper (aka. honeybee[+]).

This repository contains all "core" Grasshopper components for the honeybee plugin
(aka. those components that are shared across all extensions). The package includes
both the userobjects (`.ghuser`) and the Python source (`.py`). Note that this
library only possesses the Grasshopper components and, in order to run the plugin,
the core libraries must be installed to the Rhino `scripts` folder (see dependencies).
the core libraries must be installed (see dependencies).

# Dependencies
The honeybee-grasshopper plugin has the following dependencies (other than Rhino/Grasshopper):
Expand All @@ -14,21 +18,11 @@ The honeybee-grasshopper plugin has the following dependencies (other than Rhino
* [ladybug-geometry](https://github.com/ladybug-tools/ladybug-geometry)
* [ladybug-dotnet](https://github.com/ladybug-tools/ladybug-dotnet)
* [ladybug-rhino](https://github.com/ladybug-tools/ladybug-rhino)
* [ladybug-grasshopper](https://github.com/ladybug-tools/ladybug-grasshopper)
* [honeybee-core](https://github.com/ladybug-tools/honeybee-core)

# Extensions
The honeybee-grasshopper plugin has the following extensions:

* honeybee-grasshopper-radiance
* [honeybee-grasshopper-energy]((https://github.com/ladybug-tools/honeybee-grasshopper-energy)

# Installation
To install the most recent version of the Grasshopper plugin, follow these steps:

1. Clone this repository to your machine.
2. Open the installer.gh in Grasshopper and set the toggle inside to `True`.
3. Restart Rhino + Grasshopper.

Note that following these steps will install the absolute most recent version of
the plugin. To install the last stable release, download the components and Grasshopper
file installer from [food4rhino](https://www.food4rhino.com/app/ladybug-tools).
6 changes: 6 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

echo "Building distribution"
python setup.py sdist bdist_wheel
echo "Pushing new version to PyPi"
twine upload dist/* -u $PYPI_USERNAME -p $PYPI_PASSWORD
5 changes: 5 additions & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
coverage==4.5.2
coveralls==1.5.1
pytest==4.1.0
pytest-cov==2.6.1
twine==1.13.0
1 change: 1 addition & 0 deletions pass_tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Disregard test running on Travis for now."""
5 changes: 5 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[bdist_wheel]
universal = 1

[metadata]
license_file = LICENSE
25 changes: 25 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import re
import setuptools

with open("README.md", "r") as fh:
long_description = fh.read()

setuptools.setup(
name="honeybee-grasshopper-core",
use_scm_version = True,
setup_requires=['setuptools_scm'],
author="Ladybug Tools",
author_email="[email protected]",
description="Core Honeybee plugin for Grasshopper.",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/ladybug-tools/honeybee-grasshopper-core",
packages=setuptools.find_packages(exclude=["samples"]),
install_requires=[],
classifiers=[
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: Implementation :: IronPython",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent"
],
)

0 comments on commit c22ca19

Please sign in to comment.