Skip to content

Commit

Permalink
small improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
maximlt committed Jul 25, 2024
1 parent cc21012 commit f4fe841
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 12 deletions.
35 changes: 27 additions & 8 deletions MAINTAINING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The main parts that constitute this system are:
- two websites
- main: https://examples.holoviz.org
- dev: https://holoviz-dev.github.io/examples/
- an Anaconda Enterprise instance hosted at https://pyviz.demo.anaconda.com/
- an Anaconda Enterprise instance hosted at https://holoviz-dev.anaconda.com/

Each project, also called example, is an [anaconda-project](https://anaconda-project.readthedocs.io/),
capturing the dependencies, data and commands required to execute the project.
Expand All @@ -38,20 +38,39 @@ The system has been designed to cope with multiple projects being touched at onc
It is also possible to remove projects via a Pull Request, the system should remove the data in the `evaluated` branch
and remove the projects on Anaconda Enterprise.

## Commands
## Set up admin/contributor environment

The `doit` task runner is used to implement many tasks required to maintain the system.
These tasks are implemented in Python and can be found in the `dodo.py` file.
Install conda and run this to install the dependencies required to manage the system
(pick the file in the `envs/` folder that matches with your platform):

Run this to install the dependencies required to manage the system:
```bash
conda create -n examples-gallery-manage --file envs/environment-osx-arm64.lock
conda activate examples-gallery-manage
```

Alternatively, you could install the latest dependencies with this command:

```bash
conda env create --file envs/environment.yml
conda activate examples-gallery-manage
```

## Update admin/contributor environment

1. Update manually `envs/environment.yml`, if needed
2. Install `conda-lock` in your environment (dedicated one preferably, or `base`)
3. Run `cd envs` and `bash lock.yml`

## Commands

The `doit` task runner is used to implement many tasks required to maintain the system.
These tasks are implemented in Python and can be found in the `dodo.py` file.

Run `doit list` to list all the commands available.

### Build the website

To build the full website, run `doit doc_full`. This might take a little while as this involve multiple steps, such as building the archived projects, or checking out locally the `evaluated` branch to retrieve the evaluated notebooks. Once executed, running `doit doc_build_website` is enough to re-build the site only.

## GitHub Actions

Scheduled runs:
Expand Down Expand Up @@ -82,8 +101,8 @@ to the zip file. Once your project has been created, you can deploy it.

The endpoints should be:

- notebook: `<projectname>-notebook.pyviz.demo.anaconda.com`
- dashboard: `<projectname>.pyviz.demo.anaconda.com`
- notebook: `<projectname>-notebook.holoviz-demo.anaconda.com`
- dashboard: `<projectname>.holoviz-demo.anaconda.com`

where `<projectname>` is the project name, with underscores turned
into hyphens.
4 changes: 2 additions & 2 deletions dodo.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ def list_ae5_deployments(session, name=None):

deployments = session.deployment_list(format="json")

# {'url': 'https://gapminders.pyviz.demo.anaconda.com/',
# {'url': 'https://gapminders.holoviz-demo.anaconda.com/',
# 'public': True,
# 'created': '2022-12-08T11:12:20.538714+00:00',
# 'project_name': 'gapminders',
Expand Down Expand Up @@ -662,7 +662,7 @@ def list_ae5_sessions(session, name):
# '_record_type': 'session',
# 'created': '2022-12-14T15:38:25.795710+00:00',
# 'id': 'a1-8bfc935b04794519bc3d2b637d3b51a7',
# 'iframe_hosts': 'https://pyviz.demo.anaconda.com',
# 'iframe_hosts': 'https://holoviz-demo.anaconda.com',
# 'name': 'Panel-Gallery',
# 'owner': 'anaconda-enterprise',
# 'project_branch': 'anaconda-enterprise-d979c8be607b4745ac817dc6477f770d',
Expand Down
4 changes: 2 additions & 2 deletions template/anaconda-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ examples_config:
# Each deployment must declare the command it deploys, options
# include "notebook" or "dashboard".
deployments:
# Will be deployed at {projname_with_hyphens}-notebook.pyviz.demo.anaconda.com
# Will be deployed at {projname_with_hyphens}-notebook.holoviz-demo.anaconda.com
- command: notebook
# Will be deployed at {projname_with_hyphens}.pyviz.demo.anaconda.com
# Will be deployed at {projname_with_hyphens}.holoviz-demo.anaconda.com
- command: dashboard
# [OPTIONAL] Set the AE5 container resource profile.
# Options include: "default" (default), "medium", "large"
Expand Down

0 comments on commit f4fe841

Please sign in to comment.