Skip to content

Commit

Permalink
Merge branch 'master' into mobile-feats/lists
Browse files Browse the repository at this point in the history
  • Loading branch information
cdubz committed Apr 17, 2024
2 parents 5cf26de + 712779b commit f2393a9
Show file tree
Hide file tree
Showing 67 changed files with 18,696 additions and 12,190 deletions.
30 changes: 23 additions & 7 deletions .devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,39 @@
{
"name": "babybuddy",
"image": "mcr.microsoft.com/devcontainers/python:3",
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/node:1": {
"version": "18"
},
"ghcr.io/devcontainers-contrib/features/gulp-cli:2": {},
"ghcr.io/devcontainers-contrib/features/pipenv:2": {}
},
"customizations": {
"vscode": {
"extensions": [
"bbenoist.Nix",
"ms-python.python",
"batisteo.vscode-django",
"ms-python.black-formatter"
"donjayamanne.python-environment-manager",
"ms-python.black-formatter",
"ms-python.python",
"samuelcolvin.jinjahtml"
],
"settings": {
"[python]": {
"defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python",
"editor": {
"defaultFormatter": "ms-python.black-formatter"
},
"pipenvPath": "pipenv"
}
},
"terminal.integrated.defaultProfile.linux": "zsh"
}
}
},
"image": "ghcr.io/cachix/devenv:latest",
"overrideCommand": false,
"updateContentCommand": "devenv ci"
"containerEnv": {
"DJANGO_SETTINGS_MODULE": "babybuddy.settings.development",
"PIPENV_VENV_IN_PROJECT": "1"
},
"postCreateCommand": "pipenv install --dev && npm install --include=dev && gulp migrate",
"forwardPorts": [8000]
}
3 changes: 0 additions & 3 deletions .envrc

This file was deleted.

2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github: [cdubz]
github: [babybuddy]
open_collective: babybuddy
16 changes: 0 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,3 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
REQUIREMENTS: docs/requirements.txt
deploy-demo:
needs: test
runs-on: ubuntu-latest
environment:
name: demo
url: https://demo.baby-buddy.net
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Push to dokku
uses: dokku/github-action@master
with:
git_remote_url: "ssh://dokku@dokku.baby-buddy.net:22/demo"
ssh_private_key: ${{ secrets.DOKKU_SSH_PRIVATE_KEY }}
41 changes: 0 additions & 41 deletions .github/workflows/review-app.yml

This file was deleted.

9 changes: 4 additions & 5 deletions .vscode/launch.template.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Django",
"type": "python",
"name": "Debug Baby Buddy",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/manage.py",
"python": "${workspaceFolder}/.venv/bin/python",
"env": {
"DEBUG": "False"
},
"args": [
"runserver"
],
"console": "integratedTerminal",
"django": true,
"justMyCode": true
}
Expand Down
69 changes: 25 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ guess work.

![Baby Buddy mobile views](screenshot_mobile.png)

## Demo
## 👾 Demo

