Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

vgrange/rome_slicing_bis #62

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion labonneboite/common/load_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from backports.functools_lru_cache import lru_cache

USE_ROME_SLICING_DATASET = False # Rome slicing dataset is not ready yet
USE_ROME_SLICING_DATASET = True # Rome slicing dataset is not ready yet

if USE_ROME_SLICING_DATASET:
OGR_ROME_FILE = "rome_slicing_dataset/ogr_rome_mapping.csv"
Expand Down
5 changes: 4 additions & 1 deletion labonneboite/common/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,10 @@ def get_companies(self, add_suggestions=False):
if self.company_count <= current_page_size and add_suggestions:

# Suggest other jobs.
alternative_rome_codes = ROME_MOBILITIES[self.rome]
try:
alternative_rome_codes = ROME_MOBILITIES[self.rome]
except KeyError: # FIXME regenerate rome_mobilities dataset after rome slicing
alternative_rome_codes = []
for rome in alternative_rome_codes:
if not rome == self.rome:
company_count = self._get_company_count(rome, self.distance)
Expand Down