Skip to content

Commit

Permalink
Merge pull request #75 from podaac/develop
Browse files Browse the repository at this point in the history
release 1.9.1
  • Loading branch information
mike-gangl authored May 19, 2022
2 parents bd21411 + 94a6fca commit ff9c179
Show file tree
Hide file tree
Showing 12 changed files with 450 additions and 118 deletions.
30 changes: 18 additions & 12 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,35 @@ on:

jobs:
build:

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: [ "3.8", "3.9", "3.10" ]
poetry-version: [ "1.1" ]
os: [ ubuntu-18.04, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
poetry install
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest -m "not regression"
poetry run pytest -m "not regression"
- name: netrc-gen
uses: extractions/netrc@v1
with:
Expand All @@ -42,4 +48,4 @@ jobs:
password: ${{ secrets.EDL_OPS_PASSWORD }}
- name: Regression Test with pytest
run: |
pytest -m "regression"
poetry run pytest -m "regression"
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ jobs:

runs-on: ubuntu-latest
steps:


- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: 3.10
- name: Install Poetry
uses: abatilo/[email protected]
with:
poetry-version: 1.1
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade build
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
poetry install
- name: build
run: |
python -m build
poetry build
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ build/
dist/
podaac_data_subscriber.egg-info/
.idea/
venv
venv
.pytest_cache
MUR25-JPL-L4-GLOB-v04.2
41 changes: 33 additions & 8 deletions BUILD.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,46 @@
# Manually building
If you are interested in contributing to this project, you will need to be able to manually build it.

## Make sure we have all the build Dependencies
However, if you just want to download and use this project, please refer back to the [Installation](./README.md#installation) instructions in the README file.

# Manually building (for development)

This project is built with [Poetry](https://python-poetry.org/).
In order to build it, please follow the [installation instructions](https://python-poetry.org/docs/#installation) for poetry first.
If you are unfamiliar with poetry as a build tool, it is recommended to review the [Basic Usage](https://python-poetry.org/docs/basic-usage/) documentation before continuing.

## Installing
```
python3 -m pip install --upgrade build
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade twine
poetry install
```

## Running tests
All tests
```
poetry run pytest
```

Exclude regression tests
```
poetry run pytest -m "not regression"
```

Only regression tests
```
poetry run pytest -m "regression"
```


## Clean, build, and upload
```
rm -r dist
python3 -m build
poetry install
poetry build
# pypi test upload
# python3 -m twine upload --repository testpypi dist/*
# poetry config repositories.testpypi https://test.pypi.org/legacy/
# poetry publish -r testpypi
#pypi upload
python3 -m twine upload dist/*
poetry publish
```

## Install a specific version
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)


## [1.9.1]
### Changed
- Switched to [poetry](https://python-poetry.org/) as the build tool for the project

## [1.9.0]
### Added
Expand Down
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,12 @@ The Downloader is useful if you need to download PO.DAAC data once in a while or

The subscriber is useful for users who need to continuously pull the latest data from the PO.DAAC archive. If you feed data into a model or real time process, the subscriber allows you to repeatedly run the script and only download the latest data.

## Dependencies

Aside from **python 3**, the only dependency is the python 'requests' module, which can be installed via pip. Pip is the `package installer for python`. you don't need to know much of anything about python or pip, as long as you have it installed on the machine you're using.

```
python -m pip install requests
```

## Installation

The subscriber and downloader scripes are available in the [pypi python repository](https://pypi.org/project/podaac-data-subscriber/), it can be installed via pip:
Both subscriber and download require Python >= 3.8.

The subscriber and downloader scripts are available in the [pypi python repository](https://pypi.org/project/podaac-data-subscriber/), it can be installed via pip:

```
pip install podaac-data-subscriber
Expand Down
Loading

0 comments on commit ff9c179

Please sign in to comment.