Skip to content

Commit

Permalink
docs: add project documentation and changelog generation
Browse files Browse the repository at this point in the history
  • Loading branch information
gabor-boros committed Oct 11, 2021
1 parent 466aa6d commit c82e766
Show file tree
Hide file tree
Showing 19 changed files with 726 additions and 34 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/docs.yml
@@ -0,0 +1,20 @@
name: Docs

'on':
push:
branches:
- main
paths:
- www/*
pull_request: { }

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.x
- run: pip install -r www/requirements.txt
- run: cd www && mkdocs gh-deploy --force
61 changes: 61 additions & 0 deletions CHANGELOG.md
@@ -0,0 +1,61 @@
# Changelog

All notable changes to this project will be documented in this file.

## [unreleased]

**Bug Fixes**

- Solve time parsing issue when start or end date is defined (3d9c7be)

**Documentation**

- Add readme file (6784310)
- Add code of conduct (6b29c4f)
- Update go install instructions (a91840f)
- Add project documentation and changelog generation (48b7f98)

**Features**

- Initial worklog implementation (b73017b)
- Add basic client implementation (2501bcc)
- Add basic tempo client implementation (202ac41)
- Add basic clockify client implementation (cb04282)
- Add initial CLI implementation (98a6759)

**Miscellaneous Tasks**

- Add MIT license (3c3b64c)
- Add initial .gitignore (47e5b92)
- Add dependencies (1a24535)
- Add issue templates (99fba16)
- Add virtualenv to gitignore (466aa6d)

**Refactor**

- Rename worklog search and create path (b3d1ede)
- Return a list of entries instead of a pointer to a list of entries (000a6b7)
- Rename every occurance of item to entry (38f37ab)
- Update command headline (e1fa381)
- Replace table printer and refactor utils (67721bf)
- Rename tasks-as-tags to tags-as-tasks and tasks-as-tags-regex to tags-as-tasks-regex (180126b)
- Rename ci.yml to build.yml (4165ea4)
- Rename codeql-analysis.yml to codeql.yml (88edae1)

**Testing**

- Add benchmarks for NewWorklog (87f6767)
- Remove unused mock server opts (9fba963)
- Use UTC for time zone in tests (145031e)

**Build**

- Add initial Makefile (d25eab8)
- Add post build hook to call upx (6391c0f)

**Ci**

- Add CodeQL integration (29d4b74)
- Setup PR builds (210c58f)
- Update cron frequency (05db753)

113 changes: 113 additions & 0 deletions CONTRIBUTING.md
@@ -0,0 +1,113 @@
# Contributing

Contributions are welcome, and they are greatly appreciated! Every little helps, and credit will always be given. You can contribute in many ways.

## Types of Contributions

### Report Bugs

Report bugs at <https://github.com/gabor-boros/minutes/issues>.

If you are reporting a bug, please use the bug report template, and include:

- your operating system name and version
- any details about your local setup that might be helpful in troubleshooting
- detailed steps to reproduce the bug

### Fix Bugs

Look through the GitHub issues for bugs. Anything tagged with "bug" and "help wanted" is open to whoever wants to implement it.

### Implement Features

Look through the GitHub issues for features. Anything tagged with "enhancement" and "help wanted" is open to whoever wants to implement it. In case you added a new source or target, do not forget to add them to the docs as well.

### Write Documentation

Minutes could always use more documentation, whether as part of the docs, in docstrings, or even on the web in blog posts, articles, and such.

### Submit Feedback

The best way to send feedback is to file an [issue](https://github.com/gabor-boros/minutes/issues).

If you are proposing a feature:

- explain in detail how it would work
- keep the scope as narrow as possible, to make it easier to implement
- remember that this is a volunteer-driven project, and that contributions are welcome :)

## Get Started!

Ready to contribute? Here's how to set up `minutes` for local development.

As step 0 make sure you have Go 1.17+ and Python 3 installed.

1. Fork the repository
2. Clone your fork locally

```shell
$ git clone git@github.com:your_name_here/minutes.git
```

3. Install prerequisites

```shell
$ cd minutes
$ make prerequisites
$ make deps
$ python -m virtualenv -p python3 virtualenv
$ pip install -r www/requirements.txt
```

4. Create a branch for local development

```shell
$ git checkout -b github-username/bugfix-or-feature-name
```

5. When you're done making changes, check that your changes are formatted, passing linters, and tests are succeeding

```shell
$ make format
$ make lint
$ make test
```

6. Update documentation and check the results by running `make docs`
7. Commit your changes and push your branch to GitHub

We use [conventional commits](https://www.conventionalcommits.org/en/v1.0.0-beta.2/), and we require every commit to
follow this pattern.

```shell
$ git add .
$ git commit -m "action(scope): summary"
$ git push origin github-username/bugfix-or-feature-name
```

8. Submit a pull request on GitHub

## Pull Request Guidelines

Before you submit a pull request, check that it meets these guidelines:

1. The pull request should include tests
2. Tests should pass for the PR
3. If the pull request adds new functionality, or changes existing one, the docs should be updated

## Releasing

A reminder for the maintainers on how to release.

Before doing anything, ensure you have [git-cliff](https://github.com/orhun/git-cliff) installed, and you already
executed `make prerequisites`.

1. Make sure every required PR is merged
2. Make sure every test is passing both on GitHub and locally
3. Make sure that formatters are not complaining (`make format` returns 0)
4. Make sure that linters are not complaining (`make lint` returns 0)
5. Take a note about the next release version, keeping semantic versioning in mind
6. Update the CHANGELOG.md using `TAG="<new release version>" make changelog`
7. Compare the CHANGELOG.md changes and push to master
8. Cut a new tag for the next release version
9. Run `GITHUB_TOKEN="<TOKEN>" make release` to package the tool and create a GitHub release
8 changes: 7 additions & 1 deletion Makefile
@@ -1,4 +1,4 @@
.PHONY: help prerequisites deps format lint test build clean
.PHONY: help prerequisites deps format lint test build release changelog docs clean
.DEFAULT_GOAL := build

BIN_NAME := minutes
Expand Down Expand Up @@ -34,5 +34,11 @@ build: deps ## Build binary
release: ## Release a new version on GitHub
goreleaser release --rm-dist --auto-snapshot

changelog: ## Generate changelog
git-cliff --unreleased --prepend CHANGELOG.md

docs: ## Serve the documentation site locally
@cd www && mkdocs serve

clean: ## Clean up project root
rm -rf bin/
58 changes: 29 additions & 29 deletions README.md
Expand Up @@ -11,7 +11,7 @@
<p align="center">
Sync worklogs between multiple time trackers, invoicing, and bookkeeping software.
<br />
<a href="https://github.com/minutes/tree/master/docs/README.md"><strong>Explore the docs</strong></a>
<a href="https://gabor-boros.github.io/minutes"><strong>Explore the docs</strong></a>
<br />
<br />
<a href="https://github.com/gabor-boros/minutes/issues">Bug report</a>
Expand All @@ -21,6 +21,7 @@
</div>

<!-- ABOUT THE PROJECT -->

## About The Project

```plaintext
Expand All @@ -42,7 +43,7 @@ You have 5 complete and 0 incomplete items. Before proceeding, please double-che
Continue? [y/n]:
```

Minutes is a CLI tool for synchronizing work logs between multiple time trackers, invoicing, and bookkeeping software to make entrepreneurs' daily work easier. Every source and destination comes with their specific flags. Before using any flags, check the related documentation.
Minutes is a CLI tool for synchronizing work logs between multiple time trackers, invoicing, and bookkeeping software to make entrepreneurs' daily work easier. Every source and destination comes with their specific flags. Before using any flags, check the related documentation.

Minutes come with absolutely **NO WARRANTY**; before and after synchronizing any logs, please ensure you got the expected result.

Expand All @@ -58,7 +59,7 @@ To install `minutes`, use one of the [release artifacts](https://github.com/gabo

`minutes` has numerous flags and there will be more when other sources or targets are added. Therefore, `minutes` comes with a config file, that can be placed to the user's home directory or the config directory.

_To read more about the config file, please refer to the [Documentation](https://github.com/minutes/tree/master/docs/README.md)_
_To read more about the config file, please refer to the [Documentation](https://gabor-boros.github.io/minutes/getting-started)_

## Usage

Expand Down Expand Up @@ -86,17 +87,15 @@ Flags:
--table-sort-by strings sort table by column [task summary project client start end billable unbillable] (default [start,project,task,summary])
-t, --target string set the target of the sync [tempo]
--target-user string set the source user ID
--tasks-as-tags treat tags matching the value of tasks-as-tags-regex as tasks
--tasks-as-tags-regex string regex of the task pattern
--tags-as-tasks treat tags matching the value of tags-as-tasks-regex as tasks
--tags-as-tasks-regex string regex of the task pattern
--tempo-password string set the login password
--tempo-url string set the base URL
--tempo-username string set the login user ID
--verbose print verbose messages
--version show command version
```



### Usage examples

Depending on the config file, the number of flags can change.
Expand Down Expand Up @@ -124,7 +123,7 @@ $ minutes --date-format "2006-01-02" --start "2021-10-07" --end "2021-10-08"

```shell
# Specify how a tag should look like to be considered as a task
$ minutes --tasks-as-tags --tasks-as-tags-regex '[A-Z]{2,7}-\d{1,6}'
$ minutes --tags-as-tasks --tags-as-tasks-regex '[A-Z]{2,7}-\d{1,6}'
```

#### Minute based rounding
Expand Down Expand Up @@ -155,8 +154,8 @@ tempo-username = "<jira username>"
tempo-password = "<jira password>"

# General config
tasks-as-tags = true
tasks-as-tags-regex = '[A-Z]{2,7}-\d{1,6}'
tags-as-tasks = true
tags-as-tasks-regex = '[A-Z]{2,7}-\d{1,6}'
round-to-closest-minute = true
force-billed-duration = true

Expand All @@ -176,37 +175,37 @@ summary = 40
project = 10
client = 10

# Column Config
# Column Config
[table-column-config.summary]
widthmax = 40
widthmax = 40
```

## Supported tools

| Tool | Use as source | Use as target |
| ----------- | ----------------- | ------------- |
| Clockify | **yes** | upon request |
| Everhour | upon request | upon request |
| FreshBooks | upon request | **planned** |
| Harvest | upon request | upon request |
| QuickBooks | upon request | upon request |
| Tempo | **yes** | **yes** |
| Time Doctor | upon request | upon request |
| TimeCamp | upon request | upon request |
| Timewarrior | upon request | upon request |
| Toggl Track | **planned** | upon request |
| Zoho Books | upon request | **planned** |
| Tool | Use as source | Use as target |
| ----------- | ------------- | ------------- |
| Clockify | **yes** | upon request |
| Everhour | upon request | upon request |
| FreshBooks | upon request | **planned** |
| Harvest | upon request | upon request |
| QuickBooks | upon request | upon request |
| Tempo | **yes** | **yes** |
| Time Doctor | upon request | upon request |
| TimeCamp | upon request | upon request |
| Timewarrior | upon request | upon request |
| Toggl Track | **planned** | upon request |
| Zoho Books | upon request | **planned** |

See the [open issues](https://github.com/gabor-boros/minutes/issues) for a full list of proposed features, tools and known issues.

## Unsupported features

The following list of features are not supported at the moment:

* Cost rate sync
* Hourly rate sync
* Estimate sync
* Multiple source and target user support
- Cost rate sync
- Hourly rate sync
- Estimate sync
- Multiple source and target user support

## Contributing

Expand All @@ -222,6 +221,7 @@ Don't forget to give the project a star!
5. Open a Pull Request

<!-- MARKDOWN LINKS & IMAGES -->

[contributors-shield]: https://img.shields.io/github/contributors/gabor-boros/minutes.svg?style=for-the-badge
[contributors-url]: https://github.com/gabor-boros/minutes/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/gabor-boros/minutes.svg?style=for-the-badge
Expand Down

0 comments on commit c82e766

Please sign in to comment.