Skip to content

Commit

Permalink
Switch from Travis to GitHub Actions for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mikix committed Jul 12, 2024
1 parent c419fa4 commit 5c608f5
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 11 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI
on:
pull_request:
push:
branches:
- main

# The goal here is to cancel older workflows when a PR is updated (because it's pointless work)
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true

jobs:
generate:
name: generate
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Test generation
run: |
echo "from Default.settings import *" > settings.py
./generate.py
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*.pyc
__pycache__
env
/.idea/

# ignore mappings and settings files
/mappings.py
Expand Down
4 changes: 0 additions & 4 deletions .travis.yml

This file was deleted.

6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
Python FHIR Parser
==================
[![Build Status](https://travis-ci.org/palfrey/fhir-parser.svg?branch=master)](https://travis-ci.org/palfrey/fhir-parser)

A Python FHIR specification parser for model class generation.
If you've come here because you want _Swift_ or _Python_ classes for FHIR data models, look at our client libraries instead:

- [Swift-FHIR][] and [Swift-SMART][]
- Python [client-py][]

The `master` branch is currently capable of parsing _R5_.
The `main` branch is currently capable of parsing _R5_.

This work is licensed under the [APACHE license][license].
FHIR® is the registered trademark of [HL7][] and is used with the permission of HL7.
Expand All @@ -24,7 +22,7 @@ These representations are then used by [Jinja][] templates to create classes in
This script does its job for the most part, but it doesn't yet handle all FHIR peculiarities and there's no guarantee the output is correct or complete.
This repository **does not include the templates and base classes** needed for class generation, you must do this yourself in your project.
You will typically add this repo as a submodule to your framework project, create a directory that contains the necessary base classes and templates, create _settings_ and _mappings_ files and run the script.
Examples on what you would need to do for Python classes can be found in _Sample/settings.py_, _Sample/mappings.py_ and _Sample/templates*_.
Examples on what you would need to do for Python classes can be found in _Default/settings.py_, _Default/mappings.py_ and _Sample/templates*_.


Use
Expand Down
5 changes: 2 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
Jinja2>=3.0
MarkupSafe==0.23
colorlog>=2.10.0
jinja2>=3.0
requests>=2.13.0
colorlog==2.10.0

0 comments on commit 5c608f5

Please sign in to comment.