Skip to content

Commit

Permalink
Merge branch 'develop' into remove_dead_code
Browse files Browse the repository at this point in the history
  • Loading branch information
Anish9901 authored Oct 15, 2024
2 parents 61eb385 + 35798e7 commit e573704
Show file tree
Hide file tree
Showing 22 changed files with 485 additions and 71 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/deploy-docs.yml

This file was deleted.

5 changes: 3 additions & 2 deletions db/sql/00_msar.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1246,7 +1246,8 @@ Args:
Membership will be revoked for existing members not present in this array.
*/
DECLARE
parent_role_info jsonb := msar.get_role(parent_rol_id::regrole::text);
parent_role_name text := msar.get_role_name(parent_rol_id);
parent_role_info jsonb := msar.get_role(parent_role_name);
all_members_array bigint[];
revoke_members_array bigint[];
set_members_expr text;
Expand All @@ -1273,7 +1274,7 @@ BEGIN
);
EXECUTE set_members_expr;
-- Return the updated parent_role info including membership details.
RETURN msar.get_role(parent_rol_id::regrole::text);
RETURN msar.get_role(parent_role_name);
END;
$$ LANGUAGE plpgsql RETURNS NULL ON NULL INPUT;

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ services:
#
service:
container_name: mathesar_service
image: mathesar/mathesar-prod:latest
image: mathesar/mathesar-testing:latest
environment:
# First we load the variables configured above.
<<: *config
Expand Down
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
site
2 changes: 1 addition & 1 deletion docs/docs/api/rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Mathesar has an API available at `/api/rpc/v0/` which follows the [JSON-RPC](https://www.jsonrpc.org/specification) spec version 2.0.

!!! caution "Not yet stable"
!!! danger "Not yet stable"
The RPC API is not yet stable and may change in the future. If you build logic that depends on this API, be mindful that it may change in the future without warning or notice.

## Usage
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion docs/docs/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Mathesar Documentation

!!! question "Help us get our beta out sooner – send us feedback!"
You're looking at the documentation for our **✨ new test build ✨**, see [release notes here](releases/0.2.0-testing.1.md).

For a timely and stable beta release, we need feedback from as many users as possible about how this new version of Mathesar is working for you. Let us know on [this GitHub discussion](https://github.com/mathesar-foundation/mathesar/discussions/3956) or drop us a line at <[email protected]>.

## Welcome!

Mathesar is a self-hostable open source project that provides a spreadsheet-like interface to a PostgreSQL database. Our web-based interface helps you and your collaborators set up data models, edit data, and build custom reports &mdash; no technical skills needed. You can create a new PostgreSQL database while setting up Mathesar or use our UI to interact with an existing database (or do both).
Expand All @@ -17,7 +22,7 @@ This is a quick way to play with Mathesar locally, but is not appropriate for sa
1. With [Docker](https://docs.docker.com/get-docker/) installed, run:

```
docker run -it --name mathesar -p 8000:8000 mathesar/mathesar-prod:latest
docker run -it --name mathesar -p 8000:8000 mathesar/mathesar-testing:latest
```

1. Visit [http://localhost:8000/](http://localhost:8000/) to set up an admin user account and create a database connection.
Expand Down
31 changes: 22 additions & 9 deletions docs/docs/installation/build-from-source/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Install Mathesar from source on Linux

!!! danger "Not a stable release"
This is a testing build released with the goal of gathering feedback from our community. It has **[many known issues](https://github.com/mathesar-foundation/mathesar/issues?q=is%3Aissue+milestone%3Av0.2.0-testing.2+)** and is not recommended for production use.

!!! warning "For experienced Linux sysadmins"
To follow this guide you need be experienced with Linux server administration, including the command line interface and some common utilities.

Expand All @@ -23,7 +26,7 @@ You should have **root access** to the machine you're installing Mathesar on.

You'll need to install the following system packages before you install Mathesar:

- [Python](https://www.python.org/downloads/) 3.9, 3.10, or 3.11
- [Python](https://www.python.org/downloads/) 3.9, 3.10, or 3.11 (along with appropriate [`venv`](https://docs.python.org/3/library/venv.html) module)

!!! note "Python version"

Expand All @@ -39,6 +42,8 @@ You'll need to install the following system packages before you install Mathesar

- [GNU gettext](https://www.gnu.org/software/gettext/) (Verify with `gettext --version`)

- [unzip](https://packages.debian.org/search?keywords=unzip) A utility tool to de-archive .zip files (Verify with `unzip -v`)

### Domain (optional)

If you want Mathesar to be accessible over the internet, you'll probably want to set up a domain or sub-domain to use. **If you don't need a domain, you can skip this section.**
Expand Down Expand Up @@ -129,14 +134,14 @@ Then press <kbd>Enter</kbd> to customize this guide with your domain name.
git clone https://github.com/mathesar-foundation/mathesar.git .
```

1. Checkout the tag of the latest stable release, `{{mathesar_version}}`.
1. Check out the tag of the release or build you'd like to install, `{{mathesar_version}}`.

```
git checkout {{mathesar_version}}
```

!!! warning "Important"
If you don't run the above command you'll end up installing the latest _development_ version of Mathesar, which will be less stable.
If you don't run the above command you'll end up installing the latest _development_ version of Mathesar.

1. We need to create a python virtual environment for the Mathesar application.

Expand Down Expand Up @@ -177,23 +182,31 @@ Then press <kbd>Enter</kbd> to customize this guide with your domain name.
Your `.env` file should look something like this

```
SECRET_KEY='REPLACE_THIS_WITH_YOUR_RANDOMLY_GENERATED_VALUE'
DOMAIN_NAME='xDOMAIN_NAMEx'
ALLOWED_HOSTS='xDOMAIN_NAMEx'
SECRET_KEY='REPLACE_THIS_WITH_YOUR_RANDOMLY_GENERATED_VALUE' # REPLACE THIS!
POSTGRES_DB=mathesar_django
POSTGRES_USER=mathesar
POSTGRES_PASSWORD=mathesar1234 # Do not use this password!
POSTGRES_PASSWORD=REPLACE_THIS_WITH_APPROPRIATE_PASSWORD_FOR_THE_CHOSEN_POSTGRES_USER
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
```

!!! tip
You can generate a [SECRET_KEY variable](../../configuration/env-variables.md#secret_key) by running:
To generate a [`SECRET_KEY`](../../configuration/env-variables.md#secret_key) you can use this [browser-based generator](https://djecrety.ir/) or run this command on MacOS or Linux:

```
echo $(cat /dev/urandom | LC_CTYPE=C tr -dc 'a-zA-Z0-9' | head -c 50)
```

!!! tip
If you want to host Mathesar on multiple domains/subdomains you can do so by adding multiple comma separated domain names to the following env variables without a whitespace:

```
DOMAIN_NAME='xDOMAIN_NAMEx,xDOMAIN_NAMEx.example.org'
ALLOWED_HOSTS='xDOMAIN_NAMEx,xDOMAIN_NAMEx.example.org'
```

1. Add the environment variables to the shell

You need to `export` the environment variables listed in the `.env` file to your shell. The easiest way would be to run the below command.
Expand Down Expand Up @@ -290,7 +303,7 @@ Then press <kbd>Enter</kbd> to customize this guide with your domain name.
1. Check the logs to verify if Gunicorn is running without any errors

```
journalctl --priority=notice --unit=gunicorn.service
journalctl --unit=gunicorn.service
```

### Set up the Caddy reverse proxy
Expand All @@ -307,7 +320,7 @@ Then press <kbd>Enter</kbd> to customize this guide with your domain name.
2. Add the configuration details to the CaddyFile

```
https://xDOMAIN_NAMEx {
$DOMAIN_NAME {
log {
output stdout
}
Expand Down Expand Up @@ -385,7 +398,7 @@ Then press <kbd>Enter</kbd> to customize this guide with your domain name.
1. Check the logs to verify if Caddy is running without any errors

```
journalctl --priority=notice --unit=caddy.service
journalctl --unit=caddy.service
```

### Set up your user account
Expand Down
3 changes: 3 additions & 0 deletions docs/docs/installation/docker-compose/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Install Mathesar via Docker Compose

!!! danger "Not a stable release"
This is a testing build released with the goal of gathering feedback from our community. It has **[many known issues](https://github.com/mathesar-foundation/mathesar/issues?q=is%3Aissue+milestone%3Av0.2.0-testing.2+)** and is not recommended for production use.

## Prerequisites

{% include 'snippets/docker-compose-prerequisites.md' %}
Expand Down
Loading

0 comments on commit e573704

Please sign in to comment.