Skip to content

Commit 619a862

Browse files
committed
feat(init): Initial commit of ladybug tools template
1 parent ab80b63 commit 619a862

23 files changed

+634
-1
lines changed

.gitignore

+14
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

+13
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+
}

.travis.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
language: python
2+
3+
python:
4+
- "2.7"
5+
- "3.7"
6+
7+
install:
8+
- pip install -r dev-requirements.txt
9+
- pip install -r requirements.txt
10+
11+
script:
12+
- python -m pytest --cov=. tests/
13+
14+
after_success:
15+
- coverage report
16+
- coveralls
17+
18+
jobs:
19+
include:
20+
- stage: deploy
21+
if: branch = master AND (NOT type IN (pull_request))
22+
before_install:
23+
- nvm install lts/* --latest-npm
24+
python:
25+
- "3.7"
26+
install:
27+
- pip install -r dev-requirements.txt
28+
- pip install -r requirements.txt
29+
- npm install @semantic-release/exec
30+
script:
31+
- git config --global user.email "[email protected]"
32+
- git config --global user.name "ladybugbot"
33+
- npx semantic-release
34+
- stage: docs
35+
if: branch = master AND (NOT type IN (pull_request))
36+
script:
37+
- sphinx-apidoc -f -e -d 4 -o ./docs ./honeybee_3dm
38+
- sphinx-build -b html ./docs ./docs/_build/docs
39+
deploy:
40+
provider: pages
41+
skip_cleanup: true
42+
github-token: $GH_TOKEN
43+
keep-history: false
44+
local_dir: docs/_build/
45+
on:
46+
branch: master

CODE_OF_CONDUCT.md

+4
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

+6
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

+50-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,51 @@
1+
[![Build Status](https://travis-ci.org/ladybug-tools/honeybee-3dm.svg?branch=master)](https://travis-ci.org/ladybug-tools/honeybee-3dm)
2+
[![Coverage Status](https://coveralls.io/repos/github/ladybug-tools/honeybee-3dm/badge.svg?branch=master)](https://coveralls.io/github/ladybug-tools/honeybee-3dm)
3+
4+
[![Python 2.7](https://img.shields.io/badge/python-2.7-green.svg)](https://www.python.org/downloads/release/python-270/) [![Python 3.7](https://img.shields.io/badge/python-3.7-blue.svg)](https://www.python.org/downloads/release/python-370/)
5+
16
# honeybee-3dm
2-
🐝 🦏3DM - Honeybee extension for translating to and from Rhino 3dm
7+
8+
Honeybee extension for translating to and from [Rhino 3dm](https://www.rhino3d.com/).
9+
10+
## Installation
11+
12+
```console
13+
pip install -U honeybee-3dm
14+
```
15+
16+
## QuickStart
17+
18+
```python
19+
import honeybee_3dm
20+
21+
```
22+
23+
## [API Documentation](http://ladybug-tools.github.io/honeybee-3dm/docs)
24+
25+
## Local Development
26+
27+
1. Clone this repo locally
28+
```console
29+
git clone [email protected]:ladybug-tools/honeybee-3dm
30+
31+
# or
32+
33+
git clone https://github.com/ladybug-tools/honeybee-3dm
34+
```
35+
2. Install dependencies:
36+
```console
37+
cd honeybee-3dm
38+
pip install -r dev-requirements.txt
39+
pip install -r requirements.txt
40+
```
41+
42+
3. Run Tests:
43+
```console
44+
python -m pytest tests/
45+
```
46+
47+
4. Generate Documentation:
48+
```console
49+
sphinx-apidoc -f -e -d 4 -o ./docs ./honeybee_3dm
50+
sphinx-build -b html ./docs ./docs/_build/docs
51+
```

deploy.sh

+6
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

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
coverage==5.3
2+
coveralls==1.7.0;python_version<'3.0'
3+
coveralls==2.1.2;python_version>='3.6'
4+
pytest==4.6.9;python_version<'3.0'
5+
pytest==6.1.1;python_version>='3.6'
6+
pytest-cov==2.10.1
7+
Sphinx==1.8.5;python_version<'3.0'
8+
Sphinx==3.2.1;python_version>='3.6'
9+
sphinx-bootstrap-theme==0.7.1
10+
sphinxcontrib-fulltoc==1.2.0
11+
sphinxcontrib-websupport==1.1.2;python_version<'3.0'
12+
sphinxcontrib-websupport==1.2.4;python_version>='3.6'
13+
twine==1.13.0;python_version<'3.0'
14+
twine==3.2.0;python_version>='3.6'
15+
wheel==0.35.1
16+
setuptools==44.1.0;python_version<'3.0'
17+
setuptools==50.3.2;python_version>='3.6'

docs/README.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
## Usage
3+
For generating the documents locally use commands below from the root folder.
4+
5+
```shell
6+
# install dependencies
7+
pip install Sphinx sphinxcontrib-fulltoc sphinx_bootstrap_theme
8+
9+
# generate rst files for modules
10+
sphinx-apidoc -f -e -d 4 -o ./docs ./honeybee_3dm
11+
# build the documentation under _build/docs folder
12+
sphinx-build -b html ./docs ./docs/_build/docs
13+
```

docs/_build/.nojekyll

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

docs/_build/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# documentation

docs/_build/docs/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# documentation

docs/_static/custom.css

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* bootstrap-sphinx.css
3+
* ~~~~~~~~~~~~~~~~~~~~
4+
*
5+
* Sphinx stylesheet -- Bootstrap theme.
6+
*/
7+
8+
9+
/* The code below is based on the bootstrap website sidebar */
10+
11+
12+
/* Show and affix the side nav when space allows it */
13+
@media screen and (min-width: 992px) {
14+
.bs-sidenav .nav > .active > ul {
15+
display: block;
16+
}
17+
/* Widen the fixed sidenav */
18+
.bs-sidenav.affix,
19+
.bs-sidenav.affix-bottom {
20+
width: 292px;
21+
}
22+
.bs-sidenav.affix {
23+
position: fixed; /* Undo the static from mobile first approach */
24+
}
25+
.bs-sidenav.affix-bottom {
26+
position: absolute; /* Undo the static from mobile first approach */
27+
}
28+
.bs-sidenav.affix-bottom .bs-sidenav,
29+
.bs-sidenav.affix .bs-sidenav {
30+
margin-top: 0;
31+
margin-bottom: 0;
32+
}
33+
}
34+
@media screen and (min-width: 1200px) {
35+
/* Widen the fixed sidenav again */
36+
.bs-sidenav.affix-bottom,
37+
.bs-sidenav.affix {
38+
width: 360px;
39+
}
40+
}

