Skip to content

Commit f42f874

Browse files
committed
Initial commit with everything for the repository
1 parent f6acc7c commit f42f874

24 files changed

+1086
-2
lines changed

.github/workflows/ci.yaml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
---
2+
name: CI
3+
4+
on: [push, pull_request]
5+
6+
jobs:
7+
8+
test:
9+
name: Unit tests
10+
strategy:
11+
matrix:
12+
python-version: [2.7, 3.7]
13+
os: [macos-latest, ubuntu-latest, windows-latest]
14+
15+
runs-on: ${{ matrix.os }}
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: set up Python
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
- name: install python dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install -r requirements.txt
26+
pip install -r dev-requirements.txt
27+
- name: run tests
28+
run: python -m pytest tests/
29+
30+
deploy:
31+
name: Deploy to GitHub and PyPI
32+
runs-on: ubuntu-latest
33+
needs: test
34+
if: github.ref == 'refs/heads/master' && github.repository_owner == 'ladybug-tools'
35+
steps:
36+
- uses: actions/checkout@v2
37+
- name: set up Python
38+
uses: actions/setup-python@v2
39+
with:
40+
python-version: 3.7
41+
- name: set up node # we need node for for semantic release
42+
uses: actions/setup-node@v2.1.2
43+
with:
44+
node-version: 14.2.0
45+
- name: install python dependencies
46+
run: |
47+
python -m pip install --upgrade pip
48+
pip install -r requirements.txt
49+
pip install -r dev-requirements.txt
50+
- name: install semantic-release
51+
run:
52+
npm install @semantic-release/exec
53+
- name: run semantic release
54+
id: new_release
55+
run: |
56+
nextRelease="`npx semantic-release@^17.0.0 --dryRun | grep -oP 'Published release \K.*? ' || true`"
57+
npx semantic-release@^17.0.0
58+
echo "::set-output name=tag::$nextRelease"
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
62+
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
63+
- name: sleep for 5 minutes for PyPI update
64+
if: contains(steps.new_release.outputs.tag, '.')
65+
run: sleep 300s
66+
shell: bash
67+
- name: Update lbt-honeybee
68+
if: contains(steps.new_release.outputs.tag, '.')
69+
env:
70+
DISPATCH_REPO: ladybug-tools/lbt-honeybee
71+
DEPS_TOKEN: ${{ secrets.DEPS_UPDATING }}
72+
run: |
73+
curl -X POST https://api.github.com/repos/$DISPATCH_REPO/dispatches \
74+
-H "Accept: application/vnd.github.everest-preview+json" \
75+
-d '{"event_type": "honeybee_display_release", "client_payload": {"version": "${{ steps.new_release.outputs.tag }}"}}' \
76+
-u ladybugbot:$DEPS_TOKEN
77+
78+
docs:
79+
name: Generate docs
80+
runs-on: ubuntu-latest
81+
needs: test
82+
if: github.ref == 'refs/heads/master' && github.repository_owner == 'ladybug-tools'
83+
steps:
84+
- uses: actions/checkout@v2
85+
- name: set up Python
86+
uses: actions/setup-python@v2
87+
with:
88+
python-version: 3.7
89+
- name: install dependencies
90+
run: |
91+
pip install -U .
92+
pip install -r dev-requirements.txt
93+
sphinx-apidoc -f -e -d 4 -o ./docs ./honeybee_display
94+
sphinx-build -b html ./docs ./docs/_build/docs
95+
- name: deploy to github pages
96+
uses: peaceiris/actions-gh-pages@v3
97+
with:
98+
# this will use ladybugbot token
99+
github_token: ${{ secrets.GITHUB_TOKEN }}
100+
publish_branch: gh-pages
101+
publish_dir: docs/_build/
102+
force_orphan: true
103+
keep_files: false
104+
full_commit_message: 'deploy: update docs'

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
*.pyc
2+
test.py
3+
.pytest_cache
4+
*__pycache__
5+
.coverage
6+
*.ipynb
7+
.ipynb_checkpoints
8+
.tox
9+
*.egg-info
10+
tox.ini
11+
/.cache
12+
/.vscode
13+
.eggs
14+
*.code-workspace

.releaserc.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"plugins": [
3+
"@semantic-release/commit-analyzer",
4+
"@semantic-release/release-notes-generator",
5+
"@semantic-release/github",
6+
[
7+
"@semantic-release/exec",
8+
{
9+
"publishCmd": "bash deploy.sh"
10+
}
11+
]
12+
]
13+
}

