Skip to content

Commit 227ed20

Browse files
committed
ci(dev-deps): Update CI and dev deps to run on Python 3.12
1 parent 2a8359f commit 227ed20

File tree

5 files changed

+99
-62
lines changed

5 files changed

+99
-62
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
name: Unit tests
1010
strategy:
1111
matrix:
12-
python-version: ['3.10']
12+
python-version: ['3.10', '3.12']
1313
os: [macos-latest, ubuntu-latest, windows-latest]
1414

1515
runs-on: ${{ matrix.os }}
@@ -25,7 +25,7 @@ jobs:
2525
pip install -r requirements.txt
2626
pip install -r dev-requirements.txt
2727
- name: run tests
28-
run: python -m pytest --cov=. tests/
28+
run: python -m pytest tests/
2929

3030
deploy:
3131
name: Deploy to GitHub and PyPI
@@ -37,7 +37,7 @@ jobs:
3737
- name: set up Python
3838
uses: actions/setup-python@v2
3939
with:
40-
python-version: 3.7
40+
python-version: '3.12'
4141
- name: set up node # we need node for for semantic release
4242
uses: actions/setup-node@v4
4343
with:
@@ -107,7 +107,7 @@ jobs:
107107
- name: set up Python
108108
uses: actions/setup-python@v2
109109
with:
110-
python-version: 3.7
110+
python-version: '3.12'
111111
- name: install dependencies
112112
run: |
113113
pip install -U .

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,13 @@ For the Legacy Ladybug Grasshopper Plugin see [this repository](https://github.c
2020

2121
## Installation
2222

23+
To install the library use:
24+
2325
`pip install ladybug-core`
2426

27+
To check if Honeybee command line interface is installed correctly use `ladybug viz` and you
28+
should get a `viiiiiiiiiiiiizzzzzzzzz!` back in response!
29+
2530
## Usage
2631

2732
```python
@@ -45,6 +50,33 @@ print('altitude: {}, azimuth: {}'.format(sun.altitude, sun.azimuth))
4550
>>> altitude: 72.26, azimuth: 32.37
4651
```
4752

53+
## Local Development
54+
1. Clone this repo locally
55+
```console
56+
git clone [email protected]:ladybug-tools/ladybug-core.git
57+
58+
# or
59+
60+
git clone https://github.com/ladybug-tools/ladybug.git
61+
```
62+
2. Install dependencies:
63+
```console
64+
cd ladybug
65+
pip install -r dev-requirements.txt
66+
pip install -r requirements.txt
67+
```
68+
69+
3. Run Tests:
70+
```console
71+
python -m pytest ./tests
72+
```
73+
74+
4. Generate Documentation:
75+
```console
76+
sphinx-apidoc -f -e -d 4 -o ./docs ./ladybug
77+
sphinx-build -b html ./docs ./docs/_build/docs
78+
```
79+
4880
### Derivative Work
4981

5082
Ladybug is a derivative work of the following software projects:

dev-requirements.txt

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
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==5.3.0;python_version>='3.6'
9-
docutils==0.17;python_version>='3.6'
1+
pytest==8.3.2;python_version>='3.6'
2+
Sphinx==8.0.2;python_version>='3.6'
103
sphinx-bootstrap-theme==0.8.1
114
sphinxcontrib-fulltoc==1.2.0
5+
sphinxcontrib-websupport==2.0.0;python_version>='3.6'
6+
sphinx-click==6.0.0;python_version>='3.6'
7+
twine==5.1.1;python_version>='3.6'
8+
wheel==0.44.0;python_version>='3.6'
9+
setuptools==75.1.0;python_version>='3.6'
10+
importlib-metadata==8.5.0;python_version>='3.6'
11+
pytest==4.6.9;python_version<'3.0'
12+
Sphinx==1.8.5;python_version<'3.0'
1213
sphinxcontrib-websupport==1.1.2;python_version<'3.0'
13-
sphinxcontrib-websupport==1.2.4;python_version>='3.6'
14-
sphinx-click==4.4.0
14+
sphinx-click==4.4.0;python_version<'3.0'
1515
twine==1.13.0;python_version<'3.0'
16-
twine==3.4.1;python_version>='3.6'
17-
wheel==0.38.1
16+
wheel==0.38.1;python_version<'3.0'
1817
setuptools==44.1.0;python_version<'3.0'
19-
setuptools==65.5.1;python_version>='3.6'
2018
importlib-metadata==2.0.0;python_version<'3.0'
21-
importlib-metadata==4.8.0;python_version>='3.6'
22-
jinja2==3.0.3;python_version>='3.6'
23-
markupsafe==2.0.1;python_version>='3.6'

docs/_static/custom.css

Lines changed: 42 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,44 +5,61 @@
55
* Sphinx stylesheet -- Bootstrap theme.
66
*/
77

8+
/* Overwrite colors */
9+
div.navbar-inverse {
10+
background-color: #EB2227;
11+
border-color: #EB2227;
12+
}
13+
a {
14+
color: #EB2227;
15+
}
16+
a:visited {
17+
color: #Bf0408;
18+
}
19+
code {
20+
color: #Bf0408;
21+
}
22+
div.bs-sidenav a {
23+
color: #333333;
24+
}
825

9-
/* The code below is based on the bootstrap website sidebar */
26+
/* Prevent top nav from blocking docs */
27+
div.navbar-fixed-top {
28+
position: absolute;
29+
}
1030

31+
/* Indent the side nav when in mobile mode */
32+
@media screen and (min-width: 0px) {
33+
div.bs-sidenav ul {
34+
margin-bottom: 0;
35+
padding-left: 5px;
36+
list-style: none;
37+
}
38+
}
1139

12-
/* Show and affix the side nav when space allows it */
40+
/* Widen and de-indent the side nav when space is restricted */
1341
@media screen and (min-width: 992px) {
1442
.bs-sidenav .nav > .active > ul {
1543
display: block;
1644
}
1745
div.bs-sidenav ul {
1846
margin-bottom: 0;
19-
padding-left: 5px;
47+
padding-left: 0px;
2048
list-style: none;
2149
}
22-
div.bs-sidenav a {
23-
color: #333333;
24-
}
25-
/* Widen the fixed sidenav */
26-
.bs-sidenav.affix,
27-
.bs-sidenav.affix-bottom {
28-
width: 292px;
29-
}
30-
.bs-sidenav.affix {
31-
position: fixed; /* Undo the static from mobile first approach */
32-
}
33-
.bs-sidenav.affix-bottom {
34-
position: absolute; /* Undo the static from mobile first approach */
35-
}
36-
.bs-sidenav.affix-bottom .bs-sidenav,
37-
.bs-sidenav.affix .bs-sidenav {
38-
margin-top: 0;
39-
margin-bottom: 0;
50+
.bs-sidenav {
51+
width: 300px;
4052
}
4153
}
54+
55+
/* Slightly indent the side nav when space allows it */
4256
@media screen and (min-width: 1200px) {
43-
/* Widen the fixed sidenav again */
44-
.bs-sidenav.affix-bottom,
45-
.bs-sidenav.affix {
46-
width: 360px;
57+
div.bs-sidenav ul {
58+
margin-bottom: 0;
59+
padding-left: 5px;
60+
list-style: none;
61+
}
62+
.bs-sidenav {
63+
width: 370px;
4764
}
4865
}

docs/conf.py

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
import os
1717
import re
1818
import sys
19+
20+
# The theme to use for HTML and HTML Help pages
21+
import sphinx_bootstrap_theme
22+
1923
sys.path.insert(0, os.path.abspath('../'))
2024

2125
# -- Project information -----------------------------------------------------
@@ -71,7 +75,7 @@
7175
#
7276
# This is also used if you do content translation via gettext catalogs.
7377
# Usually you set "language" from the command line for these cases.
74-
language = None
78+
language = 'en'
7579

7680
# List of patterns, relative to source directory, that match files and
7781
# directories to ignore when looking for source files.
@@ -81,13 +85,11 @@
8185
# The name of the Pygments (syntax highlighting) style to use.
8286
pygments_style = None
8387

88+
# hide the class names in the nav bar
89+
toc_object_entries_show_parents = 'hide'
8490

85-
# -- Options for HTML output -------------------------------------------------
8691

87-
# The theme to use for HTML and HTML Help pages. See the documentation for
88-
# a list of builtin themes.
89-
#
90-
import sphinx_bootstrap_theme
92+
# -- Options for HTML output -------------------------------------------------
9193

9294
# html_theme = 'alabaster'
9395
html_theme = 'bootstrap'
@@ -121,6 +123,7 @@
121123
# relative to this directory. They are copied after the builtin static files,
122124
# so a file named "default.css" will overwrite the builtin "default.css".
123125
html_static_path = ['_static']
126+
html_css_files = ['custom.css']
124127

125128
# Custom sidebar templates, must be a dictionary that maps document names
126129
# to template names.
@@ -594,13 +597,3 @@ def update_doc_index(proj_folder, lib_name):
594597
create_cli_files()
595598

596599
# -----------------------------------------------------------------------------
597-
598-
599-
def setup(app):
600-
"""Run custom code with access to the Sphinx application object
601-
Args:
602-
app: the Sphinx application object
603-
"""
604-
605-
# Add bootstrap theme custom stylesheet
606-
app.add_stylesheet("custom.css")

0 commit comments

Comments
 (0)