Skip to content

Commit

Permalink
Merge pull request #3463 from mathesar-foundation/master
Browse files Browse the repository at this point in the history
Merge pull request #3460 from mathesar-foundation/0.1.5
  • Loading branch information
seancolsen authored Feb 28, 2024
2 parents 7e614f8 + 2f4a15f commit 090eab6
Show file tree
Hide file tree
Showing 13 changed files with 140 additions and 135 deletions.
18 changes: 18 additions & 0 deletions docs/docs/administration/upgrade/0.1.5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Upgrade Mathesar to 0.1.5

### For installations using Docker Compose

If you have a Docker compose installation (including one from the guided script), run the command below:

```
docker compose -f /etc/mathesar/docker-compose.yml up \
--force-recreate --build service
```

!!! warning "Your installation directory may be different"
You may need to change `/etc/mathesar/` in the command above if you chose to install Mathesar to a different directory.


### For installations done from scratch

If you installed from scratch, the upgrade instructions are the same as [for 0.1.4](../../administration/upgrade/0.1.4/#scratch), but you can skip Step 5 – you do not need to change the environment variables.
90 changes: 0 additions & 90 deletions docs/docs/configuration/connect-to-existing-db.md

This file was deleted.

3 changes: 3 additions & 0 deletions docs/docs/configuration/env-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ This page contains all available environment variables supported by Mathesar. Se

## Caddy reverse proxy configuration {: #caddy}

!!!note
These variables are only needed if you're using the Caddy configuration in our [default Docker Compose](../../installation/docker-compose/#steps) file.

### `DOMAIN_NAME`

- **Description**: The public URL that will be used to access Mathesar ([see Caddy docs](https://caddyserver.com/docs/caddyfile/concepts#addresses)).
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ See our [live demo site](https://demo.mathesar.org/) to try Mathesar without ins

### Try locally

This is a quick way to play with Mathesar locally before installing, but will not be appropriate for saving data that you care about.
This is a quick way to play with Mathesar locally, but is not appropriate for saving data that you care about or setting up a long-term installation.

1. With [Docker](https://docs.docker.com/get-docker/) installed, run:

Expand Down Expand Up @@ -51,8 +51,8 @@ You can self-host Mathesar by following one of the guides below:

Mathesar should be pretty intuitive to use. More documentation is coming soon, but for now, we've written some documentation for some things that could be tricky.

- [Syncing Database Changes](./user-guide/syncing-db.md)
- [Users & Access Levels](./user-guide/users.md)
- [Syncing database changes](./user-guide/syncing-db.md) if the database's structure is changed outside of Mathesar.
- How to set up [users with different access levels](./user-guide/users.md)

## Contribute to Mathesar

Expand Down
13 changes: 13 additions & 0 deletions docs/docs/installation/docker-compose/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,16 @@ Add your domain(s) or sub-domain(s) to the [`DOMAIN_NAME`](../../configuration/e
```

Restart the docker containers for the configuration to take effect.

### Using an external PostgreSQL server for Mathesar's internal database

If you'd like to use an external PostgreSQL server for Mathesar's internal database, you'll need to do the following:


1. On the existing database server, [create a new database](https://www.postgresql.org/docs/current/sql-createdatabase.html) for Mathesar to store its metadata.

```bash
psql -c 'create database mathesar_django;'
```

1. Configure the [internal database environment variables](../../configuration/env-variables.md#db) to point to the database you just created. Ensure that you change the default values for the user, password, and host.
2 changes: 2 additions & 0 deletions docs/docs/releases/0.1.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

Mathesar 0.1.4 focuses on improving the installation and setup experience.

_This page provides a comprehensive list of all changes in the release._

## Upgrading to 0.1.4

See our guide on [upgrading Mathesar to 0.1.4](../administration/upgrade/0.1.4.md).
Expand Down
37 changes: 37 additions & 0 deletions docs/docs/releases/0.1.5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Mathesar 0.1.5

## Summary

Mathesar 0.1.5 is a small, bug fix release.

_This page provides a comprehensive list of all changes in the release._

## Upgrading to Mathesar 0.1.5

See our guide on [upgrading Mathesar to 0.1.5](../administration/upgrade/0.1.5.md).

## Improvements

- Improve performance of loading sample data when adding a new connection _[#3448](https://github.com/mathesar-foundation/mathesar/pull/3448 "Efficient data loader")_
- Constrain the width of the connections page _[#3439](https://github.com/mathesar-foundation/mathesar/pull/3439 "Constrain the width of the connections page")_

## Bug fixes

- Fix "Page not found" error when viewing a shared exploration _[#3456](https://github.com/mathesar-foundation/mathesar/pull/3456 "Fix regression where `connections` list is empty in `common_data`")_
- Fix bugs preventing Mathesar from running in demo mode _[#3459](https://github.com/mathesar-foundation/mathesar/pull/3459 "Fix Demo mode issues")_
- Fix timeout when setting up a new database with sample data in installations with higher network latency _[#3448](https://github.com/mathesar-foundation/mathesar/pull/3448 "Efficient data loader")_
- Restore display of column type icons within shared tables _[#3456](https://github.com/mathesar-foundation/mathesar/pull/3456 "Fix regression where `connections` list is empty in `common_data`")_
- Temporarily hide link to missing docs page _[#3451](https://github.com/mathesar-foundation/mathesar/pull/3451 "Temporarily hide link to missing docs page")_
- Fix active cell displaying above row header cell _[#3382](https://github.com/mathesar-foundation/mathesar/pull/3382 "Fix active cell displaying above row header cell")_

## Documentation

- Improve docs on using an external PostgreSQL server for Mathesar's internal database _[#3457](https://github.com/mathesar-foundation/mathesar/pull/3457 "Updates to documentation")_
- Add embedded video walkthrough within installation steps _[#3437](https://github.com/mathesar-foundation/mathesar/pull/3437 "Merge pull request #3436 from mathesar-foundation/video_walkthrough")_ _[#3443](https://github.com/mathesar-foundation/mathesar/pull/3443 "Merge pull request #3442 from mathesar-foundation/update_video_link")_
- 0.1.5 release notes _[#3449](https://github.com/mathesar-foundation/mathesar/pull/3449 "0.1.5 release notes")_

## Maintenance

- Improve our release notes helper script _[#3435](https://github.com/mathesar-foundation/mathesar/pull/3435 "Merge pull request #3434 from mathesar-foundation/release_notes")_
- Post-release cleanup _[#3432](https://github.com/mathesar-foundation/mathesar/pull/3432 "Merge pull request #3429 from mathesar-foundation/0.1.4")_

22 changes: 2 additions & 20 deletions docs/docs/releases/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,7 @@ This is developer documentation to help with release notes. It is not published
- If you haven't yet created a release notes file for this release, it will create one for you.
- The script will find PRs which have been merged but not yet included in the release notes file.

1. Open `missing_prs.csv` to see the PRs you need to add. Incorporate them into the release notes as you see fit. Save the release notes and commit them.
1. Open the release notes file and find a new section at the end titled **(TO CATEGORIZE)**. Incorporate PRs listed within this section into the release notes as you see fit. Rewrite the title text that appears directly in the markdown. Leave the titles as-written within the quotes (these will appear within hover text). Save the release notes and commit them.

1. Re-run the script as needed. When more PRs are merged, they will appear in `missing_prs.csv`.

## How to format the release notes content

1. Group changes into sections in the following order

```md
## Security fixes
## Breaking changes
## New features
## Groundwork
## Documentation
## Bug fixes
## Maintenance
```

You can omit sections if there are no applicable changes.

1. Within the "New features" section, further categorize changes by specific features using level 3 headings.
1. Re-run the script as needed.

35 changes: 35 additions & 0 deletions docs/docs/releases/TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Mathesar __VERSION__

## Summary

TODO

_This page provides a comprehensive list of all changes in the release._

## Upgrading to __VERSION__

TODO

<!-- ## Security fixes -->


<!-- ## Breaking changes -->
<!-- (This section lists any breaking changes to publicly exposed and documented machine interfaces to Mathesar such as the API or DB functions) -->


<!-- ## Improvements -->
<!-- (Each feature within this section should have its own level-three heading) -->


<!-- ## Groundwork -->
<!-- (Use this section to list any incremental work done on still-incomplete changes) -->


<!-- ## Bug fixes -->


<!-- ## Documentation -->


<!-- ## Maintenance -->

42 changes: 23 additions & 19 deletions docs/docs/releases/find_missing_prs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,21 @@ fi

RELEASE=$1
NOTES_FILE=$RELEASE.md
TEMPLATE_FILE=TEMPLATE.md

# If the notes file doesn't yet exist, create one
if [ ! -f $NOTES_FILE ]; then
echo "# Mathesar $RELEASE" > $NOTES_FILE
cp $TEMPLATE_FILE $NOTES_FILE
sed -i "s/__VERSION__/$RELEASE/g" $NOTES_FILE
fi

PREV_NOTES_FILE=$(ls -1 | sort | grep -B 1 $NOTES_FILE | head -n 1)
PREV_RELEASE=$(echo $PREV_NOTES_FILE | sed s/.md$//)

COMMITS_FILE=cache/commits.txt
ALL_PRS_FILE=cache/all_prs.json
INCLUDED_PRS_FILE=cache/included_prs.txt
MISSING_PRS_FILE=missing_prs.csv
CACHE_DIR=cache
COMMITS_FILE="$CACHE_DIR/commits.txt"
ALL_PRS_FILE="$CACHE_DIR/all_prs.json"
INCLUDED_PRS_FILE="$CACHE_DIR/included_prs.txt"

# Use the latest release notes file
NOTES_FILE=$(ls -1 | grep -e '^[0-9]\.[0-9]\.[0-9]' | sort | tail -n 1)
Expand All @@ -72,21 +74,20 @@ RELEASE_BRANCH=$(
fi
)

mkdir -p "$CACHE_DIR"

# Find and cache the hashes for all the PR-merge commits included in the release
# branch but not included in the master branch.
git log --format=%H --first-parent $PREV_RELEASE..$RELEASE_BRANCH > $COMMITS_FILE

# Find and cache details about all the PRs merged within the past year. This
# gets more PRs than we need, but we'll filter it shortly.
gh pr list \
--base $RELEASE_BRANCH \
--limit 1000 \
--json additions,author,deletions,mergeCommit,title,url \
--search "is:closed merged:>$(date -d '1 year ago' '+%Y-%m-%d')" \
--jq 'map({
additions: .additions,
author: .author.login,
deletions: .deletions,
mergeCommit: .mergeCommit.oid,
title: .title,
url: .url
Expand All @@ -99,24 +100,27 @@ grep -Po 'https://github\.com/mathesar-foundation/mathesar/pull/\d*' \

# Generate a CSV containing details for PRs that match commits in the release
# but not in the release notes.
echo "
PR_LIST=$(echo "
SELECT
pr.title,
pr.url,
pr.author,
pr.additions,
pr.deletions,
'[#' || regexp_extract(pr.url, '(\d+)$', 1) || '](' || pr.url || ')' AS link
'- ' || pr.title ||
' _[#' || regexp_extract(pr.url, '(\d+)$', 1) || ']' ||
'(' || pr.url || ' \"' || replace(pr.title, '\"', '') || '\")_' AS link
FROM read_json('$ALL_PRS_FILE', auto_detect=true) AS pr
JOIN read_csv('$COMMITS_FILE', columns={'hash': 'text'}) AS commit
ON commit.hash = pr.mergeCommit
LEFT JOIN read_csv('$INCLUDED_PRS_FILE', columns={'url': 'text'}) AS included
ON included.url = pr.url
WHERE included.url IS NULL
ORDER BY pr.additions DESC;" | \
duckdb -csv > $MISSING_PRS_FILE

COUNT=$(tail -n +2 $MISSING_PRS_FILE | wc -l)
duckdb -ascii -noheader -newline $'\n')

echo "$COUNT missing PRs written to $MISSING_PRS_FILE"
if [ -z "$PR_LIST" ]; then
echo "No missing PRs"
exit 0
fi

echo $'\n\n## (TO CATEGORIZE)\n' >> $NOTES_FILE
echo "$PR_LIST" >> $NOTES_FILE
echo $'\n' >> $NOTES_FILE
COUNT=$(wc -l <<< "$PR_LIST")
echo "$COUNT PRs added to $NOTES_FILE. Please categorize them."
3 changes: 2 additions & 1 deletion docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ nav:
- Install from scratch: installation/build-from-source/index.md
- Configuration:
- Environment variables: configuration/env-variables.md
- Connect to an existing database server: configuration/connect-to-existing-db.md
- Administration:
- Upgrade:
- To 0.1.5: administration/upgrade/0.1.5.md
- To 0.1.4: administration/upgrade/0.1.4.md
- To older versions: administration/upgrade/older.md
- Uninstall Mathesar: administration/uninstall.md
Expand All @@ -24,6 +24,7 @@ nav:
- Users & access levels: user-guide/users.md
- Glossary: user-guide/glossary.md
- Releases:
- '0.1.5': releases/0.1.5.md
- '0.1.4': releases/0.1.4.md
- '0.1.3': releases/0.1.3.md
- '0.1.2': releases/0.1.2.md
Expand Down
2 changes: 1 addition & 1 deletion mathesar/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
default_app_config = 'mathesar.apps.MathesarConfig'

__version__ = "0.1.4"
__version__ = "0.1.5"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "Mathesar"
version = "0.1.4"
version = "0.1.5"
[tool.vulture]
exclude = ["mathesar/migrations"]
ignore_names = ["go_to_patents_data_table", "go_to_all_types_table", "go_to_table_with_numbers_in_text", "admin_user"]
Expand Down

0 comments on commit 090eab6

Please sign in to comment.