-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
013d856
commit 8f946f7
Showing
34 changed files
with
179 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Formatting, Linting, Type Checking, Testing | ||
|
||
on: [push] | ||
|
||
jobs: | ||
nox: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Run nox | ||
run: | | ||
pip install nox | ||
nox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from django.contrib import admin | ||
from core.models import News | ||
from django.contrib import admin | ||
|
||
admin.site.register(News) | ||
admin.site.register(News) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [] | ||
|
42 changes: 42 additions & 0 deletions
42
app/core/migrations/0002_alter_news_created_at_alter_news_link_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Generated by Django 4.1.7 on 2023-03-26 21:34 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("core", "0001_initial"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="news", | ||
name="created_at", | ||
field=models.DateTimeField(auto_now_add=True, verbose_name="Parsed/created at"), | ||
), | ||
migrations.AlterField( | ||
model_name="news", | ||
name="link", | ||
field=models.CharField(default="", max_length=2083, verbose_name="Link"), | ||
), | ||
migrations.AlterField( | ||
model_name="news", | ||
name="published", | ||
field=models.DateTimeField(verbose_name="Published at"), | ||
), | ||
migrations.AlterField( | ||
model_name="news", | ||
name="source", | ||
field=models.CharField(blank=True, default="", max_length=30, null=True, verbose_name="Source"), | ||
), | ||
migrations.AlterField( | ||
model_name="news", | ||
name="title", | ||
field=models.CharField(max_length=200, verbose_name="Title"), | ||
), | ||
migrations.AlterField( | ||
model_name="news", | ||
name="updated_at", | ||
field=models.DateTimeField(auto_now=True, verbose_name="Updated at"), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
from django.urls import path | ||
|
||
from core.views import HomePageView | ||
from django.urls import path | ||
|
||
app_name = "core" | ||
|
||
|
File renamed without changes.
File renamed without changes.
Empty file.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[tool.black] | ||
line-length = 120 | ||
double-quote = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[flake8] | ||
count = true | ||
max-line-length = 120 | ||
max-complexity = 30 | ||
exclude = .git, __pycache__, .idea/ | ||
select = F,W,E,C,N,B,A,S,T,H,JS,CCR,SIM,PEA,NU,D200,D201,D202,D209,D210 | ||
ignore = W503,B011,SIM102,SIM106,SIM111,SIM118,I,JS101,JS102,C408,T002,T003,E203,E501 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[settings] | ||
line_length = 120 | ||
profile = black | ||
py_version = 310 | ||
multi_line_output = 3 | ||
include_trailing_comma = true | ||
force_grid_wrap = 0 | ||
use_parentheses = true | ||
ensure_newline_before_comments = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[mypy] | ||
ignore_missing_imports = True | ||
strict_optional = True | ||
warn_unused_ignores = True | ||
disable_error_code = union-attr, import, var-annotated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Exclude a variety of commonly ignored directories and comments. | ||
exclude = [ | ||
".bzr", | ||
".direnv", | ||
".eggs", | ||
".git", | ||
".hg", | ||
".mypy_cache", | ||
".nox", | ||
".pants.d", | ||
".pytype", | ||
".ruff_cache", | ||
".svn", | ||
".tox", | ||
".venv", | ||
"__pypackages__", | ||
"_build", | ||
"buck-out", | ||
"build", | ||
"dist", | ||
"node_modules", | ||
"venv", | ||
] | ||
|
||
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default. | ||
select = ["E", "F"] | ||
|
||
|
||
# Allow autofix for all enabled rules (when `--fix`) is provided. | ||
fixable = ["A", "B", "C", "D", "E", "F"] | ||
unfixable = [] | ||
|
||
per-file-ignores = {} | ||
|
||
# Same as Black. | ||
line-length = 120 | ||
|
||
# Allow unused variables when underscore-prefixed. | ||
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" | ||
|
||
# Assume Python 3.10. | ||
target-version = "py311" |
43 changes: 0 additions & 43 deletions
43
core/migrations/0002_alter_news_created_at_alter_news_link_and_more.py
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import nox | ||
from dotenv import load_dotenv | ||
|
||
|
||
@nox.session | ||
def format(session: nox.Session) -> None: | ||
session.install("ufmt", "black", "isort") | ||
session.run("ufmt", "format", "app") | ||
session.run("black", "--config=configs/.black.toml", "app") | ||
session.run( | ||
"isort", | ||
"--sp=configs/.isort.cfg", | ||
"app", | ||
) | ||
|
||
|
||
@nox.session | ||
def lint(session: nox.Session) -> None: | ||
session.install("ruff", "flake8", "mypy") | ||
session.run( | ||
"ruff", | ||
"check", | ||
"--config=configs/.ruff.toml", | ||
"--fix", | ||
"app", | ||
) | ||
session.run("flake8", "--config=configs/.flake8", "app") | ||
session.run( | ||
"mypy", | ||
"--config-file=configs/.mypy.ini", | ||
"app" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ beautifulsoup4 | |
Django | ||
django_environ | ||
gunicorn | ||
requests | ||
celery | ||
requests | ||
psycopg2-binary |