Skip to content

Commit

Permalink
Update pre-commit configuration, enhance documentation, and refine mo…
Browse files Browse the repository at this point in the history
…dule exports
  • Loading branch information
cleder committed Nov 6, 2024
1 parent 148a3f5 commit 1eea2da
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 40 deletions.
15 changes: 7 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
---
default_language_version:
python: python3.12
repos:
- repo: https://github.com/pre-commit-ci/pre-commit-ci-config

Check failure on line 5 in .pre-commit-config.yaml

View workflow job for this annotation

GitHub Actions / static-tests (3.12)

5:3 [indentation] wrong indentation: expected 4 but found 2
rev: v1.6.1
hooks:
- id: check-pre-commit-ci-config

Check failure on line 8 in .pre-commit-config.yaml

View workflow job for this annotation

GitHub Actions / static-tests (3.12)

8:7 [indentation] wrong indentation: expected 8 but found 6
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
Expand Down Expand Up @@ -36,18 +42,11 @@ repos:
rev: v0.3.1
hooks:
- id: absolufy-imports

Check failure on line 44 in .pre-commit-config.yaml

View workflow job for this annotation

GitHub Actions / static-tests (3.12)

44:7 [indentation] wrong indentation: expected 8 but found 6
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.7.2'
hooks:
- id: ruff

Check failure on line 48 in .pre-commit-config.yaml

View workflow job for this annotation

GitHub Actions / static-tests (3.12)

48:7 [indentation] wrong indentation: expected 8 but found 6
- id: ruff-format
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
Expand Down
4 changes: 3 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ Requirements
Optional
---------

* lxml_::
* lxml_:

.. code-block:: bash
pip install --pre "fastkml[lxml]"
Expand Down
4 changes: 3 additions & 1 deletion docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ as its parser, but you can change this by setting the
implementation.

E.g. if you have lxml installed, but you want to use the
standard ``xml.etree.ElementTree``, you can do this::
standard ``xml.etree.ElementTree``, you can do this:

.. code-block:: pycon
>>> import fastkml.config
>>> import xml.etree.ElementTree
Expand Down
60 changes: 32 additions & 28 deletions docs/fastkml.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,191 +2,195 @@
Reference Guide
===============

.. toctree::
:maxdepth: 4



.. automodule:: fastkml


fastkml.about module
fastkml.about
--------------------

.. automodule:: fastkml.about
:members:
:undoc-members:
:show-inheritance:

fastkml.atom module
fastkml.atom
-------------------

.. automodule:: fastkml.atom
:members:
:undoc-members:
:show-inheritance:

fastkml.base module
fastkml.base
-------------------

.. automodule:: fastkml.base
:members:
:undoc-members:
:show-inheritance:

fastkml.config module
fastkml.config
---------------------

.. automodule:: fastkml.config
:members:
:undoc-members:
:show-inheritance:

fastkml.containers module
fastkml.containers
-------------------------

.. automodule:: fastkml.containers
:members:
:undoc-members:
:show-inheritance:

fastkml.data module
fastkml.data
-------------------

.. automodule:: fastkml.data
:members:
:undoc-members:
:show-inheritance:

fastkml.enums module
fastkml.enums
--------------------

.. automodule:: fastkml.enums
:members:
:undoc-members:
:show-inheritance:

fastkml.exceptions module
fastkml.exceptions
-------------------------

.. automodule:: fastkml.exceptions
:members:
:undoc-members:
:show-inheritance:

fastkml.features module
fastkml.features
-----------------------

.. automodule:: fastkml.features
:members:
:undoc-members:
:show-inheritance:

fastkml.geometry module
fastkml.geometry
-----------------------

.. automodule:: fastkml.geometry
:members:
:undoc-members:
:show-inheritance:

fastkml.gx module
fastkml.gx
-----------------

.. automodule:: fastkml.gx
:members:
:undoc-members:
:show-inheritance:

fastkml.helpers module
fastkml.helpers
----------------------

.. automodule:: fastkml.helpers
:members:
:undoc-members:
:show-inheritance:

fastkml.kml module
fastkml.kml
------------------

.. automodule:: fastkml.kml
:members:
:undoc-members:
:show-inheritance:

fastkml.kml\_base module
fastkml.kml\_base
------------------------

.. automodule:: fastkml.kml_base
:members:
:undoc-members:
:show-inheritance:

fastkml.links module
fastkml.links
--------------------

.. automodule:: fastkml.links
:members:
:undoc-members:
:show-inheritance:

fastkml.mixins module
fastkml.mixins
---------------------

.. automodule:: fastkml.mixins
:members:
:undoc-members:
:show-inheritance:

fastkml.overlays module
fastkml.overlays
-----------------------

.. automodule:: fastkml.overlays
:members:
:undoc-members:
:show-inheritance:

fastkml.registry module
fastkml.registry
-----------------------

.. automodule:: fastkml.registry
:members:
:undoc-members:
:show-inheritance:

fastkml.styles module
fastkml.styles
---------------------

.. automodule:: fastkml.styles
:members:
:undoc-members:
:show-inheritance:

fastkml.times module
fastkml.times
--------------------

.. automodule:: fastkml.times
:members:
:undoc-members:
:show-inheritance:

fastkml.types module
fastkml.types
--------------------

.. automodule:: fastkml.types
:members:
:undoc-members:
:show-inheritance:

fastkml.utils module
fastkml.utils
--------------------

.. automodule:: fastkml.utils
:members:
:undoc-members:
:show-inheritance:

fastkml.views module
fastkml.validator
--------------------

.. automodule:: fastkml.validator
:members:
:undoc-members:
:show-inheritance:


fastkml.views
--------------------

.. automodule:: fastkml.views
Expand Down
1 change: 0 additions & 1 deletion docs/modules.rst

This file was deleted.

3 changes: 3 additions & 0 deletions fastkml/about.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@
The only purpose of this module is to provide a version number for the package.
"""

__version__ = "1.0.0b2"

__all__ = ["__version__"]
2 changes: 1 addition & 1 deletion fastkml/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from typing import Type
from typing import Union

__all__ = ["find_all", "has_attribute_values"]
__all__ = ["find", "find_all", "has_attribute_values"]


def has_attribute_values(obj: object, **kwargs: Any) -> bool:
Expand Down
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@ include = [
"fastkml",
]

[tool.rstcheck]
ignore_directives = [
"automodule",
]
report_level = "WARNING"

[tool.ruff]
fix = true
target-version = "py38"
Expand Down

0 comments on commit 1eea2da

Please sign in to comment.