Skip to content

Commit

Permalink
"feat(*): initial commit"
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoineDao committed Mar 18, 2020
0 parents commit ff3a3ba
Show file tree
Hide file tree
Showing 24 changed files with 1,287 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
*.pyc
test.py
.pytest_cache
*__pycache__
.coverage
*.ipynb
.ipynb_checkpoints
.tox
*.egg-info
tox.ini
/.cache
/.vscode
.eggs
*.code-workspace
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"
}
]
]
}
46 changes: 46 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
language: python

python:
- "2.7"
- "3.6"

install:
- pip install -r dev-requirements.txt
- pip install -r requirements.txt

script:
- python -m pytest --cov=. tests/

after_success:
- coverage report
- coveralls

jobs:
include:
- 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
- pip install -r requirements.txt
- npm install @semantic-release/exec
script:
- git config --global user.email "releases@ladybug.tools"
- git config --global user.name "ladybugbot"
- npx semantic-release
- stage: docs
if: branch = master AND (NOT type IN (pull_request))
script:
- sphinx-apidoc -f -e -d 4 -o ./docs ./ladybug_pandas
- sphinx-build -b html ./docs ./docs/_build/docs
deploy:
provider: pages
skip_cleanup: true
github-token: $GH_TOKEN
keep-history: false
local_dir: docs/_build/
on:
branch: master
4 changes: 4 additions & 0 deletions CODE_OF_CONDUCT.md
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).
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
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).
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

48 changes: 48 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[![Build Status](https://travis-ci.org/ladybug-tools/ladybug-pandas.svg?branch=master)](https://travis-ci.org/ladybug-tools/ladybug-pandas)
[![Coverage Status](https://coveralls.io/repos/github/ladybug-tools/ladybug-pandas/badge.svg?branch=master)](https://coveralls.io/github/ladybug-tools/ladybug-pandas)

[![Python 2.7](https://img.shields.io/badge/python-2.7-green.svg)](https://www.python.org/downloads/release/python-270/) [![Python 3.6](https://img.shields.io/badge/python-3.6-blue.svg)](https://www.python.org/downloads/release/python-360/)

# ladybug-pandas

A ladybug extension powered by pandas

## Installation
```console
pip install ladybug-pandas
```

## QuickStart
```python
import ladybug_pandas

```

## [API Documentation](http://ladybug-tools.github.io/ladybug-pandas/docs)

## Local Development
1. Clone this repo locally
```console
git clone git@github.com:ladybug-tools/ladybug-pandas

# or

git clone https://github.com/ladybug-tools/ladybug-pandas
```
2. Install dependencies:
```console
cd ladybug-pandas
pip install -r dev-requirements.txt
pip install -r requirements.txt
```

3. Run Tests:
```console
python -m pytest tests/
```

4. Generate Documentation:
```console
sphinx-apidoc -f -e -d 4 -o ./docs ./ladybug_pandas
sphinx-build -b html ./docs ./docs/_build/docs
```
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
9 changes: 9 additions & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
coverage==4.5.2
coveralls==1.5.1
pytest==4.1.0
pytest-cov==2.6.1
Sphinx==1.8.5
sphinx-bootstrap-theme==0.6.5
sphinxcontrib-fulltoc==1.2.0
sphinxcontrib-websupport==1.1.0
twine==1.13.0
13 changes: 13 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

## Usage
For generating the documents locally use commands below from the root folder.

```shell
# install dependencies
pip install Sphinx sphinxcontrib-fulltoc sphinx_bootstrap_theme

# generate rst files for modules
sphinx-apidoc -f -e -d 4 -o ./docs ./ladybug_pandas
# build the documentation under _build/docs folder
sphinx-build -b html ./docs ./docs/_build/docs
```
1 change: 1 addition & 0 deletions docs/_build/.nojekyll
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions docs/_build/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# documentation
1 change: 1 addition & 0 deletions docs/_build/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# documentation
40 changes: 40 additions & 0 deletions docs/_static/custom.css
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;
}
}
107 changes: 107 additions & 0 deletions docs/_templates/layout.html
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 %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}<br/>
{%- else %}
{% trans copyright=copyright|e %}&copy; 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 %}
Loading

0 comments on commit ff3a3ba

Please sign in to comment.