Skip to content

Commit dc07223

Browse files
onefloidMariusWirtz
authored andcommitted
chore: Redesign docs
1 parent 199ec41 commit dc07223

20 files changed

Lines changed: 465 additions & 1113 deletions

.github/workflows/docs.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Build and Deploy Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags:
8+
- "[0-9]+.[0-9]+.?[0-9]*" # Triggered by versions tags e.g. 2.0 or 2.0.1
9+
workflow_dispatch: # Manually triggered
10+
jobs:
11+
deploy-docs:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: "3.11"
22+
23+
- name: Install dependencies
24+
run: |
25+
pip install -r docs/requirements-docs.txt
26+
pip install .
27+
28+
- name: Configure Git (for mike commits)
29+
run: |
30+
git config --global user.name "github-actions[bot]"
31+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
32+
33+
- name: Fetch gh-pages branch (if exists)
34+
run: git fetch origin gh-pages:gh-pages || echo "gh-pages does not exist yet"
35+
36+
- name: Deploy documentation
37+
run: |
38+
if [[ "${GITHUB_REF}" == refs/heads/master ]]; then
39+
echo "→ Deploying latest"
40+
mike deploy latest --push --update-aliases
41+
mike set-default latest --push
42+
elif [[ "${GITHUB_REF}" == refs/tags/* ]]; then
43+
VERSION="${GITHUB_REF#refs/tags/}"
44+
echo "→ Deploying version $VERSION"
45+
mike deploy "$VERSION" --push --update-aliases
46+
mike set-default --push stable
47+
fi
48+
49+
- name: Copy and commit CNAME file (if exists)
50+
run: |
51+
git checkout gh-pages
52+
if git checkout master -- docs/CNAME 2>/dev/null; then
53+
mv docs/CNAME .
54+
git add CNAME
55+
if ! git diff --cached --quiet; then
56+
git commit -m "Update CNAME file"
57+
git push origin gh-pages
58+
else
59+
echo "No changes to commit for CNAME"
60+
fi
61+
else
62+
echo "No CNAME file found in master branch"
63+
fi

.readthedocs.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

README.md

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<h1 align="center">
22
<img src="https://s3-ap-southeast-2.amazonaws.com/downloads.cubewise.com/web_assets/CubewiseLogos/TM1py-logo.png" style="width: 70%; height: 70%;text-align: center"/>
33

4-
54
![PyPI - License](https://img.shields.io/pypi/l/TM1py)
65
![PyPI - Version](https://img.shields.io/pypi/v/TM1py)
76
![Pepy Total Downloads](https://img.shields.io/pepy/dt/TM1py)
@@ -31,17 +30,14 @@ TM1py offers handy features to interact with TM1 from Python, such as
3130
Requirements
3231
=======================
3332

34-
- python (3.7 or higher)
35-
- requests
36-
- requests_negotiate_sspi
37-
- TM1 11, TM1 12
38-
- keyring
39-
33+
- [Python](https://www.python.org/downloads/) (3.7 or higher)
34+
- [TM1/Planning Analytics](https://www.ibm.com/products/planning-analytics) (v11 or higher)
4035

41-
Optional Requirements
36+
Optional Python Packages
4237
=======================
4338

4439
- pandas
40+
- networkx
4541

4642
Install
4743
=======================
@@ -53,10 +49,6 @@ Install
5349
> with pandas
5450
5551
pip install "tm1py[pandas]"
56-
57-
> keyring
58-
59-
pip install keyring
6052

6153
Usage
6254
=======================
@@ -84,7 +76,6 @@ with TM1Service(
8476
print(tm1.server.get_product_version())
8577
```
8678

87-
8879
> TM1 12 PAaaS
8980
9081
``` python
@@ -134,19 +125,16 @@ with TM1Service(**params) as tm1:
134125
print(tm1.server.get_product_version())
135126
```
136127

137-
138128
Documentation
139129
=======================
140130

141-
https://tm1py.readthedocs.io/en/master/
142-
131+
<https://tm1py.org/>
143132

144133
Issues
145134
=======================
146135

147136
If you find issues, sign up in GitHub and open an Issue in this repository
148137

149-
150138
Contribution
151139
=======================
152140

docs/CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tm1py.org

docs/Makefile

Lines changed: 0 additions & 192 deletions
This file was deleted.

0 commit comments

Comments
 (0)