Skip to content

Commit

Permalink
Merge pull request #126 from mraspaud/fix-sdist-deploy
Browse files Browse the repository at this point in the history
Switch to `pyproject.toml`entirely
  • Loading branch information
mraspaud authored Mar 20, 2024
2 parents 0cccee8 + a519397 commit 298252f
Show file tree
Hide file tree
Showing 16 changed files with 126 additions and 1,306 deletions.
6 changes: 0 additions & 6 deletions .bumpversion.cfg

This file was deleted.

8 changes: 5 additions & 3 deletions .github/workflows/deploy-sdist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@ jobs:

steps:
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Create sdist
shell: bash -l {0}
run: python setup.py sdist
run: |
python -m pip install -q build
python -m build -s
- name: Publish package to PyPI
if: github.event.action == 'published'
uses: pypa/gh-action-pypi-publish@v1.4.1
uses: pypa/gh-action-pypi-publish@v1.8.12
with:
user: __token__
password: ${{ secrets.pypi_password }}
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,11 @@ doc/build
dist
pygac.egg-info
etc/*.cfg
gapfilled_tles/
gapfilled_tles/*
pygac/version.py

tmp
.vscode
.venv
*.lock
.python-version
11 changes: 0 additions & 11 deletions .landscape.yaml

This file was deleted.

14 changes: 10 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
exclude: '^$'
fail_fast: false

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.2.3
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: 'v0.3.2'
hooks:
- id: flake8
additional_dependencies: [flake8-docstrings, flake8-debugger, flake8-bugbear]
- id: ruff
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
7 changes: 0 additions & 7 deletions .stickler.yml

This file was deleted.

5 changes: 2 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
include etc/*
include gapfilled_tles/*
include bin/pygac-*
include etc/pygac.cfg.template
include gapfilled_tles/TLE_*.txt
include LICENSE.txt
include README.md
include pygac/version.py
172 changes: 0 additions & 172 deletions bin/pygac-run

This file was deleted.

17 changes: 9 additions & 8 deletions pygac/calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,18 @@
"""Calibration coefficients and generic calibration functions
"""
from __future__ import division
from enum import Enum
import sys
import logging
import numpy as np
import json

import datetime as dt
import hashlib
import json
import logging
import sys
import warnings
import datetime as dt
from collections import namedtuple
from pkg_resources import resource_filename
from enum import Enum
from importlib.resources import files

import numpy as np

LOG = logging.getLogger(__name__)

Expand Down Expand Up @@ -172,7 +173,7 @@ def read_coeffs(cls, coeffs_file):
LOG.info('Read calibration coefficients from "%s"', coeffs_file)
else:
LOG.debug("Read PyGAC internal calibration coefficients.")
coeffs_file = resource_filename('pygac', 'data/calibration.json')
coeffs_file = files("pygac") / "data/calibration.json"
with open(coeffs_file, mode='rb') as json_file:
content = json_file.read()
coeffs = json.loads(content)
Expand Down
Loading

0 comments on commit 298252f

Please sign in to comment.