Skip to content

Commit

Permalink
chore: remove changes done to play with pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobCoffee committed Jul 20, 2023
1 parent 59a49aa commit b287fe8
Show file tree
Hide file tree
Showing 74 changed files with 64 additions and 1,309 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
###################################################################################
# These are environment variables that are used by the application. They are #
# loaded into the environment by the ``.env`` file in the root of the project. #
# They override the defaults in niapi/lib/settings.py if they are set. #
# They override the defaults in app/lib/settings.py if they are set. #
# #
# Please note that you must: #
# - Restart the application for changes to take effect #
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
pytest
- name: Test with coverage
if: inputs.coverage
run: poetry run pytest tests --cov=niapi --cov-report=xml
run: poetry run pytest tests --cov=app --cov-report=xml
- uses: actions/upload-artifact@v3
if: inputs.coverage
with:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,6 @@ cython_debug/
/docs/_build/
coverage.*
setup.py
!/niapi/lib/
!/app/lib/
!/tests/**/lib/
!/docs/**/lib/
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ test: ## Run the tests
$(POETRY_RUN_BIN) pytest tests

coverage: ## Run the tests and generate coverage report
$(POETRY_RUN_BIN) pytest tests --cov=niapi
$(POETRY_RUN_BIN) pytest tests --cov=app
$(POETRY_RUN_BIN) coverage html
$(POETRY_RUN_BIN) coverage xml

Expand All @@ -89,7 +89,7 @@ docs-clean: ## Dump the existing built docs
rm -rf docs/_build

docs-serve: docs-clean ## Serve the docs locally
$(POETRY_RUN_BIN) $(SPHINXAUTOBUILD) docs docs/_build/ -j auto --watch niapi --watch docs --watch tests --watch CONTRIBUTING.rst --port 8002
$(POETRY_RUN_BIN) $(SPHINXAUTOBUILD) docs docs/_build/ -j auto --watch app --watch docs --watch tests --watch CONTRIBUTING.rst --port 8002

docs: docs-clean ## Dump the existing built docs and rebuild them
$(POETRY_RUN_BIN) $(SPHINXBUILD) docs docs/_build/ -E -a -j auto --keep-going
Expand Down Expand Up @@ -142,11 +142,11 @@ production: ## Install the project in production mode.
if [ "$(VENV_EXISTS)" ]; then $(MAKE) destroy; fi
if [ "$(USING_POETRY)" ]; then $(POETRY) config virtualenvs.in-project true && $(POETRY) config virtualenvs.options.always-copy true && python3 -m venv --copies .venv && source .venv/bin/activate && .venv/bin/pip install -U wheel setuptools cython pip && $(POETRY) install --only main && $(POETRY) install --only docs; fi
if [ "$(VENV_EXISTS)" ]; then cp /data/packages/tailwind/tailwindcss-3.3.1-linux-x64 .venv/bin/tailwindcss; fi
if [ "$(VENV_EXISTS)" ]; then .venv/bin/tailwindcss -i niapi/domain/web/resources/input.css -o niapi/domain/web/resources/style.css; fi
if [ "$(VENV_EXISTS)" ]; then .venv/bin/tailwindcss -i app/domain/web/resources/input.css -o app/domain/web/resources/style.css; fi
@echo "=> Install complete! Note: If you want to re-install re-run 'make production'"

run-dev-server: ## Run the app in dev mode
$(POETRY_RUN_BIN) app run server --http-workers 1 --reload

run-dev-frontend: ## Run the app frontend in dev mode
$(POETRY_RUN_BIN) tailwindcss -i niapi/domain/web/resources/input.css -o niapi/domain/web/resources/style.css --watch
$(POETRY_RUN_BIN) tailwindcss -i app/domain/web/resources/input.css -o app/domain/web/resources/style.css --watch
4 changes: 2 additions & 2 deletions niapi/__init__.py → app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from rich import get_console
from rich.traceback import install as rich_tracebacks

from niapi import asgi, cli
from niapi.metadata import __version__
from app import asgi, cli
from app.metadata import __version__

