Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.0.alpha 13 #358

Merged
merged 70 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
a8d546d
back to develop a 13
cleder Jun 19, 2024
7df753e
Merge branch 'main' into develop
cleder Jun 19, 2024
24a4852
fix ruff errors for base classes
cleder Jun 20, 2024
419b46d
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jun 24, 2024
2210254
Merge pull request #332 from cleder/pre-commit-ci-update-config
cleder Jun 24, 2024
89f3eaa
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jul 1, 2024
429cf45
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 1, 2024
87e505b
Merge pull request #333 from cleder/pre-commit-ci-update-config
cleder Jul 2, 2024
fe5eda3
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jul 8, 2024
48d4f76
Merge pull request #334 from cleder/pre-commit-ci-update-config
cleder Jul 9, 2024
221ba14
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jul 15, 2024
6e90a52
Merge pull request #335 from cleder/pre-commit-ci-update-config
cleder Jul 16, 2024
2aad8b1
document the helper functions
cleder Jun 20, 2024
5b7ee34
better docstrings and ruff fixes
cleder Jul 18, 2024
7fee7b0
better docstrings and ruff fixes
cleder Jul 18, 2024
401c8e9
better docstrings and ruff fixes
cleder Jul 18, 2024
c3c6f8e
better docstrings and ruff fixes
cleder Jul 18, 2024
4541ea0
better docstrings and ruff fixes
cleder Jul 18, 2024
d592b0d
better docstrings and ruff fixes
cleder Jul 18, 2024
7983fdb
better docstrings and ruff fixes
cleder Jul 18, 2024
9d71aaf
better docstrings and ruff fixes
cleder Jul 18, 2024
765d36e
better docstrings and ruff fixes
cleder Jul 18, 2024
a81a586
Apply suggestions from code review
cleder Jul 18, 2024
0e30b63
Update fastkml/features.py
cleder Jul 18, 2024
9e954cf
Merge pull request #336 from cleder/264-test-documentation-with-docte…
cleder Jul 18, 2024
36a7f6d
make __eq__ generic
cleder Jul 18, 2024
0ac5e91
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jul 22, 2024
931b155
Merge pull request #337 from cleder/pre-commit-ci-update-config
cleder Jul 26, 2024
1dc645d
add basic parse class method to KML #284
cleder Jul 26, 2024
6d04f79
add basic parse class method to KML #284
cleder Jul 26, 2024
251fd83
add basic parse class method to KML #284
cleder Jul 26, 2024
2f69fd9
Update fastkml/kml.py
cleder Jul 26, 2024
8eb9680
ruff format
cleder Jul 26, 2024
75347fe
Merge pull request #338 from cleder/284-add-from_file-or-load-method-…
cleder Jul 26, 2024
f5b76d6
override name_spaces in parse whith obsvered namespace
cleder Jul 26, 2024
518fe3a
Refactor default namespace handling in XMLObject from _default_ns to …
cleder Jul 26, 2024
49aa9c7
fix repr
cleder Jul 27, 2024
c39ce76
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jul 29, 2024
e91ec55
Refactor geometry.py to include outer_boundary_is and inner_boundary_…
cleder Jul 30, 2024
1cab81a
Merge pull request #339 from cleder/pre-commit-ci-update-config
cleder Aug 1, 2024
dff28d1
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Aug 5, 2024
577d18c
Merge pull request #340 from cleder/pre-commit-ci-update-config
cleder Aug 6, 2024
a01e1f1
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Aug 12, 2024
6979396
Merge pull request #341 from cleder/pre-commit-ci-update-config
cleder Aug 12, 2024
19f3415
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Aug 19, 2024
807c939
Merge pull request #342 from cleder/pre-commit-ci-update-config
cleder Aug 20, 2024
8830734
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Aug 26, 2024
3f65d45
Merge pull request #344 from cleder/pre-commit-ci-update-config
cleder Aug 27, 2024
2fbbfc3
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Sep 2, 2024
58d0de4
Merge pull request #347 from cleder/pre-commit-ci-update-config
cleder Sep 3, 2024
5c9ad59
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Sep 9, 2024
839a433
Merge pull request #348 from cleder/pre-commit-ci-update-config
cleder Sep 10, 2024
48faf51
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Sep 16, 2024
c588bdd
Merge pull request #349 from cleder/pre-commit-ci-update-config
cleder Sep 16, 2024
513a9ac
#351 Add Test for the __repr__ method
cleder Sep 22, 2024
01b6144
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Sep 23, 2024
23782a2
Merge pull request #353 from cleder/pre-commit-ci-update-config
cleder Sep 23, 2024
d04e56b
Refactor contributing documentation and add setup instructions
cleder Sep 25, 2024
744cd50
improve type annotations for tests
cleder Sep 25, 2024
9e8b3b7
run mypy for tests in CI
cleder Sep 25, 2024
456f5cc
add pytest as dependency to typechecking
cleder Sep 25, 2024
27fb7a4
add python 3.14-dev to CI
cleder Sep 25, 2024
031c3b3
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Sep 30, 2024
2480842
Merge pull request #354 from cleder/pre-commit-ci-update-config
cleder Sep 30, 2024
181e2fe
add typos
cleder Oct 1, 2024
9dc9f74
Add test case for #355
cleder Oct 2, 2024
3f760bb
Fix inner boundaries for polygon #355
cleder Oct 2, 2024
118c064
Apply suggestions from code review
cleder Oct 2, 2024
fd61d0b
fix tests
cleder Oct 2, 2024
3ecc272
Merge pull request #356 from cleder/355-interior-rings-not-working-pr…
cleder Oct 2, 2024
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
8 changes: 4 additions & 4 deletions .github/workflows/run-all-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# run tests and lint with a variety of Python versions
---
name: Tests
on: [push, pull_request]

