Skip to content

Commit

Permalink
🎉 Create initial project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
veit committed Nov 12, 2024
0 parents commit c8af00b
Show file tree
Hide file tree
Showing 16 changed files with 665 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: docs

on:
pull_request:
push:
branches: [main]

jobs:
docs:
name: Build docs and check links
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pandoc/actions/setup@v1
- uses: ts-graphviz/setup-graphviz@v2
- uses: actions/setup-python@v5
with:
cache: pip
# Keep in sync with .readthedocs.yaml
python-version-file: .python-version
- run: python -m pip install -e ".[docs]"
- run: python -m sphinx -nb html docs/ docs/_build/html
- run: python -m sphinx -b linkcheck docs/ docs/_build/html
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.python-version

# Distribution / packaging
*.egg-info/

# Sphinx documentation
docs/_build/

# Jupyter Notebook
.ipynb_checkpoints

# virtualenv
.venv
52 changes: 52 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks

ci:
autoupdate_schedule: monthly

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-json
types: [file] # override `types: [json]`
files: \.(json|ipynb)$
- id: check-yaml
- id: check-added-large-files
args: ['--maxkb=1024']
- repo: https://github.com/sphinx-contrib/sphinx-lint
rev: v1.0.0
hooks:
- id: sphinx-lint
types: [rst]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
additional_dependencies: ["toml"]
entry: isort --profile=black
name: isort (python)
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
- repo: https://github.com/adamchainz/blacken-docs
rev: "1.19.1"
hooks:
- id: blacken-docs
args: [--line-length=79]
additional_dependencies:
- black
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
- repo: local
hooks:
- id: linkcheck
entry: sphinx-build -b linkcheck docs _build/html
name: linkcheck
language: system
files: $(git diff --staged --name-only "*")
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12
32 changes: 32 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
apt_packages:
# graphviz is required for sphinx.ext.graphviz
- graphviz
tools:
python: "3.12"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# If using Sphinx, optionally build your docs in additional formats such as PDF
formats:
- epub
- pdf

# Optionally declare the Python requirements required to build your docs
python:
install:
- method: pip
path: .
extra_requirements:
- docs
23 changes: 23 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Changelog
=========

Alle nennenswerten Änderungen an diesem Projekt werden in dieser Datei
dokumentiert.

Das Format basiert auf `Keep a Changelog
<https://keepachangelog.com/en/1.0.0/>`_ und dieses Projekt hält sich an
`Calendar Versioning <https://calver.org>`_.

Die erste Zahl der Version ist das Jahr. Die zweite Zahl wird mit jeder Version
erhöht, beginnend bei 1 für jedes Jahr. Die dritte Zahl ist für Notfälle, wenn
wir Zweige für ältere Versionen starten müssen.

.. unreleased
Unreleased
----------

Added
~~~~~

* 🎉 Create initial project structure
27 changes: 27 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Copyright (c) Veit Schiele.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

3. Neither the name of Veit Schiele nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
117 changes: 117 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
Schnelleinstieg
===============

Status
------

.. image:: https://img.shields.io/github/contributors/cusyio/neural-network-tutorial.svg
:alt: Contributors
:target: https://github.com/cusyio/neural-network-tutorial/graphs/contributors
.. image:: https://img.shields.io/github/license/cusyio/neural-network-tutorial.svg
:alt: License
:target: https://github.com/cusyio/neural-network-tutorial/blob/main/LICENSE
.. image:: https://readthedocs.org/projects/neural-network-tutorial/badge/?version=latest
:alt: Docs
:target: https://neural-network-tutorial.readthedocs.io/de/latest/

Installation
------------

#. Auschecken:

.. code-block:: console
$ git clone [email protected]:cusyio/neural-network-tutorial.git
#. Installieren von Python-Paketen:

… auf Linux/macOS:

.. code-block:: console
$ python3 -m venv .venv
$ . .venv/bin/activate
$ python -m pip install --upgrade pip
$ python -m pip install -e ".[dev]"
… auf Windows:

.. code-block:: ps1con
C:> py -m venv .venv
C:> .\.venv\Scripts\activate.bat
C:> python -m pip install --upgrade pip
C:> python -m pip install -e ".[dev]"
#. Erstellen der HTML-Dokumentation:

.. note::
pandoc muss installiert sein.

… auf Debian/Ubuntu:

.. code-block:: console
$ sudo apt install pandoc
Zum Erstellen der HTML-Dokumentation führt den folgenden Befehl aus:

.. code-block:: console
$ sphinx-build -ab html docs/ docs/_build/html/
#. Erstellen eines PDF:

Zum Erstellen einer PDF-Dokumentation benötigt ihr zusätzliche Pakete, die
ihr installieren könnt

… auf Debian/Ubuntu mit

.. code-block:: console
$ sudo apt install texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended latexmk
… auf macOS mit

.. code-block:: console
$ brew cask install mactex
🍺 mactex was successfully installed!
$ curl --remote-name https://www.tug.org/fonts/getnonfreefonts/install-getnonfreefonts
$ sudo texlua install-getnonfreefonts
mktexlsr: Updating /usr/local/texlive/2020/texmf-dist/ls-R...
mktexlsr: Done.
Anschließend könnt ihr ein PDF generieren mit:

.. code-block:: console
$ cd docs/
$ make latexpdf
The LaTeX files are in _build/latex.
Run 'make' in that directory to run these through (pdf)latex
Das PDF findet ihr dann in ``docs/_build/latex/pythonbasics.pdf``.

Folgt uns
---------

* `GitHub <https://github.com/cusyio/neural-network-tutorial>`_

Pull-Requests
-------------

Wenn ihr Vorschläge für Verbesserungen und Ergänzungen habt, empfehlen wir euch,
einen `Fork <https://github.com/cusyio/neural-network-tutorial/fork>`_ unseres
`GitHub Repository <https://github.com/cusyio/neural-network-tutorial/>`_ zu
erstellen und eure Änderungen dort zu machen. Bevor ihr Commits macht,
überprüft, ob die pre-commit-Checks erfolgreich durchlaufen:

.. code-block:: console
$ cd neural-network-tutorial
$ pre-commit install
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Binary file added docs/_static/images/logo/favicon.ico
Binary file not shown.
Binary file added docs/_static/images/logo/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Was ist neu?
============

.. include:: ../CHANGELOG.rst
:start-after: unreleased
Loading

0 comments on commit c8af00b

Please sign in to comment.