From 13ac1bf864151324886dc480600aabe95532cf01 Mon Sep 17 00:00:00 2001 From: Gerard CL Date: Thu, 3 Oct 2024 20:57:10 +0200 Subject: [PATCH] release 5.2.0 for rust crate built offering --- .github/workflows/CICD.yml | 17 ++++++++++++++++- CHANGELOG.md | 4 ++++ Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 14 +++++++++++++- pyproject.toml | 2 +- 6 files changed, 36 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 415db7f..7a7f2cc 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -214,7 +214,7 @@ jobs: path: dist release: - name: Release + name: Release (PyPI) runs-on: ubuntu-latest if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }} needs: [linux, musllinux, windows, macos, sdist] @@ -239,3 +239,18 @@ jobs: with: command: upload args: --non-interactive --skip-existing wheels-*/* + + release: + name: Publish (crates.io) + if: startsWith(github.ref, 'refs/tags/') + needs: [build] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - name: Publish + run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index ef41f55..35ce42e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v5.2.0 (2024-10-03) + +* Publish Rust crate binary via crates.io [#202](https://github.com/gerardcl/renfe-cli/issues/202) + ## v5.1.0 (2024-10-02) * Enable Renfe Cercanías GTFS dataset [#200](https://github.com/gerardcl/renfe-cli/issues/200) diff --git a/Cargo.lock b/Cargo.lock index b1fc40d..70de2da 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -925,7 +925,7 @@ dependencies = [ [[package]] name = "renfe-cli" -version = "5.1.0" +version = "5.2.0" dependencies = [ "chrono", "getopts", diff --git a/Cargo.toml b/Cargo.toml index bb5a87e..a1a015a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "renfe-cli" -version = "5.1.0" +version = "5.2.0" edition = "2021" authors = ["Gerard C.L. "] license = "BSD-3-Clause" diff --git a/README.md b/README.md index e20a3c1..7107b05 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,15 @@ # Renfe Timetables CLI -Get faster Renfe trains timetables in your terminal, with Python3.7+ support. +Get faster Renfe trains timetables in your terminal, with Python3.8+ support. No longer need to open the browser! Just keep using your terminal 😀 It supports both [Horarios de alta velocidad, larga distancia y media distancia](https://data.renfe.com/dataset/horarios-de-alta-velocidad-larga-distancia-y-media-distancia) (default option, as in the web) and [Renfe Cercanías](https://data.renfe.com/dataset/horarios-cercanias) GTFS datasets. `renfe-cli` is written in [Rust](https://www.rust-lang.org/) (since v4.0.0) and published to [pypi.org](https://pypi.org/project/renfe-cli/) as a Python package (CLI and library). +It is provided as a Python package due to historical reasons, but was ported to Rust to showcase Rust's interoperability and performance improvements that can offer to the Python ecosystem. Nevertheless, one can optionally use the built [renfe-cli](https://crates.io/crates/renfe-cli) crate that is publised to crates.io. + See the [changelog](https://github.com/gerardcl/renfe-cli/blob/master/CHANGELOG.md). **NOTE** since I am more often using Rodalies trains I have created [rodalies-cli](https://github.com/gerardcl/rodalies-cli). I hope you like it too! @@ -17,12 +19,22 @@ See the [changelog](https://github.com/gerardcl/renfe-cli/blob/master/CHANGELOG. ## Installation +### Python package + Install Python CLI package [renfe-cli](https://pypi.org/project/renfe-cli/) ```bash pip install renfe-cli --upgrade ``` +### Rust crate (optional) + +Install the Rust crate [renfe-cli](https://crates.io/crates/renfe-cli) + +```bash +cargo install renfe-cli +``` + ## Usage (CLI) The CLI uses the official and latest Renfe's GTFS dataset, from [Horarios de alta velocidad, larga distancia y media distancia](https://data.renfe.com/dataset/horarios-de-alta-velocidad-larga-distancia-y-media-distancia), by default. Optionally, one can enable searching over [Renfe Cercanías GTFS dataset](https://data.renfe.com/dataset/horarios-cercanias) (expect longer load time in this case). diff --git a/pyproject.toml b/pyproject.toml index 7c33e87..3a4c383 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "renfe-cli" -requires-python = ">=3.7" +requires-python = ">=3.8" authors = [ {name = "Gerard Castillo Lasheras", email = "gerardcl@gmail.com"}, ]