Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding pre-commit to git-hook #5

Merged
merged 3 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
language: system
types: [python]
# args:
# [
# "-rn", # Only display messages
# "-sn", # Don't display the score
# ]
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ Please, follow this instructions once, before starting:
- Visit the page: `https://your.misskey.instance/settings/api`
- Create a new API-key having at minimum `notes:write` privilege.

### Prepare a Python virtual environment
### Prepare a Python virtual environment

Please use python3. In latest GNU/Linux distros, it's already in as default. Otherwise you'll need `python3-venv` package with dependencies.
Please use python3. In latest GNU/Linux distros, it's already in as default. Otherwise you'll need `python3-venv` package with dependencies.

1. `git clone` this repository, to get the source code, or download the zip file
2. `python -m venv .venv` Python sandboxed enviroment creation
Expand All @@ -38,7 +38,7 @@ Now you installed the software, you need a small amount of configuration.

### Fill the bot with RSS feed

First of all, put the RSS Feed source URLS into the file `sources.txt`, line by line.
First of all, put the RSS Feed source URLS into the file `sources.txt`, line by line.

### Environment variables

Expand All @@ -65,7 +65,7 @@ You probably want to run it detached from the console by using `nohup` or runnin

The software has ability to avoid multiple concurrent runs.

## Stop!
## Stop!

To stop it, just press `CTRL+C` in the console.

Expand All @@ -74,3 +74,11 @@ To exit the Python environment type: `deactivate`. You're aware of activation be
## Upgrade

It's super easy, just Stop! Then `git pull` to check for updates. Then `pip-review -a` to update the libraries. Needs a restart to get things done.

## Development

If you plan to contribute, please run this command, after installation noted before.

```bash
pre-commmit install
```
4 changes: 3 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ Misskey.py
python-dotenv
schedule
asent
pip-review
pip-review
pylint
pre-commit