Check warning on line 5 in .github/workflows/run-all-tests.yml

View workflow job for this annotation

GitHub Actions / static-tests (3.12)

5:1 [truthy] truthy value should be one of [false, true]

Check warning on line 5 in .github/workflows/run-all-tests.yml

View workflow job for this annotation

GitHub Actions / static-tests (3.12)

5:1 [truthy] truthy value should be one of [false, true]

Check warning on line 5 in .github/workflows/run-all-tests.yml

View workflow job for this annotation

GitHub Actions / static-tests (3.12)

5:1 [truthy] truthy value should be one of [false, true]

jobs:
cpython:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13-dev']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13-dev', '3.14-dev']

steps:
- uses: actions/checkout@v4
Expand All @@ -29,7 +29,7 @@
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13-dev']

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -87,10 +87,10 @@
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -e ".[typing, complexity, linting]"
pip install -e ".[typing, complexity, linting, tests]"
- name: Typecheck
run: |
mypy fastkml
mypy fastkml tests
- name: Linting
run: |
flake8 fastkml examples docs
Expand Down
20 changes: 12 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ repos:
hooks:
- id: pyprojectsort
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.18
rev: v0.20.2
hooks:
- id: validate-pyproject
- repo: https://github.com/ikamensh/flynt/
Expand All @@ -37,24 +37,24 @@ repos:
hooks:
- id: absolufy-imports
- repo: https://github.com/asottile/pyupgrade
rev: v3.16.0
rev: v3.17.0
hooks:
- id: pyupgrade
args: ["--py3-plus", "--py37-plus"]
- repo: https://github.com/psf/black
rev: 24.4.2
rev: 24.8.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.4.9'
rev: 'v0.6.8'
hooks:
- id: ruff
- repo: https://github.com/PyCQA/flake8
rev: 7.1.0
rev: 7.1.1
hooks:
- id: flake8
- repo: https://github.com/pre-commit/pygrep-hooks
Expand All @@ -70,18 +70,22 @@ repos:
- id: rst-inline-touching-normal
- id: text-unicode-replacement-char
- repo: https://github.com/rstcheck/rstcheck
rev: "v6.2.0"
rev: "v6.2.4"
hooks:
- id: rstcheck
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0
rev: v1.11.2
hooks:
- id: mypy
additional_dependencies: [pygeoif>=1.4, arrow, pytest]
- repo: https://github.com/adamchainz/blacken-docs
rev: "1.16.0"
rev: "1.18.0"
hooks:
- id: blacken-docs
- repo: https://github.com/crate-ci/typos
rev: v1.25.0
hooks:
- id: typos
# - repo: https://github.com/Lucas-C/pre-commit-hooks-markup
# rev: v1.0.1
# hooks:
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ Optional
Limitations
===========

