Skip to content
forked from neo4j/docs-aura

fi's copy of the docs-aura repo, to freely experiment with changes without affecting the original project.

Notifications You must be signed in to change notification settings

fiquick/docs-aura

 
 

Repository files navigation

Aura Documentation

Run Live Preview

npm install
npm start

Generate APOC Docs

  1. Copy .env.example to .env and update the credentials to a valid aura instance.

  2. Run npm run apoc to get a list of currently valid APOC functions/procedures and load them into modules/ROOT/partials/apoc-procedures.adoc.

Create/Destroy an Aura instance

NOTE: Remember to destroy Aura instances when no longer in use!

Note
The script requires Python 3.

Setup

  1. Copy aura_api.env.example to aura_api.env and update it to use actual API access credentials (client ID and client secret).

  2. Create a Python virtual environment: python -m venv venv.

  3. Activate the virtual environment: source venv/bin/activate (venv\Scripts\activate on Windows).

  4. Install the requirements: pip install -r scripts/requirements.txt.

Running the script

  1. Activate the virtual environment (if not already active): source venv/bin/activate (venv\Scripts\activate on Windows).

  2. Run python scripts/manage_instances.py --create INSTANCE_NAME to create an Aura instance with name INSTANCE_NAME, or python scripts/manage_instances.py --destroy INSTANCE_NAME to destroy it.

    • You can use the optional parameter --instance-type together with --create to select the instance type to create (the default is enterprise-ds).

    • You can use different tenants using the optional parameter --tenant together with --create (the default is gcp). Every tenant is used with a default region.

    • Run python scripts/manage_instances.py --help for more details on the usage.

The script creates an INSTANCE_NAME.env file containing the Aura instance credentials.

Extract runnable code from AuraDS docs

This script can be used to extract runnable code (Python or Cypher statements) from a doc HTML page. This means that the docset has to be built first, for example by running npm run build.

Note
The script requires Python 3.
Note
AuraDS credentials must be available in an aura.env file.

Setup

  1. Create a Python virtual environment: python -m venv venv.

  2. Activate the virtual environment: source venv/bin/activate (venv\Scripts\activate on Windows).

  3. Install the requirements: pip install -r scripts/requirements.txt.

Running the script

  1. Activate the virtual environment (if not already active): source venv/bin/activate (venv\Scripts\activate on Windows).

  2. Run python scripts/extract_code.py <source-html-file> to extract the content of (GDS client, by default) code blocks from the <source-html-file> doc.

    • The --code-type parameter can be used to select the type of code blocks to extract.

    • Run python scripts/extract_code.py --help for more details on the usage.

Replace partials in an AsciiDoc file

Some applications cannot use Asciidoc files that use partials. The replace_partials.py script can be used to preprocess an Asciidoc file and replace the include::partial lines with the actual content of the referenced partials.

Note
The script requires Python 3.

Setup

  1. Create a Python virtual environment: python -m venv venv.

  2. Activate the virtual environment: source venv/bin/activate (venv\Scripts\activate on Windows).

  3. Install the requirements: pip install -r scripts/requirements.txt.

Running the script

  1. Activate the virtual environment (if not already active): source venv/bin/activate (venv\Scripts\activate on Windows).

  2. Run scripts/replace_partials.py <source-asciidoc> <partials-dir>, where <source-asciidoc> is the source file to be processed and <partials-dir> is the location where the partials are. The "enriched" file will be created in the directory where the command is run from, unless the --outdir option is specified.

    • Run scripts/replace_partials.py --help for more details on the usage.

About

fi's copy of the docs-aura repo, to freely experiment with changes without affecting the original project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 91.7%
  • Python 5.5%
  • JavaScript 2.8%