Skip to content

Commit eaa319a

Browse files
committed
Update CONTRIBUTING.md and README.md for clarity and consistency
- Standardized formatting and capitalization in CONTRIBUTING.md for improved readability. - Enhanced instructions in README.md, including clearer setup and running commands, and added details about importing time tracking data. - Updated version number in uv.lock to 2.0.0a1.
1 parent cbd4748 commit eaa319a

3 files changed

Lines changed: 71 additions & 84 deletions

File tree

CONTRIBUTING.md

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@ If you are reporting a bug, please include:
2020

2121
## Fix Bugs
2222

23-
Look through the GitHub issues for bugs. Anything tagged with \"bug\"
24-
and \"help wanted\" is open to whoever wants to implement it.
23+
Look through the GitHub issues for bugs. Anything tagged with "bug"
24+
and "help wanted" is open to whoever wants to implement it.
2525

2626
## Implement Features
2727

2828
Look through the GitHub issues for features. Anything tagged with
29-
\"enhancement\" and \"help wanted\" is open to whoever wants to
29+
"enhancement" and "help wanted" is open to whoever wants to
3030
implement it.
3131

3232
## Write Documentation
3333

34-
tuttle could always use more documentation, whether as part of the
35-
official tuttle docs, in docstrings, or even on the web in blog posts,
34+
Tuttle could always use more documentation, whether as part of the
35+
official docs, in docstrings, or even on the web in blog posts,
3636
articles, and such.
3737

3838
## Submit Feedback
@@ -50,41 +50,39 @@ If you are proposing a feature:
5050

5151
# Get Started!
5252

53-
Ready to contribute? Here\'s how to set up [tuttle]{.title-ref} for
53+
Ready to contribute? Here's how to set up Tuttle for
5454
local development.
5555

56-
1. Fork the [tuttle]{.title-ref} repo on GitHub.
56+
1. Fork the repo on GitHub.
5757

5858
2. Clone your fork locally:
5959

60-
``` shell
61-
$ git clone git@github.com:your_name_here/tuttle.git
60+
```shell
61+
git clone git@github.com:your_name_here/tuttle.git
6262
```
6363

64-
3. Install your local copy into a virtualenv. Assuming you have
65-
virtualenvwrapper installed, this is how you set up your fork for
66-
local development:
64+
3. Install dependencies with [uv](https://docs.astral.sh/uv/):
6765

68-
``` shell
69-
$ mkvirtualenv tuttle
70-
$ cd tuttle/
71-
$ python setup.py develop
66+
```shell
67+
cd tuttle/
68+
uv sync
7269
```
7370

7471
4. Create a branch for local development:
7572

