Skip to content
This repository has been archived by the owner on Oct 7, 2022. It is now read-only.

Release V2 #23

Open
wants to merge 54 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
58302ca
chore: move app-related files and source code to "app" dir
upsetbit Apr 22, 2022
89b1390
build(app): remove documentation-related packages (sphinx etc), add p…
upsetbit Apr 22, 2022
7cd033d
chore: remove sphinx-related files
upsetbit Apr 22, 2022
27a9f67
docs: re-write README in markdown
upsetbit Apr 22, 2022
36de83c
build(docs): init poetry project for documentation
upsetbit Apr 22, 2022
dac0596
build(docs): add mkdocs config file
upsetbit Apr 22, 2022
3aee66d
build(docs): add Dockerfile to build and serve the documentation
upsetbit Apr 22, 2022
60600f3
build(app): add targets to init the project, clean files, build the d…
upsetbit Apr 22, 2022
d7bc57e
chore: add pre-commit config
upsetbit Apr 22, 2022
fb1a18b
chore: simplify dockerignore
upsetbit Apr 22, 2022
f153761
chore: update gitignore
upsetbit Apr 22, 2022
5653939
chore: add script to run all tests and the docker entrypoint
upsetbit Apr 22, 2022
bf82f21
fix: move main logic to main function to fix pylint error
upsetbit Apr 22, 2022
6d81f7f
build(app): improvements & fixes
upsetbit Apr 22, 2022
b8fb083
chore: improve pylint config
upsetbit Apr 22, 2022
3dd8abc
build(app): greatly improve the docker build process
upsetbit Apr 22, 2022
ef220ff
build(app): add docker-compose and env file
upsetbit Apr 22, 2022
5ef5638
build(app): makefile additions
upsetbit Apr 22, 2022
ce911d3
ci: add dependabot alerts on the app and the docs
upsetbit Apr 22, 2022
deba3b0
ci: (WIP) fix pipelines to use the new project structure
upsetbit Apr 22, 2022
711020a
ci: run against python 3.9 and 3.10
upsetbit Apr 22, 2022
3bb99f0
build(app): bump pylint
upsetbit Apr 22, 2022
abed9fc
build(app): can we make it work on 3.7 -> 3.10? LETS FIND OUT
upsetbit Apr 22, 2022
41df424
ci: run matrix from 3.7 to 3.10, fix caching path
upsetbit Apr 22, 2022
a78726d
ci: run code checkings from inside the docker container
upsetbit Apr 22, 2022
8c9445d
build(app): add missing dependency
upsetbit Apr 22, 2022
08cf7b0
build(docs): require python 3.7 at minimum, fix project name and version
upsetbit Apr 22, 2022
0daad82
docs: (WIP) initial structure
upsetbit Apr 22, 2022
6860149
ci: minor naming changes here and there
upsetbit Apr 22, 2022
417d15f
ci: run tests from within the container, get coverage file and upload…
upsetbit Apr 22, 2022
155326a
ci: only run on PRs
upsetbit Apr 22, 2022
9d3d5a0
ci: fix path of coverage file (again)
upsetbit Apr 22, 2022
f2b9279
docs: improve the README page
upsetbit Apr 22, 2022
0bdf5a7
build: add target to get runned on cloudflare pages (to generate the …
upsetbit Apr 22, 2022
2213c42
build(docs): add python handler for mkdocstrings
upsetbit Apr 22, 2022
c1eb847
docs: move README page file to root dir (remove symbolic link)
upsetbit Apr 22, 2022
6610953
build(docs): include plugins
upsetbit Apr 23, 2022
f7e8cb7
build(docs): indent jinja2 template
upsetbit Apr 23, 2022
7f48f6b
docs: add site logo/favicon
upsetbit Apr 23, 2022
79fb336
build(docs): add partials to display the creation/revision/author of …
upsetbit Apr 23, 2022
342b7bc
build(docs): last included stuff (plugins, favicon etc)
upsetbit Apr 23, 2022
525b7dc
docs: organize a lil bit
upsetbit Apr 23, 2022
37d463f
build(docs): change site name and the repo icon
upsetbit Apr 23, 2022
c973625
docs: write home page "entry text" and do some aesthetic improvements
upsetbit Apr 23, 2022
cf02df9
build(docs): add the example app to the docs image (so API refs can b…
upsetbit Apr 23, 2022
f052538
docs: initial mkdocstrings setup
upsetbit Apr 23, 2022
8433a90
build: bind yapt example app dir on serve and set the PYTHONPATH
upsetbit Apr 23, 2022
8728c36
docs: improve Calculator class usage example
upsetbit Apr 23, 2022
32bb7f2
chore: only run the hooks when something changes inside app/yapt
upsetbit Apr 23, 2022
054d0f5
build: fix docs build for cloudflare pages
upsetbit Apr 23, 2022
1fe8c79
build(docs): ensures that the page metadata section will always rende…
upsetbit Apr 24, 2022
46c5db4
chore: add some explanation about what the use of each target/script
upsetbit Apr 24, 2022
ea2a8e6
docs: better organize the API reference, enable mermaid diagrams
upsetbit Apr 24, 2022
bf3acd2
docs(app): more improvements, add examples of what is possible using …
upsetbit Apr 24, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
221 changes: 8 additions & 213 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,215 +1,10 @@
**/__pycache__
**/*.py[cod]
**/*$py.class

# Created by https://www.toptal.com/developers/gitignore/api/python,windows,macos,linux
# Edit at https://www.toptal.com/developers/gitignore?templates=python,windows,macos,linux
**/.DS_Store

### Linux ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# 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

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# 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

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# 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/

### Windows ###
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

# End of https://www.toptal.com/developers/gitignore/api/python,windows,macos,linux
app/htmlcov
app/.coverage
app/.pytest_cache
app/.mypy_cache
64 changes: 64 additions & 0 deletions .docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# ===== STAGE =====
FROM python:3.10-slim-buster AS base

ARG USER=turing
ENV USER $USER

ARG HOME_DIR=/home/${USER}
ENV HOME_DIR $HOME_DIR

ARG PROJ_DIR=${HOME_DIR}/.docs
ENV PROJ_DIR $PROJ_DIR

ENV PIP_NO_CACHE_DIR 1

# creates a linux user and group for "USER" (see above) and installs poetry (dependency manager for python)
# unless one of the lines below are changed, this is only built once
RUN groupadd "${USER}" \
&& useradd -rm -d "${HOME_DIR}" -s /bin/bash -g "${USER}" "${USER}" \
&& mkdir -p "${HOME_DIR}" \
&& chown "${USER}:${USER}" "${HOME_DIR}" \
&& pip install "poetry==1.1.*" \
&& poetry config virtualenvs.create false
# poetry must not create a virtualenv inside the container; the line above ensures this


# ===== STAGE =====
FROM base AS requirements
WORKDIR ${HOME_DIR}
COPY .docs/pyproject.toml .
COPY .docs/poetry.lock .
RUN poetry export > requirements.txt


# ===== STAGE =====
FROM base AS sys-deps
RUN apt-get update \
&& apt-get install --no-install-recommends --yes "git=1:2.20.*" \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*


# ===== STAGE =====
FROM sys-deps AS build
WORKDIR ${HOME_DIR}
COPY --from=requirements ["${HOME_DIR}/requirements.txt", "."]
RUN pip install -r requirements.txt && rm requirements.txt


# ===== STAGE =====
FROM build AS run

WORKDIR ${HOME_DIR}
COPY .git .git
COPY app/yapt yapt

WORKDIR ${PROJ_DIR}
COPY .docs/mkdocs.yml .
COPY .docs/content content

RUN chown -R "${USER}:${USER}" "${HOME_DIR}"

USER ${USER}
EXPOSE 8000
ENTRYPOINT ["mkdocs"]
73 changes: 0 additions & 73 deletions .docs/README.rst

This file was deleted.

5 changes: 0 additions & 5 deletions .docs/calculator.rst

This file was deleted.

Loading