diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml deleted file mode 100644 index 67eab45..0000000 --- a/.github/workflows/python-app.yml +++ /dev/null @@ -1,40 +0,0 @@ -# This workflow will install Python dependencies, run tests and lint with a single version of Python -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: Python application - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -permissions: - contents: read - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.10 - uses: actions/setup-python@v3 - with: - python-version: "3.10" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - # flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=150 --statistics - flake8 --max-line-length=150 --ignore=E266 *.py project/*.py project/*/routes.py - - name: Test with pytest - run: | - pytest diff --git a/.gitignore b/.gitignore index f7332d1..0b15172 100644 --- a/.gitignore +++ b/.gitignore @@ -3,28 +3,160 @@ __pycache__/ *.py[cod] *$py.class -# Mac custom attributes file (Desktop Service Store) -.DS_Store +# C extensions +*.so -# PyCharm files -.idea/ +# Distribution / packaging +.Python +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST -# Instance Folder - used for run-time files -instance/*.cfg -instance/*.db -instance/*.log -instance/*.log* +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec -# Log Files -instance/logs/ -*.log +# Installer logs +pip-log.txt +pip-delete-this-directory.txt -# Coverage output -.coverage +# Unit test / coverage reports htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ -# Virtual Environment -/venv/ +# Translations +*.mo +*.pot -# pytest files -.pytest_cache/ +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/latest/usage/project/#working-with-version-control +.pdm.toml +.pdm-python +.pdm-build/ + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ +.idea + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ diff --git a/app.py b/app.py index 6318656..6c26a88 100644 --- a/app.py +++ b/app.py @@ -1,18 +1,17 @@ from flask_frozen import Freezer from project import create_app -from flask_fontawesome import FontAwesome +from flask_font_awesome import FontAwesome + # Call the application factory function to construct a Flask application # instance using the development configuration app = create_app() -fa = FontAwesome(app) +font_awesome = FontAwesome(app) # Create an instance of Freezer for generating the static files from -# the Flask application routes ('/', '/data_analysis', etc.) +# the Flask application routes ('/', '/breakfast', etc.) freezer = Freezer(app) - if __name__ == "__main__": - # Run the development server that generates the static files - # using Frozen-Flask - freezer.run(debug=True) + # Generate the static files using Frozen-Flask + freezer.freeze() diff --git a/build.py b/build.py index 45952a3..f8e1550 100644 --- a/build.py +++ b/build.py @@ -1,17 +1,17 @@ from flask_frozen import Freezer from project import create_app -from flask_fontawesome import FontAwesome +from flask_font_awesome import FontAwesome # Call the application factory function to construct a Flask application # instance using the development configuration app = create_app() -fa = FontAwesome(app) +font_awesome = FontAwesome(app) # Create an instance of Freezer for generating the static files from # the Flask application routes ('/', '/breakfast', etc.) freezer = Freezer(app) -if __name__ == "__main__": +if __name__ == '__main__': # Generate the static files using Frozen-Flask freezer.freeze() diff --git a/netlify.toml b/netlify.toml index 98f86f6..59b3b28 100644 --- a/netlify.toml +++ b/netlify.toml @@ -7,3 +7,8 @@ X-Content-Type-Options = "nosniff" Referrer-Policy = "no-referrer" Permissions-Policy = "geolocation=(); midi=(); notifications=(); push=(); sync-xhr=(); accelerometer=(); gyroscope=(); magnetometer=(); payment=(); camera=(); microphone=(); usb=(); xr=(); speaker=(self); vibrate=(); fullscreen=(self)" + +[[redirects]] +from = "/*" +to = "/404/index.html" +status = 404 diff --git a/project/build/404/index.html b/project/build/404/index.html new file mode 100644 index 0000000..712f54c --- /dev/null +++ b/project/build/404/index.html @@ -0,0 +1,72 @@ + + + + + + + Unseen University + + + + + + + + + + + + + + + + + + + + + + + +
+

Ty Myrddin Home

+ +
+ +
+ + +

Uh,oh, 404, not found

+
+ + Wyrd sisters + +


+ Here, for whatever reason, is the world.
+ And it revolves around a small unregarded yellow sun at
+ nine hundred miles an hour (nineteen miles a second),
+ far out in the uncharted backwaters of the unfashionable end of
+ the western spiral arm of a Galaxy.
+ A Galaxy containing a hundred billion stars, a hundred thousand
+ light years side to side, bulging in the middle.
+ Out by us, it is only three thousand light years wide. That planet.
+ With you and me on it, for now.

+
+ +
+ + + + \ No newline at end of file diff --git a/project/build/about/index.html b/project/build/about/index.html index b7e7c0b..0c8cc43 100644 --- a/project/build/about/index.html +++ b/project/build/about/index.html @@ -19,22 +19,22 @@ + + - -
-

Unseen University

+

Ty Myrddin Home