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

Fix : geojson parsing #61

Closed
wants to merge 40 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
0e26877
Update Github Actions
Quentinchampenois Mar 4, 2022
bb71a89
Bump dependencies to 0.25.2
Quentinchampenois Mar 4, 2022
66ea035
Move to Webpacker and update views
Quentinchampenois Mar 4, 2022
3952dc0
Update participatory_processes form
Quentinchampenois Mar 4, 2022
f3c176f
Fix tests
armandfardeau Mar 21, 2022
efce087
Add need in wf
armandfardeau Mar 28, 2022
136667d
Bundle install
armandfardeau Mar 28, 2022
11f2325
Fix offenses
armandfardeau Mar 28, 2022
8bcfdd2
WIP fix js errors
eliegaboriau Jul 4, 2022
454e1be
fix tests
eliegaboriau Jul 4, 2022
5bb2536
Fix map
Quentinchampenois Jul 7, 2022
e55c248
Clear comments and add previously removed condition
Quentinchampenois Jul 7, 2022
f6036ea
Bump to v2.0.0
Quentinchampenois Jul 7, 2022
552ea8f
WIP fix CI
eliegaboriau Jul 11, 2022
db33fec
Merge branch 'fix/interactive_map' of https://github.com/OpenSourcePo…
eliegaboriau Jul 11, 2022
92e3037
fix tests 2.0.0
eliegaboriau Jul 11, 2022
871f2db
lint
eliegaboriau Jul 11, 2022
89a9003
include methods
eliegaboriau Jul 11, 2022
06f82d3
add rake task to install dependencies
eliegaboriau Jul 11, 2022
52007a5
linter
eliegaboriau Jul 11, 2022
ae0f5b8
rename folder
eliegaboriau Jul 11, 2022
68c2156
update readme
eliegaboriau Jul 11, 2022
8b99113
Fix/interactive map 0.26 (#36)
Quentinchampenois Jul 22, 2022
063bd43
Fix - Homepage Interactive Map - Participatory Process Marker (#37)
AyakorK Jul 26, 2022
02c0f78
[Fix] - Marker position on geocoded PP (#38)
Quentinchampenois Aug 3, 2022
6004345
disable zoom on scrolling
eliegaboriau Aug 29, 2022
c869801
Merge pull request #40 from OpenSourcePolitics/disable_zoom
paulinebessoles Aug 30, 2022
3710b53
[Fix] - Place PP by address if defined (#42)
Quentinchampenois Sep 21, 2022
0e80a82
Chores/fix map (#43)
armandfardeau Feb 6, 2023
1d52f95
update gemfile
eliegaboriau Feb 17, 2023
2fefc26
bump 0.27 (#44)
eliegaboriau Apr 18, 2023
fa10180
Removes need
armandfardeau Apr 18, 2023
8859848
Set default epsg to WGS 84 (#52)
armandfardeau Apr 18, 2023
dd68516
Fix js dep (#53)
armandfardeau Apr 18, 2023
e5b1fe6
fix: empty geojson values (#57)
Quentinchampenois May 28, 2024
ab83fbd
fix: Update & Create from geocoding hash
Quentinchampenois Jun 4, 2024
ebf36ab
fix: Reduce hash duplication in coordinate swapper
Quentinchampenois Jun 4, 2024
73bda50
lint: Fix rubocop offenses
Quentinchampenois Jun 4, 2024
1ff2225
fix: Scope create & update
Quentinchampenois Jun 4, 2024
4198908
fix: Handle GeoJSON FeatureCollection
moustachu Sep 11, 2024
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
17 changes: 17 additions & 0 deletions .github/install_proj.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
sudo apt-get update && sudo apt install cmake sqlite libtiff-dev curl libcurl4-openssl-dev libssl-dev -y

if [ ! -d "$PROJ_VERSION" ]; then
curl https://download.osgeo.org/proj/"${PROJ_VERSION}".tar.gz -o "${PROJ_VERSION}".tar.gz
tar -xzf "${PROJ_VERSION}".tar.gz
fi

cd "$PROJ_VERSION" || exit

if [ ! -d "build" ]; then
mkdir build
fi

cd build || exit
cmake ..
sudo cmake --build . -j "$(nproc)" --target install
sudo ldconfig
37 changes: 0 additions & 37 deletions .github/workflows/erblint.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/workflows/rubocop.yml

This file was deleted.

144 changes: 104 additions & 40 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,116 @@
name: Tests
name: "[CI] Tests"
on: [push]

on:
push:
branches:
- develop
- release/*
- "*-stable"
pull_request:
branches-ignore:
- "chore/l10n*"
env:
CI: "true"
CODECOV: "true"
NODE_VERSION: 16.9.1
PROJ_VERSION: proj-9.1.1
DECIDIM_MODULE: decidim-homepage_interactive_map

jobs:
build:
erblint:
name: Erb linting
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: rokroskar/workflow-run-cleanup-action@v0.3.0
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v2.0.0
with:
fetch-depth: 1
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: ERB files linting
run: ./.github/run_erblint.sh
lint:
name: Lint code
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: rokroskar/workflow-run-cleanup-action@v0.3.0
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v2.0.0
with:
fetch-depth: 1
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Run Rubocop
run: bundle exec rubocop -P
test:
name: Tests
runs-on: ubuntu-latest
timeout-minutes: 30
services:
postgres:
image: postgres:11.6-alpine
ports:
- 5432:5432

image: postgres:11
ports: [ "5432:5432" ]
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
POSTGRES_PASSWORD: postgres
env:
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: postgres
DATABASE_HOST: localhost
steps:
- uses: actions/checkout@v2
- name: Set up Ruby 2.7.1
uses: ruby/setup-ruby@v1
- uses: rokroskar/workflow-run-cleanup-action@v0.3.0
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v2.0.0
with:
ruby-version: 2.7.1
- name: Install bundler
run: |
gem install bundler -v "$(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1)"
fetch-depth: 1
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: Get npm cache directory path
id: npm-cache-dir-path
run: echo "::set-output name=dir::$(npm get cache)-${{ env.DECIDIM_MODULE }}"
- uses: actions/cache@v2
id: npm-cache
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
path: ${{ steps.npm-cache-dir-path.outputs.dir }}
key: npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Install gems
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Generate test app
env:
RAILS_ENV: test
DATABASE_USERNAME: postgres
run: |
bundle exec rake test_app
- name: Run tests
env:
RAILS_ENV: test
DATABASE_USERNAME: postgres
npm-
- uses: actions/cache@v2
id: proj-cache
with:
path: ./${{env.PROJ_VERSION}}
key: ${{env.PROJ_VERSION}}
- name: Install PROJ
run: |
bundle exec rspec
./.github/install_proj.sh
- run: |
bundle config set build.rgeo-proj4 --with-proj-dir="/usr/local/bin/"
bundle pristine rgeo-proj4
name: Setup gem
- run: bundle exec rake test_app
name: Create test app
- run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots
name: Create the screenshots folder
- uses: nanasess/setup-chromedriver@v2
- run: npm install
name: Add dependencies
- run: RAILS_ENV=test bundle exec rails assets:precompile
name: Precompile assets
working-directory: ./spec/decidim_dummy_app/
- run: bundle exec rspec
name: RSpec
- uses: codecov/codecov-action@v1
- uses: actions/upload-artifact@v2
if: always()
with:
name: screenshots
path: ./spec/decidim_dummy_app/tmp/screenshots
if-no-files-found: ignore
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16.9.1
2 changes: 1 addition & 1 deletion .rubocop_ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ AllCops:
# If a value is specified for TargetRubyVersion then it is used.
# Else if .ruby-version exists and it contains an MRI version it is used.
# Otherwise we fallback to the oldest officially supported Ruby version (2.0).
TargetRubyVersion: 2.7
TargetRubyVersion: 3.0

RSpec:
Patterns:
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.1
3.0.6
17 changes: 10 additions & 7 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,24 @@

source "https://rubygems.org"

DECIDIM_VERSION = "release/0.24-stable"

ruby RUBY_VERSION

gem "decidim", git: "https://github.com/decidim/decidim", branch: DECIDIM_VERSION
base_path = File.basename(__dir__) == "development_app" ? "../" : ""
require_relative "#{base_path}lib/decidim/homepage_interactive_map/version"

gem "decidim", Decidim::HomepageInteractiveMap::DECIDIM_VERSION
gem "decidim-homepage_interactive_map", path: "."

gem "bootsnap", "~> 1.4"
gem "puma", "~> 5.3.1"
gem "uglifier", "~> 4.1"
gem "puma", "~> 5.5.1"

gem "rgeo", "~> 2.4"
gem "rgeo-proj4", "~> 3.1"

group :development, :test do
gem "byebug", "~> 11.0", platform: :mri

gem "decidim-dev", git: "https://github.com/decidim/decidim", branch: DECIDIM_VERSION
gem "decidim-dev", Decidim::HomepageInteractiveMap::DECIDIM_VERSION
end

group :development do
Expand All @@ -26,5 +29,5 @@ group :development do
gem "rubocop-faker"
gem "spring", "~> 2.0"
gem "spring-watcher-listen", "~> 2.0"
gem "web-console", "~> 3.5"
gem "web-console", "~> 4.0.4"
end
Loading
Loading