Skip to content

Commit

Permalink
Switch from setuptools to a modern pyproject config
Browse files Browse the repository at this point in the history
  • Loading branch information
mikix committed Jul 17, 2024
1 parent c1a42df commit df61119
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 99 deletions.
3 changes: 0 additions & 3 deletions .bumpversion.cfg

This file was deleted.

3 changes: 1 addition & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest pytest-cov
pip install .[tests]
- name: Test with pytest
run: |
Expand Down
2 changes: 2 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ The following wonderful people contributed directly or indirectly to this projec
- Faith Oyedemi <https://github.com/lere01>
- Josh Mandel <https://github.com/jmandel>
- Martin Burchell <https://github.com/martinburchell>
- Matt Garber <https://github.com/dogversioning>
- Michael Terry <https://github.com/mikix>
- Nikolai Schwertner <https://github.com/nschwertner>
- Pascal Pfiffner <https://github.com/p2>
- Raheel Sayeed <https://github.com/raheelsayeed>
Expand Down
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "SMART on FHIR Python Client"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 4.0.0
PROJECT_NUMBER = 4.2.0

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in

This file was deleted.

37 changes: 14 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
SMART FHIR Client
=================
# SMART FHIR Client

This is _fhirclient_, a flexible Python client for [FHIR][] servers supporting the [SMART on FHIR][smart] protocol.

Expand All @@ -22,14 +21,12 @@ The `develop` branch should be on recent freezes, and the `feature/latest-ci` br
**0.0.2** | `0.0.82.2943` | (DSTU 1)


Installation
------------
## Installation

pip install fhirclient


Documentation
-------------
## Documentation

Technical documentation is available at [docs.smarthealthit.org/client-py/][docs].

Expand Down Expand Up @@ -170,23 +167,19 @@ Clone the _client-py_ repository, then create a virtual environment (not compuls
python flask_app.py


Building Distribution
---------------------
## Building Distribution

pip install -r requirements.txt
python setup.py sdist
python setup.py bdist_wheel
pip install -U build
python3 -m build


### Incrementing the lib version

bumpversion patch
bumpversion minor
bumpversion major
- Edit `fhirclient/client.py` and change the `__version__` field.
- Edit `Doxyfile` and change the `PROJECT_NUMBER` field.


Docs Generation
---------------
## Docs Generation

Docs are generated with [Doxygen][] and [doxypypy][].
You can install doxypypy via pip: `pip install doxypypy`.
Expand All @@ -200,24 +193,22 @@ I usually perform a second checkout of the _gh-pages_ branch and copy the html f
rsync -a docs/html/ ../client-py-web/


PyPi Publishing (notes for SMART team)
--------------------------------------
## PyPi Publishing (notes for SMART team)

Using setuptools (*Note*: Alternatively, you can use twine https://pypi.python.org/pypi/twine/):
Using flit (*Note*: Alternatively, you can use [twine](https://twine.readthedocs.io/)):

### Make sure that you have the PyPi account credentials in your account

copy server.smarthealthit.org:/home/fhir/.pypirc to ~/.pypirc

### Test the build

python setup.py sdist
python setup.py bdist_wheel
python3 -m build

### Upload the packages to PyPi

python setup.py sdist upload -r pypi
python setup.py bdist_wheel upload -r pypi
pip install -U flit
flit publish


[fhir]: http://www.hl7.org/implement/standards/fhir/
Expand Down
3 changes: 3 additions & 0 deletions fhirclient/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""A flexible client for FHIR servers supporting the SMART on FHIR protocol"""

from .client import __version__
36 changes: 36 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[project]
name = "fhirclient"
requires-python = ">= 3.8"
dependencies = [
"isodate >= 0.5",
"requests >= 2.4",
]
authors = [{ name="SMART Platforms Team", email="[email protected]" }]
readme = "README.md"
keywords = ["smart", "fhir", "healthcare", "medical-informatics", "clinical-informatics", "biomedical-informatics"]
license = { file="LICENSE" }
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Natural Language :: English",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dynamic = ["description", "version"]

[project.urls]
Homepage = "https://github.com/smart-on-fhir/client-py"
Documentation = "https://docs.smarthealthit.org/client-py/"

[build-system]
requires = ["flit_core >=3.4,<4"]
build-backend = "flit_core.buildapi"

[project.optional-dependencies]
tests = [
"pytest >= 2.5",
"pytest-cov",
]
6 changes: 0 additions & 6 deletions requirements.txt

This file was deleted.

6 changes: 0 additions & 6 deletions setup.cfg

This file was deleted.

57 changes: 0 additions & 57 deletions setup.py

This file was deleted.

0 comments on commit df61119

Please sign in to comment.