Skip to content

Commit

Permalink
🔧 Switch to pyproject.toml
Browse files Browse the repository at this point in the history
* Update README, readthedocs config, .gitignore and github workflow
  • Loading branch information
veit committed Oct 8, 2024
1 parent 035bd54 commit bca11aa
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ jobs:
cache: pip
# Keep in sync with .readthedocs.yaml
python-version-file: .python-version
- run: python -m pip install -r docs/requirements.txt
- 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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,9 @@ mprun_demo.py
panel-examples
deploy-panel.html
test.png

# venv
.venv/

# pip install -e .
cusy_design_system.egg-info/
7 changes: 5 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.11"
python: "3.12"

# Build documentation in the docs/ directory with Sphinx
sphinx:
Expand All @@ -23,4 +23,7 @@ formats:
# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: docs/requirements.txt
- method: pip
path: .
extra_requirements:
- docs
16 changes: 8 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ Installation

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

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

Expand All @@ -69,7 +69,7 @@ Installation

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

Expand Down Expand Up @@ -99,7 +99,7 @@ Installation

.. code-block:: console
$ source bin/activate
$ . .venv/bin/activate
$ cd docs/
$ make latexpdf
Expand Down
4 changes: 0 additions & 4 deletions docs/requirements.txt

This file was deleted.

45 changes: 45 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[project]
name = "cusy-design-system"
version = "24.1.0"
authors = [
{ name="Veit Schiele", email="[email protected]" },
]
description = "Richtlinien für Benutzeroberflächen, Code-Beispiele, Designtools und Ressourcen"
readme = "README.rst"
requires-python = ">=3.9"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
]
dependencies = []

[project.optional-dependencies]
docs = [
"furo",
"nbsphinx",
"sphinxcontrib-svg2pdfconverter",
"sphinx_design",
]

dev = [
"cusy-design-system[docs]",
"pre-commit",
]

[project.urls]
"Homepage" = "https://github.com/cusyio/cusy-design-system"
"Bug Tracker" = "https://github.com/cusyio/cusy-design-system/issues"

[tool.black]
line-length = 79

[tool.isort]
atomic=true
force_grid_wrap=0
include_trailing_comma=true
lines_after_imports=2
lines_between_types=1
multi_line_output=3
not_skip="__init__.py"
use_parentheses=true

0 comments on commit bca11aa

Please sign in to comment.