diff --git a/.github/workflows/all-os-tests.yml b/.github/workflows/all-os-tests.yml index 7c44adc0..d19f055e 100644 --- a/.github/workflows/all-os-tests.yml +++ b/.github/workflows/all-os-tests.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9"] + python-version: ["3.11.6"] os: ["macos-latest", "ubuntu-latest", "windows-latest"] steps: - uses: actions/checkout@v3 @@ -26,6 +26,7 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt + pip install . - name: Run Integration Tests # run only those tests marked runinteg & with no osmosis deps run: | pytest -m runinteg --runinteg --deselect tests/osm/ diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 9955734d..3a50f323 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9"] + python-version: ["3.11.6"] os: ["macos-latest", "ubuntu-latest"] steps: - uses: actions/checkout@v3 @@ -26,6 +26,7 @@ jobs: run: | python -m pip install --upgrade pip if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + pip install . - name: Install java uses: actions/setup-java@v3 with: diff --git a/.github/workflows/sphinx-render.yml b/.github/workflows/sphinx-render.yml index 94cd86e8..c6d43efd 100644 --- a/.github/workflows/sphinx-render.yml +++ b/.github/workflows/sphinx-render.yml @@ -3,7 +3,7 @@ name: "Render docs" on: push env: - PYTHON_VERSION: "3.9" + PYTHON_VERSION: "3.11.6" PUSH_BRANCH: "refs/heads/dev" jobs: @@ -21,6 +21,7 @@ jobs: run: | python -m pip install --upgrade pip if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + pip install . - name: Sphinx build # use -W to turn warnings into errors run: | make -C docs/ html SPHINXOPTS="-W" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 71a29293..7a912e03 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -30,8 +30,8 @@ Install Dependencies: Package set-up and installation: -1. Setup a new conda env: `conda create -n r5py python=3.9.13` -2. Activate the environment: `conda activate r5py` +1. Setup a new conda env: `conda env create -f environment.yml` +2. Activate the environment: `conda activate transport-performance` 3. Launch terminal and change directory to wherever you keep your GitHub repos: `cd ~/Documents` 4. Clone this repo, eg with https: `git clone https://github.com/datasciencecampus/transport-network-performance.git` 5. Change directory to the repo: `cd transport-network-performance` diff --git a/environment.yml b/environment.yml new file mode 100644 index 00000000..24b7e932 --- /dev/null +++ b/environment.yml @@ -0,0 +1,9 @@ +name: transport-performance +channels: + - conda-forge +dependencies: + - python=3.11.6 + - cartopy + - proj # Required to build cartopy (can't be installed with pip) +# create your environment with the below line +# conda env create -f environment.yml diff --git a/pyproject.toml b/pyproject.toml index 043a3ba5..2936f414 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] build-backend = "setuptools.build_meta" -requires = ["setuptools>=61.0.0", "wheel"] +requires = ["setuptools==65.6.3", "wheel"] [project] name = "transport_performance" @@ -16,7 +16,7 @@ classifiers = [ "Operating System :: MacOS", "Topic :: Scientific/Engineering :: GIS", ] -requires-python = ">=3.9, <3.10" +requires-python = "==3.11.6" version = "0.0.1" [tool.setuptools.packages.find] diff --git a/requirements.txt b/requirements.txt index 61ad0091..4e75e11f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,33 +1,23 @@ -pre-commit -r5py==0.1.0 -gtfs_kit==5.2.7 -rasterio -matplotlib>=3.7.0 -scipy -rioxarray -geopandas -geocube -pyproj>=3.6.0 -pytest +beautifulsoup4 +cartopy coverage -pyprojroot -pytest-lazy-fixture +numpy>=1.25.0 # test suite will fail if user installed lower than this +geocube +gtfs_kit==5.2.7 ipykernel==6.23.1 +kaleido +mapclassify +munkres # new parent import flagged pipdeptools +nbformat pandas<2.1.0 -beautifulsoup4 -requests -pytest-mock -toml plotly -nbformat>=4.2.0 +pre-commit +pretty_html_table +pyprojroot +pytest-lazy-fixture +pytest-mock +r5py==0.1.0 scikit-image -cartopy -folium -mapclassify seaborn -pretty_html_table -kaleido -numpy>=1.25.0 # test suite will fail if user installed lower than this -sphinx sphinx-rtd-theme --e . +toml diff --git a/src/transport_performance/gtfs/routes.py b/src/transport_performance/gtfs/routes.py index 58494f75..bb0908d4 100644 --- a/src/transport_performance/gtfs/routes.py +++ b/src/transport_performance/gtfs/routes.py @@ -12,12 +12,6 @@ _is_expected_filetype, ) -warnings.filterwarnings( - action="ignore", category=DeprecationWarning, module=".*pkg_resources" -) -# see https://github.com/datasciencecampus/transport-network-performance/ -# issues/19 - def _construct_extended_schema_table( some_soup: BeautifulSoup, cd_list: list, desc_list: list