diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..2b98bfa --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,45 @@ +name: build + +on: + pull_request: + push: + branches: + - main + release: + types: + - published + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + strategy: + matrix: + runs-on: + - "ubuntu-latest" + - "macos-latest" + - "windows-latest" + fail-fast: false + runs-on: ${{ matrix.runs-on }} + steps: + - if: runner.os == 'Linux' + run: sudo apt install -y pkg-config libusb-1.0-0-dev libftdi1-dev libudev-dev + - uses: actions/checkout@v3 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + - run: cargo build --release + - if: runner.os == 'Linux' || runner.os == 'macOS' + run: chmod +x target/release/packetraven + - uses: vimtor/action-zip@v1.1 + with: + files: target/release/packetraven${{ runner.os == 'Windows' && '.exe' || '' }} + dest: ${{ runner.os }}.zip + - uses: actions/upload-artifact@v3 + with: + name: ${{ runner.os }} + path: target/release/packetraven${{ runner.os == 'Windows' && '.exe' || '' }} + - if: (github.event_name == 'release' && github.event.action == 'published') + uses: svenstaro/upload-release-action@v2 + with: + file: ${{ runner.os }}.zip diff --git a/.github/workflows/tests.yml b/.github/workflows/test.yml similarity index 61% rename from .github/workflows/tests.yml rename to .github/workflows/test.yml index 3980150..8337e32 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/test.yml @@ -1,16 +1,10 @@ -name: tests +name: test on: + pull_request: push: branches: - main - paths: - - '**.rs' - - '.github/workflows/tests.yml' - pull_request: - release: - types: - - published concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -19,11 +13,13 @@ concurrency: jobs: test: name: test (${{ matrix.runs-on }}) - runs-on: ${{ matrix.runs-on }} strategy: - fail-fast: false matrix: - runs-on: [ ubuntu-latest, macos-latest, windows-latest ] + runs-on: + - "ubuntu-latest" + - "macos-latest" + - "windows-latest" + runs-on: ${{ matrix.runs-on }} steps: - if: runner.os == 'Linux' run: sudo apt install -y pkg-config libusb-1.0-0-dev libftdi1-dev libudev-dev @@ -32,11 +28,11 @@ jobs: - run: cargo test test_slow: name: test slow (${{ matrix.runs-on }}) - runs-on: ${{ matrix.runs-on }} strategy: - fail-fast: false matrix: - runs-on: [ ubuntu-latest ] + runs-on: + - ubuntu-latest + runs-on: ${{ matrix.runs-on }} env: APRS_FI_API_KEY: ${{ secrets.APRS_FI_API_KEY }} steps: @@ -49,9 +45,10 @@ jobs: # name: test all features (${{ matrix.runs-on }}) # runs-on: ${{ matrix.runs-on }} # strategy: - # fail-fast: false # matrix: - # runs-on: [ ubuntu-latest ] + # runs-on: + # - ubuntu-latest + # fail-fast: false # services: # postgres: # image: postgis/postgis:latest @@ -75,26 +72,3 @@ jobs: # - uses: actions/checkout@v3 # - uses: actions-rust-lang/setup-rust-toolchain@v1 # - run: cargo test - build: - needs: [ test, test_slow ] - if: (github.event_name == 'release' && github.event.action == 'published') - runs-on: ${{ matrix.runs-on }} - strategy: - fail-fast: false - matrix: - runs-on: [ "ubuntu-latest", "macos-latest", "windows-latest" ] - steps: - - if: runner.os == 'Linux' - run: sudo apt install -y pkg-config libusb-1.0-0-dev libftdi1-dev libudev-dev - - uses: actions/checkout@v3 - - uses: actions-rust-lang/setup-rust-toolchain@v1 - - run: cargo build --release - - uses: actions/upload-artifact@v3 - with: - name: packetraven-${{ runner.os }} - path: target/release/packetraven* - - uses: svenstaro/upload-release-action@v2 - with: - asset_name: packetraven_${{ runner.os }}${{ runner.os == 'Windows' && '.exe' || '' }} - file: target/release/packetraven${{ runner.os == 'Windows' && '.exe' || '' }} - diff --git a/Cargo.lock b/Cargo.lock index a56b006..a37e4ac 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1149,7 +1149,7 @@ dependencies = [ [[package]] name = "packetraven" -version = "4.0.0" +version = "4.0.2" dependencies = [ "aprs-parser", "chrono", diff --git a/Cargo.toml b/Cargo.toml index fc08321..cd7ba04 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "packetraven" authors = ["Zach Burnett "] description = "track high-altitude balloon telemetry from a variety of sources" -version = "4.0.0" +version = "4.0.2" edition = "2021" readme = "README.md" license = "GPL-3.0-or-later" diff --git a/README.md b/README.md index 04919f4..a374349 100644 --- a/README.md +++ b/README.md @@ -22,34 +22,36 @@ The program is designed to be run during a flight and display information in a t ## Instructions -1. Follow [these instructions](https://packetraven.readthedocs.io/en/latest/configuration.html) to create a new configuration file in a text editor, or use the following example: - ```yaml - # example.yaml - connections: - text: - - path: ~/raw_aprs_frames.txt - callsigns: - - W3EAX-8 - - path: http://bpp.umd.edu/archives/Launches/NS-111_2022_07_31/APRS/W3EAX-8%20raw.txt - ``` +1. Follow [these instructions](https://packetraven.readthedocs.io/en/latest/configuration.html) to create a new configuration file in a text editor, or use the following simple example: + ```yaml + # example.yaml + callsigns: + - W3EAX-8 + connections: + sondehub: {} + text: + - path: http://bpp.umd.edu/archives/Launches/NS-111_2022_07_31/APRS/W3EAX-8%20raw.txt + - port: COM3 + baud_rate: 9600 + ``` 2. Download an executable from the [Releases page](https://github.com/UMDBPP/PacketRaven/releases). 3. Open a terminal window. 4. Run the executable you downloaded with the `start` subcommand, and give it the path to your configuration file: - ```shell - packetraven_Windows.exe start example.yaml - ``` + ```shell + packetraven.exe start example.yaml + ``` > [!TIP] > Add `--help` to any command to show usage instructions. 5. You should now see the user interface. Resize your terminal window or decrease the font size as needed. - ![starting screen](https://github.com/UMDBPP/PacketRaven/blob/main/docs/images/example1_log.png) + ![starting screen](https://github.com/UMDBPP/PacketRaven/blob/main/docs/images/example1_log.png) 6. The left and right arrow keys (or `Tab` and `Shift+Tab`) cycle through active tabs, and the up and down arrow keys change the current plot (or scroll through log messages). - ![altitude telemetry plotted over time](https://github.com/UMDBPP/PacketRaven/blob/main/docs/images/example1_altitude.png) + ![altitude telemetry plotted over time](https://github.com/UMDBPP/PacketRaven/blob/main/docs/images/example1_altitude.png) 7. To quit, press `q` or `Esc`. @@ -58,7 +60,7 @@ The program is designed to be run during a flight and display information in a t Use `predict` to retrieve a balloon flight prediction: ```shell -packetraven_Windows.exe predict "2023-08-16T10:00:00" -- -79 39 5 30000 9 +packetraven.exe predict "2023-08-16T10:00:00" -- -79 39 5 30000 9 ``` > [!WARNING] diff --git a/src/main.rs b/src/main.rs index abd4d31..dd04bbb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,7 +15,7 @@ use clap::Parser; lazy_static::lazy_static! { pub static ref DEFAULT_INTERVAL: chrono::Duration = chrono::Duration::seconds(60); pub static ref DATETIME_FORMAT: String = "%Y-%m-%d %H:%M:%S".to_string(); - pub static ref LOG_LEVEL: log::Level = log::Level::Debug; + pub static ref LOG_LEVEL: log::Level = log::Level::Info; } #[derive(Parser)]