Skip to content

Commit c599739

Browse files
committed
Merge machine-learning-api into hsml subdirectory
1 parent e510018 commit c599739

File tree

167 files changed

+25692
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+25692
-0
lines changed
+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: mkdocs-main
2+
3+
on: pull_request
4+
5+
jobs:
6+
publish-main:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v4
11+
with:
12+
fetch-depth: 0
13+
14+
- name: set dev version
15+
working-directory: ./java
16+
run: echo "DEV_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -Ev 'Download|INFO|WARNING')" >> $GITHUB_ENV
17+
18+
- uses: actions/setup-python@v5
19+
with:
20+
python-version: "3.10"
21+
22+
- name: install deps
23+
working-directory: ./python
24+
run: cp ../README.md . && pip3 install -r ../requirements-docs.txt && pip3 install -e .[dev]
25+
26+
- name: generate autodoc
27+
run: python3 auto_doc.py
28+
29+
- name: setup git
30+
run: |
31+
git config --global user.name Mike
32+
git config --global user.email mike@docs.hopsworks.ai
33+
34+
- name: mike deploy docs
35+
run: mike deploy ${{ env.DEV_VERSION }} dev -u
+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: mkdocs-release
2+
3+
on:
4+
push:
5+
branches: [branch-*\.*]
6+
7+
jobs:
8+
publish-release:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
16+
- name: set major/minor/bugfix release version
17+
working-directory: ./java
18+
run: echo "RELEASE_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -Ev 'Download|INFO|WARNING')" >> $GITHUB_ENV
19+
20+
- name: set major/minor release version
21+
run: echo "MAJOR_VERSION=$(echo $RELEASE_VERSION | sed 's/^\([0-9]*\.[0-9]*\).*$/\1/')" >> $GITHUB_ENV
22+
23+
- uses: actions/setup-python@v5
24+
with:
25+
python-version: "3.10"
26+
27+
- name: install deps
28+
working-directory: ./python
29+
run: cp ../README.md . && pip3 install -r ../requirements-docs.txt && pip3 install -e .[dev]
30+
31+
- name: generate autodoc
32+
run: python3 auto_doc.py
33+
34+
- name: setup git
35+
run: |
36+
git config --global user.name Mike
37+
git config --global user.email mike@docs.hopsworks.ai
38+
39+
- name: mike deploy docs
40+
run: |
41+
mike deploy ${{ env.RELEASE_VERSION }} ${{ env.MAJOR_VERSION }} -u --push
42+
mike alias ${{ env.RELEASE_VERSION }} latest -u --push
+163
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
name: python
2+
3+
on: pull_request
4+
5+
jobs:
6+
lint_stylecheck:
7+
name: Lint and Stylecheck
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- uses: actions/setup-python@v5
14+
with:
15+
python-version: "3.11"
16+
17+
- name: Get all changed files
18+
id: get-changed-files
19+
uses: tj-actions/changed-files@v44
20+
with:
21+
files_yaml: |
22+
src:
23+
- 'python/**/*.py'
24+
- '!python/tests/**/*.py'
25+
test:
26+
- 'python/tests/**/*.py'
27+
28+
- name: install deps
29+
run: pip install ruff==0.4.2
30+
31+
- name: ruff on python files
32+
if: steps.get-changed-files.outputs.src_any_changed == 'true'
33+
env:
34+
SRC_ALL_CHANGED_FILES: ${{ steps.get-changed-files.outputs.src_all_changed_files }}
35+
run: ruff check --output-format=github $SRC_ALL_CHANGED_FILES
36+
37+
- name: ruff on test files
38+
if: steps.get-changed-files.outputs.test_any_changed == 'true'
39+
env:
40+
TEST_ALL_CHANGED_FILES: ${{ steps.get-changed-files.outputs.test_all_changed_files }}
41+
run: ruff check --output-format=github $TEST_ALL_CHANGED_FILES
42+
43+
- name: ruff format --check $ALL_CHANGED_FILES
44+
env:
45+
ALL_CHANGED_FILES: ${{ steps.get-changed-files.outputs.all_changed_files }}
46+
run: ruff format $ALL_CHANGED_FILES
47+
48+
unit_tests_ubuntu_utc:
49+
name: Unit Testing (Ubuntu)
50+
needs: lint_stylecheck
51+
runs-on: ubuntu-latest
52+
strategy:
53+
matrix:
54+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
55+
56+
steps:
57+
- name: Set Timezone
58+
run: sudo timedatectl set-timezone UTC
59+
60+
- uses: actions/checkout@v4
61+
- name: Copy README
62+
run: cp README.md python/
63+
64+
- uses: actions/setup-python@v5
65+
name: Setup Python
66+
with:
67+
python-version: ${{ matrix.python-version }}
68+
cache: "pip"
69+
cache-dependency-path: "python/setup.py"
70+
- run: pip install -e python[dev]
71+
72+
- name: Display Python version
73+
run: python --version
74+
75+
- name: Run Pytest suite
76+
run: pytest python/tests
77+
78+
unit_tests_ubuntu_local:
79+
name: Unit Testing (Ubuntu) (Local TZ)
80+
needs: lint_stylecheck
81+
runs-on: ubuntu-latest
82+
83+
steps:
84+
- name: Set Timezone
85+
run: sudo timedatectl set-timezone Europe/Amsterdam
86+
87+
- uses: actions/checkout@v4
88+
- name: Copy README
89+
run: cp README.md python/
90+
91+
- uses: actions/setup-python@v5
92+
name: Setup Python
93+
with:
94+
python-version: "3.12"
95+
cache: "pip"
96+
cache-dependency-path: "python/setup.py"
97+
- run: pip install -e python[dev]
98+
99+
- name: Display Python version
100+
run: python --version
101+
102+
- name: Run Pytest suite
103+
run: pytest python/tests
104+
105+
unit_tests_windows_utc:
106+
name: Unit Testing (Windows)
107+
needs: lint_stylecheck
108+
runs-on: windows-latest
109+
strategy:
110+
matrix:
111+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
112+
113+
steps:
114+
- name: Set Timezone
115+
run: tzutil /s "UTC"
116+
117+
- uses: actions/checkout@v4
118+
- name: Copy README
119+
run: cp README.md python/
120+
121+
- uses: actions/setup-python@v5
122+
name: Setup Python
123+
with:
124+
python-version: ${{ matrix.python-version }}
125+
cache: "pip"
126+
cache-dependency-path: "python/setup.py"
127+
- run: pip install -e python[dev]
128+
129+
- name: Display Python version
130+
run: python --version
131+
132+
- name: Run Pytest suite
133+
run: pytest python/tests
134+
135+
unit_tests_windows_local:
136+
name: Unit Testing (Windows) (Local TZ)
137+
needs: lint_stylecheck
138+
runs-on: windows-latest
139+
140+
steps:
141+
- name: Set Timezone
142+
run: tzutil /s "W. Europe Standard Time"
143+
144+
- uses: actions/checkout@v4
145+
- name: Copy README
146+
run: cp README.md python/
147+
148+
- uses: actions/setup-python@v5
149+
name: Setup Python
150+
with:
151+
python-version: "3.12"
152+
cache: "pip"
153+
cache-dependency-path: "python/setup.py"
154+
- run: pip install -e python[dev]
155+
156+
- name: Display Python version
157+
run: python --version
158+
159+
- name: Display pip freeze
160+
run: pip freeze
161+
162+
- name: Run Pytest suite
163+
run: pytest python/tests

