Renamed project

This commit is contained in:
Kristofers Solo 2023-03-27 08:46:51 +03:00
parent 2a25d389a6
commit d6446c7f8a
18 changed files with 68 additions and 19 deletions

23
.github/workflows/test.yml vendored Normal file
View File

@ -0,0 +1,23 @@
name: Test
on:
- push
- pull_request
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.10"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install django
- name: Lint with tox
run: python manage.py test

View File

View File

@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.

View File

@ -0,0 +1,6 @@
from django.apps import AppConfig
class FossdbConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'fossdb'

View File

@ -0,0 +1,3 @@
from django.db import models
# Create your models here.

View File

@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

View File

@ -0,0 +1,3 @@
from django.shortcuts import render
# Create your views here.

View File

@ -1,5 +1,5 @@
"""
ASGI config for OSSDB_web project.
ASGI config for FOSSDB_web project.
It exposes the ASGI callable as a module-level variable named ``application``.
@ -11,6 +11,6 @@ import os
from django.core.asgi import get_asgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "OSSDB_web.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "FOSSDB_web.settings")
application = get_asgi_application()

View File

@ -1,5 +1,5 @@
"""
Django settings for OSSDB_web project.
Django settings for FOSSDB_web project.
Generated by "django-admin startproject" using Django 4.0.5.
@ -16,7 +16,7 @@ from pathlib import Path
# Build paths inside the project like this: BASE_DIR / "subdir".
BASE_PATH = Path(__file__).resolve().parent.parent
sys.path.insert(0, str(BASE_PATH.joinpath("OSSDB_web", "apps")))
sys.path.insert(0, str(BASE_PATH.joinpath("FOSSDB_web", "apps")))
# SECURITY WARNING: don't run with debug turned on in production!
@ -55,7 +55,7 @@ MIDDLEWARE = [
"django.middleware.clickjacking.XFrameOptionsMiddleware",
]
ROOT_URLCONF = "OSSDB_web.urls"
ROOT_URLCONF = "FOSSDB_web.urls"
TEMPLATES = [
{
@ -73,7 +73,7 @@ TEMPLATES = [
},
]
WSGI_APPLICATION = "OSSDB_web.wsgi.application"
WSGI_APPLICATION = "FOSSDB_web.wsgi.application"
# Database

View File

@ -1,5 +1,5 @@
"""
WSGI config for OSSDB_web project.
WSGI config for FOSSDB_web project.
It exposes the WSGI callable as a module-level variable named ``application``.
@ -11,6 +11,6 @@ import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "OSSDB_web.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "FOSSDB_web.settings")
application = get_wsgi_application()

View File

@ -6,7 +6,7 @@ import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'OSSDB_web.settings')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "FOSSDB_web.settings")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
@ -18,5 +18,5 @@ def main():
execute_from_command_line(sys.argv)
if __name__ == '__main__':
if __name__ == "__main__":
main()

View File

@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
check_untyped_defs = true
disallow_any_generics = true
ignore_missing_imports = true
mypy_path = "OSSDB_web"
mypy_path = "FOSSDB_web"
no_implicit_optional = true
no_implicit_reexport = true
show_error_codes = true

View File

@ -1,2 +1,3 @@
Django==4.1
fontawesomefree==6.2.1
mysqlclient==2.1.1

View File

@ -1,5 +1,5 @@
[metadata]
name = OSSDB-Web
name = FOSSDB-Web
description = Open-Source Software Database Website
author = Kristofers Solo
license = GPL3
@ -9,10 +9,11 @@ classifiers =
Programming Language :: Python :: 3.10
[options]
packages = OSSDB_web
packages = FOSSDB_web
install_requires =
Django>=4.1
fontawesomefree>=6.2.1
mysqlclient>=2.1.1
python_requires = >=3.10
package_dir = =.

18
tox.ini
View File

@ -7,19 +7,25 @@ isolated_build = true
python =
3.10: py310, mypy, flake8
; [testenv]
; setenv =
; PYTHONPATH = {toxinidir}
; deps =
; -r{toxinidir}/requirements_dev.txt
[testenv]
setenv =
PYTHONPATH = {toxinidir}
deps =
-r{toxinidir}/requirements_dev.txt
basepython = python3.10
deps = django
commands = python manage.py test
[testenv:flake8]
basepython = python3.10
deps = flake8
commands = flake8 OSSDB_web
commands = flake8 FOSSDB_web
[testenv:mypy]
basepython = python3.10
deps =
-r{toxinidir}/requirements_dev.txt
commands = mypy OSSDB_web
commands = mypy FOSSDB_web