Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: planetarypy/planetarypy
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: michaelaye/planetarypy
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 14 commits
  • 36 files changed
  • 1 contributor

Commits on Mar 7, 2025

  1. Modernize project configuration and package structure

    - Migrate to pyproject.toml for project configuration
    - Update dependencies and development setup
    - Remove redundant configuration files (setup.py, setup.cfg, requirements_dev.txt)
    - Update README installation instructions
    - Bump version to 0.2.0
    - Add initial PDS module structure
    michaelaye committed Mar 7, 2025
    Copy the full SHA
    e10545b View commit details
  2. Enhance PDS index configuration and management

    - Implement new configuration system for PDS index URLs and access logs
    - Add dynamic URL discovery for CTX and LROC indices
    - Create modular index handling with support for timestamp tracking
    - Introduce new documentation for PDS index configuration
    - Refactor dependencies to separate core and optional SPICE-related packages
    - Add new utility modules for PDS index processing
    - Split config into general, urls, access_log
    michaelaye committed Mar 7, 2025
    Copy the full SHA
    9a111b8 View commit details
  3. Copy the full SHA
    d17433e View commit details
  4. Enhance PDS index utilities with comprehensive discovery and explorat…

    …ion tools
    
    - Add new utility functions for listing missions, instruments, and indexes
    - Implement print_pds_tree for visualizing PDS index configuration
    - Create get_index function for retrieving detailed index information
    - Update __init__.py to expose new utility functions
    - Replace README.rst with more comprehensive README.md
    - Update project description and configuration
    michaelaye committed Mar 7, 2025
    Copy the full SHA
    e5660fb View commit details
  5. Copy the full SHA
    381e8bf View commit details
  6. Refactor config and index URL management

    - Modify config.py to create default config with minimal structure
    - Remove hardcoded planetarypy_config.toml from data directory
    - Create new planetarypy_index_urls.toml with comprehensive mission index URLs
    - Update index_config.py to handle default config creation more robustly
    - Improve error handling and logging for config file generation
    michaelaye committed Mar 7, 2025
    Copy the full SHA
    eae1794 View commit details

Commits on Mar 13, 2025

  1. Refactor coverage configuration and enhance CLI functionality

    - Remove obsolete .coveragerc file and integrate coverage settings into pyproject.toml
    - Update CLI main function to accept command line arguments and improve docstring
    - Add tests for CLI functionality to ensure proper argument handling
    - Enhance exception handling in planetarypy.exceptions with additional docstrings
    - Introduce new tests for PDS index configuration and Spicer classes to improve test coverage
    michaelaye committed Mar 13, 2025
    Copy the full SHA
    387cd8f View commit details
  2. Reorg SPICE integration module and related components

    - Introduce __init__.py for SPICE integration, providing an overview and importing necessary classes and functions.
    - Create archived_kernels.py for managing SPICE kernels related to archived datasets, including validation and downloading functionalities.
    - Add config.py for common configuration elements, defining paths and URLs for kernel storage.
    - Implement generic_kernels.py for downloading and loading essential SPICE generic kernels required for some surface operations.
    - Enhance overall structure and organization of SPICE-related modules for better usability in planetary science applications.
    michaelaye committed Mar 13, 2025
    Copy the full SHA
    c98d4d6 View commit details
  3. Copy the full SHA
    6da2913 View commit details
  4. Update dependencies in pyproject.toml

    - add missing pvl
    - make astropy a core dependency
    - Reorder dependencies for clarity and maintainability.
    - Remove 'astropy' from optional dependencies to streamline SPICE-related functionality.
    michaelaye committed Mar 13, 2025
    Copy the full SHA
    3030f99 View commit details
  5. Enhance dependency installation script and update workflow

    - Modify install_dev_deps.py to include 'spice' dependencies in the installation process.
    - Update GitHub Actions workflow to install the package with 'spice' extras for comprehensive testing.
    michaelaye committed Mar 13, 2025
    Copy the full SHA
    7fec873 View commit details
  6. Update development dependencies and enhance CI workflow

    - Add 'planets' to the pip installation script in install_dev_deps.py.
    - Include 'sh' in the development dependencies in pyproject.toml for shell command execution.
    - Modify GitHub Actions workflow to support multiple Python versions and improve environment activation naming.
    michaelaye committed Mar 13, 2025
    Copy the full SHA
    4908504 View commit details
  7. Update CI workflow to include 'sh' in dependency installation

    - Modify GitHub Actions workflow to install 'sh' alongside 'tomlkit' for improved script execution.
    - Enhance comments for clarity on the installation process.
    michaelaye committed Mar 13, 2025
    Copy the full SHA
    470b9fd View commit details
  8. Enhance dependency management in installation script and CI workflow

    - Introduce CONDA_ONLY_PACKAGES in install_dev_deps.py to prevent specific packages from being installed via pip.
    - Update GitHub Actions workflow to include 'gdal' in the initial dependency installation for improved functionality.
    michaelaye committed Mar 13, 2025
    Copy the full SHA
    f09ff26 View commit details
