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

Use importlib to track data files #123

Merged
merged 17 commits into from
Sep 29, 2023
Merged

Conversation

ljlamarche
Copy link
Collaborator

@ljlamarche ljlamarche commented Apr 10, 2023

Description

This PR transitions to using importlib.resources to keep track of data files instead of paths relative to the source file. This is the new recommended way of managing package data, as shown in this description of packaging data and this example.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that changes existing functionality) - seems to break some unit tests; this is a work in progress

How Has This Been Tested?

Running unit tests - not fully functional yet.

Test Configuration

  • Operating system: MacOS 12.6.1
  • Python version number: 3.10
  • Compiler with version number: gfortran 12.2.0
  • Relevant local setup details: apexpy 2.0.0

Checklist

  • Make sure you are merging into the develop (not main) branch
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • Add a note to Changelog.rst, summarising the changes
  • Add yourself to AUTHORS.rst and .zenodo.json

@aburrell aburrell added this to the 2.1.0 milestone Apr 11, 2023
@ljlamarche ljlamarche marked this pull request as ready for review April 19, 2023 16:09
Copy link
Owner

@aburrell aburrell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few style things to change. Otherwise this looks like a great improvement. Kinda shocked it fixed some of the OS X failures 🐞

CHANGELOG.rst Show resolved Hide resolved
apexpy/apex.py Show resolved Hide resolved
apexpy/apex.py Show resolved Hide resolved
apexpy/tests/test_Apex.py Show resolved Hide resolved
@ljlamarche ljlamarche merged commit 61304aa into aburrell:develop Sep 29, 2023
@ljlamarche ljlamarche deleted the importlib branch September 29, 2023 23:38
@ljlamarche ljlamarche restored the importlib branch September 29, 2023 23:42
ljlamarche added a commit to ljlamarche/apexpy that referenced this pull request Sep 29, 2023
@ljlamarche ljlamarche mentioned this pull request Sep 30, 2023
11 tasks
aburrell added a commit that referenced this pull request Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants