Skip to content

Commit

Permalink
v1.5.0; package feature updates, bug fixes, doc updates, API updates
Browse files Browse the repository at this point in the history
  • Loading branch information
amckenna41 committed Mar 3, 2024
1 parent a7818d1 commit 902ddc7
Show file tree
Hide file tree
Showing 31 changed files with 2,327 additions and 1,365 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
python3 -m pip install setuptools wheel twine
pip install flake8 pytest
pip install pytest
pip install codecov
pip install pytest-cov
pip install bandit
pip install safety
Expand Down Expand Up @@ -78,15 +79,21 @@ jobs:
run: |
echo "Testing using unittest..."
python3 -m unittest discover tests -b
#create coverage report using pytest package
- name: Generate Coverage Report
run: |
pytest --cov=./ --cov-report=xml
codecov
#upload to Code Coverage, only if matrix python version is 3.9
- name: Upload Coverage Report to Codecov
if: ${{ matrix.python-version == '3.9' }}
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
flags: iso3166_2_workflow
flags: iso3166_2_workflow

#upload test artifacts to workflow
- name: Upload Test Artifacts
Expand Down
24 changes: 13 additions & 11 deletions .github/workflows/deploy_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,20 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python3 -m pip install setuptools wheel twine
python3 setup.py install
pip install build
# Build package and upload to PyPI
- name: Build and upload to PyPI
# Build package
- name: Build package
run: |
python3 setup.py sdist bdist_wheel
twine check dist/*
twine upload dist/* --verbose
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
python -m build
# publish to pypi
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}

#sleep for 30 seconds to ensure that distribution package has finised uploading to Test PyPI
- name: Wait / Sleep
Expand All @@ -50,6 +52,6 @@ jobs:
# download package of iso3166_2 from PYPI server to ensure it uploaded correctly
- name: Install iso3166_2 from PyPI
run: |
pip install iso3166_updates --upgrade
echo -e "import iso3166_updates as iso3166_2" | python3
pip install iso3166_2 --upgrade
echo -e "import iso3166_2 as iso3166_2" | python3
echo "iso3166_2 successfully installed"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ __pycache__/
old/
test-iso3166_2/
iso3166-2-data-archive/
get_iso3166_2.py
.DS_Store

.vscode
Expand Down
12 changes: 2 additions & 10 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Read the Docs configuration file: see https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"
# You can also specify other tool versions:
# nodejs: "19"
# rust: "1.64"
# golang: "1.19"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
Expand All @@ -25,8 +18,7 @@ formats:
- pdf
# - epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# Optional but recommended, declare the Python requirements required to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
Expand Down
Loading

0 comments on commit 902ddc7

Please sign in to comment.