Skip to content

Commit

Permalink
replaced pandas with csv, added optimizer, added download sort by fil…
Browse files Browse the repository at this point in the history
…e size, cleaned up math.ciel, removed some TQDMs that were not neccesary, restructured signing and downloading into a batching format

Update requirements
  • Loading branch information
lbeckman314 committed Nov 23, 2022
1 parent f18ca4b commit 1d903b7
Show file tree
Hide file tree
Showing 15 changed files with 451 additions and 3,553 deletions.
93 changes: 93 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

# Optionally debug via SSH
# Ref: https://fleetdm.com/engineering/tips-for-github-actions-usability
#
# To use this step uncomment and place anywhere in the build steps. The build will pause on this step and
# output a ssh address associated with the Github action worker. Helpful for debugging build steps and
# and intermediary files/artifacts.
# Example:
# Web shell: https://tmate.io/t/q8FU3U9SvmMVxAhMHRyExNhr8
# SSH: ssh [email protected]
#
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3

name: DRS Downloader

on:
push:
branches: [ "main", "feature/**" ]
tags:
- '**'
pull_request:
branches: [ "main" ]

permissions:
contents: write

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["macos-latest", "ubuntu-latest", "windows-latest"]
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.9"

- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
pip install -e .
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --statistics
- name: Test with pytest
run: pytest --cov=drs_downloader -k 'not test_terra'

build:
if: startsWith(github.ref, 'refs/tags/')
needs: test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["macos-latest", "ubuntu-latest", "windows-latest"]
steps:
- run: echo github.ref
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install dependencies
run: |
pip install -r requirements.txt pyinstaller
pyinstaller drs_downloader/cli.py --onefile --name drs_downloader
- name: Prepare artifact for release (macOS and Ubuntu)
if: runner.os != 'Windows'
run: zip -j drs-downloader-${{ runner.os }}.zip dist/drs_downloader

- name: Prepare artifact for release (Windows)
if: runner.os == 'Windows'
shell: bash
run: 7z a drs-downloader-${{ runner.os }}.zip ./dist/drs_downloader.exe

- name: Release
uses: softprops/action-gh-release@v1
with:
files: drs-downloader-${{ runner.os }}.zip
41 changes: 0 additions & 41 deletions .github/workflows/python-app.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,5 @@ site/
# ignore pycharm
.idea/

# ignore temp directory
tmp/
Loading

0 comments on commit 1d903b7

Please sign in to comment.