Skip to content

Commit ae8f75d

Browse files
authored
Merge pull request #33 from paarnes/dev
Dev
2 parents 46e2b2a + 1116c5c commit ae8f75d

22 files changed

+1381
-812
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Upload Python Package to PYPI
2+
3+
on:
4+
release:
5+
types:
6+
- created
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v2
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: 3.8
20+
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install --upgrade setuptools wheel build twine
25+
26+
- name: Get current version from pyproject.toml
27+
id: get_version
28+
run: echo "::set-output name=version::$(grep -oP '(?<=version = ")[^"]*' pyproject.toml)"
29+
30+
- name: Increment version
31+
id: increment_version
32+
run: echo "::set-output name=version::$(python -c "version='${{ steps.get_version.outputs.version }}'.split('.'); version[-1] = str(int(version[-1]) + 1); print('.'.join(version))")"
33+
34+
- name: Update version in pyproject.toml
35+
run: sed -i "s/version = \".*\"/version = \"${{ steps.increment_version.outputs.version }}\"/" pyproject.toml
36+
37+
- name: Commit changes to pyproject.toml
38+
run: |
39+
git config --local user.email "[email protected]"
40+
git config --local user.name "Per Helge Aarnes"
41+
git add pyproject.toml
42+
git commit -m "Bump version to ${{ steps.increment_version.outputs.version }}"
43+
44+
- name: Push changes to the master branch
45+
run: git push origin HEAD:${{ github.ref }}
46+
if: github.ref == 'refs/heads/master'
47+
48+
- name: Build and upload to PyPI (master branch)
49+
if: github.ref == 'refs/heads/master' && github.event_name == 'release' && github.event.action == 'created'
50+
run: |
51+
python -m build
52+
twine upload --repository-url https://upload.pypi.org/legacy/ --username __token__ --password ${{ secrets.PYPI_TOKEN }} dist/*
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Upload Python Package to TEST PYPI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v2
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: 3.8
20+
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install --upgrade setuptools wheel build twine
25+
26+
- name: Get current version from pyproject.toml
27+
id: get_version
28+
run: echo "::set-output name=version::$(grep -oP '(?<=version = ")[^"]*' pyproject.toml)"
29+
30+
- name: Increment version
31+
id: increment_version
32+
run: echo "::set-output name=version::$(python -c "version='${{ steps.get_version.outputs.version }}'.split('.'); version[-1] = str(int(version[-1]) + 1); print('.'.join(version))")"
33+
34+
- name: Update version in pyproject.toml
35+
run: sed -i "s/version = \".*\"/version = \"${{ steps.increment_version.outputs.version }}\"/" pyproject.toml
36+
37+
- name: Build and upload to Test PyPI (master branch)
38+
if: github.ref == 'refs/heads/master'
39+
run: |
40+
python -m build
41+
twine upload --repository-url https://test.pypi.org/legacy/ --username __token__ --password ${{ secrets.TEST_PYPI_TOKEN }} dist/*

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,9 @@ dmypy.json
128128
# Pyre type checker
129129
.pyre/
130130

131-
Admin
131+
Admin
132132
launch.json
133+
SLETT_*
133134

134135
Output_Files/
135136
.vscode/

README.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -110,19 +110,18 @@ cutoff_elevation_angle = 10 # drop satellites lower than 10 degrees
110110
nav_data_rate = 60 # desired datarate for ephemerides (to improve speed)
111111
112112
analysisResults = GNSS_MultipathAnalysis(rinex_obs_file,
113-
broadcastNav1=rinNav_file,
114-
include_SNR = True,
115-
outputDir = output_folder,
116-
nav_data_rate = nav_data_rate,
117-
cutoff_elevation_angle = cutoff_elevation_angle)
113+
broadcastNav1=rinNav_file,
114+
include_SNR = True,
115+
outputDir = output_folder,
116+
nav_data_rate = nav_data_rate,
117+
cutoff_elevation_angle = cutoff_elevation_angle)
118118
```
119119

120120
#### Read a RINEX observation file
121121
```
122122
from gnssmultipath import readRinexObs
123123
124124
rinObs_file = 'OPEC00NOR_S_20220010000_01D_30S_MO_3.04'
125-
126125
GNSS_obs, GNSS_LLI, GNSS_SS, GNSS_SVs, time_epochs, nepochs, GNSSsystems,\
127126
obsCodes, approxPosition, max_sat, tInterval, markerName, rinexVersion, recType, timeSystem, leapSec, gnssType,\
128127
rinexProgr, rinexDate, antDelta, tFirstObs, tLastObs, clockOffsetsON, GLO_Slot2ChannelMap, success = \
@@ -136,7 +135,6 @@ GNSS_obs, GNSS_LLI, GNSS_SS, GNSS_SVs, time_epochs, nepochs, GNSSsystems,\
136135
from gnssmultipath import Rinex_v3_Reader
137136
138137
rinNav_file = 'BRDC00IGS_R_20220010000_01D_MN.rnx'
139-
140138
navdata = Rinex_v3_Reader().read_rinex_nav(rinNav_file, data_rate=60)
141139
142140
```
@@ -147,8 +145,7 @@ navdata = Rinex_v3_Reader().read_rinex_nav(rinNav_file, data_rate=60)
147145
from gnssmultipath import PickleHandler
148146
149147
path_to_picklefile = 'analysisResults.pkl'
150-
151-
result_dict = PickleHandler.read_pickle(pickl_file)
148+
result_dict = PickleHandler.read_pickle(path_to_picklefile)
152149
153150
154151
```
@@ -158,8 +155,7 @@ result_dict = PickleHandler.read_pickle(pickl_file)
158155
from gnssmultipath import PickleHandler
159156
160157
path_to_picklefile = 'analysisResults.pkl'
161-
162-
result_dict = PickleHandler.read_zstd_pickle(pickl_file)
158+
result_dict = PickleHandler.read_zstd_pickle(path_to_picklefile)
163159
164160
```
165161

build_and_upload_to_pypi.sh

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)