Skip to content

Commit 63b5000

Browse files
Merge pull request #118 from spaceml-org/cleanup-pages-deploy
Clean up legacy ghp-import deploy path and restore FloodMapper logo
2 parents 9884912 + a36e1c8 commit 63b5000

7 files changed

Lines changed: 18 additions & 44 deletions

File tree

Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: help install install-dev sync lock format lint type test check clean build publish build-jupyterbook clean-jupyterbook publish-docs
1+
.PHONY: help install install-dev sync lock format lint type test check clean build publish build-jupyterbook clean-jupyterbook
22
.DEFAULT_GOAL = help
33

44
PKGROOT = ml4floods
@@ -49,9 +49,6 @@ build-jupyterbook: ## Build jupyter book
4949
clean-jupyterbook: ## Clean jupyter book html
5050
uv run jupyter-book clean jupyterbook
5151

52-
publish-docs: ## Publish docs to gh-pages
53-
uv run ghp-import -n -p -f jupyterbook/_build/html
54-
5552
##@ Build & Publish
5653

5754
clean: ## Remove build artifacts

jupyterbook/README.md

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,27 @@
11
# Create docs
22

3-
Install `jupyter-book` and `ghp-import`. From the main directory run
3+
The documentation site is built with [Jupyter Book](https://jupyterbook.org/).
44

5-
```bask
6-
make build-jupyterbook
7-
# Check doc in local looks good
5+
Build it locally from the repository root:
86

9-
# Upload the doc to GitHub
10-
ghp-import -n -p -f jupyterbook/_build/html
7+
```bash
8+
make build-jupyterbook
119
```
12-
The commit should appear in branch `gh-pages` and the page will be live at [spaceml-org.github.io/ml4floods](https://spaceml-org.github.io/ml4floods)
1310

14-
# Publish package in pip
11+
Then open `jupyterbook/_build/html/index.html` to review it.
1512

16-
Install `twine`.
13+
Deployment is automatic: on every merge to `main`, the `deploy` GitHub Actions
14+
workflow builds the book and publishes it to GitHub Pages at
15+
[spaceml-org.github.io/ml4floods](https://spaceml-org.github.io/ml4floods).
1716

18-
First update the version number in `ml4floods/__init__.py`
17+
# Publish package to PyPI
1918

20-
```
21-
rm -rf build/
22-
rm -rf dist/
23-
python setup.py sdist bdist_wheel
19+
First bump the version number in `ml4floods/__init__.py`, then from the
20+
repository root:
2421

25-
# upload to testpypi
26-
python -m twine upload --repository testpypi dist/*
27-
28-
# Upload to real pypi
29-
python -m twine upload dist/*
22+
```bash
23+
make build # build sdist + wheel (uv build)
24+
make publish # upload to PyPI (uv publish)
3025
```
31-
The package in PyPi will be shown at [pypi.org/project/ml4floods/](https://pypi.org/project/ml4floods/). The test version can be checked at [test.pypi.org/project/ml4floods/](https://test.pypi.org/project/ml4floods/)
32-
3326

34-
Follow [this tutorial](https://towardsdatascience.com/how-to-publish-a-python-package-to-pypi-7be9dd5d6dcd) to understand how pip works
27+
The package is listed at [pypi.org/project/ml4floods](https://pypi.org/project/ml4floods/).

jupyterbook/content/config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Introduction
22

33
---
4-
ML4Floods is python package to do *end-to-end* flood extent estimation from optical images using deep learning models.
4+
FloodMapper (also known as ML4Floods) is python package to do *end-to-end* flood extent estimation from optical images using deep learning models.
55

66
```{figure} ./ml4ops/ts_albania.gif
77
---

jupyterbook/ml4cc_logo.png

-466 KB
Loading

jupyterbook/requirements.txt

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

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Homepage = "https://github.com/spaceml-org/ml4floods"
5656
[project.optional-dependencies]
5757
dev = ["ruff", "mypy", "pre-commit", "pyprojroot"]
5858
tests = ["pytest"]
59-
docs = ["jupyter-book<2", "ghp-import"]
59+
docs = ["jupyter-book<2"]
6060
serve = ["flask", "gunicorn"]
6161
cloudmasks = ["segmentation-models-pytorch", "s2cloudless"]
6262
kappazeta = ["tensorflow"]

uv.lock

Lines changed: 0 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)