Skip to content

Commit

Permalink
Merge pull request #55 from Phynix/py313
Browse files Browse the repository at this point in the history
enh: add python 3.13, move to pyproject.toml
  • Loading branch information
jonas-eschle authored Dec 20, 2024
2 parents 2d0032a + 6ee887d commit c581840
Show file tree
Hide file tree
Showing 25 changed files with 161 additions and 151 deletions.
3 changes: 3 additions & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git_archival.txt export-subst
13 changes: 5 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ jobs:
max-parallel: 8
fail-fast: False
matrix:
python-version: [ "3.7", "3.8", "3.9", "3.10" , "3.11", "3.12" ]
python-version: [ "3.7", "3.8", "3.9", "3.10" , "3.11", "3.12", "3.13"]
include:
- os: macos-latest
python-version: "3.12"
python-version: "3.13"
- os: windows-latest
python-version: "3.12"
python-version: "3.13"
- os: macos-14 # Apple silicon runner
python-version: '3.12'
python-version: '3.13'
name: tests on ubuntu with ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
Expand All @@ -35,12 +35,9 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install cython
pip install .[dev] cython coveralls coverage
- name: Test with pytest
run: |
. ci/install_tester.sh
. ci/run_tests.sh
- name: Build docs
run: |
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ dist
MANIFEST
/.hypothesis/
*.coverage
/docs/api/_build/
/.idea/
/src/yamlloader/_version.py
31 changes: 15 additions & 16 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand All @@ -16,13 +16,6 @@ repos:
- id: fix-byte-order-marker
- id: check-ast


- repo: https://github.com/myint/docformatter
rev: v1.7.5
hooks:
- id: docformatter
args: [ -r, --in-place, --wrap-descriptions, '120', --wrap-summaries, '120', -- ]

- repo: https://github.com/mattlqx/pre-commit-sign
rev: v1.2.0
hooks:
Expand All @@ -36,39 +29,45 @@ repos:


- repo: https://github.com/asottile/pyupgrade
rev: v3.15.2
rev: v3.19.0
hooks:
- id: pyupgrade
args: [ --py36-plus ]
args: [ --py37-plus ]

- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.5.0
rev: v2.7.0
hooks:
- id: setup-cfg-fmt

# Notebook formatting
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.8.5
rev: 1.8.7
hooks:
- id: nbqa-isort
additional_dependencies: [ isort ]

- id: nbqa-pyupgrade
additional_dependencies: [ pyupgrade ]
args: [ --py36-plus ]
args: [ --py37-plus ]

- repo: https://github.com/mgedmin/check-manifest
rev: '0.49'
rev: '0.50'
hooks:
- id: check-manifest
stages: [ manual ]

# auto walrus
- repo: https://github.com/MarcoGorelli/auto-walrus
rev: 0.3.4
hooks:
- id: auto-walrus

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.3.7"
rev: "v0.7.1"
hooks:
- id: ruff
types_or: [ python, pyi, jupyter ]
args: [ --fix, --unsafe-fixes, --show-fixes , --line-length=120]
args: [ --fix, --unsafe-fixes, --show-fixes , --line-length=120 ]
# Run the formatter.
- id: ruff-format
types_or: [ python, pyi, jupyter ]
3 changes: 0 additions & 3 deletions MANIFEST.in

This file was deleted.

6 changes: 0 additions & 6 deletions ci/install_tester.sh

This file was deleted.

2 changes: 1 addition & 1 deletion ci/run_tests.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash

coverage run --source=. --branch -m unittest discover && coverage report yamlloader/*.py
coverage run --source=. --branch -m unittest discover && coverage report src/yamlloader/*.py
coverage report
File renamed without changes
13 changes: 4 additions & 9 deletions docs/api/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@

# Manually added things

import sphinx_rtd_theme

import yamlloader

here = Path(__file__).resolve().parent
Expand All @@ -43,7 +41,7 @@

html_theme = "sphinx_rtd_theme"

html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
Expand All @@ -60,7 +58,7 @@
"sphinx.ext.githubpages",
]

html_logo = here / "static/img/phynix_logo_medium.png"
html_logo = str(here / "_static/img/phynix_logo_medium.png")

# Napoleon settings (convert numpy/google docstrings to proper ReST
napoleon_google_docstring = False
Expand Down Expand Up @@ -131,8 +129,8 @@
#
# html_theme_options = {}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# Add any paths that contain custom _static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin _static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]

Expand Down Expand Up @@ -228,6 +226,3 @@

# A list of files that should not be packed into the epub file.
epub_exclude_files = ["search.html"]

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {"https://docs.python.org/": None}
6 changes: 3 additions & 3 deletions docs/api/yamlloader.ordereddict.dumpers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ dumpers
=======

.. automodule:: yamlloader.ordereddict.dumpers
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:
6 changes: 3 additions & 3 deletions docs/api/yamlloader.ordereddict.loaders.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ loaders
=======

.. automodule:: yamlloader.ordereddict.loaders
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:
7 changes: 4 additions & 3 deletions docs/api/yamlloader.ordereddict.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ ordereddict
===========

.. automodule:: yamlloader.ordereddict
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

Submodules
----------

.. toctree::
:maxdepth: 4

yamlloader.ordereddict.dumpers
yamlloader.ordereddict.loaders
18 changes: 14 additions & 4 deletions docs/api/yamlloader.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,23 @@ yamlloader package
==================

.. automodule:: yamlloader
:members:
:undoc-members:
:show-inheritance:
:members:
:undoc-members:
:show-inheritance:

Subpackages
-----------

.. toctree::
:maxdepth: 4

yamlloader.ordereddict
yamlloader.ordereddict

Submodules
----------

.. toctree::
:maxdepth: 4

yamlloader.settings
yamlloader.version
7 changes: 7 additions & 0 deletions docs/api/yamlloader.settings.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
settings
========

.. automodule:: yamlloader.settings
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/api/yamlloader.version.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version
=======

.. automodule:: yamlloader.version
:members:
:undoc-members:
:show-inheritance:
2 changes: 1 addition & 1 deletion docs/make_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ MAKE_DOCS_PATH="$( cd "$(dirname "$0")" ; pwd -P )"
popd > /dev/null

# generate the ReST files
sphinx-apidoc -o ${MAKE_DOCS_PATH}/api ${MAKE_DOCS_PATH}/../yamlloader -fMeT && \
sphinx-apidoc -o ${MAKE_DOCS_PATH}/api ${MAKE_DOCS_PATH}/../src/yamlloader -fMeT && \
python ${MAKE_DOCS_PATH}/api/tools/change_headline.py ${MAKE_DOCS_PATH}/api/yamlloader.* && \
make -C ${MAKE_DOCS_PATH}/api clean && make -C ${MAKE_DOCS_PATH}/api html -j4 && \
echo "Documentation successfully built!" || echo "FAILED to build Documentation"
Loading

0 comments on commit c581840

Please sign in to comment.