dragonfly-display 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dragonfly-display-0.1.0/.github/workflows/ci.yaml +107 -0
- dragonfly-display-0.1.0/.gitignore +15 -0
- dragonfly-display-0.1.0/.releaserc.json +13 -0
- dragonfly-display-0.1.0/CODE_OF_CONDUCT.md +4 -0
- dragonfly-display-0.1.0/CONTRIBUTING.md +6 -0
- dragonfly-display-0.1.0/Dockerfile +42 -0
- dragonfly-display-0.1.0/LICENSE +661 -0
- dragonfly-display-0.1.0/PKG-INFO +76 -0
- dragonfly-display-0.1.0/README.md +59 -0
- dragonfly-display-0.1.0/deploy.sh +28 -0
- dragonfly-display-0.1.0/dev-requirements.txt +23 -0
- dragonfly-display-0.1.0/docs/README.md +14 -0
- dragonfly-display-0.1.0/docs/_build/.nojekyll +1 -0
- dragonfly-display-0.1.0/docs/_build/README.md +1 -0
- dragonfly-display-0.1.0/docs/_build/docs/README.md +1 -0
- dragonfly-display-0.1.0/docs/_static/custom.css +48 -0
- dragonfly-display-0.1.0/docs/_templates/layout.html +107 -0
- dragonfly-display-0.1.0/docs/cli/index.rst +14 -0
- dragonfly-display-0.1.0/docs/conf.py +603 -0
- dragonfly-display-0.1.0/docs/index.rst +47 -0
- dragonfly-display-0.1.0/dragonfly_display/__init__.py +2 -0
- dragonfly-display-0.1.0/dragonfly_display/__main__.py +4 -0
- dragonfly-display-0.1.0/dragonfly_display/_extend_dragonfly.py +9 -0
- dragonfly-display-0.1.0/dragonfly_display/cli/__init__.py +187 -0
- dragonfly-display-0.1.0/dragonfly_display/model.py +78 -0
- dragonfly-display-0.1.0/dragonfly_display.egg-info/PKG-INFO +76 -0
- dragonfly-display-0.1.0/dragonfly_display.egg-info/SOURCES.txt +37 -0
- dragonfly-display-0.1.0/dragonfly_display.egg-info/dependency_links.txt +1 -0
- dragonfly-display-0.1.0/dragonfly_display.egg-info/entry_points.txt +2 -0
- dragonfly-display-0.1.0/dragonfly_display.egg-info/requires.txt +7 -0
- dragonfly-display-0.1.0/dragonfly_display.egg-info/top_level.txt +1 -0
- dragonfly-display-0.1.0/extras-requirements.txt +3 -0
- dragonfly-display-0.1.0/requirements.txt +2 -0
- dragonfly-display-0.1.0/setup.cfg +10 -0
- dragonfly-display-0.1.0/setup.py +37 -0
- dragonfly-display-0.1.0/tests/__init__.py +0 -0
- dragonfly-display-0.1.0/tests/json/model_with_doors_skylights.dfjson +1 -0
- dragonfly-display-0.1.0/tests/model_extend_test.py +80 -0
|
@@ -0,0 +1,107 @@
|
|
|
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: ['3.7', '3.10']
|
|
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 extras-requirements.txt
|
|
27
|
+
pip install -r dev-requirements.txt
|
|
28
|
+
- name: run tests
|
|
29
|
+
run: python -m pytest tests/
|
|
30
|
+
|
|
31
|
+
deploy:
|
|
32
|
+
name: Deploy to GitHub and PyPI
|
|
33
|
+
runs-on: ubuntu-latest
|
|
34
|
+
needs: test
|
|
35
|
+
if: github.ref == 'refs/heads/master' && github.repository_owner == 'ladybug-tools'
|
|
36
|
+
steps:
|
|
37
|
+
- uses: actions/checkout@v2
|
|
38
|
+
- name: set up Python
|
|
39
|
+
uses: actions/setup-python@v2
|
|
40
|
+
with:
|
|
41
|
+
python-version: 3.7
|
|
42
|
+
- name: set up node # we need node for for semantic release
|
|
43
|
+
uses: actions/setup-node@v2.1.2
|
|
44
|
+
with:
|
|
45
|
+
node-version: 14.2.0
|
|
46
|
+
- name: install python dependencies
|
|
47
|
+
run: |
|
|
48
|
+
python -m pip install --upgrade pip
|
|
49
|
+
pip install -r requirements.txt
|
|
50
|
+
pip install -r dev-requirements.txt
|
|
51
|
+
- name: install semantic-release
|
|
52
|
+
run:
|
|
53
|
+
npm install @semantic-release/exec
|
|
54
|
+
- name: run semantic release
|
|
55
|
+
id: new_release
|
|
56
|
+
run: |
|
|
57
|
+
nextRelease="`npx semantic-release@^17.0.0 --dryRun | grep -oP 'Published release \K.*? ' || true`"
|
|
58
|
+
npx semantic-release@^17.0.0
|
|
59
|
+
echo "::set-output name=tag::$nextRelease"
|
|
60
|
+
env:
|
|
61
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
62
|
+
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
|
63
|
+
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
|
|
64
|
+
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
|
65
|
+
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
|
66
|
+
- name: sleep for 5 minutes for PyPI update
|
|
67
|
+
if: contains(steps.new_release.outputs.tag, '.')
|
|
68
|
+
run: sleep 300s
|
|
69
|
+
shell: bash
|
|
70
|
+
- name: Update lbt-dragonfly
|
|
71
|
+
if: contains(steps.new_release.outputs.tag, '.')
|
|
72
|
+
env:
|
|
73
|
+
DISPATCH_REPO: ladybug-tools/lbt-dragonfly
|
|
74
|
+
DEPS_TOKEN: ${{ secrets.DEPS_UPDATING }}
|
|
75
|
+
run: |
|
|
76
|
+
curl -X POST https://api.github.com/repos/$DISPATCH_REPO/dispatches \
|
|
77
|
+
-H "Accept: application/vnd.github.everest-preview+json" \
|
|
78
|
+
-d '{"event_type": "dragonfly_display_release", "client_payload": {"version": "${{ steps.new_release.outputs.tag }}"}}' \
|
|
79
|
+
-u ladybugbot:$DEPS_TOKEN
|
|
80
|
+
|
|
81
|
+
docs:
|
|
82
|
+
name: Generate docs
|
|
83
|
+
runs-on: ubuntu-latest
|
|
84
|
+
needs: test
|
|
85
|
+
if: github.ref == 'refs/heads/master' && github.repository_owner == 'ladybug-tools'
|
|
86
|
+
steps:
|
|
87
|
+
- uses: actions/checkout@v2
|
|
88
|
+
- name: set up Python
|
|
89
|
+
uses: actions/setup-python@v2
|
|
90
|
+
with:
|
|
91
|
+
python-version: 3.7
|
|
92
|
+
- name: install dependencies
|
|
93
|
+
run: |
|
|
94
|
+
pip install -U .
|
|
95
|
+
pip install -r dev-requirements.txt
|
|
96
|
+
sphinx-apidoc -f -e -d 4 -o ./docs ./dragonfly_display
|
|
97
|
+
sphinx-build -b html ./docs ./docs/_build/docs
|
|
98
|
+
- name: deploy to github pages
|
|
99
|
+
uses: peaceiris/actions-gh-pages@v3
|
|
100
|
+
with:
|
|
101
|
+
# this will use ladybugbot token
|
|
102
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
103
|
+
publish_branch: gh-pages
|
|
104
|
+
publish_dir: docs/_build/
|
|
105
|
+
force_orphan: true
|
|
106
|
+
keep_files: false
|
|
107
|
+
full_commit_message: 'deploy: update docs'
|
|
@@ -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).
|
|
@@ -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).
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
FROM python:3.10-slim
|
|
2
|
+
|
|
3
|
+
LABEL maintainer="Ladybug Tools" email="info@ladybug.tools"
|
|
4
|
+
|
|
5
|
+
ENV HOMEDIR='/home/ladybugbot'
|
|
6
|
+
ENV PATH="${HOMEDIR}/.local/bin:${PATH}"
|
|
7
|
+
ENV LIBRARYDIR="${HOMEDIR}/lib"
|
|
8
|
+
ENV RUNDIR="${HOMEDIR}/run"
|
|
9
|
+
|
|
10
|
+
RUN apt-get update \
|
|
11
|
+
&& apt-get -y install ffmpeg libsm6 libxext6 xvfb --no-install-recommends git \
|
|
12
|
+
&& apt-get clean \
|
|
13
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
14
|
+
|
|
15
|
+
# Create non-root user
|
|
16
|
+
RUN adduser ladybugbot --uid 1000 --disabled-password --gecos ""
|
|
17
|
+
USER ladybugbot
|
|
18
|
+
WORKDIR ${HOMEDIR}
|
|
19
|
+
RUN mkdir ladybug_tools && touch ladybug_tools/config.json
|
|
20
|
+
|
|
21
|
+
# Install dragonfly-display
|
|
22
|
+
COPY dragonfly_display ${LIBRARYDIR}/dragonfly_display
|
|
23
|
+
COPY .git ${LIBRARYDIR}/.git
|
|
24
|
+
COPY setup.py ${LIBRARYDIR}
|
|
25
|
+
COPY setup.cfg ${LIBRARYDIR}
|
|
26
|
+
COPY requirements.txt ${LIBRARYDIR}
|
|
27
|
+
COPY extras-requirements.txt ${LIBRARYDIR}
|
|
28
|
+
COPY README.md ${LIBRARYDIR}
|
|
29
|
+
COPY LICENSE ${LIBRARYDIR}
|
|
30
|
+
|
|
31
|
+
USER root
|
|
32
|
+
RUN pip3 install --no-cache-dir setuptools wheel xvfbwrapper \
|
|
33
|
+
&& pip3 install --no-cache-dir ${LIBRARYDIR}[full] \
|
|
34
|
+
&& apt-get -y --purge remove git \
|
|
35
|
+
&& apt-get -y clean \
|
|
36
|
+
&& apt-get -y autoremove \
|
|
37
|
+
&& rm -rf ${LIBRARYDIR}/.git
|
|
38
|
+
|
|
39
|
+
USER ladybugbot
|
|
40
|
+
# Set up working directory
|
|
41
|
+
RUN mkdir -p ${RUNDIR}/simulation
|
|
42
|
+
WORKDIR ${RUNDIR}
|