*Tesselate*, *Extrude* and *Altitude Mode* are assigned to a Geometry or
*Tessellate*, *Extrude* and *Altitude Mode* are assigned to a Geometry or
Geometry collection (MultiGeometry). You cannot assign different values of
*Tesselate*, *Extrude* or *Altitude Mode* on parts of a MultiGeometry.
*Tessellate*, *Extrude* or *Altitude Mode* on parts of a MultiGeometry.

Currently, the only major feature missing for the full Google Earth experience
is the `gx extension
Expand Down
6 changes: 6 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[default.extend-words]
lod = "lod"
Lod = "Lod"

[files]
extend-exclude = ["tests/ogc_conformance/data/kml/*.kml"]
2 changes: 1 addition & 1 deletion docs/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Changelog
-----------------

- specify minor python versions tested with Travis CI
- add support for tesselation, altitudeMode and extrude to Geometries
- add support for tessellation, altitudeMode and extrude to Geometries
- move implementation of geometry from kml.Placemark to geometry.Geometry
- add support for heterogenous GeometryCollection
- python 3 compatible
Expand Down
92 changes: 43 additions & 49 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,76 +11,70 @@ especially in the following ways:
* Commenting on open issues and pull requests
* Suggesting new features

Setting Up Your Environment
---------------------------

Pull Requests
-------------
Fork the repository and clone your fork to your local machine:

Start by submitting a pull request on GitHub against the ``develop`` branch of the
repository. Your pull request should provide a good description of the change
you are making, and/or the bug that you are fixing.
.. code-block:: bash

git clone https://github.com/yourusername/fastkml.git
cd fastkml
git checkout develop

Running Tests Locally
---------------------
Next, set up a virtual environment. This helps to manage dependencies and avoid conflicts:

You can make use of tox_ >= 1.8 to test the entire matrix of options:
.. code-block:: bash

* with / without lxml
* py36,py37,py38,py39
python3 -m venv .venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`

as well as pep8 style checking in a single call (this approximates what happens
when the package is run through Travis-CI)
Then, install the required packages:

.. code-block:: python
.. code-block:: bash

# Install tox
pip install tox>=1.8
pip install -e ".[dev]"

# Run tox
tox
Install the ``pre-commit`` hook with:

# Or optionally
# (to skip tests for Python versions you do not have installed)
tox --skip-missing-interpreters
.. code-block:: bash

This will run through all of the tests and produce an output similar to::
pre-commit install

______________________________________________________ summary ______________________________________________________
SKIPPED: py36: InterpreterNotFound: python3.6
py37: commands succeeded
py38: commands succeeded
py39: commands succeeded
SKIPPED: py36-lxml: InterpreterNotFound: python3.6
py37-lxml: commands succeeded
py38-lxml: commands succeeded
py39-lxml: commands succeeded
pep8: commands succeeded
docs: commands succeeded
congratulations :)
and check the code with:

You are primarily looking for the ``congratulations :)`` line at the bottom,
signifying that the code is working as expected on all configurations
available.
.. code-block:: bash

.. _tox: https://pypi.python.org/pypi/tox
pre-commit run --all-files

coverage
~~~~~~~~
Running the Tests
-----------------

You can also run the tests with coverage_ to see which lines are covered by the
tests. This is useful for writing new tests to cover any uncovered lines::
To run the tests, simply use:

pytest tests --cov=fastkml --cov=tests --cov-report=xml
.. code-block:: bash

pytest

pre-commit
~~~~~~~~~~~
You can also run the tests with `coverage <https://coverage.readthedocs.io/>`_
to see which lines are covered by the tests.
This is useful for writing new tests to cover any uncovered lines:

Install the ``pre-commit`` hook with::
.. code-block:: bash

pip install pre-commit
pre-commit install
pytest --cov=fastkml --cov-report=term

and check the code with::
To get a report on the individual lines that are not covered, use the
``--cov-report=term-missing`` option, or generate an HTML report with
``--cov-report=html``.
Some editor extensions can also show the coverage directly in the editor, notably
`coverage-gutter <https://marketplace.visualstudio.com/items?itemName=ryanluker.vscode-coverage-gutters>`_
for VSCode, which needs the output to be in the ``xml`` format produced with
``--cov-report=xml``.

pre-commit run --all-files

Tips
----

- Commit often, commit early.
- Make a draft PR while you are still working on it to give your work some visibility.
2 changes: 1 addition & 1 deletion fastkml/about.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@

The only purpose of this module is to provide a version number for the package.
"""
__version__ = "1.0.a12"
__version__ = "1.0.a13"
Loading
Loading