Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup some development infrastructure #13

Merged
merged 10 commits into from
Mar 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI

# We can specify which Github events will trigger a CI build
on: push

# now define a single job 'build' (but could define more)
jobs:

build:

strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.11"]

runs-on: ${{ matrix.os }}

# a job is a seq of steps
steps:

# Next we need to checkout out repository, and set up Python
# A 'name' is just an optional label shown in the log - helpful to clarify progress - and can be anything
- name: Checkout repository
uses: actions/checkout@v2

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

- name: Install Python dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt

- name: Check style with Pylint
run: |
python3 -m pylint --fail-under=5 --reports=y earth_model

- name: Test with PyTest
run: |
python3 -m pytest --cov=earth_model

19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# IDEs
.vscode/
.idea/

# Intermediate Coverage file
.coverage

# Output files
*.png

# Python runtime
*.pyc
*.egg-info
.pytest_cache
__pycache__

# Virtual environments
venv/
.venv/
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Andrew Walker <a.walker@leeds.ac.uk>
Copyright (c) 2019-24 Andrew Walker <andrew.walker@earth.ox.ac.uk>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
12 changes: 6 additions & 6 deletions PREM_density_example.ipynb

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions PREM_normal_modes_example.ipynb

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions PREM_travel_times_example.ipynb

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions PREM_velocity_example.ipynb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions earth_model/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""PREM-like Earth models"""
Loading
Loading