Skip to content

Commit 71fee0b

Browse files
committed
Merge branch 'main' into use_float
2 parents 8652bf5 + 86261d4 commit 71fee0b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1701
-531
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. import pathfinding '...'
16+
2. call function '....'
17+
3. See error
18+
19+
**Expected behavior**
20+
A clear and concise description of what you expected to happen.
21+
22+
**Screenshots** / **Map** / **Log**
23+
If applicable, add screenshots or logs to help explain your problem.
24+
Also add your map or console log.
25+
26+
**Environment (please complete the following information):**
27+
- Environment: [e.g. Docker using Linux Ubuntu 24.04]
28+
- Python version [e.g. 3.11]
29+
- Pathfinding Version [e.g. 1.0.1]
30+
31+
**Additional context**
32+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Build, test and publish Python 🐍 distributions 📦 to PyPI
2+
3+
on:
4+
push:
5+
branches:
6+
- release
7+
jobs:
8+
build-and-publish:
9+
name: Build, test and publish Python 🐍 distributions 📦 to PyPI
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check out repository code
13+
uses: actions/checkout@v4
14+
15+
# Setup Python (faster than using Python container)
16+
- name: Setup Python
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: "3.x"
20+
21+
- name: Install dependencies
22+
run: |
23+
python3 -m pip install numpy pandas pytest coverage pytest-cov
24+
25+
- name: Install pathfinding
26+
run: |
27+
python3 -m pip install .
28+
29+
- name: Run tests with pytest
30+
run: python3 -m coverage run --source pathfinding -m pytest
31+
32+
- name: Show basic test coverage report
33+
run: python3 -m coverage report
34+
35+
- name: Install pypa/build
36+
run: >-
37+
python3 -m pip install build --user
38+
39+
- name: Build a binary wheel and a source tarball
40+
run: python3 -m build
41+
42+
- name: Store the distribution packages
43+
uses: actions/upload-artifact@v3
44+
with:
45+
name: python-package-distributions
46+
path: dist/
47+
48+
- name: Publish distribution 📦 to PyPI
49+
uses: pypa/gh-action-pypi-publish@release/v1.8
50+
with:
51+
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/test-main.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
jobs:
8+
build-and-publish:
9+
name: Test
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check out repository code
13+
uses: actions/checkout@v4
14+
15+
# Setup Python (faster than using Python container)
16+
- name: Setup Python
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: "3.x"
20+
21+
- name: Install dependencies
22+
run: |
23+
python3 -m pip install numpy pandas pytest coverage pytest-cov
24+
25+
- name: Install pathfinding
26+
run: |
27+
python3 -m pip install .
28+
29+
- name: Run tests with pytest
30+
run: python3 -m coverage run --source pathfinding -m pytest
31+
32+
- name: Show basic test coverage report
33+
run: python3 -m coverage report

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,6 @@ target/
6161

6262
# ipython notebook
6363
.ipynb_checkpoints
64+
65+
# python virtual env
66+
venv/

