Skip to content

Commit

Permalink
Merge pull request #81 from ue-sho/fix-github-actions-with-pipenv
Browse files Browse the repository at this point in the history
Define the dependencies in only one place using setup.py
  • Loading branch information
pchoisel authored May 21, 2024
2 parents bc6aaed + 0ad9ea4 commit 9389e6a
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 85 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Continuous Integration

on:
pull_request:
merge_group:

jobs:
launch-unit-tests:
runs-on: ubuntu-latest

strategy:
matrix:
# Tracked via issue #77
# 3.6: Not available on ubuntu-22.04
# 3.7: Results in failures in `test_cli.py`
# 3.12: pkg_resources not supported
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Cache Python dependencies
uses: actions/cache@v4
id: pip-cache
with:
path: ~/.cache/pip
key: pip-${{ matrix.python-version }}-${{ hashFiles('**/setup.py') }}
restore-keys: |
pip-${{ matrix.python-version }}-${{ hashFiles('**/setup.py') }}
- name: Install python dependencies
if: steps.pip-cache.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
- name: Run test
run: pytest
26 changes: 0 additions & 26 deletions .github/workflows/tester.yml

This file was deleted.

15 changes: 0 additions & 15 deletions Pipfile

This file was deleted.

43 changes: 0 additions & 43 deletions pyproject.toml

This file was deleted.

28 changes: 27 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,23 @@
setup(
name='dicom_anonymizer', # Required
version='1.0.12', # Required
author='Laurenn Lam',
author_email='[email protected]',
description="Program to anonymize dicom files with default and custom rules",
url="https://github.com/KitwareMedical/dicom-anonymizer",
project_urls={
"Bug Tracker": "https://github.com/KitwareMedical/dicom-anonymizer/issues",
},
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Topic :: Software Development :: Build Tools",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Programming Language :: Python"
],
keywords=["dicom", "anonymizer", "medical"],
python_requires='>=3.6',

packages=find_packages(), # Required

Expand All @@ -25,6 +42,15 @@
# installed, so they must be valid existing projects.
#
# For an analysis of "install_requires" vs pip's requirements files see:
# https://packaging.python.org/en/latest/requirements.html
# https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/
install_requires=['pydicom', 'tqdm'], # Optional

extras_require={
'dev': [
"pytest",
"bs4",
"fire",
"requests"
]
}
)

0 comments on commit 9389e6a

Please sign in to comment.