Skip to content

Commit 6a3bb06

Browse files
committed
refactor: split code to multi-project workspace (geo, http, models li… (#5)
* refactor: split code to multi-project workspace (geo, http, models libraries) ### Key Changes - **Geographical Data Handling (`ralertsinua-geo`)**: Introduction of modules for mapping in Ukraine, handling geometric data, and structures for map bounds. - **HTTP Client Functionality (`ralertsinua-http`)**: Refactoring of `AlertsInUaClient` to simplify configuration handling by accepting `base_url` and `token` directly in its constructor. - **Data Models (`ralertsinua-models`)**: New data structures for representing geographical regions and encapsulation of models in a new module for accessibility. - **General Refactoring**: Updates to import statements and configurations to align with the new project structure. These changes aim to enhance modularity, maintainability, and scalability of the codebase by segregating different functionalities into distinct libraries.
1 parent 2c4fb54 commit 6a3bb06

Some content is hidden

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

59 files changed

+2278
-1991
lines changed

.data/config.toml

-11
This file was deleted.

.editorconfig

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
root = true
4+
5+
[*]
6+
indent_style = space
7+
indent_size = 4
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
end_of_line = lf
11+
12+
[*.md]
13+
trim_trailing_whitespace = false
14+
15+
[Makefile]
16+
indent_style = tab
17+
trim_trailing_whitespace = false

.envrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export {{crate_name | shouty_snake_case}}_CONFIG=`pwd`/.config
22
export {{crate_name | shouty_snake_case}}_DATA=`pwd`/.data
3-
export {{crate_name | shouty_snake_case}}_LOG_LEVEL=debug
3+
export {{crate_name | shouty_snake_case}}_LOG_LEVEL=debug

.gitattributes

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Set the default behavior for all files.
2+
* text=auto eol=lf
3+
4+
# Normalized and converts to native line endings on checkout.
5+
*.rs text

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ jobs:
4141
with:
4242
args: >
4343
-Dsonar.externalIssuesReportPaths=sonar-issues.json
44-
-Dcommunity.rust.lcov.reportPaths=lcov.info
44+
-Dcommunity.rust.lcov.reportPaths=lcov.info

.gitignore

+2-3
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ rust-project.json
4545
.ionide
4646

4747
### Local
48-
# Ignore all local history of files
49-
.data/*.sqlite
50-
.data/*.log
48+
tmp/
49+
assets/*.sqlite
5150

5251
# End of https://www.toptal.com/developers/gitignore/api/rust,rust-analyzer,visualstudiocode,dotenv

.pre-commit-config.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.6.0
4+
hooks:
5+
- id: end-of-file-fixer
6+
- id: trailing-whitespace
7+
- id: check-yaml
8+
- id: check-json
9+
- id: check-toml
10+
- id: check-merge-conflict
11+
- id: check-case-conflict
12+
- id: detect-private-key
13+
- repo: https://github.com/doublify/pre-commit-rust
14+
rev: master
15+
hooks:
16+
- id: fmt
17+
- id: cargo-check
18+
- id: clippy
19+
exclude: '.vscode'
20+
default_stages:
21+
- 'pre-commit'
22+
- 'pre-push'

.vscode/launch.json

+10-13
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
{
2-
// Use IntelliSense to learn about possible attributes.
3-
// Hover to view descriptions of existing attributes.
4-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
52
"version": "0.2.0",
63
"configurations": [
74
{
@@ -12,11 +9,11 @@
129
"args": [
1310
// "watch -x",
1411
"build",
15-
"--bin=alertsinua-tui",
16-
"--package=alertsinua-tui"
12+
"--bin=ralertsinua",
13+
"--package=ralertsinua"
1714
],
1815
"filter": {
19-
"name": "alertsinua-tui",
16+
"name": "ralertsinua",
2017
"kind": "bin"
2118
}
2219
},
@@ -30,16 +27,16 @@
3027
{
3128
"type": "lldb",
3229
"request": "launch",
33-
"name": "Debug unit tests in library 'alertsinua-tui'",
30+
"name": "Debug unit tests in library 'ralertsinua'",
3431
"cargo": {
3532
"args": [
3633
"test",
3734
"--no-run",
3835
"--lib",
39-
"--package=alertsinua-tui"
36+
"--package=ralertsinua"
4037
],
4138
"filter": {
42-
"name": "alertsinua-tui",
39+
"name": "ralertsinua",
4340
"kind": "lib"
4441
}
4542
},
@@ -49,16 +46,16 @@
4946
{
5047
"type": "lldb",
5148
"request": "launch",
52-
"name": "Debug unit tests in executable 'alertsinua-tui'",
49+
"name": "Debug unit tests in executable 'ralertsinua'",
5350
"cargo": {
5451
"args": [
5552
"test",
5653
"--no-run",
57-
"--bin=alertsinua-tui",
58-
"--package=alertsinua-tui"
54+
"--bin=ralertsinua",
55+
"--package=ralertsinua"
5956
],
6057
"filter": {
61-
"name": "alertsinua-tui",
58+
"name": "ralertsinua",
6259
"kind": "bin"
6360
}
6461
},

.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
"lldb.showDisassembly": "auto",
88
"lldb.dereferencePointers": true,
99
"lldb.consoleMode": "evaluate"
10-
}
10+
}

0 commit comments

Comments
 (0)