Skip to content

Commit

Permalink
update to 0.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
tensorturtle committed Dec 20, 2024
1 parent c372ab6 commit 7acf638
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 16 deletions.
18 changes: 5 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,19 @@ Run app in development:
uv run fob
```

The `--debug` option may be helpful. Also, the so-called database is actually just a human-readable/editable JSON file. Use `fob info` to see where the database is located.

# Test

```
uvx pytest
```

This is an end-to-end test. It installs `fob` to a temporary directory using `install.sh` and runs commands against it.
This is an end-to-end test. It installs `fob` to a temporary directory using `install.sh` and runs commands against it. Github Actions is set up to run the same test upon pushing to main branch.

# Release

From the root of this repository, run `install.sh`. It uses pyinstaller to create a standalone binary and places it in `~/.local/bin` for access from anywhere on the system.
From the root of this repository, run `./install.sh`. It uses pyinstaller to create a standalone binary and places it in `~/.local/bin` for access from anywhere on the system.

Create a new Github Release with a new tag and upload the executable. The binary is at: `dist/fob`.

Expand All @@ -63,14 +65,4 @@ For example, to use a database synchronized across devices on your Dropbox,
add the following line to `~/.bashrc` (for bash shell):
```
export FOB_DB_PATH="~/Dropbox/my-fob.db"
```

# Inner Workings

## Database

[`TinyDB`](https://github.com/msiemens/tinydb) is used to persist the data as a human-readable JSON file.

Since we're not using a SQL database, we are responsible for upholding the integrity and consistency of the data before writing it to the database. We implement that by first receiving all the data from the user, validating it, and then 'committing' (writing) to the database in one go.

Run the program with debug option `fob -x` or `fob --debug` to see how the database gets updated. Also, the so-called database is actually just a human-readable JSON file, so you can open that to inspect / edit it if you're developing `fob`. Use `fob info` to see where the database is located.
```
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "fob"
# Remember to update the version number in 'utils/utils.py' manually also.
version = "0.2.5"
version = "0.2.6"
description = "Focus Blocks: Simple and elegant daily time management tool."
readme = "README.md"
authors = [{ name = "tensorturtle", email = "[email protected]" }]
Expand Down
2 changes: 1 addition & 1 deletion src/fob/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from rich import print

def get_version_number() -> tuple[int, int, int]:
return (0,2,5)
return (0,2,6)

def get_db_path(args: Namespace) -> Path:
'''
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7acf638

Please sign in to comment.