Skip to content

Commit

Permalink
docs: improve documentation in various places
Browse files Browse the repository at this point in the history
  • Loading branch information
faradox committed Mar 1, 2024
1 parent 86d822f commit a084146
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 30 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [0.2.0](https://github.com/okio-ai/nendo/releases/tag/0.2.0) - 2024-02-19

<small>[Compare with 0.1.3](https://github.com/okio-ai/nendo/compare/0.1.3...0.2.0)</small>

### Features

- Added the first extension for the Nendo Library: The `NendoLibraryVectorExtension` is a mix-in class that can be used by implementations of the Nendo Library to add support for saving and retrieving embedding vectors.
Expand Down Expand Up @@ -53,8 +55,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed a bug where the length of a `NendoTrack` would not be correctly determined if the track had a mono signal.
- A bunch of small bugfixes, too many to mention them all here.

<small>[Compare with 0.1.3](https://github.com/okio-ai/nendo/compare/0.1.3...0.2.0)</small>

## [0.1.3](https://github.com/okio-ai/nendo/releases/tag/0.1.3) - 2023-12-08

<small>[Compare with 0.1.2](https://github.com/okio-ai/nendo/compare/0.1.2...0.1.3)</small>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT">
</a>
<a href="https://discord.gg/gaZMZKzScj" target="_blank">
<img src="https://dcbadge.vercel.app/api/server/XpkUsjwXTp?compact=true&style=flat" alt="Discord">
<img src="https://dcbadge.vercel.app/api/server/gaZMZKzScj?compact=true&style=flat" alt="Discord">
</a>
<a href="https://twitter.com/okio_ai" target="_blank">
<img src="https://img.shields.io/twitter/url/https/twitter.com/okio_ai.svg?style=social&label=Follow%20%40okio_ai" alt="Twitter">
Expand Down
4 changes: 2 additions & 2 deletions docs/development/plugindev.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Is there already another plugin for that problem? (Check the [Plugin Catalog](..
5. **Document:** Document the functionality of your plugin in the `README.md` file.
Make sure to be concise and clear so that the nendo community can understand what your plugin does.
6. **Publish:** Publish your plugin via pypi and contact us to add it to the official [Plugin Catalog](../plugins.md).
7. **Share:** Share your plugin with the nendo community via the official [discord](https://discord.gg/XpkUsjwXTp)
7. **Share:** Share your plugin with the nendo community via the official [discord](https://discord.gg/gaZMZKzScj)
or send us a tweet [@okio](https://twitter.com/okio_ai)!


Expand Down Expand Up @@ -258,5 +258,5 @@ Now we can specify it when starting nendo:
## Publishing a plugin

To publish a plugin, simply build and ship a package to your favorite package
manager and then contact us via our [discord channel](https://discord.gg/XpkUsjwXTp) to
manager and then contact us via our [discord channel](https://discord.gg/gaZMZKzScj) to
enter the plugin's name in the official [Plugin Catalog](../plugins.md).
5 changes: 5 additions & 0 deletions docs/platform/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ SSL_CERTIFICATE_PATH | `str` | `"./conf/nginx/certs/nendo.crt"` | Path to the SS
SSL_KEY_PATH | `str` | `"./conf/nginx/certs/nendo.key"` | Path to the SSL key file (only relevant when `USE_SSL=true`). |
MAILGUN_FROM_ADDRESS | `str` | `"[email protected]"` | Sets the `FROM` for administrative emails (registration, verification, password reset, etc.) from the server. |
MAILGUN_API_KEY | `str` | `"REPLACE_KEY"` | Mail API key. |
AUTO_RESAMPLE | `bool` | `False` | Flag that determines whether tracks should be automatically resampled upon import. |
DEFAULT_SR | `int` | `44100` | The default sample rate to be used when auto-resampling tracks upon import. |
COPY_TO_LIBRARY | `bool` | `True` | Flag that determines whether an imported track's file should be copied into the nendo library. |
AUTO_CONVERT | `bool` | `True` | Flag that determines whether an imported track's file should be converted to Nendo's standard file format (`.wav`). |
SKIP_DUPLICATE | `bool` | `True` | Flag that determines whether a track that points to a file that already exists in the library can be important multiple times. If True, always the file that already exists in the library will be used instead. |
20 changes: 10 additions & 10 deletions docs/platform/development.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Development

Nendo Platform comes with a convenient _development mode_, in which the [nendo_web](web/index.md) and [nendo_server](server/index.md) components are updated upon any changes made to the codebase.
Nendo Platform comes with a convenient _development mode_, in which the [nendo-web](web/index.md) and [nendo-server](server/index.md) components are updated upon any changes made to the codebase.

Use the following script to prepare the development environment for you:

Expand All @@ -20,13 +20,13 @@ make run-dev
This will run Nendo Platform in development mode with more verbose logging and hot-reloading of components upon code changes.

!!! tip "Hot-reloading"
The hot-reloading only works with changes that are done to the application code, i.e. code that resides in the `nendo_server/` subdirectory of `nendo_server` and in the `src/` subdirectory of `nendo_web` accordingly. All changes to files outside those directories require [rebuilding of the images, as explained below](#building).
The hot-reloading only works with changes that are done to the application code, i.e. code that resides in the `nendo_server/` subdirectory of `nendo-server` and in the `src/` subdirectory of `nendo-web` accordingly. All changes to files outside those directories require [rebuilding of the images, as explained below](#building).

Now you can start developing your app by changing files in the `repo/nendo_server` and `repo/nendo_web` directories.
Now you can start developing your app by changing files in the `repo/nendo-server` and `repo/nendo-web` directories.

## Building

If you end up changing something about `nendo_server` or `nendo_web` that requires (re-)building of the images, you should use the respective `make` commands for that. To build both images (server _and_ web):
If you end up changing something about `nendo-server` or `nendo_web` that requires (re-)building of the images, you should use the respective `make` commands for that. To build both images (server _and_ web):

```bash
# build for production
Expand All @@ -35,7 +35,7 @@ make build
make build-dev
```

To only build `nendo_server`:
To only build `nendo-server`:

```bash
# build for production
Expand All @@ -44,7 +44,7 @@ make server-build
make server-build-dev
```

To only build `nendo_web`:
To only build `nendo-web`:

```bash
# build for production
Expand Down Expand Up @@ -79,9 +79,9 @@ To read the logs:
!!! example "Reading logs"

```bash
# get the logs of nendo_server
# get the logs of nendo-server
make server-logs
# get the logs of nendo_web
# get the logs of nendo-web
make web-logs
```

Expand All @@ -90,8 +90,8 @@ To get a shell into a running container:
!!! example "Getting shell access"

```bash
# get a shell into nendo_server
# get a shell into nendo-server
make server-shell
# get a shell into nendo_web
# get a shell into nendo-web
make web-shell
```
12 changes: 11 additions & 1 deletion docs/usage/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,14 @@ This page serves as a technical FAQ and troubleshooting guide.

## GPU support

Most of the libraries polymath uses come with native GPU support through cuda. Please follow the [tensorflow documentation](https://www.tensorflow.org/install/pip) for instructions on how to set up use with cuda. If you have followed these steps, tensorflow and torch will both automatically pick up the GPU and use it.
Most of the libraries polymath uses come with native GPU support through cuda. Please follow the [tensorflow documentation](https://www.tensorflow.org/install/pip) for instructions on how to set up use with cuda. If you have followed these steps, tensorflow and torch will both automatically pick up the GPU and use it.

## I see a strange warning in the logs about `nendo_plugin_embed_clap` not being found

If you see the following warning in the logs:

```
[2024-02-22T19:37:19.256Z] nendo WARNING Plugin with name nendo_plugin_embed_clap has been configured for the NendoLibraryVectorExtension but is not loaded. Please make sure to install and enable the plugin to use the embedding features of the nendo library.
```

Do not panic. This warning appears because we currently do not use the CLAP embedding plugin inside `nendo-server` directly. Instead, we run the plugin inside the tools (which are started in their own docker containers) so everything is fine and the warning can be ignored.
10 changes: 5 additions & 5 deletions scripts/gen_platform_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ def remove_block_of_lines(file_path, block):
file.write(file_str)


print(f"Generating docs for nendo_platform...")
print(f"Generating docs for nendo-platform...")
# Clone the repos into a temporary directory
repo_path = os.path.join(local_dir)
os.makedirs(repo_path, exist_ok=True)
temp_dir_server = os.path.join("/tmp", "nendo_server")
temp_dir_web = os.path.join("/tmp", "nendo_web")
temp_dir_server = os.path.join("/tmp", "nendo-server")
temp_dir_web = os.path.join("/tmp", "nendo-web")
shutil.rmtree(temp_dir_server, ignore_errors=True)
shutil.rmtree(temp_dir_web, ignore_errors=True)
Repo.clone_from("[email protected]:okio-ai/nendo_server.git", temp_dir_server)
Repo.clone_from("[email protected]:okio-ai/nendo_web.git", temp_dir_web)
Repo.clone_from("[email protected]:okio-ai/nendo-server.git", temp_dir_server)
Repo.clone_from("[email protected]:okio-ai/nendo-web.git", temp_dir_web)

# copy README files to platformdocs
server_file_path = os.path.join(repo_path, "server.md")
Expand Down
2 changes: 1 addition & 1 deletion scripts/gen_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def create_readme_md(plugin_name: str, description: str, author: str) -> str:
return f"""# {plugin_name}
![Documentation](https://img.shields.io/website/https/nendo.ai)
[![Twitter](https://img.shields.io/twitter/url/https/twitter.com/okio_ai.svg?style=social&label=Follow%20%40okio_ai)](https://twitter.com/okio_ai) [![](https://dcbadge.vercel.app/api/server/XpkUsjwXTp?compact=true&style=flat)](https://discord.gg/XpkUsjwXTp)
[![Twitter](https://img.shields.io/twitter/url/https/twitter.com/okio_ai.svg?style=social&label=Follow%20%40okio_ai)](https://twitter.com/okio_ai) [![](https://dcbadge.vercel.app/api/server/gaZMZKzScj?compact=true&style=flat)](https://discord.gg/gaZMZKzScj)
Created by {author}
Expand Down
10 changes: 5 additions & 5 deletions scripts/gen_plugin_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
"https://github.com/okio-ai/nendo_plugin_loopify/",
"https://github.com/okio-ai/nendo_plugin_musicgen/",
"https://github.com/okio-ai/nendo_plugin_vampnet/",
# "https://github.com/okio-ai/nendo_plugin_textgen/",
# "https://github.com/okio-ai/nendo_plugin_caption_lpmusiccaps/",
# "https://github.com/okio-ai/nendo_plugin_voicegen_styletts2/",
# "https://github.com/okio-ai/nendo_plugin_transcribe_whisper/",
# "https://github.com/okio-ai/nendo_plugin_embed_clap/",
"https://github.com/okio-ai/nendo_plugin_textgen/",
"https://github.com/okio-ai/nendo_plugin_caption_lpmusiccaps/",
"https://github.com/okio-ai/nendo_plugin_voicegen_styletts2/",
"https://github.com/okio-ai/nendo_plugin_transcribe_whisper/",
"https://github.com/okio-ai/nendo_plugin_embed_clap/",
# "https://github.com/okio-ai/nendo_plugin_library_postgres/",
]

Expand Down
4 changes: 1 addition & 3 deletions src/nendo/library/sqlalchemy_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -1337,9 +1337,7 @@ def get_tracks(
if query:
query_local = query
else:
query_local = session_local.query(model.NendoTrackDB).filter(
model.NendoTrackDB.user_id == user_id,
)
query_local = session_local.query(model.NendoTrackDB)
if user_id is not None:
query_local = query_local.filter(
model.NendoTrackDB.user_id == user_id,
Expand Down

0 comments on commit a084146

Please sign in to comment.