CODE_OF_CONDUCT.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Contributor Covenant Code of Conduct
2+
=========================================
3+
4+
This project follows Ladybug Tools contributor covenant code of conduct. See our [contributor covenant code of conduct](https://github.com/ladybug-tools/contributing/blob/master/CODE-OF-CONDUCT.md).

CONTRIBUTING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Contributing
2+
------------
3+
We welcome contributions from anyone, even if you are new to open source we will be happy to help you to get started. Most of the Ladybug Tools developers started learning programming through developing for Ladybug Tools.
4+
5+
### Code contribution
6+
This project follows Ladybug Tools contributing guideline. See [contributing to Ladybug Tools projects](https://github.com/ladybug-tools/contributing/blob/master/README.md).

README.md

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,47 @@
1-
# honeybee-display
2-
🐝 :computer: Adds methods to translate honeybee objects to VisualizationSets
1+
[![Build Status](https://github.com/ladybug-tools/ladybug-display/workflows/CI/badge.svg)](https://github.com/ladybug-tools/ladybug-display/actions)
2+
3+
[![Python 3.7](https://img.shields.io/badge/python-3.7-blue.svg)](https://www.python.org/downloads/release/python-370/) [![Python 2.7](https://img.shields.io/badge/python-2.7-green.svg)](https://www.python.org/downloads/release/python-270/) [![IronPython](https://img.shields.io/badge/ironpython-2.7-red.svg)](https://github.com/IronLanguages/ironpython2/releases/tag/ipy-2.7.8/)
4+
5+
# ladybug-display
6+
7+
A library that assigns basic display attributes to ladybug-geometry objects (color, line weight, line type, etc).
8+
9+
## Installation
10+
```console
11+
pip install ladybug-display
12+
```
13+
14+
## QuickStart
15+
```python
16+
import ladybug_display
17+
18+
```
19+
20+
## [API Documentation](http://ladybug-tools.github.io/ladybug-display/docs)
21+
22+
## Local Development
23+
1. Clone this repo locally
24+
```console
25+
git clone git@github.com:ladybug-tools/ladybug-display
26+
27+
# or
28+
29+
git clone https://github.com/ladybug-tools/ladybug-display
30+
```
31+
2. Install dependencies:
32+
```console
33+
cd ladybug-display
34+
pip install -r dev-requirements.txt
35+
pip install -r requirements.txt
36+
```
37+
38+
3. Run Tests:
39+
```console
40+
python -m pytest tests/
41+
```
42+
43+
4. Generate Documentation:
44+
```console
45+
sphinx-apidoc -f -e -d 4 -o ./docs ./ladybug_display
46+
sphinx-build -b html ./docs ./docs/_build/docs
47+
```

deploy.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
3+
echo "Building distribution"
4+
python setup.py sdist bdist_wheel
5+
echo "Pushing new version to PyPi"
6+
twine upload dist/* -u $PYPI_USERNAME -p $PYPI_PASSWORD

dev-requirements.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
coverage==5.5
2+
coveralls==1.7.0;python_version<'3.0'
3+
coveralls==2.2.0;python_version>='3.6'
4+
pytest==4.6.9;python_version<'3.0'
5+
pytest==6.2.4;python_version>='3.6'
6+
pytest-cov==2.12.0
7+
Sphinx==1.8.5;python_version<'3.0'
8+
Sphinx==3.3.1;python_version>='3.6'
9+
docutils==0.17;python_version>='3.6'
10+
sphinx-bootstrap-theme==0.7.1
11+
sphinxcontrib-fulltoc==1.2.0
12+
sphinxcontrib-websupport==1.1.2;python_version<'3.0'
13+
sphinxcontrib-websupport==1.2.4;python_version>='3.6'
14+
sphinx-click==2.7.1
15+
twine==1.13.0;python_version<'3.0'
16+
twine==3.4.1;python_version>='3.6'
17+
wheel==0.36.2
18+
setuptools==44.1.0;python_version<'3.0'
19+
setuptools==57.0.0;python_version>='3.6'
20+
importlib-metadata==2.0.0;python_version<'3.0'
21+
importlib-metadata==4.3.1;python_version>='3.6'
22+
jinja2==3.0.3;python_version>='3.6'
23+
markupsafe==2.0.1;python_version>='3.6'

docs/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
## Usage
3+
For generating the documents locally use commands below from the root folder.
4+
5+
```shell
6+
# install dependencies
7+
cd honeybee_display
8+
pip install -r dev-requirements.txt
9+
10+
# generate rst files for modules
11+
sphinx-apidoc -f -e -d 4 -o ./docs ./honeybee_display
12+
# build the documentation under _build/docs folder
13+
sphinx-build -b html ./docs ./docs/_build/docs
14+
```

docs/_build/.nojekyll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

0 commit comments

Comments
 (0)