__all__ = (
"__version__",
Expand Down
4 changes: 2 additions & 2 deletions niapi/asgi.py → app/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ def create_app() -> Litestar:
from litestar import Litestar
from pydantic import SecretStr

from niapi import domain
from niapi.lib import (
from app import domain
from app.lib import (
cors,
exceptions,
log,
Expand Down
2 changes: 1 addition & 1 deletion niapi/cli.py → app/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import click
from rich import get_console

from niapi.lib import log, settings
from app.lib import log, settings

__all__ = [
"run_all_app",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from litestar.response import Template
from litestar.status_codes import HTTP_200_OK

from niapi.domain import urls
from app.domain import urls

__all__ = ["WebController"]

Expand Down
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/api/asgi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ asgi

Entry point for ASGI-compatible application.

.. automodule:: niapi.asgi
.. automodule:: app.asgi
:members:
4 changes: 2 additions & 2 deletions docs/api/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ Command line interface for the application.
CLI Usage
---------

.. click:: niapi.cli:run_all_app
.. click:: app.cli:run_all_app
:prog: run_all_app
:nested: full

.. click:: niapi.cli:run_app
.. click:: app.cli:run_app
:prog: app
:nested: full
2 changes: 1 addition & 1 deletion docs/api/domain/calculator/controllers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ controllers

Controllers for the application calculator.

.. automodule:: niapi.domain.calculator.controllers
.. automodule:: app.domain.calculator.controllers
:members:
2 changes: 1 addition & 1 deletion docs/api/domain/calculator/schema.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ schema

Schema for the application calculator.

.. automodule:: niapi.domain.calculator.schema
.. automodule:: app.domain.calculator.schema
:members:
2 changes: 1 addition & 1 deletion docs/api/domain/init.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ Domain Initializer

Initializes the domain module.

.. automodule:: niapi.domain.__init__
.. automodule:: app.domain.__init__
:members:
2 changes: 1 addition & 1 deletion docs/api/domain/system/controllers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ controllers

Controllers for the application system.

.. automodule:: niapi.domain.system.controllers
.. automodule:: app.domain.system.controllers
:members:
2 changes: 1 addition & 1 deletion docs/api/domain/urls.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ urls

URL patterns for the NIAPI app.

.. automodule:: niapi.domain.urls
.. automodule:: app.domain.urls
:members:
2 changes: 1 addition & 1 deletion docs/api/domain/web/controllers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ controllers

Controllers for the application web interface.

.. automodule:: niapi.domain.web.controllers.web
.. automodule:: app.domain.web.controllers.web
:members:
2 changes: 1 addition & 1 deletion docs/api/lib/cors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ cors

CORS config

.. automodule:: niapi.lib.cors
.. automodule:: app.lib.cors
:members:
2 changes: 1 addition & 1 deletion docs/api/lib/exceptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ exceptions

Application exceptions

.. automodule:: niapi.lib.exceptions
.. automodule:: app.lib.exceptions
:members:
2 changes: 1 addition & 1 deletion docs/api/lib/log/controller.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ controller

Log config for the controllers

.. automodule:: niapi.lib.log.controller
.. automodule:: app.lib.log.controller
:members:
:noindex:
2 changes: 1 addition & 1 deletion docs/api/lib/log/init.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ init

Log initialization

.. automodule:: niapi.lib.log.__init__
.. automodule:: app.lib.log.__init__
:members:
:noindex:
2 changes: 1 addition & 1 deletion docs/api/lib/log/utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ utils

Log utils

.. automodule:: niapi.lib.log.utils
.. automodule:: app.lib.log.utils
:members:
:noindex:
2 changes: 1 addition & 1 deletion docs/api/lib/openapi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ openapi

OpenAPI config

.. automodule:: niapi.lib.openapi
.. automodule:: app.lib.openapi
:members:
2 changes: 1 addition & 1 deletion docs/api/lib/schema.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ schema
Schema for the API and application.


.. automodule:: niapi.lib.schema
.. automodule:: app.lib.schema
:members:
:noindex:
2 changes: 1 addition & 1 deletion docs/api/lib/serialization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ serialization

Application serialization utilities.

.. automodule:: niapi.lib.serialization
.. automodule:: app.lib.serialization
:members:
2 changes: 1 addition & 1 deletion docs/api/lib/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ settings

Application settings

.. automodule:: niapi.lib.settings
.. automodule:: app.lib.settings
:members:
2 changes: 1 addition & 1 deletion docs/api/lib/static_files.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ static files

Static file config

.. automodule:: niapi.lib.static_files
.. automodule:: app.lib.static_files
:members:
2 changes: 1 addition & 1 deletion docs/api/lib/template.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ template

Template engine config

.. automodule:: niapi.lib.template
.. automodule:: app.lib.template
:members:
2 changes: 1 addition & 1 deletion docs/api/metadata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ metadata

Metadata for the application.

.. automodule:: niapi.metadata
.. automodule:: app.metadata
:members:
2 changes: 1 addition & 1 deletion docs/api/utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ utils

Utilities for the application.

.. automodule:: niapi.utils
.. automodule:: app.utils
:members:
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from dotenv import load_dotenv

from niapi.metadata import __project__ as project
from app.metadata import __project__ as project

# -- Environmental Data ------------------------------------------------------
path = Path("..").resolve()
Expand Down
6 changes: 0 additions & 6 deletions niapi/lib/__init__.py

This file was deleted.

7 changes: 0 additions & 7 deletions niapi/lib/cors.py

This file was deleted.

120 changes: 0 additions & 120 deletions niapi/lib/exceptions.py

This file was deleted.

Loading

0 comments on commit b287fe8

Please sign in to comment.