Skip to content

Commit

Permalink
Rename bbox-common to bbox-core
Browse files Browse the repository at this point in the history
  • Loading branch information
pka committed Jun 23, 2023
1 parent 87c8e5e commit 5b44f45
Show file tree
Hide file tree
Showing 74 changed files with 107 additions and 107 deletions.
18 changes: 9 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[workspace]
members = [
"bbox-common",
"bbox-core",
"bbox-feature-server",
"bbox-asset-server",
"bbox-map-server",
Expand Down
2 changes: 1 addition & 1 deletion bbox-asset-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2018"
actix-files = "0.6.0"
actix-web = { workspace = true }
async-trait = { workspace = true }
bbox-common = { path = "../bbox-common" }
bbox-core = { path = "../bbox-core" }
clap = { workspace = true }
configparser = "3.0.0"
log = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion bbox-asset-server/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::qgis_plugins::QgisPluginRepoCfg;
use crate::runtime_templates::TemplateDirCfg;
use bbox_common::config::from_config_opt_or_exit;
use bbox_core::config::from_config_opt_or_exit;
use serde::Deserialize;

#[derive(Deserialize, Default, Debug)]
Expand Down
6 changes: 3 additions & 3 deletions bbox-asset-server/src/endpoints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ use crate::runtime_templates::RuntimeTemplates;
use crate::service::{AssetService, PluginIndex};
use actix_files::{Files, NamedFile};
use actix_web::{web, HttpRequest, HttpResponse, Result};
use bbox_common::app_dir;
use bbox_common::endpoints::{abs_req_baseurl, req_parent_path};
use bbox_common::service::CoreService;
use bbox_core::app_dir;
use bbox_core::endpoints::{abs_req_baseurl, req_parent_path};
use bbox_core::service::CoreService;
use log::{info, warn};
use minijinja::context;
use std::io::Write;
Expand Down
2 changes: 1 addition & 1 deletion bbox-asset-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ mod runtime_templates;
mod service;

use crate::service::AssetService;
use bbox_common::service::run_service;
use bbox_core::service::run_service;

fn main() {
run_service::<AssetService>().unwrap();
Expand Down
2 changes: 1 addition & 1 deletion bbox-asset-server/src/qgis_plugins.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use bbox_common::{file_search, templates::create_env_embedded};
use bbox_core::{file_search, templates::create_env_embedded};
use configparser::ini::Ini;
use minijinja::{context, Environment};
use once_cell::sync::Lazy;
Expand Down
6 changes: 3 additions & 3 deletions bbox-asset-server/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ use crate::config::AssetserverCfg;
use crate::qgis_plugins::plugin_files;
use actix_web::web;
use async_trait::async_trait;
use bbox_common::app_dir;
use bbox_common::cli::{NoArgs, NoCommands};
use bbox_common::service::{CoreService, OgcApiService};
use bbox_core::app_dir;
use bbox_core::cli::{NoArgs, NoCommands};
use bbox_core::service::{CoreService, OgcApiService};
use clap::ArgMatches;
use log::{info, warn};
use std::collections::HashMap;
Expand Down
2 changes: 1 addition & 1 deletion bbox-common/Cargo.toml → bbox-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "bbox-common"
name = "bbox-core"
version = "0.1.0"
edition = "2018"

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion bbox-common/src/config.rs → bbox-core/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ mod tests {
.merge(Toml::file("Cargo.toml"))
.merge(Env::prefixed("CARGO_"));
let package: Package = config.extract_inner("package").unwrap();
assert_eq!(package.name, "bbox-common");
assert_eq!(package.name, "bbox-core");
assert_eq!(package.edition.unwrap(), "2018");
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion bbox-common/src/service.rs → bbox-core/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl CoreService {
pub fn add_service<T: OgcApiService>(&mut self, svc: &T) {
// Add cli commands
let mut cli = T::CliCommands::augment_subcommands(self.cli.clone());
if std::any::type_name::<T::CliArgs>() != "bbox_common::cli::NoArgs" {
if std::any::type_name::<T::CliArgs>() != "bbox_core::cli::NoArgs" {
cli = T::CliArgs::augment_args(cli);
}
self.cli = cli;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions bbox-feature-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ authors = ["Pirmin Kalberer <pka@sourcepole.ch>"]
edition = "2018"

[features]
html = ["bbox-common/html"]
html = ["bbox-core/html"]

[dependencies]
actix-web = { workspace = true }
async-trait = { workspace = true }
bbox-common = { path = "../bbox-common" }
bbox-core = { path = "../bbox-core" }
clap = { workspace = true }
futures = { workspace = true }
geozero = { workspace = true, features = [ "with-gpkg", "with-postgis-sqlx" ] }
Expand Down
2 changes: 1 addition & 1 deletion bbox-feature-server/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use bbox_common::config::from_config_opt_or_exit;
use bbox_core::config::from_config_opt_or_exit;
use serde::Deserialize;

#[derive(Deserialize, Default, Debug)]
Expand Down
2 changes: 1 addition & 1 deletion bbox-feature-server/src/datasource/gpkg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::error::{self, Result};
use crate::filter_params::FilterParams;
use crate::inventory::FeatureCollection;
use async_trait::async_trait;
use bbox_common::ogcapi::*;
use bbox_core::ogcapi::*;
use futures::TryStreamExt;
use geozero::{geojson, wkb};
use log::warn;
Expand Down
2 changes: 1 addition & 1 deletion bbox-feature-server/src/datasource/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::error::Result;
use crate::filter_params::FilterParams;
use crate::inventory::FeatureCollection;
use async_trait::async_trait;
use bbox_common::ogcapi::*;
use bbox_core::ogcapi::*;

pub mod gpkg;
pub mod postgis;
Expand Down
2 changes: 1 addition & 1 deletion bbox-feature-server/src/datasource/postgis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::error::Result;
use crate::filter_params::FilterParams;
use crate::inventory::FeatureCollection;
use async_trait::async_trait;
use bbox_common::ogcapi::*;
use bbox_core::ogcapi::*;
use futures::TryStreamExt;
use log::warn;
use sqlx::postgres::{PgPool, PgPoolOptions, PgRow};
Expand Down
10 changes: 5 additions & 5 deletions bbox-feature-server/src/endpoints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ use crate::filter_params::FilterParams;
use crate::inventory::Inventory;
use crate::service::FeatureService;
use actix_web::{web, Error, HttpRequest, HttpResponse};
use bbox_common::api::OgcApiInventory;
use bbox_common::endpoints::absurl;
use bbox_common::ogcapi::{ApiLink, CoreCollections};
use bbox_common::service::CoreService;
use bbox_common::templates::{create_env_embedded, html_accepted, render_endpoint};
use bbox_core::api::OgcApiInventory;
use bbox_core::endpoints::absurl;
use bbox_core::ogcapi::{ApiLink, CoreCollections};
use bbox_core::service::CoreService;
use bbox_core::templates::{create_env_embedded, html_accepted, render_endpoint};
use minijinja::{context, Environment};
use once_cell::sync::Lazy;
use rust_embed::RustEmbed;
Expand Down
4 changes: 2 additions & 2 deletions bbox-feature-server/src/inventory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use crate::datasource::gpkg::GpkgDatasource;
use crate::datasource::postgis::PgDatasource;
use crate::datasource::{CollectionDatasource, CollectionInfo};
use crate::filter_params::FilterParams;
use bbox_common::file_search;
use bbox_common::ogcapi::*;
use bbox_core::file_search;
use bbox_core::ogcapi::*;
use log::{info, warn};
use std::collections::HashMap;

Expand Down
2 changes: 1 addition & 1 deletion bbox-feature-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ mod inventory;
mod service;

use crate::service::FeatureService;
use bbox_common::service::run_service;
use bbox_core::service::run_service;

fn main() {
run_service::<FeatureService>().unwrap();
Expand Down
6 changes: 3 additions & 3 deletions bbox-feature-server/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ use crate::config::DatasourceCfg;
use crate::inventory::Inventory;
use actix_web::web;
use async_trait::async_trait;
use bbox_common::cli::{NoArgs, NoCommands};
use bbox_common::ogcapi::{ApiLink, CoreCollection};
use bbox_common::service::{CoreService, OgcApiService};
use bbox_core::cli::{NoArgs, NoCommands};
use bbox_core::ogcapi::{ApiLink, CoreCollection};
use bbox_core::service::{CoreService, OgcApiService};
use clap::ArgMatches;

#[derive(Clone, Default)]
Expand Down
2 changes: 1 addition & 1 deletion bbox-map-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ actix-web = { workspace = true }
async-process = "1.0.0"
async-trait = { workspace = true }
awc = { workspace = true }
bbox-common = { path = "../bbox-common" }
bbox-core = { path = "../bbox-core" }
bufstream = "0.1.4"
clap = { workspace = true }
deadpool = { version = "0.9.2", default-features = false, features = ["managed", "rt_tokio_1"] }
Expand Down
4 changes: 2 additions & 2 deletions bbox-map-server/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::wms_fcgi_backend::{MockFcgiBackend, QgisFcgiBackend, UmnFcgiBackend};
use bbox_common::cli::CommonCommands;
use bbox_common::config::from_config_opt_or_exit;
use bbox_core::cli::CommonCommands;
use bbox_core::config::from_config_opt_or_exit;
use clap::{ArgMatches, FromArgMatches};
use log::warn;
use serde::Deserialize;
Expand Down
4 changes: 2 additions & 2 deletions bbox-map-server/src/endpoints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use crate::fcgi_process::*;
use crate::metrics::{wms_metrics, WmsMetrics};
use crate::service::MapService;
use actix_web::{guard, web, HttpRequest, HttpResponse};
use bbox_common::endpoints::TileResponse;
use bbox_common::service::CoreService;
use bbox_core::endpoints::TileResponse;
use bbox_core::service::CoreService;
use log::{debug, info, warn};
use opentelemetry::{
global,
Expand Down
2 changes: 1 addition & 1 deletion bbox-map-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mod wms_capabilities;
mod wms_fcgi_backend;

use crate::service::MapService;
use bbox_common::service::run_service;
use bbox_core::service::run_service;

fn main() {
run_service::<MapService>().unwrap();
Expand Down
4 changes: 2 additions & 2 deletions bbox-map-server/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use crate::metrics::init_metrics;
use crate::wms_fcgi_backend::detect_backends;
use actix_web::web;
use async_trait::async_trait;
use bbox_common::cli::{NoArgs, NoCommands};
use bbox_common::service::{CoreService, OgcApiService};
use bbox_core::cli::{NoArgs, NoCommands};
use bbox_core::service::{CoreService, OgcApiService};
use clap::ArgMatches;
use prometheus::Registry;
use std::collections::HashMap;
Expand Down
2 changes: 1 addition & 1 deletion bbox-map-server/src/wms_fcgi_backend.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::config::*;
use crate::fcgi_process::FcgiProcessPool;
use crate::inventory::*;
use bbox_common::{app_dir, file_search};
use bbox_core::{app_dir, file_search};
use log::info;
use std::collections::{HashMap, HashSet};
use std::env;
Expand Down
2 changes: 1 addition & 1 deletion bbox-map-viewer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2018"

[dependencies]
actix-web = { workspace = true }
bbox-common = { path = "../bbox-common", features=["html"] }
bbox-core = { path = "../bbox-core", features=["html"] }
bbox-feature-server = { path = "../bbox-feature-server" }
bbox-map-server = { path = "../bbox-map-server" }
log = { workspace = true }
Expand Down
6 changes: 3 additions & 3 deletions bbox-map-viewer/src/endpoints.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use crate::qwc2_config::*;
use actix_web::{get, web, Error, HttpRequest, HttpResponse};
use bbox_common::endpoints::abs_req_baseurl;
use bbox_common::static_files::EmbedFile;
use bbox_common::templates::create_env_embedded;
use bbox_core::endpoints::abs_req_baseurl;
use bbox_core::static_files::EmbedFile;
use bbox_core::templates::create_env_embedded;
use bbox_map_server::inventory::{Inventory, WmsService};
use minijinja::{context, Environment};
use once_cell::sync::Lazy;
Expand Down
2 changes: 1 addition & 1 deletion bbox-processes-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ actix-files = "0.6.0"
actix-web = { workspace = true }
async-trait = { workspace = true }
awc = { workspace = true }
bbox-common = { path = "../bbox-common" }
bbox-core = { path = "../bbox-core" }
chrono = { version = "0.4", features = ["serde"] }
clap = { workspace = true }
log = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions bbox-processes-server/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use bbox_common::config::config_error_exit;
use bbox_core::config::config_error_exit;
use serde::Deserialize;

#[derive(Deserialize, Default, Debug)]
Expand All @@ -22,7 +22,7 @@ pub struct DagsterBackendCfg {

impl ProcessesServerCfg {
pub fn from_config() -> Self {
let config = bbox_common::config::app_config();
let config = bbox_core::config::app_config();
if config.find_value("processes").is_ok() {
let cfg: Self = config
.extract_inner("processes")
Expand Down
2 changes: 1 addition & 1 deletion bbox-processes-server/src/endpoints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use actix_files::NamedFile;
use actix_web::{
http::header::ContentEncoding, http::StatusCode, web, Either, HttpRequest, HttpResponse,
};
use bbox_common::service::CoreService;
use bbox_core::service::CoreService;
use log::{info, warn};
use serde_json::json;

Expand Down
2 changes: 1 addition & 1 deletion bbox-processes-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ mod models;
mod service;

use crate::service::ProcessesService;
use bbox_common::service::run_service;
use bbox_core::service::run_service;

fn main() {
run_service::<ProcessesService>().unwrap();
Expand Down
Loading

0 comments on commit 5b44f45

Please sign in to comment.