Skip to content

Commit

Permalink
fix: Move fikles to sub-directory, add pyproject.toml so it can be in…
Browse files Browse the repository at this point in the history
…stalled as a package
  • Loading branch information
robsavoye committed Sep 23, 2023
1 parent 7e6bd1e commit b1d509a
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 8 deletions.
2 changes: 2 additions & 0 deletions conflator/__version__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"""Project version"""
__version__ = "0.2.0"
16 changes: 8 additions & 8 deletions conflator.py → conflator/conflator.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
#!/usr/bin/python3

# Copyright (c) 2022 Humanitarian OpenStreetMap Team
# Copyright (c) 2021, 2022, 2023 Humanitarian OpenStreetMap Team
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
import logging
import getopt
from sys import argv
Expand Down
File renamed without changes.
99 changes: 99 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
[project]
name = "conflator"
dynamic = ["version"]
description = "Conflate OSM data."
authors = [
{name = "Rob Savoye", email = "[email protected]"},
]
dependencies = [
"geojson>=2.5.0",
"psycopg2>=2.9.7",
]
requires-python = ">=3.10"
readme = "README.md"
license = "AGPL-3.0-only"
keywords = ["hot", "osm", "openstreetmap"]
classifiers = [
"Topic :: Utilities",
"Topic :: Scientific/Engineering :: GIS",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]

[project.urls]
homepage = "https://hotosm.github.io/conflator"
documentation = "https://hotosm.github.io/conflator"
repository = "https://github.com/hotosm/conflator"

[build-system]
requires = ["pdm-pep517>=1.1.4"]
build-backend = "pdm.pep517.api"

[tool.pytest.ini_options]
addopts = "-ra -q -p no:warnings"
testpaths = [
"tests",
]
pythonpath = "conflator"

[tool.commitizen]
name = "cz_conventional_commits"
version = "0.1.2rc0"
version_files = [
"pyproject.toml:version",
"conflator/__version__.py",
]

[tool.pdm]
version = {from = "conflator/__version__.py"}
[tool.pdm.build]
includes = ["conflator"]
source-includes = ["tests", "LICENSE.md", "README.md"]
[tool.pdm.dev-dependencies]
dev = [
"black>=23.7.0",
"commitizen>=3.6.0",
"pre-commit>=3.3.3",
]
debug = [
"debugpy>=1.6.7.post1",
"ipdb>=0.13.13",
]
test = [
"pytest>=7.4.0",
]
docs = [
"mkdocs>=1.5.2",
"mkdocs-material>=9.2.3",
"mkdocstrings-python>=1.5.2",
"mkdocs-exclude>=1.0.2",
]

[tool.black]
line-length = 132
target-versions = ["py310", "py311"]

[tool.ruff]
fix = true
line-length = 132
target-version = "py310"
select = ["I", "E", "W", "D", "B", "F", "N", "Q"]
ignore = ["N805", "B008"]
exclude = [
".git",
".ruff_cache",
".vscode",
"__pypackages__",
"build",
"dist",
"conflator/__version__.py",
]
[tool.ruff.pydocstyle]
convention = "google"


[project.scripts]
# conflator = "conflator.cmd:main"
# hot-import = "conflator.postgres:main"
geofabrik = "conflator.geofabrik:main"

0 comments on commit b1d509a

Please sign in to comment.