.travis.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# 1.0.12
2+
## Bugfixes
3+
- fix for passable borders (see #62, merges #63)
4+
5+
# 1.0.11
6+
## Bugfixes
7+
- always call cleanup
8+
- cleanup worlds
9+
- return empty on msp
10+
11+
# 1.0.10
12+
## Bugfixes
13+
- allow diagonal crossing movement over a border (see #58)
14+
- fix import in documentation for graphs
15+
16+
# 1.0.9
17+
## Bugifxes
18+
- update return type annoation (see #55)
19+
20+
# 1.0.8
21+
## Performance
22+
- huge performance update by reducing lookup time for smallest entry in heapq. (see #53, thanks to @peterchenadded)
23+
24+
# 1.0.7
25+
## Bugfixes
26+
- fixed calculation of graph width (see #52)
27+
28+
# 1.0.6
29+
## Bugfixes
30+
- removed an unused debug print that lead to performance issues on big maps
31+
32+
# 1.0.5
33+
## Bugfixes
34+
- fixed a bug for graphs where node_ids were not unique (#51)
35+
36+
# 1.0.4
37+
## Bugfixes
38+
- backward-compability with Python 3.9
39+
40+
# 1.0.3
41+
## Bugfixes
42+
- lookup-table/cache for the path in grid_str for faster output.
43+
44+
## New features
45+
- Support for generic graphs that are not grids.
46+
47+
## General
48+
- Minor PEP 8 fixes, (import order, remove empty lines, remove utf-8 force because it's the default in Python3)
49+
50+
# 1.0.2
51+
## New features
52+
- portals/elevators/steps (see [docs/02_connecting_grids.md](docs/02_connecting_grids.md))
53+
54+
## Security
55+
- update Pipfile.lock (had depenencies on vulnerable pytest version)
56+
57+
## General
58+
- **BREAKING CHANGE** remove Python 2 support (for older Python 3 and Python 2 see python2-branch)
59+
- **BREAKING CHANGE** Node is a dataclass now
60+
- stricter flake8 integration
61+
- moved usage documentation to [docs](docs/)
62+
- add contributing and changelog
63+
- update license to 2023
64+
65+
# 1.0.1
66+
## Bugfixes
67+
- fix super call in Minimum Spanning Tree
68+
69+
# 1.0.0
70+
## New features
71+
- add Minimum Spanning Tree
72+
73+
## General
74+
- throw error when check_neighbors isn't implemented
75+
- add badges
76+
- fix spelling, typos and update text in Readme
77+
- update License to 2020
78+
79+
# 0.4.0
80+
## Bugfix
81+
- fix calc_cost (cost was calculated incorrectly)
82+
83+
## General
84+
- add pipenv Pipfile
85+
86+
# 0.3.0
87+
## Bugfix
88+
- add long description from README.md to setup.py
89+
90+
## General
91+
- More documentation and typo fixes
92+
93+
# 0.2.0
94+
## Bugfixes
95+
- use copy.copy for python2.5
96+
- cleanup grid instead of recreate it every time (see #9)
97+
- **BEHAVIOR CHANGED** Switch node walkable flag to use it as weight, so <0 is an obstacle and >=1 is a walkable field now
98+
99+
## New features
100+
- BestFirstSearch (BFS)
101+
- raytrace for path smoothing
102+
- weighted path finding for A* and Dijkstra
103+
104+
## General
105+
- coveralls integration
106+
- removed debug logs
107+
- updated license to 2018
108+
- More unit tests, add constrains for time and step count
109+
- flake8 integration
110+
111+
# 0.1.0
112+
Initial release

CONTRIBUTING.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Contributing to **python-pathfinding**
2+
3+
Please inform the maintainer as early as possible about your planned
4+
feature developments, extensions, or bugfixes that you are working on.
5+
An easy way is to open an issue or a pull request in which you explain
6+
what you are trying to do.
7+
8+
## Pull Requests
9+
10+
The preferred way to contribute to *python-pathfinding* is to fork the main repository on Github, then submit a "pull request"
11+
(PR):
12+
13+
1. Fork the [project repository](https://github.com/brean/python-pathfinding):
14+
click on the 'Fork' button near the top of the page. This creates a copy of
15+
the code under your account on the Github server.
16+
17+
3. Clone this copy to your local disk:
18+
19+
$ git clone git@github.com:YourLogin/python-pathfinding.git
20+
21+
4. Create a branch to hold your changes:
22+
23+
$ git checkout -b my-feature
24+
25+
and start making changes. Never work in the ``main`` branch!
26+
27+
5. Work on this copy, on your computer, using Git to do the version
28+
control. When you're done editing, do::
29+
30+
$ git add modified_files
31+
$ git commit
32+
33+
to record your changes in Git, then push them to Github with::
34+
35+
$ git push -u origin my-feature
36+
37+
Finally, go to the web page of the your fork of the repo,
38+
and click 'Pull request' to send your changes to the maintainers for review.
39+
40+
## Merge Policy
41+
42+
Summary: maintainer can push minor changes directly, pull request + 1 reviewer for everything else.
43+
44+
* Usually it is not possible to push directly to the `main` branch of *python-pathfinding* for anyone. Only tiny changes, urgent bugfixes, and maintenance commits can be pushed directly to the `main` branch by the maintainer without a review. "Tiny" means backwards compatibility is mandatory and all tests must succeed. No new feature must be added.
45+
46+
* Developers should submit pull requests. Those will ideally be reviewed by at least one other developer and merged by the maintainer. New features must be documented and tested. Breaking changes must be discussed and announced in advance with deprecation warnings.
47+
48+
## Project Roadmap
49+
50+
Check the [Issue Tracker](https://github.com/brean/python-pathfinding/issues) for roadmap planning.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015-2018 Andreas Bresser
3+
Copyright (c) 2015-2023 Andreas Bresser <self@andreasbresser.de>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Pipfile

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)