76-
``` shell
77-
$ git checkout -b name-of-your-bugfix-or-feature
73+
```shell
74+
git checkout -b name-of-your-bugfix-or-feature
7875
```
7976

8077
Now you can make your changes locally.
8178

8279

8380
**Install the pre-commit hooks before making your first commit to ensure that you match the code style**:
8481

85-
``` shell
86-
$ pre-commit install
82+
```shell
83+
pre-commit install
8784
```
85+
8886
5. If you haven't done so already, install and/or activate
8987
[pyright](https://github.com/microsoft/pyright).
9088
The "basic" level should suffice and help you to avoid type errors.
@@ -98,20 +96,20 @@ local development.
9896
Oftentimes, type errors indicate bad design,
9997
so keep refactoring in mind as a third option.
10098

101-
6. When you\'re done making changes, check that your changes pass
102-
code style checks and the tests:
99+
6. When you're done making changes, check that your changes pass
100+
the tests:
103101
104-
``` shell
105-
$ pytest
102+
```shell
103+
uv run pytest
106104
```
107105
108106
109107
7. Commit your changes and push your branch to GitHub:
110108
111-
``` shell
112-
$ git add .
113-
$ git commit -m "Your detailed description of your changes."
114-
$ git push origin name-of-your-bugfix-or-feature
109+
```shell
110+
git add .
111+
git commit -m "Your detailed description of your changes."
112+
git push origin name-of-your-bugfix-or-feature
115113
```
116114
117115
8. Submit a pull request through the GitHub website.
@@ -122,46 +120,48 @@ Before you submit a pull request, check that it meets these guidelines:
122120
123121
1. The pull request should include tests.
124122
2. If the pull request adds functionality, the docs should be updated.
125-
Put your new functionality into a function with a docstring, and add
126-
the feature to the list in README.rst.
127-
3. The pull request should work for Python 3.8, 3.9, 3.10.
123+
Put your new functionality into a function with a docstring.
124+
3. The pull request should work for Python 3.10, 3.11, 3.12, and 3.13.
128125
129126
# Tips
130127
131128
To run a subset of tests:
132129
133-
``` shell
134-
$ pytest tests.test_tuttle
130+
```shell
131+
uv run pytest tuttle_tests/test_model.py
132+
```
133+
134+
To run a specific test:
135+
136+
```shell
137+
uv run pytest tuttle_tests/test_model.py::TestContract::test_valid_instantiation
135138
```
136139
137140
# Deploying
138141
139-
A reminder for the maintainers on how to deploy. Make sure all your
140-
changes are committed (including an entry in HISTORY.rst). Then run:
142+
Make sure all your changes are committed. Then run:
141143
142-
``` shell
143-
$ bump2version patch # possible: major / minor / patch
144-
$ git push
145-
$ git push --tags
144+
```shell
145+
bump2version patch # possible: major / minor / patch
146+
git push
147+
git push --tags
146148
```
147149
148-
Travis will then deploy to PyPI if tests pass.
149-
150150
151151
## Architecture Notes
152152
153153
**The View**
154154
155-
- builds Ui,
156-
- reacts to data changes (by updating the Ui)
155+
- builds UI,
156+
- reacts to data changes (by updating the UI)
157157
- listens for events and forwards them to the Intent
158158
159159
**The Intent**
160160
161161
- receives events
162162
- if some data is affected by the event, figure out which data source corresponds to that data
163163
- transforms the event data to the data format required by the data source
164-
- transform returned data source data to the data format required by the Ui
164+
- transform returned data source data to the data format required by the UI
165165
- else, no data is affected by the event, handle the event (often using a util class).
166166
- an example of this is sending invoices by mail.
167167
@@ -174,12 +174,12 @@ Travis will then deploy to PyPI if tests pass.
174174
- defines classes that manipulate this source (open, read, write, ....)
175175

176176

177-
As you go outer in layers (the outmost layer is the Ui, the innermost is the data layer), communication can occur down_ward across layers, and horizontally (for lack of a better word) BUT a layer cannot skip the layer directly below it. This is to say:
177+
As you go outer in layers (the outmost layer is the UI, the innermost is the data layer), communication can occur downward across layers, and horizontally, BUT a layer cannot skip the layer directly below it. This is to say:
178178

179-
* Data sources can communicate with each other. Thus `ClientDatasource.delete_client` can call. `ContractDatasource.get_contract ` for example.
179+
* Data sources can communicate with each other. Thus `ClientDatasource.delete_client` can call `ContractDatasource.get_contract` for example.
180180

181-
* Intents can communicate with each other, and with any data source. Thus `ClientIntent` can call `ContractIntent` or `ContractDatasource` for example.
182-
The Ui can communicate with any intent (though often the Ui is tied to only a single intent, and the intent can instead call the 'other' intent). But it cannot communicate with a data source -> this would violate the do not skip layers rule.
183-
An inner layer cannot have a dependency on the layer above it. Thus an intent cannot instantiate a Ui class, and a data source cannot instantiate an Intent class.
181+
* Intents can communicate with each other, and with any data source. Thus `ClientIntent` can call `ContractIntent` or `ContractDatasource` for example.
182+
The UI can communicate with any intent (though often the UI is tied to only a single intent, and the intent can instead call the "other" intent). But it cannot communicate with a data source -- this would violate the do-not-skip-layers rule.
183+
An inner layer cannot have a dependency on the layer above it. Thus an intent cannot instantiate a UI class, and a data source cannot instantiate an Intent class.
184184

185185
![](assets/images/mvi-concept.png)

README.md

Lines changed: 21 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,22 @@ We develop the solution as a desktop application. Sensitive financial data is pr
3838

3939
## Features
4040

41-
4241
### Business Data Management
4342

44-
Manage your business contacts and contract terms for your project - all in one place.
43+
Manage your business contacts, clients and contract terms for your projects - all in one place. Entity list views support sorting by any field.
4544

4645
<img src="assets/images/screenshot-contract.png" width=768 />
4746

4847
### Time Tracking
4948

50-
Track the time you spend on your projects. Import from your cloud calendar or from your favorite time tracking tool.
49+
Track the time you spend on your projects. Import from your cloud calendar (iCloud), from an ICS file, or from a CSV export of your favorite time tracking tool.
5150

5251
<img src="assets/images/screenshot-timetracking.png" width=768 />
5352

5453

5554
### Invoicing
5655

57-
Generate invoices and timesheets automatically from your time tracking data. Export to PDF and send via email.
56+
Generate invoices and timesheets automatically from your time tracking data, or create invoices manually by entering the quantity of hours or days directly. Export to PDF and send via email.
5857

5958
<img src="assets/images/screenshot-invoicing.png" width=768 />
6059

@@ -74,56 +73,44 @@ Track regular expenses, taxes and social security contributions. Estimate them f
7473
Calculate your effective income and see how much you can spend without risking your financial security.
7574

7675

77-
## Test via Python
76+
## Getting Started
7877

79-
### Setup
78+
### Prerequisites
8079

81-
1. Clone or download the current version.
80+
- Python 3.10 or newer
81+
- [uv](https://docs.astral.sh/uv/) (recommended) or pip
8282

83-
2. We recommend installation into a new [virtual environment](https://calmcode.io/virtualenv/intro.html).
83+
### Installation
8484

85-
3. Install the Python module in development mode:
85+
1. Clone the repository:
8686

8787
```shell
88-
pip install -e .
88+
git clone https://github.com/tuttle-dev/tuttle.git
89+
cd tuttle
8990
```
9091

91-
1. To verify, run the unit tests:
92+
2. Install dependencies (this creates a virtual environment automatically):
9293

9394
```shell
94-
$ pytest
95+
uv sync
9596
```
9697

97-
1. Start the app with
98+
### Running the App
9899

99100
```shell
100-
$ python app/app.py
101+
uv run app.py
101102
```
102103

103-
## Test the App Bundle
104-
105-
Download the latest [release](https://github.com/tuttle-dev/tuttle/releases) for your platform.
106-
107-
### macOS
108-
109-
1. Run the .app bundle.
110-
111-
### Linux
112-
113-
1. Run the executable.
104+
### Running the Tests
114105

115-
### Windows
116-
117-
1. Requires [GTK](https://www.gtk.org).
118-
2. Run the .exe file.
119-
120-
121-
## Build
106+
```shell
107+
uv run pytest
108+
```
122109

123-
To build an app bundle, run
110+
To include GUI tests (requires a display):
124111

125112
```shell
126-
python scripts/pack_app.py
113+
uv run pytest -m gui
127114
```
128115

129116

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)