A [demo of Baby Buddy](https://demo.baby-buddy.net) is available. The demo instance
resets every hour. Login credentials are:

- Username: `admin`
- Password: `admin`

## Documentation
## 📘 Documentation

Visit [https://docs.baby-buddy.net](https://docs.baby-buddy.net) for full documentation.

Expand All @@ -35,7 +35,7 @@ Visit [https://docs.baby-buddy.net](https://docs.baby-buddy.net) for full docume
- [Security](/SECURITY.md)
- [License](/LICENSE) (BSD-2 Clause)

## Languages
## 🗺️ Languages

Baby Buddy is available in a variety of languages thanks to the efforts of numerous
translators. Language can be set on a per-user basis from the user settings page
Expand All @@ -44,47 +44,9 @@ for information about how to create/update translations.

### Available languages

:brazil: Brazilian Portuguese
:brazil: Brazilian Portuguese, :es: Catalan, :cn: Chinese (simplified), :czech*republic: Czech, :denmark: Danish, :netherlands: Dutch, :uk: English (U.K.), :us: English (U.S.) *(base)\_, :finland: Finnish, :fr: French, :de: German, :israel: Hebrew, :hungary: Hungarian, :it: Italian, :norway: Norwegian Bokmål, :poland: Polish, :portugal: Portuguese, :ru: Russian, :mexico: :es: Spanish, :sweden: Swedish, :tr: Turkish, :ukraine: Ukrainian

:es: Catalan

:cn: Chinese (simplified)

:czech_republic: Czech

:denmark: Danish

:netherlands: Dutch

:uk: English (U.K.)

:us: English (U.S.) _(base)_

:finland: Finnish

:fr: French

:de: German

:hungary: Hungarian

:it: Italian

:norway: Norwegian Bokmål

:poland: Polish

:portugal: Portuguese

:ru: Russian

:mexico: :es: Spanish

:sweden: Swedish

:tr: Turkish

## Baby Buddy on the Web
## 🌐 Baby Buddy on the Web

This is a non-exhaustive list of neat projects and blog posts that either extend
or use Baby Buddy in fun ways. If you have a project to share please open a PR
Expand Down Expand Up @@ -125,7 +87,26 @@ adding it here or reach out via GitHub Issues or Discussions or on Gitter!
- [part 3](https://lutzky.net/2021/10/10/software-parenting-3/)
- [High Level Developer Documentation (AI-Generated)](https://wiki.mutable.ai/babybuddy/babybuddy)

## Reporting Vulnerabilities
## 🔐 Reporting Vulnerabilities

See [SECURITY.md](SECURITY.md) for information about where and how to report
potential Baby Buddy vulnerabilities.

## ❤️ Support

### Contribution and sponsorship

Contribute or sponsor Baby Buddy's contributors using any of the following methods:

- [Sponsor @babybuddy on GitHub](https://github.com/sponsors/babybuddy)
- [Sponsor @cdubz on GitHub](https://github.com/sponsors/cdubz)
- [Contribute on Open Collective](https://opencollective.com/babybuddy)

### Tools and infrastructure

The following organizations and services support Baby Buddy contributors in various ways (software licensing, service credits, etc.).

_Some of the links below use referral codes -- all referral proceeds are treated as contributions to the Baby Buddy project._

[![DigitalOcean Referral Badge](https://web-platforms.sfo2.cdn.digitaloceanspaces.com/WWW/Badge%203.svg)](https://www.digitalocean.com/?refcode=dd79e4cfd7b6&utm_campaign=Referral_Invite&utm_medium=Referral_Program&utm_source=badge)
[<img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.png" width="100" alt="JetBrains Logo (Main) logo.">](https://www.jetbrains.com/community/opensource/)
3 changes: 2 additions & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ currently being supported with security updates.

| Version | Supported |
| ------- | ------------------ |
| 1.x | :white_check_mark: |
| 2.x | :white_check_mark: |
| 1.x | :x: |

## Reporting a Vulnerability

Expand Down
2 changes: 1 addition & 1 deletion babybuddy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
""" # noqa

__title__ = "Baby Buddy"
__version__ = "2.2.1"
__version__ = "2.3.1"
__license__ = "BSD 2-Clause"

VERSION = __version__
Expand Down
6 changes: 6 additions & 0 deletions babybuddy/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ class CustomRemoteUser(RemoteUserMiddleware):

header = getenv("PROXY_HEADER", "HTTP_REMOTE_USER")

def process_request(self, request):
# Exclude API paths using token authentication.
if request.path.startswith("api/"):
return None
return super().process_request(request)


class HomeAssistant:
"""
Expand Down
15 changes: 14 additions & 1 deletion babybuddy/settings/base.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
import os
from distutils.util import strtobool

from django.utils.translation import gettext_lazy as _
from dotenv import load_dotenv, find_dotenv


# Convert common string values to boolean.
def strtobool(val):
val = val.lower()
if val in ("y", "yes", "t", "true", "on", "1"):
return 1
elif val in ("n", "no", "f", "false", "off", "0"):
return 0
else:
raise ValueError("invalid truth value {!r}".format(val))


# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

Expand Down Expand Up @@ -187,6 +198,7 @@
("fr", _("French")),
("fi", _("Finnish")),
("de", _("German")),
("he", _("Hebrew")),
("hu", _("Hungarian")),
("it", _("Italian")),
("nb", _("Norwegian Bokmål")),
Expand All @@ -196,6 +208,7 @@
("es", _("Spanish")),
("sv", _("Swedish")),
("tr", _("Turkish")),
("uk", _("Ukrainian")),
]


Expand Down
28 changes: 27 additions & 1 deletion babybuddy/static_src/root/site.webmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,31 @@
"start_url": "/",
"display": "standalone",
"theme_color": "#37abe9",
"background_color": "#212529"
"background_color": "#212529",
"shortcuts": [
{
"name": "Start a timer",
"url": "/timers/add/"
},
{
"name": "Record a change",
"url": "/changes/add/"
},
{
"name": "Record a feed",
"url": "/feedings/add/"
},
{
"name": "Record a pumping",
"url": "/pumping/add/"
},
{
"name": "Record a sleep",
"url": "/sleep/add/"
},
{
"name": "Record tummy time",
"url": "/tummy-time/add/"
}
]
}
8 changes: 0 additions & 8 deletions bin/ci-pre-deploy

This file was deleted.

9 changes: 0 additions & 9 deletions bin/pre_compile

This file was deleted.

0 comments on commit f2393a9

Please sign in to comment.