Skip to content
This repository was archived by the owner on Feb 7, 2025. It is now read-only.

Documentation overhaul #6

Merged
merged 4 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: 'StochasticTree/stochtree'
submodules: 'recursive'

- name: Setup Python 3.10
Expand All @@ -34,22 +35,22 @@ jobs:
- name: Install Package with Relevant Dependencies
run: |
pip install --upgrade pip
pip install -r docs/requirements.txt
pip install -r python_docs/requirements.txt
pip install .

- name: Build HTML
run: |
sphinx-build -M html docs/source/ docs/_build/
sphinx-build -M html python_docs/source/ python_docs/_build/

- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
path:
docs/_build/html/
python_docs/_build/html/

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html
publish_dir: python_docs/_build/html
7 changes: 0 additions & 7 deletions .gitmodules

This file was deleted.

79 changes: 0 additions & 79 deletions CMakeLists.txt

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 StochasticTree
Copyright (c) 2024 stochtree authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
55 changes: 4 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,5 @@
# StochasticTree Python Package
# StochasticTree Python Package Documentation

## Getting started

The python package can be installed from source. Before you begin, make sure you have [conda](https://www.anaconda.com/download) installed.
Clone the repo recursively (including git submodules) by running

```{bash}
git clone --recursive https://github.com/StochasticTree/stochtree-python.git
```

### Conda-based installation

Conda provides a straightforward experience in managing python dependencies, avoiding version conflicts / ABI issues / etc.

To build stochtree using a `conda` based workflow, first create and activate a conda environment with the requisite dependencies

```{bash}
conda create -n stochtree-dev -c conda-forge python=3.10 numpy scipy pytest pandas pybind11 scikit-learn matplotlib seaborn
conda activate stochtree-dev
pip install jupyterlab
```

Then, navigate to the main `stochtree-python` project folder (i.e. `cd /path/to/stochtree-python`) and install the package locally via pip

```{bash}
pip install .
```

### Pip-based installation

If you would rather avoid installing and setting up conda, you can alternatively setup the dependencies and install `stochtree` using only `pip` (caveat: this has not been extensively tested
across platforms and python versions).

First, navigate to the main `stochtree-python` project folder (i.e. `cd /path/to/stochtree-python`) and create and activate a virtual environment as a subfolder of the repo

```{bash}
python -m venv venv
source venv/bin/activate
```

Install all of the package (and demo notebook) dependencies

```{bash}
pip install numpy scipy pytest pandas scikit-learn pybind11 matplotlib seaborn jupyterlab
```

Then install stochtree via

```{bash}
pip install .
```
This is documentation repository, which builds and publishes
docs for the [stochtree python package](https://stochastictree.github.io/stochtree-python/).
The source code for the python (and R and C++) is available at https://github.com/StochasticTree/stochtree
Loading