Skip to content

Commit bf7bb7f

Browse files
committed
sphinx, autodocs, ci push, related git ignore, toml package updates
1 parent 8bd84a8 commit bf7bb7f

11 files changed

Lines changed: 457 additions & 149 deletions

File tree

.github/workflows/docs.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Build and Deploy Documentation
2+
3+
on:
4+
# Runs on pushes targeting the default branch (main or master)
5+
push:
6+
branches: ["main", "master"]
7+
8+
# Allows you to run this workflow manually from the Actions tab
9+
workflow_dispatch:
10+
11+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
18+
concurrency:
19+
group: "pages"
20+
cancel-in-progress: false
21+
22+
jobs:
23+
build:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v4
28+
29+
- name: Set up Python
30+
uses: actions/setup-python@v5
31+
with:
32+
python-version: '3.10'
33+
cache: 'pip'
34+
35+
- name: Install dependencies
36+
run: pip install -e .[docs]
37+
38+
- name: Build documentation
39+
run: sphinx-build -b html docs/source docs/build
40+
41+
- name: Upload artifact
42+
uses: actions/upload-pages-artifact@v3
43+
with:
44+
path: ./docs/build
45+
46+
deploy:
47+
needs: build
48+
runs-on: ubuntu-latest
49+
environment:
50+
name: github-pages
51+
url: ${{ steps.deployment.outputs.page_url }}
52+
steps:
53+
- name: Deploy to GitHub Pages
54+
id: deployment
55+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 58 additions & 145 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,24 @@
1-
# Byte-compiled / optimized / DLL files
1+
# Python
2+
## ----------------------------------------------------------------
23
__pycache__/
34
*.py[cod]
4-
*$py.class
5-
6-
# C extensions
5+
*.egg-info/
6+
.installed.cfg
7+
*.egg
78
*.so
8-
notebooks/unit_test_synthetic_DEV.ipynb
9-
<<<<<<< HEAD
10-
*ml_grid_env/
11-
*HFE_ML_experiments/
12-
<<<<<<< HEAD
13-
14-
ml_grid/tests/unit_test_synthetic_DEV.ipynb
15-
9+
*.py,cover
1610