docs/_templates/layout.html

+107
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
{% extends "basic/layout.html" %}
2+
3+
{% if theme_bootstrap_version == "3" %}
4+
{% set bootstrap_version, navbar_version = "3.3.7", "" %}
5+
{% set bs_span_prefix = "col-md-" %}
6+
{% else %}
7+
{% set bootstrap_version, navbar_version = "2.3.2", "-2" %}
8+
{% set bs_span_prefix = "span" %}
9+
{% endif %}
10+
11+
{%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and sidebars %}
12+
13+
{%- set bs_content_width = render_sidebar and "8" or "12"%}
14+
15+
{%- block doctype -%}
16+
<!DOCTYPE html>
17+
{%- endblock %}
18+
19+
{# Sidebar: Rework into our Bootstrap nav section. #}
20+
{% macro navBar() %}
21+
{% include "navbar" + navbar_version + ".html" %}
22+
{% endmacro %}
23+
24+
{% if theme_bootstrap_version == "3" %}
25+
{%- macro bsidebar() %}
26+
{%- if render_sidebar %}
27+
<div class="{{ bs_span_prefix }}4">
28+
<div id="sidebar" class="bs-sidenav" role="complementary">
29+
{%- for sidebartemplate in sidebars %}
30+
{%- include sidebartemplate %}
31+
{%- endfor %}
32+
</div>
33+
</div>
34+
{%- endif %}
35+
{%- endmacro %}
36+
{% else %}
37+
{%- macro bsidebar() %}
38+
{%- if render_sidebar %}
39+
<div class="{{ bs_span_prefix }}4">
40+
<div id="sidebar" class="bs-sidenav well" data-spy="affix">
41+
{%- for sidebartemplate in sidebars %}
42+
{%- include sidebartemplate %}
43+
{%- endfor %}
44+
</div>
45+
</div>
46+
{%- endif %}
47+
{%- endmacro %}
48+
{% endif %}
49+
50+
{%- block extrahead %}
51+
<meta charset='utf-8'>
52+
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
53+
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
54+
<meta name="apple-mobile-web-app-capable" content="yes">
55+
<script type="text/javascript" src="{{ pathto('_static/js/jquery-1.11.0.min.js', 1) }} "></script>
56+
<script type="text/javascript" src="{{ pathto('_static/js/jquery-fix.js', 1) }} "></script>
57+
<script type="text/javascript" src="{{ pathto('_static', 1) + '/bootstrap-' + bootstrap_version + '/js/bootstrap.min.js' }} "></script>
58+
<script type="text/javascript" src="{{ pathto('_static/bootstrap-sphinx.js', 1) }} "></script>
59+
{% endblock %}
60+
61+
{# Silence the sidebar's, relbar's #}
62+
{% block header %}{% endblock %}
63+
{% block relbar1 %}{% endblock %}
64+
{% block relbar2 %}{% endblock %}
65+
{% block sidebarsourcelink %}{% endblock %}
66+
67+
{%- block content %}
68+
{{ navBar() }}
69+
<div class="container">
70+
<div class="row">
71+
{%- block sidebar1 %}{{ bsidebar() }}{% endblock %}
72+
<div class="body {{ bs_span_prefix }}{{ bs_content_width }} content" role="main">
73+
{% block body %}{% endblock %}
74+
</div>
75+
{% block sidebar2 %} {# possible location for sidebar #} {% endblock %}
76+
</div>
77+
</div>
78+
{%- endblock %}
79+
80+
{%- block footer %}
81+
<footer class="footer">
82+
<div class="container">
83+
<p class="pull-right">
84+
<a href="#">Back to top</a>
85+
{% if theme_source_link_position == "footer" %}
86+
<br/>
87+
{% include "sourcelink.html" %}
88+
{% endif %}
89+
</p>
90+
<p>
91+
{%- if show_copyright %}
92+
{%- if hasdoc('copyright') %}
93+
{% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}<br/>
94+
{%- else %}
95+
{% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}.{% endtrans %}<br/>
96+
{%- endif %}
97+
{%- endif %}
98+
{%- if last_updated %}
99+
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}<br/>
100+
{%- endif %}
101+
{%- if show_sphinx %}
102+
{% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx-doc.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}<br/>
103+
{%- endif %}
104+
</p>
105+
</div>
106+
</footer>
107+
{%- endblock %}

0 commit comments

Comments
 (0)