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

P2 (all in 1) #315

Open
wants to merge 100 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
53ef6e4
ensure all items are there
why-not-try-calmer Nov 27, 2023
5cf52c5
add report
why-not-try-calmer Nov 27, 2023
076fc43
non-naive datetimes
why-not-try-calmer Nov 27, 2023
714e52c
more assertions
why-not-try-calmer Nov 27, 2023
8bbb241
removed unnecessary
why-not-try-calmer Nov 27, 2023
f9a9faf
remove files
why-not-try-calmer Nov 27, 2023
7b53124
type hints, format
why-not-try-calmer Nov 28, 2023
911cddf
moving CL_LV data to Data_year
why-not-try-calmer Nov 28, 2023
7b6ea66
moved AN_TE to Data_hour
why-not-try-calmer Nov 28, 2023
9d1c4b8
gitignore
why-not-try-calmer Nov 28, 2023
ff4fd3c
Removing dead code and more type hints (#309)
why-not-try-calmer Dec 1, 2023
c3ac57d
test for precision
why-not-try-calmer Dec 1, 2023
3e03ede
checking for 3 decimals
why-not-try-calmer Dec 1, 2023
df44afa
---
why-not-try-calmer Dec 1, 2023
e2e91ec
__init__ helper function
why-not-try-calmer Dec 1, 2023
6bb7f47
test
why-not-try-calmer Dec 1, 2023
78ca3ba
Merge branch 'master' into 269-imprecise-columns-in-MD-hour-week
why-not-try-calmer Dec 1, 2023
f73827f
---
why-not-try-calmer Dec 1, 2023
e2afecc
---
why-not-try-calmer Dec 1, 2023
1a403f9
Merge branch 'master' into 268-missing-items-from-count-details
why-not-try-calmer Dec 1, 2023
8254b65
--
why-not-try-calmer Dec 11, 2023
e5a951e
---
why-not-try-calmer Dec 11, 2023
67d61d5
---
why-not-try-calmer Dec 11, 2023
c58a4f2
Revert "--"
why-not-try-calmer Dec 11, 2023
9110bef
fixed test
why-not-try-calmer Dec 11, 2023
7720a46
loading some test data and creating some outputs
why-not-try-calmer Nov 27, 2023
1324ce9
format
why-not-try-calmer Nov 27, 2023
6006d4a
assertion
why-not-try-calmer Nov 27, 2023
53987ac
renamed
why-not-try-calmer Nov 27, 2023
68e87c3
2 not 4 reports
why-not-try-calmer Dec 4, 2023
9e424b0
test and testdata
why-not-try-calmer Dec 4, 2023
043a156
correct values in Count
why-not-try-calmer Dec 4, 2023
e7ac7f1
---
why-not-try-calmer Dec 4, 2023
a59d26e
correct expected values in tests
why-not-try-calmer Dec 4, 2023
d3f6bcc
ensure that created files are a multiple of sections numbers
why-not-try-calmer Dec 4, 2023
8313408
more assertions
why-not-try-calmer Dec 4, 2023
8d46a0f
typo in yearly
why-not-try-calmer Dec 4, 2023
43df5e0
250 files
why-not-try-calmer Dec 4, 2023
2d3bddf
yearly reports use only 1 section
why-not-try-calmer Dec 5, 2023
af99aed
50 weeks
why-not-try-calmer Dec 5, 2023
a7e51ed
added 'sections_ids' optional parameter to issue extra files in yearl…
why-not-try-calmer Dec 5, 2023
d26d33d
found a few mistakes in original code, adding fixes
why-not-try-calmer Dec 5, 2023
2a53d8d
valuesqueryset removed
why-not-try-calmer Dec 5, 2023
c417317
restoring a few original lines
why-not-try-calmer Dec 5, 2023
31d960b
asserting qs
why-not-try-calmer Dec 7, 2023
5afa166
limit sections to those whose lanes match a countdetail
why-not-try-calmer Dec 11, 2023
358fec0
count_detail
why-not-try-calmer Dec 11, 2023
50695c9
---
why-not-try-calmer Dec 11, 2023
0c3d140
---
why-not-try-calmer Dec 11, 2023
70a7945
---
why-not-try-calmer Dec 11, 2023
1ed5cd9
guarding off section with only 1 lane in statistics
why-not-try-calmer Dec 11, 2023
93f96d9
fixed test
why-not-try-calmer Dec 12, 2023
a369037
docstring
why-not-try-calmer Dec 12, 2023
ded6307
type hints, isort
why-not-try-calmer Dec 12, 2023
e2d75c3
test
why-not-try-calmer Dec 12, 2023
f02aab5
report status
why-not-try-calmer Dec 12, 2023
c695fbb
more accurate aggregates and annotations
why-not-try-calmer Dec 18, 2023
6ef8c14
cleanup
why-not-try-calmer Dec 18, 2023
ba843a8
finalized aggregates
why-not-try-calmer Dec 18, 2023
4005265
small fix in vallues by day and month
why-not-try-calmer Dec 19, 2023
f730107
requirements
why-not-try-calmer Dec 19, 2023
12c2571
cleanup
why-not-try-calmer Dec 19, 2023
a2ff7f3
Merge branch '269-imprecise-columns-in-MD-hour-week' into p2
why-not-try-calmer Dec 19, 2023
c76a670
Merge branch '271-bike-yearly-report-columns' into p2
why-not-try-calmer Dec 19, 2023
4ceb000
Merge branch '268-missing-items-from-count-details' into p2
why-not-try-calmer Dec 19, 2023
16a61bb
Merge branch '278-missing-reports-beyond-1st-section' into p2
why-not-try-calmer Dec 19, 2023
621faaf
missing import
why-not-try-calmer Dec 19, 2023
b1c2272
idem
why-not-try-calmer Dec 19, 2023
02d9da6
typo
why-not-try-calmer Dec 19, 2023
2d06273
fix type error when sections dists are 'NA'
why-not-try-calmer Dec 21, 2023
dc4be31
test_outputs
why-not-try-calmer Dec 21, 2023
c3ca916
renamed section match
why-not-try-calmer Dec 21, 2023
432966e
no match for Python 3.9 on Windows
why-not-try-calmer Dec 22, 2023
d4438a7
format
why-not-try-calmer Dec 22, 2023
7877873
handful of small fixes
why-not-try-calmer Jan 7, 2024
332b016
catching KeyError s when removing spreadsheet's tabs
why-not-try-calmer Jan 7, 2024
4126882
improved removal from spreadsheet logic
why-not-try-calmer Jan 7, 2024
0a04624
ci
why-not-try-calmer Jan 7, 2024
dae030e
Merge branch 'master' into p2
why-not-try-calmer Jan 7, 2024
4ff97bd
no validation
why-not-try-calmer Jan 7, 2024
b335937
Union instead of "|" for Python < 3.10
why-not-try-calmer Jan 9, 2024
033f97d
update report
why-not-try-calmer Jan 15, 2024
a2f0ab3
checking output reports
why-not-try-calmer Jan 15, 2024
4da26d3
testing clean output of yearly MD reports (WIP)
why-not-try-calmer Jan 15, 2024
72d6206
fix aggregation for values_by_day_of_week
why-not-try-calmer Jan 15, 2024
cd3e939
fix tjm, add runs, to yearly bike report
why-not-try-calmer Jan 17, 2024
f12b84b
format
why-not-try-calmer Jan 17, 2024
f57f120
fixed "Data_class" tab
why-not-try-calmer Jan 17, 2024
7f5e913
improved values_by_day_and_direction, decoupled pulling data and rend…
why-not-try-calmer Jan 19, 2024
2b1bd1c
total_runs_by_hour_one_direction
why-not-try-calmer Jan 19, 2024
09a114d
tota_runs_by_hour_one_direction: writer
why-not-try-calmer Jan 19, 2024
938f6b9
Merge branch 'master' into p2
why-not-try-calmer Jan 22, 2024
ff5a701
removing now unnecessary tests
why-not-try-calmer Jan 22, 2024
de4927a
test_outputs
why-not-try-calmer Jan 23, 2024
b22f8fd
moved test_data out of testing dir in view of a rebase onto master
why-not-try-calmer Jan 23, 2024
b793159
Merge branch 'master' into p2
why-not-try-calmer Jan 23, 2024
a5ddf9a
import status to avoid surprises in tests
why-not-try-calmer Jan 23, 2024
76a9e67
gitignore
why-not-try-calmer Jan 23, 2024
b5005f3
trying out Pierre's patch
why-not-try-calmer Jan 30, 2024
b3c09d2
format
why-not-try-calmer Jan 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 10 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ on:
pull_request:

jobs:
build_package_lint_check:
name: Build, package, lint, check
ensure_build_package:
name: Ensure build and package
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
cache: pip
- name: Setup, build, install
run: |
pip install build
Expand All @@ -29,6 +29,13 @@ jobs:
run: qgis-plugin-ci --no-validation package 'test'
- name: Lint
run: black . --check
- name: Check
run: pyright . > pyright_report.txt
continue-on-error: true
- uses: actions/upload-artifact@v4
with:
name: Pyright Report
path: pyright_report.txt

test:
name: Test
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**/__pycache__/
**/coverage_report.txt
test_outputs/
*.nix
*.log
.venv/
Expand Down
10 changes: 8 additions & 2 deletions comptages/comptages.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,8 @@ def do_yearly_report_action(self):
yrb.run()
else:
self.tm.allTasksFinished.connect(
partial(self.all_tasks_finished, report)
) # FIXME `report` is a mystery.
partial(self.all_tasks_finished, "report")
)

# TODO: consider the chosed class too
self.tm.addTask(
Expand All @@ -440,6 +440,12 @@ def do_yearly_report_action(self):
)
# TODO: check if there are comptages for this section and year

QgsMessageLog.logMessage(
"{} - Generate yearly report action ended".format(datetime.now()),
"Comptages",
Qgis.Info,
)

def do_import_ics_action(self):
IcsImporter(self.layers)

Expand Down
3 changes: 2 additions & 1 deletion comptages/core/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def _parse_and_write(
with open(file_path, encoding=get_file_encoding(file_path)) as f:
for i, line in enumerate(f):
rows = line_parser(line, **kwargs)
print("i=", i)
if not rows:
continue

Expand Down Expand Up @@ -337,7 +338,7 @@ def _parse_file_header(file_path: str):
elif file_header["CLASS"][:5] == "FHWA ":
file_header["CLASS"] = "FHWA13"
elif file_header["CLASS"] == "CAT-Cycle_dist-empat":
file_header["CLASS"] = "SPCH-MD 5C"
file_header["CLASS"] = "SPCH-MD_5C"

return file_header

Expand Down
Loading
Loading