11 changes: 0 additions & 11 deletions .coveragerc

This file was deleted.

20 changes: 13 additions & 7 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -9,8 +9,13 @@ on:

jobs:
test:
name: Run tests
name: Python ${{ matrix.python-version }} tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10"]
fail-fast: false

steps:
- name: Checkout repository
uses: actions/checkout@v4
@@ -20,9 +25,9 @@ jobs:
with:
miniforge-variant: Miniforge3
miniforge-version: latest
activate-environment: test_env
activate-environment: test_env_py${{ matrix.python-version }}
use-mamba: true
python-version: "3.9"
python-version: ${{ matrix.python-version }}
channels: conda-forge
channel-priority: strict
auto-activate-base: false
@@ -42,16 +47,16 @@ jobs:
- name: Install dependencies
shell: bash -l {0}
run: |
# Install tomlkit and sh first to run the installation script
mamba install -y -c conda-forge tomlkit sh
# Install core dependencies via mamba first
mamba install -y -c conda-forge tomlkit sh gdal
# Run the installation script
python install_dev_deps.py
- name: Install package
shell: bash -l {0}
run: |
pip install -e .
pip install -e ".[spice]"
- name: Run tests
shell: bash -l {0}
@@ -63,4 +68,5 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
fail_ci_if_error: true
fail_ci_if_error: true
name: codecov-py${{ matrix.python-version }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -132,3 +132,6 @@ dmypy.json
.pixi
*.egg-info
*.code-workspace
run_migration.py
src/planetarypy/pds/migrate_config.py
src/planetarypy/scripts/migrate_pds_config.py
43 changes: 43 additions & 0 deletions MODERNIZATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Package Modernization

This project has been modernized to use `pyproject.toml` as the primary configuration file, following PEP 517 and PEP 518 standards.

## Changes Made

1. Updated `pyproject.toml` to include:
- All project metadata
- Dependencies from requirements.txt
- Development dependencies from requirements-dev.txt
- Package build configuration
- Tool configurations from setup.cfg (pytest, flake8, etc.)
- Bumped version settings

2. Updated version in `src/planetarypy/__init__.py` to match `pyproject.toml`

## Files That Can Be Removed

The following files are now redundant and can be safely removed:

- `setup.py` - All configuration now in pyproject.toml
- `setup.cfg` - All tool configurations moved to pyproject.toml under appropriate [tool.*] sections
- `requirements.txt` - Dependencies now in pyproject.toml
- `requirements-dev.txt` - Development dependencies now in pyproject.toml
- `requirements_dev.txt` - Redundant with requirements-dev.txt

## Installation

With this modernization, you can install the package using:

```bash
# For development installation with all dev dependencies
pip install -e ".[dev]"

# For regular installation
pip install .
```

## Future Improvements

1. Consider using standardized tools for version management like `hatch` instead of `bumpversion`
2. Update documentation to reflect the new project structure
3. Update CI/CD pipelines to use the new configuration
113 changes: 77 additions & 36 deletions README.rst → README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
planetarypy
===========
# planetarypy

[![PyPI](https://img.shields.io/pypi/v/planetarypy.svg)](https://pypi.python.org/pypi/planetarypy)
[![Documentation Status](https://readthedocs.org/projects/planetarypy/badge/?version=latest)](https://planetarypy.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/planetarypy/planetarypy/branch/main/graph/badge.svg)](https://codecov.io/gh/planetarypy/planetarypy)

.. image:: https://img.shields.io/pypi/v/planetarypy.svg
:target: https://pypi.python.org/pypi/planetarypy

.. image:: https://readthedocs.org/projects/planetarypy/badge/?version=latest
:target: https://planetarypy.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

.. image:: https://codecov.io/gh/planetarypy/planetarypy/branch/main/graph/badge.svg
:target: https://codecov.io/gh/planetarypy/planetarypy

Core package for planetary science tools.

Warning
-------
## Warning

This package is in early alpha.

@@ -27,19 +18,77 @@ That package will be open for public contribution and collaboration.
The approximate feature set (also see below) that this package will cover can be checked out at
https://michaelaye.github.io/nbplanetary where the documentation for the current package lives.


* Free software: BSD-3 license
* Documentation (not yet deployed): https://planetarypy.readthedocs.io.
* Part of the `PlanetaryPy`_ Organisation.
* Documentation (not yet deployed): https://planetarypy.readthedocs.io
* Part of the [PlanetaryPy](https://planetarypy.org/) Organisation.

## Installation

From PyPI (once published):

```bash
pip install planetarypy
```

From GitHub:

```bash
pip install git+https://github.com/planetarypy/planetarypy.git
```

For development installation:

```bash
# Clone the repository
git clone https://github.com/planetarypy/planetarypy.git
cd planetarypy

# Install in development mode with dev dependencies
pip install -e ".[dev]"
```

## Features

### PDS Index Tools

Installation
------------
The package includes robust tools for working with PDS (Planetary Data System) indices:

`pip install git@github.com:planetarypy/planetarypy`
- **Index Configuration**: Manage URLs and access timestamps in separate configuration files
- **Dynamic URL Discovery**: Automatically find and use the latest index files for mission data
- **Index Browsing**: Easily explore available missions, instruments, and indices

General scope
-------------
```python
from planetarypy.pds import print_pds_tree, list_missions, list_instruments, list_indexes

# Display all available PDS indices in a tree structure
print_pds_tree()

# Get a list of all missions
missions = list_missions()

# Get all instruments for a specific mission
instruments = list_instruments('mro')

# Get all indices for a specific mission and instrument
indices = list_indexes('cassini', 'iss')
```

- **Index Management**: Download, update, and convert indices to high-performance parquet format

```python
from planetarypy.pds import Index

# Create an index object
idx = Index('cassini.iss.ring_summary')

# Check if updates are available
idx.check_for_updates()

# Download the index
idx.download()
```

## General scope

First and foremost this package shall provide support in working with planetary science data.

@@ -52,8 +101,7 @@ With working we mean:

of data.

Locating
^^^^^^^^
### Locating

This library manages, via its PDS tools, multiple PDS3 index files per instrument that can be
used for identifying data of interest.
@@ -62,16 +110,14 @@ These index files are automatically downloaded and converted to the very perform
Parquet is able to store advanced datatypes like nan-capable integer and full datetime objects,
as opposed to HDF5.

Retrieving
^^^^^^^^^^
### Retrieving

The interface to getting data is via a path-retrieving function based on a PDS product-id.
If that product-id is available locally, the path will be returned.
If it is not, it will previously be downloaded, stored in a systematic fashion organized by
mission and instrument, and then the local path will be returned.

Reading
^^^^^^^
### Reading

For now, the library only returns the path to the object and the user needs to sort out the
reading process.
@@ -88,20 +134,15 @@ There will exist larger other packages that focus on working with a given instru
in which case that package could become an affiliated package with the `planetarypy` GitHub
organization, if so desired.

Further processing
^^^^^^^^^^^^^^^^^^
### Further processing

In the future, additional frequently used procedures will be added to this library, e.g.

- frequently used GDAL/rasterio procedures
- frequently used SPICE operations, e.g. surface illumination on a given body

Contributing
------------
## Contributing

Feedback, issues, and contributions are always gratefully welcomed. See the
contributing guide for details on how to help and setup a development
environment, see :ref:Contributing .


.. _PlanetaryPy: https://planetarypy.org/
environment.
Loading