Skip to content

Commit a9f7c8e

Browse files
authored
Merge pull request #646 from eskerda/fix-companies
fix companies
2 parents e726d26 + 4034fb4 commit a9f7c8e

File tree

5 files changed

+37
-13
lines changed

5 files changed

+37
-13
lines changed

pybikes/data/controlnet.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"country": "AR",
88
"name": "En la Bici",
99
"latitude": -32.8895,
10-
"longitude": -68.8433
10+
"longitude": -68.8433,
11+
"company": ["Municipalidad de la Ciudad de Mendoza"]
1112
},
1213
"feed_url": "https://enbici.ciudaddemendoza.gob.ar/bici2/mobile/EstacionesUsuarioWeb"
1314
}

pybikes/data/gbfs.json

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,8 @@
586586
"country":"NO",
587587
"name":"Bysykkel",
588588
"longitude":10.752245,
589-
"city":"Oslo"
589+
"city":"Oslo",
590+
"company": ["Urban Sharing AS"]
590591
},
591592
"feed_url": "https://gbfs.urbansharing.com/oslobysykkel.no/gbfs.json"
592593
},
@@ -597,7 +598,8 @@
597598
"country":"NO",
598599
"name":"Bysykkel",
599600
"longitude":5.322054,
600-
"city":"Bergen"
601+
"city":"Bergen",
602+
"company": ["Urban Sharing AS"]
601603
},
602604
"feed_url": "https://gbfs.urbansharing.com/bergenbysykkel.no/gbfs.json"
603605
},
@@ -608,7 +610,8 @@
608610
"country":"NO",
609611
"name":"Bysykkel",
610612
"longitude":10.3936781,
611-
"city":"Trondheim"
613+
"city":"Trondheim",
614+
"company": ["Urban Sharing AS"]
612615
},
613616
"feed_url": "https://gbfs.urbansharing.com/trondheimbysykkel.no/gbfs.json"
614617
},
@@ -722,7 +725,8 @@
722725
"name": "Verona Bike",
723726
"country": "IT",
724727
"latitude": 45.438611,
725-
"longitude": 10.992778
728+
"longitude": 10.992778,
729+
"company": ["IGP S.p.A.", "Urban Sharing AS"]
726730
},
727731
"feed_url": "https://gbfs.urbansharing.com/bikeverona.it/gbfs.json"
728732
},
@@ -823,7 +827,8 @@
823827
"city": "Belfort",
824828
"name": "Optymo",
825829
"longitude": 6.849444,
826-
"country": "FR"
830+
"country": "FR",
831+
"company": ["SMTC 90"]
827832
},
828833
"feed_url": "https://belfort-gbfs.klervi.net/gbfs/gbfs.json"
829834
},
@@ -835,7 +840,8 @@
835840
"city": "A Coruña",
836841
"latitude": 43.3623,
837842
"longitude": -8.4115,
838-
"country": "ES"
843+
"country": "ES",
844+
"company": ["PBSC Urban Solutions"]
839845
},
840846
"feed_url": "https://acoruna.publicbikesystem.net/customer/gbfs/v2/gbfs.json"
841847
},
@@ -846,7 +852,8 @@
846852
"city": "Aachen",
847853
"name": "Velocity",
848854
"longitude": 6.083611,
849-
"country": "DE"
855+
"country": "DE",
856+
"company": ["Velocity Region Aachen GmbH"]
850857
},
851858
"feed_url": "https://nitro.openvelo.org/aachen/velocity/v2/gbfs.json"
852859
},
@@ -857,7 +864,8 @@
857864
"city": "Québec",
858865
"name": "àVélo",
859866
"longitude": -71.2168,
860-
"country": "CA"
867+
"country": "CA",
868+
"company": ["PBSC Urban Solutions"]
861869
},
862870
"feed_url": "https://quebec.publicbikesystem.net/customer/gbfs/v2/gbfs.json"
863871
},
@@ -868,7 +876,8 @@
868876
"city": "Saguenay",
869877
"name": "Accès Vélo",
870878
"longitude": -71.083333,
871-
"country": "CA"
879+
"country": "CA",
880+
"company": ["PBSC Urban Solutions"]
872881
},
873882
"feed_url": "https://saguenay.publicbikesystem.net/customer/gbfs/v2/gbfs.json",
874883
"force_https": "true"
@@ -880,7 +889,12 @@
880889
"city": "Cd de M\u00e9xico",
881890
"name": "EcoBici",
882891
"longitude": -99.133208,
883-
"country": "MX"
892+
"country": "MX",
893+
"company": [
894+
"5M2 S.A. DE C.V.",
895+
"BKT BICIPÚBLICA S.A. DE C.V.",
896+
"Lyft Inc."
897+
]
884898
},
885899
"feed_url": "https://gbfs.mex.lyftbikes.com/gbfs/gbfs.json"
886900
},

pybikes/data/velib.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"name": "OPEN LICENCE 2.0",
1313
"url": "etalab.gouv.fr/wp-content/uploads/2018/11/open-licence.pdf"
1414
},
15+
"company": ["Smovengo"],
1516
"ebikes": true
1617
},
1718
"feed_url": "https://velib-metropole-opendata.smoove.pro/opendata/Velib_Metropole/gbfs.json"

pybikes/deutschebahn.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ class Callabike(DB):
4646
# All networks within use the same data feed
4747
unifeed = True
4848

49-
meta = {
49+
meta = dict({
5050
'name': 'Call-A-Bike',
51-
}
51+
}, ** DB.meta)
5252

5353
provider = 'CallABike'
5454

tests/test_instances.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ def test_fields(self, instance, i_data, cls, mod):
4646
assert -90 <= instance.meta['latitude'] <= 90
4747
assert -180 <= instance.meta['longitude'] <= 180
4848

49+
assert 'company' in instance.meta
50+
51+
company = instance.meta['company']
52+
err = "[company] expected list, found '%s' for %s" % (
53+
type(company).__name__, company
54+
)
55+
assert isinstance(instance.meta['company'], list), err
56+
4957
def test_uses_scraper(self, instance, i_data, cls, mod):
5058
scraper = pybikes.PyBikesScraper()
5159
request = Mock

0 commit comments

Comments
 (0)