Skip to content

Commit

Permalink
Bugfix 249 warnings (#281)
Browse files Browse the repository at this point in the history
* Delete requirements_36.txt

Python 3.6 no longer supported

* #249 Add test_future_warnings test

* #249 additional sample data

* Bugfix Issue #249 Future Warnings- replace append with pd.concat

* Bugfix issue #249 add the test for future warnings

* Bugfix #249 additional data

* Bugfix Issue #249 additional data that wasn't previously committed

* Bugfix #249 add sum stat import

* Bugfix #249 added workflow to check for Python package vulnerabilities

* Updated requirements.txt for nco and all others

* issue #249 add imports to pandas and warning

* Bugfix 249 future warnings (#280)

* Bump pillow from 8.3.2 to 9.3.0 (#260)

Bumps [pillow](https://github.com/python-pillow/Pillow) from 8.3.2 to 9.3.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](python-pillow/Pillow@8.3.2...9.3.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bugfix 251 test scorecard (#256)

* Replace Python versions 3.8.6 and 3.8.12 with 3.8

* Bugfix #251 replace SettingWithCopyWarning with Warning.  SettingWithCopyWarning no longer available for this check

* Adding double asterisks to end bolding on mulitple lines

Co-authored-by: Julie Prestopnik <[email protected]>

* bugfix_249_warnings (#261)

* Update unit_tests.yml

replace 3.8.6 and 3.8.12 with 3.8 for Python because latest version of ubuntu does not have support for python 3.8.6

* Feature 251 test scorecard (#253)

* Issue #251 In Pandas 1.3 and above, the SettingWithCopy Warning category has been removed.  Replace the check for category=SettingWithCopyWarning with Warning, since SettingWithCopyWarning is a subclass of Warning

* Added ending asterisks for end bold to fix these warnings: WARNING: Inline strong start-string without end-string.

Co-authored-by: Julie Prestopnik <[email protected]>

* Feature 250 test event equalize (#252)

* Remove Python 3.8.6 and 3.8.12 and use Python 3.8 instead.  The latest version of ubuntu no longer has python 3.8.6 available.

* Issue #250 fix the test_equalize_axis_data_no_fcst_var fixture

* Added ending asterisks for end bold to fix these warnings: WARNING: Inline strong start-string without end-string.

* #251 allow test to run check on numpy types regardless of numpy version

* Update unit_tests.yml

add python 3.10 to testing to evaluate package compatibility

* Update unit_tests.yml

remove Python 3.10 there are issues with HDF5

Co-authored-by: Julie Prestopnik <[email protected]>

* Delete requirements_36.txt

Python 3.6 no longer supported

* #249 Add test_future_warnings test

* #249 additional sample data

* Update requirements.txt

https://github.com/dtcenter/METcalcpy/security/dependabot/22

* Update requirements.txt

https://github.com/dtcenter/METcalcpy/security/dependabot/20

* #249 replacing pd.append with pd.concat and adding tests and data

* #249 added tests

* #249 Additional test data

* Revert "Merge branch 'develop' of https://github.com/dtcenter/METcalcpy into bugfix_249_warnings"

This reverts commit 7f203bf, reversing
changes made to dd87d77.

Co-authored-by: Julie Prestopnik <[email protected]>

* Adding file based on testing on Acorn for NCO (#265)

* Per #267, updating modulefiles

* Adding script for testing on WCOSS2

* Correcting filename

* Bugfix release (#272)

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Julie Prestopnik <[email protected]>
Co-authored-by: Hank Fisher <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Julie Prestopnik <[email protected]>
Co-authored-by: Hank Fisher <[email protected]>
  • Loading branch information
4 people authored Feb 23, 2023
1 parent 5292424 commit 93cc002
Show file tree
Hide file tree
Showing 7 changed files with 1,028 additions and 73 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/vulnerabilities.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This workflow will check third-party Python packages for vulnerabilities using pip-audit.
# pip-audit finds vulnerabilities from packages that are dependencies of
# the packages in the requirements.txt file. A summary is generated at the end of the action.
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-githu

name: Python vulnerability check

on:
push:
branches:
- develop
- develop-ref
- feature_*
- main_*
- bugfix_*
- test_*
- issue_*
pull_request:
types: [opened, reopened, synchronize]

jobs:
selftest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install
run: |
python -m venv env/
source env/bin/activate
python -m pip install .
- uses: pypa/[email protected]
with:
inputs: requirements.txt
virtual-environment: env/
local: true
summary: true


2 changes: 1 addition & 1 deletion metcalcpy/agg_stat_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def calculate_values(self):
# get results for axis1
out_frame = self._proceed_with_axis("1")
if self.params['series_val_2']:
out_frame = out_frame.append(self._proceed_with_axis("2"))
out_frame = pd.concat([out_frame, self._proceed_with_axis("2")])

else:
out_frame = pd.DataFrame()
Expand Down
5 changes: 4 additions & 1 deletion metcalcpy/sum_stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
import time
import logging
import yaml
import pandas as pd
import warnings
from inspect import signature

from metcalcpy import GROUP_SEPARATOR
Expand Down Expand Up @@ -182,6 +184,7 @@ def aggregate_special_fields(self, axis='1'):
Args:
axis - y1 or y1 axis
"""
warnings.filterwarnings('error')

# check if indy_vals have a field that need to be aggregated - the field with ';'
has_agg_indy_field = any(any(GROUP_SEPARATOR in i for i in item) for item in self.params['indy_vals'])
Expand Down Expand Up @@ -235,7 +238,7 @@ def aggregate_special_fields(self, axis='1'):
point_data,
self.params['line_type'])

aggregated_values = aggregated_values.append(point_data)
aggregated_values = pd.concat([aggregated_values, point_data])
self.input_data = aggregated_values
self.input_data.reset_index(inplace=True, drop=True)

Expand Down
50 changes: 7 additions & 43 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,49 +1,13 @@
attrs==21.4.0
certifi==2021.10.8
cffi==1.15.0
cftime==1.5.1.1
charset-normalizer==2.0.12
cloudpickle==2.0.0
cryptography==39.0.1
cycler==0.11.0
cytoolz==0.11.0
dask==2022.3.0
fsspec==2022.2.0
idna==3.3
imagecodecs-lite==2019.12.3
imageio==2.6.1
importlib-metadata==4.11.3
imutils==0.5.4
iniconfig==1.1.1
locket==0.2.0
metpy==1.1.0
netCDF4==1.5.7
networkx==2.7.1
metpy==1.3.1
netCDF4==1.6.2
numpy==1.22.3
opencv-python>=4.5.3
packaging==21.3
pandas==1.2.3
partd==1.2.0
pint==0.18
Pillow>=9.2.0
pluggy==1.0.0
pooch==1.6.0
py==1.11.0
pycparser==2.21
pyOpenSSL==22.0.0
pyparsing==3.0.7
pandas==1.5.1
pint==0.19
pytest==7.2.0
pytz==2022.1
PyWavelets==1.1.1
PyYAML==5.4.1
requests==2.27.1
PyYAML==6.0
scikit-image==0.18.1
scipy==1.8.0
six==1.16.0
tifffile==2019.7.26.2
tomli==2.0.1
toolz==0.11.2
typing_extensions==4.1.1
urllib3==1.26.9
xarray==2022.3.0
zipp==3.7.0
scipy==1.8.1
xarray==2022.3.0
28 changes: 0 additions & 28 deletions test/data/agg_stat_and_boot_output.data

This file was deleted.

Loading

0 comments on commit 93cc002

Please sign in to comment.