hsml/.gitignore

+130
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
python/README.md
29+
python/LICENSE
30+
31+
# PyInstaller
32+
# Usually these files are written by a python script from a template
33+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
34+
*.manifest
35+
*.spec
36+
37+
# Installer logs
38+
pip-log.txt
39+
pip-delete-this-directory.txt
40+
41+
# Unit test / coverage reports
42+
htmlcov/
43+
.tox/
44+
.nox/
45+
.coverage
46+
.coverage.*
47+
.cache
48+
nosetests.xml
49+
coverage.xml
50+
*.cover
51+
.hypothesis/
52+
.pytest_cache/
53+
.ruff_cache/
54+
55+
# Translations
56+
*.mo
57+
*.pot
58+
59+
# Django stuff:
60+
*.log
61+
local_settings.py
62+
db.sqlite3
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
target/
76+
77+
# Jupyter Notebook
78+
.ipynb_checkpoints
79+
80+
# IPython
81+
profile_default/
82+
ipython_config.py
83+
84+
# pyenv
85+
.python-version
86+
87+
# celery beat schedule file
88+
celerybeat-schedule
89+
90+
# SageMath parsed files
91+
*.sage.py
92+
93+
# Environments
94+
.env
95+
.venv
96+
env/
97+
venv/
98+
ENV/
99+
env.bak/
100+
venv.bak/
101+
102+
# Spyder project settings
103+
.spyderproject
104+
.spyproject
105+
106+
# Rope project settings
107+
.ropeproject
108+
109+
# mkdocs documentation
110+
/site
111+
112+
# mypy
113+
.mypy_cache/
114+
.dmypy.json
115+
dmypy.json
116+
117+
# Pyre type checker
118+
.pyre/
119+
120+
# Java
121+
.idea
122+
.vscode
123+
*.iml
124+
target/
125+
126+
# Mac
127+
.DS_Store
128+
129+
# mkdocs intemediate files
130+
docs/generated

0 commit comments

Comments
 (0)