From 3788606c246c367baf567ba6bb900104239b8877 Mon Sep 17 00:00:00 2001 From: Nolan Conaway Date: Mon, 20 Nov 2023 21:32:20 -0500 Subject: [PATCH 01/11] fix readme, actions --- .github/workflows/push.yml | 11 ++++--- .github/workflows/release_to_pypi.yml | 6 ++-- readme.md | 47 +++------------------------ 3 files changed, 13 insertions(+), 51 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 54a9735..23a9bf9 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: ["3.7", "3.8", "3.9", "3.10"] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] include: - python-version: "3.6" os: "ubuntu-20.04" @@ -25,14 +25,15 @@ jobs: uses: actions/cache@v3 with: path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} - restore-keys: | - ${{ runner.os }}-pip- + key: | + "pip-{0}-{1}-{2}".format( + runner.os, matrix.python-version, hashFiles('setup.py') + ) - name: Install Dependencies run: | python -m pip install --upgrade pip - pip install --editable .[dev] + pip install .[dev] - name: Black run: black src test --check --verbose diff --git a/.github/workflows/release_to_pypi.yml b/.github/workflows/release_to_pypi.yml index 2df3d6d..c2fa7ff 100644 --- a/.github/workflows/release_to_pypi.yml +++ b/.github/workflows/release_to_pypi.yml @@ -12,15 +12,13 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: "3.7" + python-version: "3.10" - name: Set up Cache uses: actions/cache@v3 with: path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} - restore-keys: | - ${{ runner.os }}-pip- + key: pip-${{ runner.os }}-3.9-${{ hashFiles('setup.py') }} - name: Install Dependencies run: | diff --git a/readme.md b/readme.md index 951ed78..f76e356 100644 --- a/readme.md +++ b/readme.md @@ -24,32 +24,6 @@ pip install git+https://github.com/nolanbconaway/underground.git#egg=underground To request data from the MTA, you'll also need a free API key. [Register here](https://api.mta.info/). -### Version 0.2.7.4 vs 0.3.0 - -On May 1 2020, the MTA is sunsetting the [datamine.mta.info](http://datamine.mta.info/) service. The new API ([api.mta.info](https://api.mta.info/)) provides identical data but with a new request API. - -Users of 0.2.x will need to migrate by doing the following: - -1. **Get a new API key at [api.mta.info](https://api.mta.info/).** This key is longer than the one provided by the datamine API. Underground understands this key in the same way as the old one. -2. **Replace all feed IDs with route IDs or URLs.** The feed IDs have changed for the new API, and not all feeds have IDs any more. Version 0.3 of Underground was built with a `route_or_url` concept for feed selection. Users may provide the URL for the feed they want (see [this page](https://api.mta.info/#/subwayRealTimeFeeds)), or they may provide a route ID (in which case the appropriate URL is then selected). - -Code from v0.2.x such as this: - -```python -feed = SubwayFeed.get(metadata.get_feed_id('Q')) -``` - -Now becomes in v0.3: - -```python -# under the hood, the correct URL is selected. -feed = SubwayFeed.get('Q') - -# or -url = 'https://api-endpoint.mta.info/Dataservice/mtagtfsfeeds/nyct%2Fgtfs-nqrw' -feed = SubwayFeed.get(url) -``` - ## Python API Once you have your API key, use the Python API like: @@ -102,22 +76,6 @@ feed = SubwayFeed.get(URL) The `underground` command line tool is also installed with the package. -``` -$ underground --help -Usage: underground [OPTIONS] COMMAND [ARGS]... - - Command line handlers for MTA realtime data. - -Options: - --help Show this message and exit. - -Commands: - feed Request an MTA feed. - findstops Find your stop ID. - stops Print out train departure times for all stops on a subway line. - version Print the underground version. -``` - ### `feed` ``` $ underground feed --help @@ -167,6 +125,11 @@ Options: provided. -t, --timezone TEXT Output timezone. Ignored if --epoch. Default to NYC time. + -s, --stalled-timeout INTEGER Number of seconds between the last movement + of a train and the API update before + considering a train stalled. Default is 90 as + recommended by the MTA. Numbers less than 1 + disable this check. --help Show this message and exit. ``` From 3fa4c8156aab74006941b3cec2bbb36a2a56c914 Mon Sep 17 00:00:00 2001 From: Nolan Conaway Date: Mon, 20 Nov 2023 21:35:11 -0500 Subject: [PATCH 02/11] update readme link --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index f76e356..4af3e12 100644 --- a/readme.md +++ b/readme.md @@ -1,7 +1,7 @@ # Python MTA Utilities [![badge](https://github.com/nolanbconaway/underground/workflows/Push/badge.svg)](https://github.com/nolanbconaway/underground/actions) -[![codecov](https://codecov.io/gh/nolanbconaway/underground/branch/master/graph/badge.svg)](https://codecov.io/gh/nolanbconaway/underground) +[![codecov](https://codecov.io/gh/nolanbconaway/underground/branch/main/graph/badge.svg)](https://codecov.io/gh/nolanbconaway/underground) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/underground)](https://pypi.org/project/underground/) [![PyPI](https://img.shields.io/pypi/v/underground)](https://pypi.org/project/underground/) From af81c066a06855a3cac91577675a3520fab3d43e Mon Sep 17 00:00:00 2001 From: Nolan Conaway Date: Mon, 20 Nov 2023 21:35:53 -0500 Subject: [PATCH 03/11] push only --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 23a9bf9..8ac0ffc 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -1,6 +1,6 @@ name: Push -on: [push, pull_request] +on: push jobs: build: From b55b305eb2295d7daf4475f64b59697669c21a7e Mon Sep 17 00:00:00 2001 From: Nolan Conaway Date: Mon, 20 Nov 2023 21:39:26 -0500 Subject: [PATCH 04/11] fix cache --- .github/workflows/push.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 8ac0ffc..2ef257d 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -26,9 +26,14 @@ jobs: with: path: ~/.cache/pip key: | - "pip-{0}-{1}-{2}".format( - runner.os, matrix.python-version, hashFiles('setup.py') - ) + ${{ + format( + 'pip-{0}-{1}-{2}', + runner.os, + matrix.python-version, + hashFiles('setup.py') + ) + }} - name: Install Dependencies run: | From 190ed3b868263696e6d18acda3b7174dce8a374d Mon Sep 17 00:00:00 2001 From: Nolan Conaway Date: Mon, 20 Nov 2023 21:44:54 -0500 Subject: [PATCH 05/11] pin requires better --- setup.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/setup.py b/setup.py index 844e10b..04eb85b 100644 --- a/setup.py +++ b/setup.py @@ -8,23 +8,23 @@ VERSION = (THIS_DIRECTORY / "src" / "underground" / "version").read_text().strip() INSTALL_REQUIRES = [ - "requests>=2.22", + "requests==2.*", "google~=2.0", "gtfs-realtime-bindings==0.0.6", "protobuf>=3.19.6,<=3.20.3", - "protobuf3-to-dict>=0.1.5", + "protobuf3-to-dict==0.1.*", "click~=7.0", "pydantic~=1.9.2", "pytz>=2019.2", ] DEV_REQUIRES = [ - "pytest>=5.0", - "tox>=3.13", - "black==19.10b0", - "pytest-cov>=2.8", - "codecov>=2.0", - "requests-mock>=1.7.0", + "pytest==7.*", + "tox==4.*", + "black==23.*" + "pytest-cov==4.*", + "codecov==2.*", + "requests-mock==1.*", ] # use readme as long description From e8a8ba5647641df27ee1fb027d337febca12837e Mon Sep 17 00:00:00 2001 From: Nolan Conaway Date: Mon, 20 Nov 2023 22:01:04 -0500 Subject: [PATCH 06/11] update requires, black --- setup.py | 6 ++- src/underground/cli/feed.py | 2 +- src/underground/cli/findstops.py | 4 +- src/underground/feed.py | 25 ++++++------ src/underground/models.py | 66 ++++++++++++++++---------------- test/test_cli.py | 6 ++- test/test_models.py | 2 +- tox.ini | 2 +- 8 files changed, 58 insertions(+), 55 deletions(-) diff --git a/setup.py b/setup.py index 04eb85b..6cc315c 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ "gtfs-realtime-bindings==0.0.6", "protobuf>=3.19.6,<=3.20.3", "protobuf3-to-dict==0.1.*", - "click~=7.0", + "click>=7,<9", "pydantic~=1.9.2", "pytz>=2019.2", ] @@ -21,7 +21,7 @@ DEV_REQUIRES = [ "pytest==7.*", "tox==4.*", - "black==23.*" + "black==23.*", "pytest-cov==4.*", "codecov==2.*", "requests-mock==1.*", @@ -45,6 +45,8 @@ "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ], keywords=["nyc", "transit", "subway", "command-line", "cli"], license="MIT", diff --git a/src/underground/cli/feed.py b/src/underground/cli/feed.py index 138c7f0..317caf4 100644 --- a/src/underground/cli/feed.py +++ b/src/underground/cli/feed.py @@ -39,7 +39,7 @@ def main(route_or_url, api_key, output_json, retries): \b underground feed Q --json > feed_nrqw.json - + \b URL='https://api-endpoint.mta.info/Dataservice/mtagtfsfeeds/nyct%2Fgtfs-nqrw' && underground feed $URL --json > feed_nrqw.json diff --git a/src/underground/cli/findstops.py b/src/underground/cli/findstops.py index 51f9ae0..f4c01e4 100644 --- a/src/underground/cli/findstops.py +++ b/src/underground/cli/findstops.py @@ -29,9 +29,9 @@ def request_data() -> zipfile.ZipFile: ) def main(query, output_json): """Find your stop ID. - + Query a location and look for your stop ID, like: - + $ underground findstops parkside av """ query_str = " ".join(query).lower().strip() # make into single string diff --git a/src/underground/feed.py b/src/underground/feed.py index 0e8a15f..c40416d 100644 --- a/src/underground/feed.py +++ b/src/underground/feed.py @@ -18,12 +18,12 @@ class EmptyFeedError(Exception): def load_protobuf(protobuf_bytes: bytes) -> dict: """Process a protobuf bytes object into native python. - + Parameters ---------- protobuf_bytes : bytes Protobuuf data, as returned from the raw request. - + Returns ------- Processed feed data. @@ -42,15 +42,15 @@ def request(route_or_url: str, api_key: str = None) -> bytes: """Send a HTTP GET request to the MTA for realtime feed data. Occassionally a feed is requested as the MTA is writing updated data to the file, - and the feed's contents are not complete. This function does _not_ validate the + and the feed's contents are not complete. This function does _not_ validate the contents of the data, but only returns the request contents as served by the MTA. - + Parameters ---------- route_or_url : str Route ID or feed url (per ``https://api.mta.info/#/subwayRealTimeFeeds``). api_key : str - MTA API key. If not provided, it will be read from the $MTA_API_KEY env + MTA API key. If not provided, it will be read from the $MTA_API_KEY env variable. Returns @@ -86,28 +86,28 @@ def request_robust( """Request feed data with validations and retries. Occassionally a feed is requested as the MTA is writing updated data to the file, - and the feed's contents are not complete. This function validates data completeness - and retries if the data are not complete. Since we are processing the protobuf + and the feed's contents are not complete. This function validates data completeness + and retries if the data are not complete. Since we are processing the protobuf anyway, there is an option to return the processed data as familiar python objects. - + Parameters ---------- route_or_url : str Route ID or feed url (per ``https://api.mta.info/#/subwayRealTimeFeeds``). retries : int Number of retry attempts, with 1 second timeout between attempts. - Set to -1 for unlimited. Default 100. + Set to -1 for unlimited. Default 100. api_key : str - MTA API key. If not provided, it will be read from the $MTA_API_KEY env + MTA API key. If not provided, it will be read from the $MTA_API_KEY env variable. return_dict : bool Option to return the process data as a dict rather than as raw protobuf data. This is equivalent to running ``load_protobuf(request_robust(...))``. - + Returns ------- bytes or dict - The current GTFS data as bytes or a dictionary, depending on the + The current GTFS data as bytes or a dictionary, depending on the ``return_dict`` flag. """ @@ -119,7 +119,6 @@ def request_robust( break # break if success except (EmptyFeedError, google.protobuf.message.DecodeError): - # raise if we're out of retries if attempt == retries: raise diff --git a/src/underground/models.py b/src/underground/models.py index 3b13301..65ae75c 100644 --- a/src/underground/models.py +++ b/src/underground/models.py @@ -64,7 +64,7 @@ def check_route(cls, route_id): @property def route_id_mapped(self): """Find the parent route ID. - + This is helpful for grabbing the, e.g., 5 Train when you might have a 5X. """ return metadata.ROUTE_REMAP[self.route_id] @@ -83,12 +83,12 @@ class StopTimeUpdate(pydantic.BaseModel): currently approaching, stopped at or about to leave. A stop is dropped from the sequence when the train departs the station. - Transit times are provided at all in-between stops except at those locations where - there are “scheduled holds”. At those locations both arrival and departure times + Transit times are provided at all in-between stops except at those locations where + there are “scheduled holds”. At those locations both arrival and departure times are given. - Note that the predicted times are not updated when the train is not moving. Feed - consumers can detect this condition using the timestamp in the VehiclePosition + Note that the predicted times are not updated when the train is not moving. Feed + consumers can detect this condition using the timestamp in the VehiclePosition message. """ @@ -99,7 +99,7 @@ class StopTimeUpdate(pydantic.BaseModel): @property def depart_or_arrive(self) -> UnixTimestamp: """Return the departure or arrival time if either are specified. - + This OR should usually be called because the MTA is inconsistent about when arrival/departure are specified, but when both are supplied they are usually the same time. @@ -113,12 +113,12 @@ def depart_or_arrive(self) -> UnixTimestamp: class TripUpdate(pydantic.BaseModel): """Info on trips that are underway or scheduled to start within 30 mins. - Trips are usually assigned to a physical train a few minutes before the scheduled + Trips are usually assigned to a physical train a few minutes before the scheduled start time, sometimes just a few seconds before. - If a trip is included in the GTFS-realtime feed, there is a high probability that - it will depart from its originating terminal as planned. It is more likely that a - train that is never assigned a trip identifier to be changed or cancelled than an + If a trip is included in the GTFS-realtime feed, there is a high probability that + it will depart from its originating terminal as planned. It is more likely that a + train that is never assigned a trip identifier to be changed or cancelled than an assigned one. """ @@ -128,28 +128,28 @@ class TripUpdate(pydantic.BaseModel): class Vehicle(pydantic.BaseModel): """Data model for the vehicle feed message. - + From the MTA docs: - - A VehiclePosition entity is provided for every trip when it starts moving. Note that - a train can be assigned (see TripUpdate) but has not started to move (e.g. a train + + A VehiclePosition entity is provided for every trip when it starts moving. Note that + a train can be assigned (see TripUpdate) but has not started to move (e.g. a train waiting to leave the origin station), therefore, no VehiclePosition is provided. - The motivation to include VehiclePosition is to provide the timestamp field. This - is the time of the last detected movement of the train. This allows feed consumers - to detect the situation when a train stops moving (aka stalled). The platform - countdown clocks only count down when trains are moving otherwise they persist the - last published arrival time for that train. If one wants to mimic this behavior you + The motivation to include VehiclePosition is to provide the timestamp field. This + is the time of the last detected movement of the train. This allows feed consumers + to detect the situation when a train stops moving (aka stalled). The platform + countdown clocks only count down when trains are moving otherwise they persist the + last published arrival time for that train. If one wants to mimic this behavior you must first determine the absence of movement (stalled train condition) ), then the countdown must be stopped. - As an example, a countdown could be stopped for a trip when the difference between - the timestamp in the VehiclePosition and the timestamp in the field header is + As an example, a countdown could be stopped for a trip when the difference between + the timestamp in the VehiclePosition and the timestamp in the field header is greater than, 90 seconds. - - Note: since VehiclePosition information is not provided until the train starts - moving, it is recommended that feed consumers use the origin terminal departure to - determine a train stalled condition. + + Note: since VehiclePosition information is not provided until the train starts + moving, it is recommended that feed consumers use the origin terminal departure to + determine a train stalled condition. """ trip: Trip @@ -160,7 +160,7 @@ class Vehicle(pydantic.BaseModel): class Entity(pydantic.BaseModel): """Model for an element within feed entity. - + As a side note, I have never found a case where there is BOTH a VehiclePosition and a TripUpdate. """ @@ -172,7 +172,7 @@ class Entity(pydantic.BaseModel): class SubwayFeed(pydantic.BaseModel): """Model for the main MTA feed data structure. - + Includes methods for easy creation and parsing of data. """ @@ -182,25 +182,25 @@ class SubwayFeed(pydantic.BaseModel): @staticmethod def get(route_or_url: str, retries: int = 100, api_key: str = None) -> "SubwayFeed": """Request feed data from the MTA. - + Parameters ---------- route_or_url : str - Route ID or feed url (per ``https://api.mta.info/#/subwayRealTimeFeeds``). - If a route, the URL for that route is looked up. All routes served by that + Route ID or feed url (per ``https://api.mta.info/#/subwayRealTimeFeeds``). + If a route, the URL for that route is looked up. All routes served by that URL will be included in the result. retries : int Number of retry attempts, with 1 second timeout between attempts. - Set to -1 for unlimited. Default 100. + Set to -1 for unlimited. Default 100. api_key : str - MTA API key. If not provided, it will be read from the $MTA_API_KEY env + MTA API key. If not provided, it will be read from the $MTA_API_KEY env variable. Returns ------- SubwayFeed An instance of the SubwayFeed class with the requested data. - + """ return SubwayFeed( **feed.request_robust( diff --git a/test/test_cli.py b/test/test_cli.py index 6a17fa6..bcdc1aa 100644 --- a/test/test_cli.py +++ b/test/test_cli.py @@ -179,7 +179,8 @@ def test_stopstxt(monkeypatch, args): content = zipfile.ZipFile(io.BytesIO(file.read())) monkeypatch.setattr( - "underground.cli.findstops.request_data", lambda: content, + "underground.cli.findstops.request_data", + lambda: content, ) runner = CliRunner() result = runner.invoke(findstops_cli.main, args) @@ -195,7 +196,8 @@ def test_stopstxt_json(monkeypatch, args): content = zipfile.ZipFile(io.BytesIO(file.read())) monkeypatch.setattr( - "underground.cli.findstops.request_data", lambda: content, + "underground.cli.findstops.request_data", + lambda: content, ) runner = CliRunner() result = runner.invoke(findstops_cli.main, args + ["--json"]) diff --git a/test/test_models.py b/test/test_models.py index cdf6342..32e6814 100644 --- a/test/test_models.py +++ b/test/test_models.py @@ -234,7 +234,7 @@ def test_extract_dict_stalled_train_omitted(): def test_empty_route_id(): """Test the route functionality when the route id is a blacnk string. - + This uses example data i found in the wild. """ trip = {"route_id": "", "start_date": "20191120", "trip_id": "060750_..N"} diff --git a/tox.ini b/tox.ini index 7623b3a..ee55ccf 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ # content of: tox.ini , put in same dir as setup.py [tox] -envlist = py36,py37,py38,p39,py310 +envlist = py36,py37,py38,p39,py310,py311,py312 skip_missing_interpreters = true [testenv] From 52fb5bc816d4f0cb5e06a6dcbcdf10aabdb21e16 Mon Sep 17 00:00:00 2001 From: Nolan Conaway Date: Mon, 20 Nov 2023 22:06:17 -0500 Subject: [PATCH 07/11] expose readme as data --- .github/workflows/release_to_pypi.yml | 6 +++--- setup.py | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release_to_pypi.yml b/.github/workflows/release_to_pypi.yml index c2fa7ff..45edff3 100644 --- a/.github/workflows/release_to_pypi.yml +++ b/.github/workflows/release_to_pypi.yml @@ -22,11 +22,11 @@ jobs: - name: Install Dependencies run: | - pip install --upgrade pip - pip install twine wheel --upgrade + pip install pip==23.* + pip install twine==4.* build==1.* - name: Build Distribution - run: python setup.py sdist bdist_wheel + run: python -m build - name: Publish Python distribution to PyPI uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/setup.py b/setup.py index 6cc315c..bec9137 100644 --- a/setup.py +++ b/setup.py @@ -56,4 +56,5 @@ extras_require=dict(dev=DEV_REQUIRES), entry_points={"console_scripts": ["underground = underground.cli.cli:entry_point"]}, package_data={"underground": ["version"]}, + data_files=[("", ["readme.md"])], # add the readme ) From 9a374ada039e9c005df592e6db3f8399bd150b49 Mon Sep 17 00:00:00 2001 From: Nolan Conaway Date: Mon, 20 Nov 2023 22:07:55 -0500 Subject: [PATCH 08/11] tox for py3.6 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index bec9137..a268813 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ DEV_REQUIRES = [ "pytest==7.*", - "tox==4.*", + "tox>=3,<5", "black==23.*", "pytest-cov==4.*", "codecov==2.*", From 99c417c81d31b529b86e1cb94560e7183f891ca4 Mon Sep 17 00:00:00 2001 From: Nolan Conaway Date: Mon, 20 Nov 2023 22:11:08 -0500 Subject: [PATCH 09/11] drop 36 --- .github/workflows/push.yml | 12 +----------- .github/workflows/release_to_pypi.yml | 2 +- setup.py | 3 +-- tox.ini | 2 +- 4 files changed, 4 insertions(+), 15 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 2ef257d..0a6686f 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -9,9 +9,6 @@ jobs: matrix: os: [ubuntu-latest] python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] - include: - - python-version: "3.6" - os: "ubuntu-20.04" steps: - uses: actions/checkout@v3 @@ -26,14 +23,7 @@ jobs: with: path: ~/.cache/pip key: | - ${{ - format( - 'pip-{0}-{1}-{2}', - runner.os, - matrix.python-version, - hashFiles('setup.py') - ) - }} + ${{ format('pip-{0}-{1}', matrix.python-version, hashFiles('setup.py')) }} - name: Install Dependencies run: | diff --git a/.github/workflows/release_to_pypi.yml b/.github/workflows/release_to_pypi.yml index 45edff3..3fea909 100644 --- a/.github/workflows/release_to_pypi.yml +++ b/.github/workflows/release_to_pypi.yml @@ -18,7 +18,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.cache/pip - key: pip-${{ runner.os }}-3.9-${{ hashFiles('setup.py') }} + key: pip-3.9-${{ hashFiles('setup.py') }} - name: Install Dependencies run: | diff --git a/setup.py b/setup.py index a268813..b361d8a 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ DEV_REQUIRES = [ "pytest==7.*", - "tox>=3,<5", + "tox==4.*", "black==23.*", "pytest-cov==4.*", "codecov==2.*", @@ -40,7 +40,6 @@ author_email="nolanbconaway@gmail.com", url="https://github.com/nolanbconaway/underground", classifiers=[ - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", diff --git a/tox.ini b/tox.ini index ee55ccf..28327d9 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ # content of: tox.ini , put in same dir as setup.py [tox] -envlist = py36,py37,py38,p39,py310,py311,py312 +envlist = py37,py38,p39,py310,py311,py312 skip_missing_interpreters = true [testenv] From 0a343bc1adb4fa3fa5738293393e0f2bb7ae2a64 Mon Sep 17 00:00:00 2001 From: Nolan Conaway Date: Mon, 20 Nov 2023 22:12:56 -0500 Subject: [PATCH 10/11] pin pip --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 0a6686f..6445f28 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -27,7 +27,7 @@ jobs: - name: Install Dependencies run: | - python -m pip install --upgrade pip + pip install pip==23.* pip install .[dev] - name: Black From d5e8de3c43444e0106ba5297514a28ee91133a45 Mon Sep 17 00:00:00 2001 From: Nolan Conaway Date: Mon, 20 Nov 2023 22:13:30 -0500 Subject: [PATCH 11/11] bump version --- src/underground/version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/underground/version b/src/underground/version index 42045ac..1d0ba9e 100644 --- a/src/underground/version +++ b/src/underground/version @@ -1 +1 @@ -0.3.4 +0.4.0