Skip to content

Commit e7d0293

Browse files
committed
package project
1 parent e86e1b2 commit e7d0293

File tree

6 files changed

+110
-39
lines changed

6 files changed

+110
-39
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
strategy:
3131
fail-fast: true
3232
matrix:
33-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
33+
python-version: ["3.9", "3.10", "3.11", "3.12"]
3434
steps:
3535
- uses: actions/checkout@v4
3636
- name: Set up Python ${{ matrix.python-version }}
@@ -56,7 +56,7 @@ jobs:
5656
- name: Set up Python ${{ matrix.python-version }}
5757
uses: actions/setup-python@v5
5858
with:
59-
python-version: '3.8'
59+
python-version: '3.9'
6060
- name: Install dependencies
6161
run: make install
6262
- name: Test instance changes on this branch
@@ -77,7 +77,7 @@ jobs:
7777
- name: Set up Python ${{ matrix.python-version }}
7878
uses: actions/setup-python@v5
7979
with:
80-
python-version: '3.8'
80+
python-version: '3.9'
8181
- name: Install dependencies
8282
run: make install
8383
- name: Test all instances

Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,20 @@ github-summary: report/$(R_FILE)
5050

5151
.PHONY: clean
5252
clean: clean-report
53+
rm -rf dist pybikes.egg-info
5354

5455
.PHONY: clean-report
5556
clean-report:
5657
rm -rf report/
58+
59+
.PHONY: build
60+
build:
61+
python -m build
62+
63+
.PHONY: test-upload
64+
test-upload: clean build
65+
twine upload -r testpypi dist/*
66+
67+
.PHONY: upload
68+
upload: clean build
69+
twine upload dist/*

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,20 @@ for all different systems.
1515
Installation
1616
------------
1717

18+
Install from PyPI:
19+
20+
```bash
21+
pip install pybikes
22+
```
23+
1824
Install directly from GitHub:
1925
```bash
2026
pip install git+https://github.com/eskerda/pybikes.git
2127
```
2228

2329
Or after downloading/cloning the source:
2430
```bash
25-
python setup.py install
31+
pip install .
2632
```
2733

2834
The following dependencies are required (example using Ubuntu package manager):

pybikes/__init__.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
# -*- coding: utf-8 -*-
2-
# Copyright (C) 2010-2012, eskerda <eskerda@gmail.com>
3-
# Distributed under the AGPL license, see LICENSE.txt
4-
5-
__author__ = "eskerda (eskerda@gmail.com)"
6-
__version__ = "2.0"
7-
__copyright__ = "Copyright (c) 2010-2012 eskerda"
8-
__license__ = "AGPL"
1+
__version__ = "1.0.0.dev0"
92

103
# Top class shortcuts #####################
114
from pybikes.data import get

pyproject.toml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
[build-system]
2+
requires = ["setuptools"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "pybikes"
7+
description = "A python library for scraping bike sharing data"
8+
readme = "README.md"
9+
requires-python = ">=3.9"
10+
license = "LGPL-3.0-or-later"
11+
12+
13+
authors = [
14+
{name = "Lluis Esquerda", email = "eskerda@gmail.com"},
15+
]
16+
17+
maintainers = [
18+
{name = "Lluis Esquerda", email = "eskerda@gmail.com"},
19+
]
20+
21+
keywords = [
22+
"transport",
23+
"open data",
24+
"bike share",
25+
"bike sharing",
26+
]
27+
28+
# https://pypi.org/classifiers/
29+
classifiers = [
30+
"Development Status :: 4 - Beta",
31+
"Intended Audience :: Developers",
32+
"Intended Audience :: Education",
33+
"Intended Audience :: Science/Research",
34+
"Operating System :: OS Independent",
35+
"Programming Language :: Python",
36+
"Programming Language :: Python :: 3",
37+
"Programming Language :: Python :: 3.9",
38+
"Programming Language :: Python :: 3.10",
39+
"Programming Language :: Python :: 3.11",
40+
"Programming Language :: Python :: 3.12",
41+
"Topic :: Scientific/Engineering",
42+
"Topic :: Scientific/Engineering :: GIS",
43+
]
44+
45+
dependencies = [
46+
'requests',
47+
'lxml',
48+
'shapely>=1.5.13',
49+
"importlib_resources; python_version < '3.9'",
50+
'cssselect',
51+
]
52+
53+
dynamic = ["version"]
54+
55+
[project.urls]
56+
Homepage = "https://www.citybik.es"
57+
Documentation = "https://docs.citybik.es"
58+
Source = "https://github.com/eskerda/pybikes"
59+
Tracker = "https://github.com/eskerda/pybikes/issues"
60+
61+
[project.optional-dependencies]
62+
test = [
63+
# tests
64+
"pytest",
65+
"pytest-xdist",
66+
"gitpython",
67+
# lint
68+
"flake8",
69+
# reports:
70+
"jinja2",
71+
# pin pytest-metadata until https://github.com/numirias/pytest-json-report/issues/89
72+
"pytest-metadata==2.0.4",
73+
"pytest-json-report",
74+
]
75+
76+
[tool.setuptools.packages.find]
77+
where = ["."]
78+
include = ["pybikes*"]
79+
exclude = ["tests*"]
80+
81+
[tool.setuptools.package-data]
82+
pybikes = ["data/*.json", "data/*.geojson"]
83+
84+
# So much for declarative, eh
85+
[tool.setuptools.dynamic]
86+
version = {attr = "pybikes.__version__"}

setup.py

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)