chore(): Cleans up the docs a bit

This commit is contained in:
Elia el Lazkani 2024-12-25 21:27:55 +01:00
parent 0238e4b67b
commit 188ac78b1f
9 changed files with 8 additions and 32 deletions

10
TODO
View file

@ -1,10 +0,0 @@
This list is incomplete, these are a few of the things that need to be done.
TODO:
* Documentation/Code comments
* Proper type-setting across the board
* PEP8
* Refactor code
* Dockerize
* favicon.ico is being injected into the database (need fix)
* Fix YAML warning on startup.

View file

@ -5,7 +5,7 @@
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = docs
SOURCEDIR =
BUILDDIR = build
# Put it first so that "make" without argument is like "make help".

View file

@ -1,5 +0,0 @@
Data
====
.. automodule:: shortenit.data
:members:

View file

@ -1,5 +0,0 @@
DB
===
.. automodule:: shortenit.db
:members:

View file

@ -1,5 +0,0 @@
Exceptions
==========
.. automodule:: shortenit.exceptions
:members:

View file

@ -12,14 +12,11 @@ Shortenit Documentation
.. toctree::
:maxdepth: 1
:maxdepth: 2
:caption: Contents:
common
config
data
db
exceptions
logger
main
pointer

View file

@ -1,5 +1,5 @@
Shortener
=========
.. automodule:: shortenit.shortener
.. automodule:: shortenit.models.shortener
:members:

View file

@ -31,7 +31,10 @@ def main() -> typing.NoReturn:
debug = True if args.verbose > 0 else False
verbosity_level = verbosity(args.verbose)
setup_logging(args.logger, verbosity_level)
config = Config(CONFIGURATION).get_config()
if args.config:
config = Config(args.config).get_config()
else:
config = Config(CONFIGURATION).get_config()
db_config = config.get("Database", None)
server_config = config.get("Server", None)
if db_config:
@ -96,6 +99,7 @@ def argument_parse() -> argparse.ArgumentParser:
parser.add_argument(
"-l", "--logger", type=str, help="The logger YAML configuration file."
)
parser.add_argument("-c", "--config", type=str, help="The shortenit configuration file.")
return parser