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

feat: add contextual count embedder #220

Merged
merged 33 commits into from
Apr 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
46b8acb
feat: added contextual count embedder
RaczeQ Apr 12, 2023
8a6923a
feat: modify ContextualCountEmbedder
RaczeQ Apr 13, 2023
7815a6a
chore: change changelog
RaczeQ Apr 13, 2023
e2807e6
docs: update srai/embedders/contextual_count_embedder.py
RaczeQ Apr 14, 2023
49e2569
refactor: changed embedders imports
RaczeQ Apr 14, 2023
ec82d7f
chore: added additional info to pbf downloader
RaczeQ Apr 14, 2023
2a55fb1
docs(ContextualCountEmbedder): changed notebook
RaczeQ Apr 14, 2023
c84e8b3
docs(ContextualCountEmbedder): change typo
RaczeQ Apr 14, 2023
b27237e
feat: add new `osm_tags` type for filtering
RaczeQ Apr 16, 2023
20e5861
refactor: apply refurb suggestions
RaczeQ Apr 17, 2023
809e44c
feat: add utility function to merge grouped filter
RaczeQ Apr 17, 2023
8b9de5d
chore: add merging test skeleton
RaczeQ Apr 18, 2023
98098f2
feat: add osm filters grouping to the loaders
RaczeQ Apr 18, 2023
481aa5f
refactor: change condition syntax
RaczeQ Apr 18, 2023
d1a341b
chore: modified tests after removing default value
RaczeQ Apr 19, 2023
9eace7c
chore: add tests for merging filters
RaczeQ Apr 19, 2023
aefc88b
style: changed references formatting
RaczeQ Apr 19, 2023
523784b
feat: added base osm group filter
RaczeQ Apr 19, 2023
16d44e3
docs: change examples
RaczeQ Apr 19, 2023
bc55465
chore: merge remote-tracking branch 'origin/main' into add-contextual…
RaczeQ Apr 19, 2023
0fb81ca
test: change count embedder tests
RaczeQ Apr 21, 2023
ee5322b
test: fix intersection joiner geom test
RaczeQ Apr 21, 2023
1c3cf91
test: modify osm_pbf_loader tests
RaczeQ Apr 21, 2023
cc94cd8
test: remove code coverage for pbf file download
RaczeQ Apr 21, 2023
d3b238a
docs: fix typo
RaczeQ Apr 21, 2023
08ace83
refactor: changed AttributeErrors into ValueErrors
RaczeQ Apr 23, 2023
0fb808c
refactor: change AttributeError to ValueError in tests
RaczeQ Apr 23, 2023
eee49a6
chore: apply CR suggestions
RaczeQ Apr 23, 2023
606f4d4
test: add tests for ContextualCountEmbedder
RaczeQ Apr 23, 2023
a060fe1
fix: change errors in tests
RaczeQ Apr 23, 2023
d3edb79
docs: fix heading in example
RaczeQ Apr 24, 2023
0a6e35f
Merge branch 'main' into add-contextual-count-embedder
RaczeQ Apr 24, 2023
996b866
Merge branch 'main' into add-contextual-count-embedder
RaczeQ Apr 24, 2023
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
303 changes: 152 additions & 151 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,151 +1,152 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
coverage.*.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pdm
.pdm.toml
requirements.txt

# VSCode
.vscode/**/*
!.vscode/settings.json.default
!.vscode/extensions.json

# osmnx
cache/

# pytorch lightning
lightning_logs/

# files_cache
files/

# ruff
.ruff_cache
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
coverage.*.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pdm
.pdm.toml
.pdm-python
requirements.txt

# VSCode
.vscode/**/*
!.vscode/settings.json.default
!.vscode/extensions.json

# osmnx
cache/

# pytorch lightning
lightning_logs/

# files_cache
files/

# ruff
.ruff_cache
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repos:
- id: conventional-pre-commit
stages: [commit-msg]
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.0.259'
rev: "v0.0.259"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand All @@ -28,7 +28,7 @@ repos:
- id: mypy
additional_dependencies: ["types-requests"]
- repo: https://github.com/pdm-project/pdm
rev: 2.4.9
rev: 2.5.2
hooks:
- id: pdm-lock-check
- id: pdm-export
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Neighbourhood
- H3Neighbourhood
- AdjacencyNeighbourhood
- CountEmbedder
- ContextualCountEmbedder
- (CI) Changelog Enforcer
- Utility plotting module based on Folium and Plotly
- Citation information
Expand All @@ -28,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Change embedders and joiners interface to have `.transform` method
- Change linter to Ruff and removed flake8, isort, pydocstyle
- Change default value inside `transform` function of IntersectionJoiner to not return geometry.

### Deprecated

Expand Down
Loading