diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index cce01ea..384fb2c 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,5 @@ # [Choice] Python version: 3, 3.9, 3.8, 3.7, 3.6 -ARG VARIANT=3.7 +ARG VARIANT=3.8 FROM mcr.microsoft.com/vscode/devcontainers/python:${VARIANT} # [Option] Install Node.js diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml index 9b81ae8..3eaa683 100644 --- a/.github/workflows/bump.yml +++ b/.github/workflows/bump.yml @@ -13,7 +13,7 @@ jobs: steps: - name: Checkout Latest Commit - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Generate changelog uses: charmixer/auto-changelog-action@v1 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index dc53a11..48644b1 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,4 +1,4 @@ -name: Generate and puplish gh-pages +name: Generate and publish gh-pages # https://docs.github.com/en/actions/guides/building-and-testing-python # https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ on: @@ -10,9 +10,9 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 15 steps: - - uses: actions/checkout@v2.3.4 + - uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v2.2.2 + uses: actions/setup-python@v3 with: python-version: '3.8' - name: Install dependencies @@ -23,7 +23,7 @@ jobs: run: | make -C docs/ html - name: Deploy Docs 🚀 - uses: JamesIves/github-pages-deploy-action@4.1.4 + uses: JamesIves/github-pages-deploy-action@v4.2.5 with: branch: gh-pages # The branch the action should deploy to. folder: docs/_build/html # The folder the action should deploy. \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 05ef479..d46e0cd 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,9 +10,9 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 20 steps: - - uses: actions/checkout@v2.3.4 + - uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v2.2.2 + uses: actions/setup-python@v3 with: python-version: '3.8' - name: Install dependencies diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 31e15d3..d77a0ce 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -16,12 +16,12 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: [3.7] + python-version: [3.8] steps: - - uses: actions/checkout@v2.3.4 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2.2.2 + uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} - name: Install dependencies @@ -30,4 +30,4 @@ jobs: pip install -r dev-requirements.txt -r requirements.txt - name: Test with pytest run: | - pytest \ No newline at end of file + pytest diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 38ec31b..0fd8193 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -15,9 +15,9 @@ jobs: python-version: [3.8] steps: - - uses: actions/checkout@v2.3.4 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2.2.2 + uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/CHANGELOG.md b/CHANGELOG.md index 21932f3..f278c40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +## [Unreleased](https://github.com/dermatologist/fhiry/tree/HEAD) + +[Full Changelog](https://github.com/dermatologist/fhiry/compare/1.0.0...HEAD) + +**Closed issues:** + +- Import directly \(no need for conditional\) when `python_requires = >= 3.8` [\#10](https://github.com/dermatologist/fhiry/issues/10) +- ", [\#9](https://github.com/dermatologist/fhiry/issues/9) + +## [1.0.0](https://github.com/dermatologist/fhiry/tree/1.0.0) (2021-09-17) + +[Full Changelog](https://github.com/dermatologist/fhiry/compare/0.5.0...1.0.0) + +**Merged pull requests:** + +- Feature/pyscaffold-1 [\#8](https://github.com/dermatologist/fhiry/pull/8) ([dermatologist](https://github.com/dermatologist)) +- Bump pytest from 6.2.4 to 6.2.5 [\#7](https://github.com/dermatologist/fhiry/pull/7) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump pytest from 5.4.3 to 6.2.4 [\#6](https://github.com/dermatologist/fhiry/pull/6) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump pandas from 1.1.4 to 1.1.5 [\#5](https://github.com/dermatologist/fhiry/pull/5) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump autopep8 from 1.5.4 to 1.5.7 [\#4](https://github.com/dermatologist/fhiry/pull/4) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump abatilo/actions-poetry from 2.0.0 to 2.1.2 [\#3](https://github.com/dermatologist/fhiry/pull/3) ([dependabot[bot]](https://github.com/apps/dependabot)) + ## [0.5.0](https://github.com/dermatologist/fhiry/tree/0.5.0) (2020-12-26) [Full Changelog](https://github.com/dermatologist/fhiry/compare/0.3.0...0.5.0) diff --git a/README.md b/README.md index 766a6db..478b32a 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ resource.gender ... ``` -### [Modules](https://dermatologist.github.io/fhiry/build/html/modules.html) +### [Documentation](https://dermatologist.github.io/fhiry/) ## Contributors * [Bell Eapen](https://nuchange.ca) | [![Twitter Follow](https://img.shields.io/twitter/follow/beapen?style=social)](https://twitter.com/beapen) diff --git a/dev-requirements.txt b/dev-requirements.txt index f8955cd..2464441 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -10,7 +10,7 @@ attrs==21.2.0 # via pytest babel==2.9.1 # via sphinx -backports.entry-points-selectable==1.1.0 +backports-entry-points-selectable==1.1.0 # via virtualenv certifi==2021.5.30 # via requests @@ -18,7 +18,7 @@ charset-normalizer==2.0.5 # via requests commonmark==0.9.1 # via recommonmark -coverage==5.5 +coverage[toml]==5.5 # via pytest-cov distlib==0.3.2 # via virtualenv @@ -60,13 +60,13 @@ pygments==2.10.0 # via sphinx pyparsing==2.4.7 # via packaging -pytest==6.2.5 +pytest==7.1.0 # via # -r dev-requirements.in # pytest-cov -pytest-cov==2.12.1 +pytest-cov==3.0.0 # via -r dev-requirements.in -pytz==2021.1 +pytz==2021.3 # via # -c requirements.txt # babel @@ -74,7 +74,7 @@ recommonmark==0.7.1 # via -r dev-requirements.in requests==2.26.0 # via sphinx -setuptools-scm==6.3.2 +setuptools-scm==6.4.2 # via -r dev-requirements.in six==1.16.0 # via @@ -83,7 +83,7 @@ six==1.16.0 # virtualenv snowballstemmer==2.1.0 # via sphinx -sphinx==4.2.0 +sphinx==4.4.0 # via # -r dev-requirements.in # recommonmark @@ -101,18 +101,19 @@ sphinxcontrib-serializinghtml==1.1.5 # via sphinx toml==0.10.2 # via - # pytest - # pytest-cov + # coverage # tox tomli==1.2.1 - # via setuptools-scm -tox==3.24.4 + # via + # pytest + # setuptools-scm +tox==3.24.5 # via -r dev-requirements.in urllib3==1.26.6 # via requests virtualenv==20.8.0 # via tox -wheel==0.37.0 +wheel==0.37.1 # via -r dev-requirements.in # The following packages are considered to be unsafe in a requirements file: diff --git a/notes/pyproject.toml b/notes/pyproject.toml index cf4799f..76326db 100644 --- a/notes/pyproject.toml +++ b/notes/pyproject.toml @@ -20,7 +20,7 @@ classifiers = [ ] [tool.poetry.dependencies] -python = "^3.7" +python = "^3.8" pandas = "1.1.5" diff --git a/requirements.txt b/requirements.txt index a2872b2..b9ed11c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,13 +4,13 @@ # # pip-compile # -numpy==1.21.2 +numpy==1.22.3 # via pandas -pandas==1.3.3 +pandas==1.4.1 # via fhiry (setup.py) python-dateutil==2.8.2 # via pandas -pytz==2021.1 +pytz==2021.3 # via pandas six==1.16.0 # via python-dateutil diff --git a/setup.cfg b/setup.cfg index db253d4..1bc3993 100644 --- a/setup.cfg +++ b/setup.cfg @@ -31,7 +31,7 @@ classifiers = Development Status :: 4 - Beta Operating System :: OS Independent Programming Language :: Python - Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 Topic :: Scientific/Engineering :: Information Analysis diff --git a/src/fhiry/fhiry.py b/src/fhiry/fhiry.py index 8012cbe..dd38bff 100644 --- a/src/fhiry/fhiry.py +++ b/src/fhiry/fhiry.py @@ -45,7 +45,8 @@ def read_bundle_from_file(self, filename): return pd.json_normalize(json_in['entry']) def delete_unwanted_cols(self): - del self._df['resource.text.div'] + if 'resource.text.div' in self._df.columns: + del self._df['resource.text.div'] def process_df(self): """Read a single JSON resource or a directory full of JSON resources diff --git a/src/fhiry/parallel.py b/src/fhiry/parallel.py index dce6bef..5eeae4b 100644 --- a/src/fhiry/parallel.py +++ b/src/fhiry/parallel.py @@ -1,4 +1,4 @@ -from src.fhiry import Fhiry, Fhirndjson +from . import Fhiry, Fhirndjson import os import multiprocessing as mp import pandas as pd