17-
=======
11+
# Virtual Environments
12+
## ----------------------------------------------------------------
13+
ml_grid_env/
1814
ml_grid_ts_env/
19-
>>>>>>> 7baaad22686630846a684ba42207489372d08357
20-
=======
21-
>>>>>>> 68b72edb1ca57c5b15fc038fd0f5b650fd782b00
22-
# Distribution / packaging
23-
.Python
15+
.venv/
16+
venv/
2417
env/
18+
19+
# Build and Distribution
20+
## ----------------------------------------------------------------
2521
build/
26-
develop-eggs/
2722
dist/
2823
downloads/
2924
eggs/
@@ -34,162 +29,80 @@ parts/
3429
sdist/
3530
var/
3631
wheels/
37-
<<<<<<< HEAD
38-
=======
3932
pip-wheel-metadata/
40-
share/python-wheels
41-
>>>>>>> 68b72edb1ca57c5b15fc038fd0f5b650fd782b00
42-
*.egg-info/
43-
.installed.cfg
44-
*.egg
45-
/notebooks/catboost_info/
46-
\notebooks\catboost_info\
47-
ml_grid/tests/unit_test_synthetic_DEV.ipynb
48-
notebooks/catboost_info/*
49-
<<<<<<< HEAD
50-
# pyenv
51-
.python-version
33+
share/python-wheels/
34+
develop-eggs/
35+
.Python
36+
target/
5237

53-
# Unit test / coverage reports
54-
.coverage
55-
.tox
38+
# PyInstaller
39+
## ----------------------------------------------------------------
40+
*.manifest
41+
*.spec
5642

57-
# IDE
43+
# Sphinx Documentation
44+
## ----------------------------------------------------------------
45+
docs/build/
46+
docs/source/autoapi/
47+
doc/_build/
48+
49+
# Jupyter Notebook
50+
## ----------------------------------------------------------------
51+
.ipynb_checkpoints
52+
53+
# IDE and Editor Files
54+
## ----------------------------------------------------------------
5855
.idea/
5956
.vscode/
60-
*.sublime-workspace
6157
*.sublime-project
58+
*.sublime-workspace
6259

63-
# Environment
64-
*.env
65-
66-
# Compiled source
60+
# Compiled files
61+
## ----------------------------------------------------------------
6762
*.com
6863
*.class
6964
*.dll
7065
*.exe
7166
*.o
72-
*.so
7367

74-
logs
75-
# Logs and databases
68+
# Logs and Databases
69+
## ----------------------------------------------------------------
70+
logs/
7671
*.log
7772
*.sql
7873
*.sqlite
7974
*.sqlite3
8075
*.db
81-
82-
# Miscellaneous
83-
*.bak
84-
*.swp
85-
.DS_Store
86-
=======
87-
.ml_grid_env/*
88-
ml_grid_env/*
89-
*ml_grid_env
90-
ml_grid_env/
91-
unit_test_synthetic DEV.ipynb
92-
HFE_ML_experiments/
93-
94-
ml_grid\tests\unit_test_synthetic DEV.ipynb
95-
96-
ml_grid/tests/unit_test_synthetic DEV.ipynb
97-
98-
ml_grid/tests/unit_test_synthetic_old.ipynb
99-
100-
ml_grid/tests/unit_test_synthetic-ac.ipynb
101-
102-
tests/knn time series time warp classifier-Multivariate-grid-dev-38-2.5.ipynb
103-
104-
grid_score_reader_ML_TS_Grid_V_1.5.ipynb
105-
106-
ml_grid/tests/unit_test_synthetic_time_series_DEV.ipynb
107-
108-
knn time series time warp classifier-Multivariate-grid-dev-38-2.5.ipynb
109-
110-
ml_grid_ts_env
111-
catboost_info
112-
notebooks/catboost_info/*
113-
installation_log.txt
114-
*catboost_info
115-
ml_grid_env
116-
# PyInstaller
117-
# Usually these files are written by a python script from a template
118-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
119-
*.manifest
120-
*.spec
121-
122-
# Installer logs
12376
pip-log.txt
12477
pip-delete-this-directory.txt
78+
installation_log.txt
12579

126-
# Unit test / coverage reports
127-
htmlcov/
128-
.tox/
129-
.nox/
80+
# Testing and Coverage
81+
## ----------------------------------------------------------------
13082
.coverage
13183
.coverage.*
13284
.cache
85+
.tox/
86+
.nox/
87+
htmlcov/
13388
nosetests.xml
13489
coverage.xml
13590
*.cover
136-
*.py,cover
13791
.hypothesis/
13892
.pytest_cache/
13993

140-
t1.ipynb
141-
142-
# Translations
143-
*.mo
144-
*.pot
145-
146-
# Django stuff:
147-
*.log
148-
local_settings.py
149-
150-
# Flask stuff:
151-
instance/
152-
.webassets-cache
153-
154-
# Scrapy stuff:
155-
.scrapy
156-
157-
# Sphinx documentation
158-
docs/_build/
159-
160-
# PyBuilder
161-
target/
162-
163-
# Jupyter Notebook
164-
.ipynb_checkpoints
165-
166-
# IPython
167-
profile_default/
168-
ipython_config.py
94+
# Project-specific outputs
95+
## ----------------------------------------------------------------
96+
HFE_ML_experiments/
97+
catboost_info/
98+
notebooks/catboost_info/
99+
notebooks/best_models_summary.csv
169100

170-
# pyenv
101+
# Miscellaneous
102+
## ----------------------------------------------------------------
103+
*.bak
104+
*.swp
105+
.DS_Store
171106
.python-version
172-
173-
# pipenv
174-
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
175-
# However, in case of collaboration, if having platform-specific dependencies or dependencies
176-
# having no cross-platform support, pipenv may install dependencies that don't work, or not
177-
# install all needed dependencies.
178-
#Pipfile.lock
179-
180-
# Poetry
181-
# poetry.lock
182-
183-
# Pylons
184-
.cache/
185-
186-
# Salt build
187-
# docs build
188-
doc/_build/
189-
190-
# Folders
191-
.idea/
192-
.vscode/
193-
>>>>>>> 68b72edb1ca57c5b15fc038fd0f5b650fd782b00
194107
packages.txt
195-
notebooks/best_models_summary.csv
108+
*.env

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,23 @@ If you are using Jupyter, you can also select the kernel created during installa
135135

136136
See [ml_grid/tests/unit_test_synthetic.ipynb]
137137

138+
## Documentation
139+
140+
This project uses Sphinx for documentation. The documentation includes usage guides and an auto-generated API reference.
141+
142+
To build the documentation locally:
143+
144+
1. Install the documentation dependencies (make sure your virtual environment is activated):
145+
```bash
146+
pip install -e .[docs]
147+
```
148+
149+
2. Build the HTML documentation:
150+
```bash
151+
sphinx-build -b html docs/source docs/build
152+
```
153+
154+
3. Open `docs/build/index.html` in your web browser to view the documentation.
138155

139156
## Contributing
140157
If you would like to contribute to this project, please follow these steps:

docs/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 SamoraHunter
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

0 commit comments

Comments
 (0)