Skip to content
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
34 changes: 34 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
repos:
# Flake8 to check style is OK
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
# yapf to fix many style mistakes
- repo: https://github.com/pre-commit/mirrors-yapf
rev: v0.30.0
hooks:
- id: yapf
name: yapf
language: python
entry: yapf
args: [-i, -vv]
types: [python]
# More built in style checks and fixes
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: check-docstring-first
- id: check-json
- id: check-added-large-files
- id: check-yaml
- id: debug-statements
- id: requirements-txt-fixer
- id: check-merge-conflict
- id: double-quote-string-fixer
- id: end-of-file-fixer
- id: sort-simple-yaml
- repo: meta
hooks:
- id: check-useless-excludes
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,15 @@
## Creating development environment
### Prerequisites
1. Windows or Linux based system - either [WSL on windows](https://docs.microsoft.com/en-us/windows/wsl/install-win10) or full blown linux.
2. [Python](https://www.python.org/downloads/release/python-385/)
2. [Python](https://www.python.org/downloads/release/python-385/)
3. Install python's requirements:
```shell
pip install -r requirements.txt
```
4. Install pre-commit hooks:
```shell
pre-commit install
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment doesn't work on my shell. Maybe it requires some another prerequisite?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it and I think it will work for you (and everyone else too) now :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
^^"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but I change it, ok now it is correct
you need to install the requirements before

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you've changed the requirements.txt and forgot to push it?

Currently I don't have anything in the requirements.txt that installs the pre-commit command, unfortunately :(

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh no, your right, my mistake
I fixed it now

```

### Running on Windows

Expand Down Expand Up @@ -46,4 +54,3 @@ python -m pytest --cov-report term-missing --cov=app tests

## Contributing
View [contributing guidelines](https://github.com/PythonFreeCourse/calendar/blob/master/CONTRIBUTING.md).

23 changes: 20 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
aiofiles==0.6.0
aiofiles==0.6.0
aioredis==1.3.1
aiosmtpd==1.2.2
aiosmtplib==1.1.4
anyio==2.0.2
apipkg==1.5
appdirs==1.4.4
arrow==0.17.0
async-generator==1.10
async-timeout==3.0.1
asyncio==3.4.3
atomicwrites==1.4.0
Expand All @@ -13,18 +16,24 @@ Babel==2.9.0
beautifulsoup4==4.9.3
blinker==1.4
certifi==2020.12.5
cffi==1.14.4
cfgv==3.2.0
chardet==4.0.0
click==7.1.2
colorama==0.4.4
coverage==5.3.1
curio==1.4
dateparser==1.0.0
distlib==0.3.1
dnspython==2.1.0
email-validator==1.1.2
emoji==1.2.0
execnet==1.7.1
Faker==5.6.2
fakeredis==1.4.5
fastapi==0.63.0
fastapi-mail==0.3.3.1
filelock==3.0.12
flake8==3.8.4
frozendict==1.2
h11==0.12.0
Expand All @@ -35,6 +44,7 @@ httpcore==0.12.2
httpx==0.16.1
hyperframe==6.0.0
icalendar==4.0.7
identify==1.5.13
idna==2.10
importlib-metadata==3.3.0
inflect==4.1.0
Expand All @@ -49,14 +59,18 @@ mccabe==0.6.1
mypy==0.790
mypy-extensions==0.4.3
nltk==3.5
nodeenv==1.5.0
outcome==1.1.0
packaging==20.8
Pillow==8.1.0
pluggy==0.13.1
pre-commit==2.10.0
priority==1.3.0
psycopg2==2.8.6
psycopg2-binary==2.8.6
py==1.10.0
pycodestyle==2.6.0
pycparser==2.20
pydantic==1.7.3
pyflakes==2.2.0
pyparsing==2.4.7
Expand Down Expand Up @@ -87,18 +101,21 @@ soupsieve==2.1
SQLAlchemy==1.3.22
starlette==0.13.6
text-unidecode==1.3
textblob==0.15.3
text2emotion==0.0.5
textblob==0.15.3
toml==0.10.2
tqdm==4.56.0
trio==0.18.0
typed-ast==1.4.2
typing-extensions==3.7.4.3
tzlocal==2.1
urllib3==1.26.2
uvicorn==0.13.3
virtualenv==20.4.2
watchgod==0.6
websockets==8.1
win32-setctime==1.0.3
word-forms==2.1.0
wsproto==1.0.0
zipp==3.4.0
yapf==0.30.0
zipp==3.4.0