-
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
ad70bab
commit 87ce6af
Showing
18 changed files
with
150 additions
and
92 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 |
---|---|---|
|
@@ -10,3 +10,8 @@ | |
## Fediverse Following | ||
|
||
## Fediverse Followers | ||
|
||
### Build the package | ||
``` | ||
python3 -m build --wheel | ||
``` |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -3,15 +3,15 @@ requires = ["hatchling"] | |
build-backend = "hatchling.build" | ||
|
||
[tool.hatch.build] | ||
reproducible = false | ||
reproducible = true | ||
|
||
[tool.hatch.build.targets.wheel] | ||
packages = ["webapp/"] | ||
|
||
|
||
[project] | ||
name = "pramari-webapp" | ||
version = "1.1.23" | ||
version = "1.1.24" | ||
authors = [ | ||
{ name="Andreas Neumeier", email="[email protected]" }, | ||
] | ||
|
@@ -44,52 +44,92 @@ classifiers = [ | |
"Homepage" = "https://www.pramari.de" | ||
"Bug Tracker" = "https://github.com/pramari/npc/issues" | ||
|
||
# [tool.pytest.ini_options] | ||
# addopts = "" #--cov --cov-report html --cov-report term-missing --cov-fail-under 95" | ||
|
||
[tool.tox] | ||
min_version = 4.0 | ||
legacy_tox_ini = """ | ||
[tox] | ||
min_version = 4.0 | ||
isolated_build = True | ||
env_list = | ||
py312 | ||
type | ||
[testenv] | ||
setenv = | ||
PYTHONPATH = ".";{toxinidir}:{toxinidir} | ||
DJANGO_SETTINGS_MODULE=tests.settings | ||
PYTHONPATH = ".";{toxinidir}:{toxinidir} | ||
deps = | ||
pytest | ||
# behave | ||
coverage | ||
ruff | ||
commands = | ||
ruff check webapp | ||
coverage run --source webapp tests/manage.py test --settings=tests.settings | ||
coverage xml | ||
# behave | ||
# echo "success" | ||
[testenv:lint] | ||
deps = flake8 | ||
commands = flake8 webapp | ||
[testenv:pep8] | ||
show-source = True | ||
commands = {envbindir}/flake8 --max-line-length=80 --exclude=.tox,docs,sample_app/tests/settings.py,sample_app/__init__.py,sample_app/migrations sample_app | ||
# Flake8 only needed when linting. | ||
# Do not care about other dependencies, it's just for linting. | ||
deps = flake8 | ||
changedir = {toxinidir} | ||
""" | ||
|
||
[tool.pytest.ini_options] | ||
DJANGO_SETTINGS_MODULE = "tests.settings" | ||
|
||
python_files = ["test_*.py"] | ||
|
||
[tool.coverage.run] | ||
source = ["webapp"] | ||
|
||
[tool.ruff] | ||
# Exclude a variety of commonly ignored directories. | ||
exclude = [ | ||
".bzr", | ||
".direnv", | ||
".eggs", | ||
".git", | ||
".git-rewrite", | ||
".hg", | ||
".ipynb_checkpoints", | ||
".mypy_cache", | ||
".nox", | ||
".pants.d", | ||
".pyenv", | ||
".pytest_cache", | ||
".pytype", | ||
".ruff_cache", | ||
".svn", | ||
".tox", | ||
".venv", | ||
".vscode", | ||
"__pypackages__", | ||
"_build", | ||
"buck-out", | ||
"build", | ||
"dist", | ||
"node_modules", | ||
"site-packages", | ||
"venv", | ||
] | ||
|
||
# Same as Black. | ||
line-length = 88 | ||
indent-width = 4 | ||
|
||
[tool.ruff.lint] | ||
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default. | ||
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or | ||
# McCabe complexity (`C901`) by default. | ||
select = ["E4", "E7", "E9", "F"] | ||
ignore = [] | ||
|
||
# Allow fix for all enabled rules (when `--fix`) is provided. | ||
fixable = ["ALL"] | ||
unfixable = [] | ||
|
||
# Allow unused variables when underscore-prefixed. | ||
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" | ||
|
||
[tool.ruff.format] | ||
quote-style = "double" | ||
indent-style = "space" | ||
skip-magic-trailing-comma = false | ||
line-ending = "auto" | ||
docstring-code-format = false | ||
docstring-code-line-length = "dynamic" | ||
|
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from .inbound import follow, accept, undo, create, delete | ||
|
||
__all__ = ["follow", "accept", "undo", "create", "delete"] |
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,3 +1,2 @@ | ||
from django.contrib import admin | ||
|
||
# Register your models here. |
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,3 +1,2 @@ | ||
from django.db import models | ||
|
||
# Create your models here. |
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,3 +1,2 @@ | ||
from django.test import TestCase | ||
|
||
# Create your tests here. |
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,3 +1,2 @@ | ||
from django.shortcuts import render | ||
|
||
# Create your views here. |
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 |
---|---|---|
|
@@ -276,6 +276,7 @@ class ActorAdmin(admin.ModelAdmin): | |
"id", | ||
"type", | ||
"profile", | ||
"remote" | ||
) | ||
inlines = [FollowInline] | ||
|
||
|
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
Oops, something went wrong.