Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autogenerate java docs #29

Closed
wants to merge 54 commits into from
Closed
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
c18a1aa
Remove license maven plugin
haaawk Jul 30, 2018
61b89b2
Add Host field to Connection
haaawk Apr 19, 2019
d5705ce
Add ShardingInfo class to store details of shards on host
haaawk Jul 30, 2018
6ccd1db
Add ProtocolVersion.isShardingSupported
haaawk Apr 19, 2019
cc66c5f
Add shardingInfo field to Host
haaawk Apr 19, 2019
f9f6dc1
Add shardId field to Connection
haaawk Apr 19, 2019
bc42e31
Fetch sharding info when initializing the connection
haaawk Apr 19, 2019
2bd2e25
Add shard awareness to HostConnectionPool
haaawk Apr 19, 2019
702d5f2
Signal usage of optimized driver
haaawk Apr 19, 2019
1e6338d
Add lastHost field to Statement
haaawk Apr 19, 2019
4106ab1
Add PagingOptimizingLoadBalancingPolicy
haaawk Oct 24, 2018
6511f1a
Use PagingLoadBalancingPolicy in Cluster
haaawk Apr 19, 2019
46d29d2
Add PagingOptimizingLatencyTracker
haaawk Oct 24, 2018
565d4ef
Use PagingOptimizingLatencyTracker
haaawk Apr 19, 2019
972e3f5
Prevent schema.local full scans
haaawk Apr 19, 2019
4e10d5d
Log channel creation exceptions
haaawk Apr 19, 2019
b6507ec
Stop cleaning uninitialized pool
haaawk Apr 19, 2019
5ce83a1
Optional coalscing of schema refresh queries
slivne Aug 6, 2019
934fd94
Limit number of opened connections
haaawk Apr 25, 2019
e411a57
Prepare for publishing to Maven repo
haaawk Aug 7, 2019
2521e74
[maven-release-plugin] prepare release 3.7.1-scylla-0
haaawk Aug 9, 2019
edad52b
[maven-release-plugin] prepare for next development iteration
haaawk Aug 9, 2019
09ecb30
Add metrics for shard awareness
haaawk Aug 20, 2019
9c28fb3
Update sharding info when node restarts
haaawk Aug 20, 2019
354d13d
[maven-release-plugin] prepare release 3.7.1-scylla-1
haaawk Aug 20, 2019
ab9dd27
[maven-release-plugin] prepare for next development iteration
haaawk Aug 20, 2019
d14ef5d
HostConnectionPool: track number of opened connections per shard
haaawk Oct 27, 2019
7354c77
HostConnectionPool: finish initializing after getting first connections
haaawk Oct 27, 2019
ba3443c
HostConnectionPool: use connection for any shard
haaawk Oct 27, 2019
e432c44
HostConnectionPool: share excessive connections between ConnectionTasks
haaawk Oct 28, 2019
b925924
Merge pull request #17 from haaawk/init_async
haaawk Nov 13, 2019
9ab00c4
[maven-release-plugin] prepare release 3.7.1-scylla-2
haaawk Nov 13, 2019
f3ee452
[maven-release-plugin] prepare for next development iteration
haaawk Nov 13, 2019
d8e0010
Added scylladb docs style (#1)
dgarcia360 Aug 7, 2020
2aef9fc
Updated dev docs
dgarcia360 Aug 7, 2020
958ba52
Clean conf.py
dgarcia360 Aug 7, 2020
a018b2c
Merge remote-tracking branch 'upstream/latest' into docs-automation (…
dgarcia360 Aug 14, 2020
478bb85
Fixed link
dgarcia360 Aug 14, 2020
9cd7869
Added ditaa lexer
dgarcia360 Aug 14, 2020
1ea9b03
Fixed merge
dgarcia360 Aug 14, 2020
26ebfee
Clean PR
dgarcia360 Aug 14, 2020
254b124
Replace index before building
dgarcia360 Aug 28, 2020
7d2b859
Overwrite md relative link parser
dgarcia360 Sep 10, 2020
5341cba
Add original markers
dgarcia360 Sep 10, 2020
f192325
Keep original folder structure
dgarcia360 Sep 14, 2020
b15ff8a
Fixed links
dgarcia360 Sep 14, 2020
7fc6f21
Remove index references from toctree
dgarcia360 Sep 14, 2020
9b9b5fb
Rollback index.md to README.md
dgarcia360 Sep 21, 2020
c56731c
Fixed multiversion
dgarcia360 Sep 21, 2020
2883628
Fixed doxygen multiversion
dgarcia360 Sep 21, 2020
ec0148d
Fixed redirection multiversion
Sep 21, 2020
848fe5e
Fixed conf.py
Sep 21, 2020
8d3be89
Fixed multiversion redirects
dgarcia360 Sep 21, 2020
0320099
Fixed spaces
dgarcia360 Sep 21, 2020
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
37 changes: 37 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "CI Docs"

on:
push:
branches:
- latest
tags:
- '**'
jobs:
release:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Set up Doxygen
run: sudo apt-get install doxygen
- name: Build Sphinx docs
run: |
export PATH=$PATH:~/.local/bin
cd docs
make multiversion
- name: Build Doxygen docs
run: |
./docs/_utils/doxygen.sh
- name: Deploy
run : ./docs/_utils/deploy.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LATEST_VERSION: latest
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ testing/
.settings
.classpath
.project
doc
docs
docs/_build
html
latex
notes
.DS_Store

Expand Down
36 changes: 36 additions & 0 deletions README-dev.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Building the Docs
=================

*Note*: The docs build instructions have been tested with Sphinx 2.4.4 and Fedora 32.

To build and preview the docs locally, you will need to install the following software:

- `Git <https://git-scm.com/book/en/v2/Getting-Started-Installing-Git>`_
- `Python 3.7 <https://www.python.org/downloads/>`_
- `pip <https://pip.pypa.io/en/stable/installing/>`_
- `doxygen <https://www.tutorialspoint.com/how-to-install-doxygen-on-ubuntu/>`_

Run the following command to build the docs.

.. code:: console

cd docs
make preview

Once the command completes processing, open http://127.0.0.1:5500/ with your preferred browser.

Building multiple documentation versions
========================================

Build Sphinx docs for all the versions defined in ``docs/conf.py``.

The multiverson command does not build doxygen docs.

```
cd docs
make multiversion
```

Then, open ``docs/_build/dirhtml/<version>/index.html`` with your preferred browser.

**NOTE:** If you only can see docs generated for the master branch, try to run ``git fetch --tags`` to download the latest tags from remote.
1,668 changes: 0 additions & 1,668 deletions changelog/README.md

This file was deleted.

67 changes: 0 additions & 67 deletions docs.yaml

This file was deleted.

72 changes: 72 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = poetry run sphinx-build
PAPER =
BUILDDIR = _build

# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .

.PHONY: all
all: dirhtml

.PHONY: pristine
pristine: clean
git clean -dfX

.PHONY: setup
setup:
./_utils/setup.sh

.PHONY: clean
clean:
rm -rf $(BUILDDIR)/*

.PHONY: preview
preview: setup
cd .. && ./docs/_utils/doxygen.sh
poetry run sphinx-autobuild -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml --port 5500

.PHONY: dirhtml
dirhtml: setup
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."

.PHONY: singlehtml
singlehtml: setup
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."

.PHONY: epub
epub: setup
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."

.PHONY: epub3
epub3: setup
$(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3
@echo
@echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3."

.PHONY: dummy
dummy: setup
$(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy
@echo
@echo "Build finished. Dummy builder generates no files."

.PHONY: linkcheck
linkcheck: setup
$(SPHINXBUILD) -b linkcheck . $(BUILDDIR)/linkcheck

.PHONY: multiversion
multiversion: setup
poetry run ./_utils/multiversion.sh
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
8 changes: 8 additions & 0 deletions docs/_utils/api.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!DOCTYPE html>
<html>
<head>
<title>Redirecting to API Documentation</title>
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; URL=./api/classes.html">
</head>
</html>
16 changes: 16 additions & 0 deletions docs/_utils/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

# Clone repo
git clone "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" --branch gh-pages --single-branch gh-pages
cp -r docs/_build/dirhtml/* gh-pages
# Redirections
./docs/_utils/redirect.sh > gh-pages/index.html
find gh-pages/* -name "api.html" -exec cp ./docs/_utils/api.html {} \;
# Deploy
cd gh-pages
touch .nojekyll
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -m "Publish docs" || true
git push origin gh-pages --force
12 changes: 12 additions & 0 deletions docs/_utils/doxygen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

GITHUB_VERSION=${GITHUB_REF##*/}

OUTPUT_DIR="docs/_build/dirhtml/api"
if [[ "$GITHUB_VERSION" != "" ]]; then
OUTPUT_DIR="docs/_build/dirhtml/$GITHUB_VERSION/api"
echo "HTML_OUTPUT = $OUTPUT_DIR" >> doxyfile
fi
echo $OUTPUT_DIR
mkdir -p "$OUTPUT_DIR"
doxygen doxyfile
3 changes: 3 additions & 0 deletions docs/_utils/multiversion.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#! /bin/bash

cd .. && sphinx-multiversion docs/source docs/_build/dirhtml
13 changes: 13 additions & 0 deletions docs/_utils/redirect.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

cat <<- _EOF_
<!DOCTYPE html>
<html>
<head>
<title>Redirecting to Driver</title>
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; URL=./${LATEST_VERSION}/index.html">
<link rel="canonical" href="./${LATEST_VERSION}/index.html">
</head>
</html>
_EOF_
1 change: 1 addition & 0 deletions docs/_utils/redirections.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
api: /api/classes.html
16 changes: 16 additions & 0 deletions docs/_utils/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#! /bin/bash

if pwd | egrep -q '\s'; then
echo "Working directory name contains one or more spaces."
exit 1
fi

which python3 || { echo "Failed to find python3. Try installing Python for your operative system: https://www.python.org/downloads/" && exit 1; }
# install pipx
which pipx || python3 -m pip install --user pipx
python3 -m pipx ensurepath

# install poetry
which poetry || pipx install poetry
poetry --version || { echo "Failed to find or install poetry. Try installing it manually: https://python-poetry.org/docs/#installation" && exit 1; }
poetry install
Loading