-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from lonvia/package-analyser
Allow building packages and wheels
- Loading branch information
Showing
202 changed files
with
28,655 additions
and
327 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
*.pyc | ||
src/nominatim_data_analyser.egg-info | ||
dist | ||
|
||
analyser/config/config.yaml | ||
|
||
.mason | ||
mason_packages | ||
build | ||
src/nominatim_data_analyser/config/config.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +0,0 @@ | ||
[submodule "clustering-vt/.mason"] | ||
path = clustering-vt/.mason | ||
url = https://github.com/mapbox/mason | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
include src/nominatim_data_analyser/rules_specifications/*.yaml | ||
include src/nominatim_data_analyser/config/default.yaml | ||
recursive-include contrib * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,19 @@ | ||
from analyser.core.core import Core | ||
import argparse | ||
#!/usr/bin/python3 | ||
import sys | ||
import sysconfig | ||
from pathlib import Path | ||
|
||
parser = argparse.ArgumentParser(prog='nominatim-analyser') | ||
SRC_DIR = Path(__file__, '..').resolve() | ||
|
||
parser.add_argument('--execute-all', action='store_true', help='Executes all the QA rules') | ||
parser.add_argument('--filter', metavar='<QA rules names>', nargs='+', help='Filters some QA rules so they are not executed.') | ||
parser.add_argument('--execute-one', metavar='<QA rule name>', action='store', type=str, help='Executes the given QA rule') | ||
BUILD_DIR = f"build/lib.{sysconfig.get_platform()}-{sys.version_info[0]}.{sys.version_info[1]}" | ||
|
||
args = parser.parse_args() | ||
if not (SRC_DIR / BUILD_DIR).exists(): | ||
BUILD_DIR = f"build/lib.{sysconfig.get_platform()}-{sys.implementation.cache_tag}" | ||
|
||
#Executes all the QA rules. If a filter is given, these rules are excluded from the execution. | ||
if args.execute_all: | ||
if args.filter: | ||
Core().execute_all(args.filter) | ||
else: | ||
Core().execute_all() | ||
elif args.execute_one: | ||
#Execute the given QA rule. | ||
Core().execute_one(args.execute_one) | ||
if (SRC_DIR / BUILD_DIR).exists(): | ||
sys.path.insert(0, str(SRC_DIR / BUILD_DIR)) | ||
|
||
|
||
from nominatim_data_analyser.cli import cli | ||
|
||
sys.exit(cli()) |
Submodule .mason
deleted from
704f70
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#pragma once | ||
|
||
#include <mapbox/geometry.hpp> | ||
#include <mapbox/feature.hpp> | ||
#include <mapbox/variant.hpp> | ||
|
||
namespace mapbox { | ||
namespace geojson { | ||
|
||
using empty = mapbox::geometry::empty; | ||
using point = mapbox::geometry::point<double>; | ||
using multi_point = mapbox::geometry::multi_point<double>; | ||
using line_string = mapbox::geometry::line_string<double>; | ||
using linear_ring = mapbox::geometry::linear_ring<double>; | ||
using multi_line_string = mapbox::geometry::multi_line_string<double>; | ||
using polygon = mapbox::geometry::polygon<double>; | ||
using multi_polygon = mapbox::geometry::multi_polygon<double>; | ||
using geometry = mapbox::geometry::geometry<double>; | ||
using geometry_collection = mapbox::geometry::geometry_collection<double>; | ||
|
||
using value = mapbox::feature::value; | ||
using null_value_t = mapbox::feature::null_value_t; | ||
using identifier = mapbox::feature::identifier; | ||
using feature = mapbox::feature::feature<double>; | ||
using feature_collection = mapbox::feature::feature_collection<double>; | ||
|
||
// Parse inputs of known types. Instantiations are provided for geometry, feature, and | ||
// feature_collection. | ||
template <class T> | ||
T parse(const std::string &); | ||
|
||
// Parse any GeoJSON type. | ||
using geojson = mapbox::util::variant<geometry, feature, feature_collection>; | ||
geojson parse(const std::string &); | ||
|
||
// Stringify inputs of known types. Instantiations are provided for geometry, feature, and | ||
// feature_collection. | ||
template <class T> | ||
std::string stringify(const T &); | ||
|
||
// Stringify any GeoJSON type. | ||
std::string stringify(const geojson &); | ||
|
||
} // namespace geojson | ||
} // namespace mapbox |
32 changes: 32 additions & 0 deletions
32
contrib/geojson/0.4.3/include/mapbox/geojson/rapidjson.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#pragma once | ||
|
||
#include <rapidjson/document.h> | ||
#include <mapbox/geojson.hpp> | ||
|
||
namespace mapbox { | ||
namespace geojson { | ||
|
||
// Use the CrtAllocator, because the MemoryPoolAllocator is broken on ARM | ||
// https://github.com/miloyip/rapidjson/issues/200, 301, 388 | ||
using rapidjson_allocator = rapidjson::CrtAllocator; | ||
using rapidjson_document = rapidjson::GenericDocument<rapidjson::UTF8<>, rapidjson_allocator>; | ||
using rapidjson_value = rapidjson::GenericValue<rapidjson::UTF8<>, rapidjson_allocator>; | ||
|
||
// Convert inputs of known types. Instantiations are provided for geometry, feature, and | ||
// feature_collection. | ||
template <typename T> | ||
T convert(const rapidjson_value &); | ||
|
||
// Convert any GeoJSON type. | ||
geojson convert(const rapidjson_value &); | ||
|
||
// Convert back to rapidjson value. Instantiations are provided for geometry, feature, and | ||
// feature_collection. | ||
template <typename T> | ||
rapidjson_value convert(const T &, rapidjson_allocator&); | ||
|
||
// Convert any GeoJSON type. | ||
rapidjson_value convert(const geojson &, rapidjson_allocator&); | ||
|
||
} // namespace geojson | ||
} // namespace mapbox |
Oops, something went wrong.