Skip to content

Commit 4a39a52

Browse files
authored
Merge pull request #150 from voetberg/gh-pages-action
Move documentation from readthedocs to Github Pages, bump package versions
2 parents 1d592ea + 0de8de1 commit 4a39a52

File tree

6 files changed

+1110
-1015
lines changed

6 files changed

+1110
-1015
lines changed

.github/workflows/build-docs.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: documentation
2+
3+
on:
4+
schedule:
5+
- cron: "0 5 * * 1,3,5" # At 5:00am on Monday, Wednesday, and Friday
6+
push:
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Install poetry
17+
run: pipx install poetry
18+
- uses: actions/setup-python@v5
19+
with:
20+
python-version: '3.13'
21+
cache: 'poetry'
22+
- run: poetry install
23+
24+
- name: Install Sphinx-Build
25+
run: |
26+
sudo apt install python3-sphinx
27+
28+
- name: Build Documentation
29+
run: |
30+
cd docs/
31+
poetry run make html
32+
33+
- name: Upload Artifact
34+
uses: actions/upload-pages-artifact@v3
35+
with:
36+
name: github-pages
37+
path: docs/_build/html/
38+
39+
deploy:
40+
needs: build
41+
runs-on: ubuntu-latest
42+
permissions:
43+
pages: write
44+
id-token: write
45+
46+
environment:
47+
name: github-pages
48+
url: ${{ steps.deployment.outputs.page_url }}
49+
50+
# Specify runner + deployment step
51+
steps:
52+
- name: Deploy to GitHub Pages
53+
id: deployment
54+
uses: actions/deploy-pages@v4

.github/workflows/make_pdf.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
# This should be the path to the paper within your repo.
1515
paper-path: paper/paper.md
1616
- name: Upload
17-
uses: actions/upload-artifact@v1
17+
uses: actions/upload-artifact@v4
1818
with:
1919
name: paper
2020
# This is the output path where Pandoc will write the compiled

.github/workflows/test-bench.yml

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,15 @@ jobs:
77
test:
88

99
runs-on: ubuntu-latest
10-
1110
steps:
12-
- uses: actions/checkout@v2
13-
- name: Set up Python 3.10
14-
uses: actions/setup-python@v2
15-
with:
16-
python-version: "3.10"
17-
- name: Install poetry ${{ matrix.poetry-version }}
18-
env:
19-
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
20-
run: |
21-
python -m ensurepip
22-
python -m pip install --upgrade pip
23-
python -m pip install poetry==1.3.2
24-
25-
- name: View poetry --help
26-
run: poetry --help
27-
28-
- name: Install dependencies
29-
shell: bash
30-
run: python -m poetry install
31-
32-
- name: Test with pytest
33-
run: |
34-
python3 -m poetry run pytest --cov
11+
- uses: actions/checkout@v4
12+
- name: Install poetry
13+
run: pipx install poetry
14+
- uses: actions/setup-python@v5
15+
with:
16+
python-version: '3.13'
17+
cache: 'poetry'
18+
- run: poetry install
19+
20+
- name: Test with pytest
21+
run: poetry run pytest --cov

README.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
![GitHub Workflow Status](https://github.com/deepskies/DeepBench/actions/workflows/test-bench.yml/badge.svg?label=test)
22
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
33
[![PyPI version](https://badge.fury.io/py/deepbench.svg)](https://badge.fury.io/py/deepbench)
4-
[![Documentation Status](https://readthedocs.org/projects/deepbench/badge/?version=latest)](https://deepbench.readthedocs.io/en/latest/?badge=latest)
4+
[![documentation](https://github.com/deepskies/DeepBench/actions/workflows/build-docs.yml/badge.svg)](https://github.com/deepskies/DeepBench/actions/workflows/build-docs.yml)
55
[![status](https://joss.theoj.org/papers/300762982613649881f8b6a08dabd33e/status.svg)](https://joss.theoj.org/papers/300762982613649881f8b6a08dabd33e)
66
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.14845251.svg)](https://doi.org/10.5281/zenodo.14845251)
77

@@ -16,7 +16,7 @@ Simulation library for very simple simulations to *benchmark* machine learning a
1616

1717
## Documentation
1818

19-
#### [ReadTheDocs](https://deepbench.readthedocs.io/en/latest/)
19+
#### [Docs Page](https://deepskies.github.io/DeepBench/)
2020

2121
#### To build from source
2222
```
@@ -28,14 +28,14 @@ make html
2828
The folder `docs/_build/html` will be populated with the documentation. Navigate to `file:///<Path To DeepBench>/docs/_build/html/index.html` in any web browser to view.
2929

3030
## Requirements
31-
* python = ">=3.8,<3.11,"
32-
* numpy = "^1.24.3"
33-
* matplotlib = "^3.7.1"
34-
* scikit-image = "^0.20.0"
35-
* astropy = "^5.2.2"
36-
* autograd = "^1.5"
37-
* pyyaml = "^6.0"
38-
31+
python = ">=3.12,<4.0,"
32+
numpy = ">=1.25.0"
33+
matplotlib = ">=3.7.1"
34+
scikit-image = "^0.23.0"
35+
astropy = ">=7.0.0"
36+
autograd = ">=1.5"
37+
pyyaml = ">=6.0"
38+
h5py = ">=3.9.0"
3939

4040

4141
## Install
@@ -50,7 +50,6 @@ pip install deepbench
5050
```
5151
git clone https://github.com/deepskies/DeepBench.git
5252
pip install poetry
53-
poetry shell
5453
poetry install
5554
poetry run pytest --cov
5655
```

0 commit comments

Comments
 (0)