prepare for v3.0.0

- update documentation
- bump version
This commit is contained in:
Hugh Rundle 2020-09-06 18:08:14 +10:00
parent d7a7292a2c
commit f25cc49ce1
6 changed files with 32 additions and 12 deletions

View File

@ -1,9 +1,21 @@
Descriptive title for this pull request e.g. 'Add --cool_feature flag`
## Styles and docs
- [ ] I have read the [contributing guide](https://github.com/hughrun/ephemetoot/blob/master/docs/contributing.md)
- [ ] I have run `black` on my code
- [ ] My tests are listed in alphabetical order
## Tests
- [ ] I have added tests for this code in `tests/test_ephemetoot.py`
- [ ] I would like assistance to write the required tests
- [ ] I don't know how to write test and would like someone to write them for me
# What this PR does
Changes in this pull request
-
-
-
# Related issues
Resolves #
Fixes #

View File

@ -3,17 +3,13 @@
**ephemetoot** is a Python command line tool for deleting old toots.
**NOTE:** to install ephemetoot from pypi currently you must pin the beta version:
```
pip install ephemetoot==3.0.0-beta.0
```
## Documentation
* [Installation](./docs/install.md)
* [Options](./docs/options.md)
* [Upgrading and uninstalling](./docs/upgrade.md)
You can also read the docs at [ephemetoot.hugh.run](https://ephemetoot.hugh.run)
## Prior work
The initial `ephemetoot` script was based on [this tweet-deleting script](https://gist.github.com/flesueur/bcb2d9185b64c5191915d860ad19f23f) by [@flesueur](https://github.com/flesueur)

View File

@ -7,7 +7,7 @@ You can contribute in many ways - improving the documentation, reporting bugs, s
# Expectations
## Adhere to the Code of Conduct 🤗
All contributors must adhere to the [Code of Conduct](https://github.com/hughrun/ephemetoot/blob/poetry/CODE_OF_CONDUCT.md) for this project. If you do not wish to follow this Code of Conduct, feel free to direct your energies towards a different project.
All contributors must adhere to the [Code of Conduct](https://github.com/hughrun/ephemetoot/blob/master/CODE_OF_CONDUCT.md) for this project. If you do not wish to follow this Code of Conduct, feel free to direct your energies towards a different project.
## Do not log security problems as public issues
If you have identified a security flaw in **ephemetoot**, please email `ephemetoot@hugh.run` to discuss this confidentially.
@ -35,6 +35,10 @@ Each issue should refer to a single bug or enhancement. Don't include multiple s
- "handle IndexError when there are no toots in the timeline" ([bugfix](https://github.com/hughrun/ephemetoot/commit/92643271d53e00089a10bacd1795cfd50e030413))
- "add support for archiving toots into JSON files" ([new feature](https://github.com/hughrun/ephemetoot/commit/c0d680258ff0fe141fbabcf14a60eee8994e8d18))
## Pull requests should include tests (if you can) ⛳️
We aim to have as close to full test coverage as possible: if you know how to write tests, please include them with your Pull Requests. Tests are run with `pytest`, which has [pretty good documentation](https://docs.pytest.org/en/latest/), so if you're new to `pytest` or new to testing, take a look at the docs. If you want to contribute a new fix or feature, but don't know how to rwite a test, you can also request assistance from a maintainer.
## Closing issues in pull requests 🏁
When your pull request resolves an issue, you can optionally use [one of the magic words](https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) to automatically close the issue. An example of a longer commit messages that does this is [`Add --version flag`](https://github.com/hughrun/ephemetoot/commit/a1db933bbd6c03e633975463801e6c94f7b9e9fa). The pull request template includes wording for this so you just need to add the issue number.
@ -50,6 +54,10 @@ For example, we use a configuration file boolean value for `keep_pinned` because
There are some exceptions to this general rule (`--test` prevents any real actions, for example), but the exceptions should be rare and reasonably obvious.
## Prefer top-level functions ⬆️
Putting functions inside other functions can make the codebase confusing to understand. Wherever possible, prefer to define standalone functions and then call them from wherever they need to be used. This keeps our code [DRY](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself) and makes it easier to test.
# Your first contribution
First time contributors are warmly encouraged! If you have never contributed to a project on GitHub or another public code repository, the **ephemetoot** maintainers can help you through the process.

View File

@ -10,7 +10,7 @@ To upgrade from an earlier version to Version 3.x you will need to remove your e
2. run `pip3 uninstall ephemetoot`
3. run `pip3 install ephemetoot`
4. check your config file is in the current directory
5. check everythign is working with `ephemetoot --test` or `ephemetoot --version`
5. check everything is working with `ephemetoot --test` or `ephemetoot --version`
### Upgrading with pypi
To upgrade to a new version, the easiest way is to use pip to download the latest version from pypi (remembering that for your machine you may need to substitute `pip` for `pip3`):

View File

@ -1,6 +1,6 @@
[tool.poetry]
name = "ephemetoot"
version = "3.0.0-beta.0"
version = "3.0.0"
description = "A command line tool to delete your old toots"
authors = ["Hugh Rundle <ephemetoot@hugh.run>"]
license = "GPL-3.0-or-later"

View File

@ -197,6 +197,10 @@ def mock_github_response(monkeypatch):
# TESTS #
########################
# Tests should be listed in alphabetical order
# Remember that a previous test may have mutated
# one of the values above: set all values you are using
def test_archive_toot(tmpdir):
p = tmpdir.mkdir("archive")
config_file['archive'] = str(p) # make archive directory a temp test dir