-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/ladybug-tools/honeybee-doe2 …
…into main
- Loading branch information
Showing
19 changed files
with
995 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
--- | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
|
||
test: | ||
name: Unit tests | ||
strategy: | ||
matrix: | ||
python-version: [3.7] | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: install python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install -r dev-requirements.txt | ||
- name: run tests | ||
run: python -m pytest tests/ | ||
|
||
deploy: | ||
name: Deploy to GitHub and PyPI | ||
runs-on: ubuntu-latest | ||
needs: test | ||
if: github.ref == 'refs/heads/main' && github.repository_owner == 'ladybug-tools' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
- name: set up node # we need node for for semantic release | ||
uses: actions/setup-node@v2.1.2 | ||
with: | ||
node-version: 14.2.0 | ||
- name: install python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install -r dev-requirements.txt | ||
- name: install semantic-release | ||
run: | ||
npm install @semantic-release/exec | ||
- name: run semantic release | ||
id: new_release | ||
run: | | ||
nextRelease="`npx semantic-release@^17.0.0 --dryRun | grep -oP 'Published release \K.*? ' || true`" | ||
npx semantic-release@^17.0.0 | ||
echo "::set-output name=tag::$nextRelease" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
|
||
docs: | ||
name: Generate docs | ||
runs-on: ubuntu-latest | ||
needs: test | ||
if: github.ref == 'refs/heads/main' && github.repository_owner == 'ladybug-tools' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
- name: install dependencies | ||
run: | | ||
pip install -U . | ||
pip install -r dev-requirements.txt | ||
sphinx-apidoc -f -e -d 4 -o ./docs ./honeybee_doe2 | ||
sphinx-build -b html ./docs ./docs/_build/docs | ||
- name: deploy to github pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
# this will use ladybugbot token | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_branch: gh-pages | ||
publish_dir: docs/_build/ | ||
force_orphan: true | ||
keep_files: false | ||
full_commit_message: 'deploy: update docs' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,3 +128,5 @@ dmypy.json | |
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
test.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
"@semantic-release/github", | ||
[ | ||
"@semantic-release/exec", | ||
{ | ||
"publishCmd": "bash deploy.sh" | ||
} | ||
] | ||
], | ||
"branches": ["main"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Contributor Covenant Code of Conduct | ||
========================================= | ||
|
||
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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Contributing | ||
------------ | ||
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. | ||
|
||
### Code contribution | ||
This project follows Ladybug Tools contributing guideline. See [contributing to Ladybug Tools projects](https://github.com/ladybug-tools/contributing/blob/master/README.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
recursive-exclude tests * | ||
recursive-exclude docs * | ||
recursive-exclude equest_docs * | ||
recursive-exclude .github * | ||
exclude .gitignore | ||
exclude .releaserc.json | ||
exclude deploy.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
coverage==5.5 | ||
coveralls==2.2.0 | ||
pytest==6.2.4 | ||
pytest-cov==2.12.0 | ||
Sphinx==3.3.1 | ||
sphinx-bootstrap-theme==0.7.1 | ||
sphinx-bootstrap-theme==0.8.1 | ||
sphinxcontrib-websupport==1.2.4 | ||
sphinxcontrib-fulltoc==1.2.0 | ||
sphinx-click==2.7.1 | ||
twine==3.4.1 | ||
wheel==0.36.2 | ||
setuptools==57.0.0 | ||
importlib-metadata==4.3.1 | ||
jinja2==3.0.3 | ||
markupsafe==2.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
## Usage | ||
For generating the documents locally use commands below from the root folder. | ||
|
||
```shell | ||
# install dependencies | ||
cd honeybee_doe2 | ||
pip install -r dev-requirements.txt | ||
|
||
# generate rst files for modules | ||
sphinx-apidoc -f -e -d 4 -o ./docs ./honeybee_doe2 | ||
# build the documentation under _build/docs folder | ||
sphinx-build -b html ./docs ./docs/_build/docs | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* bootstrap-sphinx.css | ||
* ~~~~~~~~~~~~~~~~~~~~ | ||
* | ||
* Sphinx stylesheet -- Bootstrap theme. | ||
*/ | ||
|
||
|
||
/* The code below is based on the bootstrap website sidebar */ | ||
|
||
|
||
/* Show and affix the side nav when space allows it */ | ||
@media screen and (min-width: 992px) { | ||
.bs-sidenav .nav > .active > ul { | ||
display: block; | ||
} | ||
/* Widen the fixed sidenav */ | ||
.bs-sidenav.affix, | ||
.bs-sidenav.affix-bottom { | ||
width: 292px; | ||
} | ||
.bs-sidenav.affix { | ||
position: fixed; /* Undo the static from mobile first approach */ | ||
} | ||
.bs-sidenav.affix-bottom { | ||
position: absolute; /* Undo the static from mobile first approach */ | ||
} | ||
.bs-sidenav.affix-bottom .bs-sidenav, | ||
.bs-sidenav.affix .bs-sidenav { | ||
margin-top: 0; | ||
margin-bottom: 0; | ||
} | ||
} | ||
@media screen and (min-width: 1200px) { | ||
/* Widen the fixed sidenav again */ | ||
.bs-sidenav.affix-bottom, | ||
.bs-sidenav.affix { | ||
width: 360px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
{% extends "basic/layout.html" %} | ||
|
||
{% if theme_bootstrap_version == "3" %} | ||
{% set bootstrap_version, navbar_version = "3.3.7", "" %} | ||
{% set bs_span_prefix = "col-md-" %} | ||
{% else %} | ||
{% set bootstrap_version, navbar_version = "2.3.2", "-2" %} | ||
{% set bs_span_prefix = "span" %} | ||
{% endif %} | ||
|
||
{%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and sidebars %} | ||
|
||
{%- set bs_content_width = render_sidebar and "8" or "12"%} | ||
|
||
{%- block doctype -%} | ||
<!DOCTYPE html> | ||
{%- endblock %} | ||
|
||
{# Sidebar: Rework into our Bootstrap nav section. #} | ||
{% macro navBar() %} | ||
{% include "navbar" + navbar_version + ".html" %} | ||
{% endmacro %} | ||
|
||
{% if theme_bootstrap_version == "3" %} | ||
{%- macro bsidebar() %} | ||
{%- if render_sidebar %} | ||
<div class="{{ bs_span_prefix }}4"> | ||
<div id="sidebar" class="bs-sidenav" role="complementary"> | ||
{%- for sidebartemplate in sidebars %} | ||
{%- include sidebartemplate %} | ||
{%- endfor %} | ||
</div> | ||
</div> | ||
{%- endif %} | ||
{%- endmacro %} | ||
{% else %} | ||
{%- macro bsidebar() %} | ||
{%- if render_sidebar %} | ||
<div class="{{ bs_span_prefix }}4"> | ||
<div id="sidebar" class="bs-sidenav well" data-spy="affix"> | ||
{%- for sidebartemplate in sidebars %} | ||
{%- include sidebartemplate %} | ||
{%- endfor %} | ||
</div> | ||
</div> | ||
{%- endif %} | ||
{%- endmacro %} | ||
{% endif %} | ||
|
||
{%- block extrahead %} | ||
<meta charset='utf-8'> | ||
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'> | ||
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'> | ||
<meta name="apple-mobile-web-app-capable" content="yes"> | ||
<script type="text/javascript" src="{{ pathto('_static/js/jquery-1.11.0.min.js', 1) }} "></script> | ||
<script type="text/javascript" src="{{ pathto('_static/js/jquery-fix.js', 1) }} "></script> | ||
<script type="text/javascript" src="{{ pathto('_static', 1) + '/bootstrap-' + bootstrap_version + '/js/bootstrap.min.js' }} "></script> | ||
<script type="text/javascript" src="{{ pathto('_static/bootstrap-sphinx.js', 1) }} "></script> | ||
{% endblock %} | ||
|
||
{# Silence the sidebar's, relbar's #} | ||
{% block header %}{% endblock %} | ||
{% block relbar1 %}{% endblock %} | ||
{% block relbar2 %}{% endblock %} | ||
{% block sidebarsourcelink %}{% endblock %} | ||
|
||
{%- block content %} | ||
{{ navBar() }} | ||
<div class="container"> | ||
<div class="row"> | ||
{%- block sidebar1 %}{{ bsidebar() }}{% endblock %} | ||
<div class="body {{ bs_span_prefix }}{{ bs_content_width }} content" role="main"> | ||
{% block body %}{% endblock %} | ||
</div> | ||
{% block sidebar2 %} {# possible location for sidebar #} {% endblock %} | ||
</div> | ||
</div> | ||
{%- endblock %} | ||
|
||
{%- block footer %} | ||
<footer class="footer"> | ||
<div class="container"> | ||
<p class="pull-right"> | ||
<a href="#">Back to top</a> | ||
{% if theme_source_link_position == "footer" %} | ||
<br/> | ||
{% include "sourcelink.html" %} | ||
{% endif %} | ||
</p> | ||
<p> | ||
{%- if show_copyright %} | ||
{%- if hasdoc('copyright') %} | ||
{% trans path=pathto('copyright'), copyright=copyright|e %}© <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}<br/> | ||
{%- else %} | ||
{% trans copyright=copyright|e %}© Copyright {{ copyright }}.{% endtrans %}<br/> | ||
{%- endif %} | ||
{%- endif %} | ||
{%- if last_updated %} | ||
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}<br/> | ||
{%- endif %} | ||
{%- if show_sphinx %} | ||
{% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx-doc.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}<br/> | ||
{%- endif %} | ||
</p> | ||
</div> | ||
</footer> | ||
{%- endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
CLI Docs | ||
======== | ||
|
||
Installation | ||
------------ | ||
|
||
To check if the command line is installed correctly use ``honeybee-doe2 --help`` |
Oops, something went wrong.