Skip to content

Commit

Permalink
add python 3.12 support (#273)
Browse files Browse the repository at this point in the history
* add python 3.12

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* install development dependencies in build workflow

* logg setuptools version

* enable support for more setuptools versions

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update conf.py for sphinx 8

* edit docstring for sphinx

* add codecov token

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
kmdalton and pre-commit-ci[bot] authored Nov 4, 2024
1 parent ceae60e commit cbf30c1
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 10 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
numpy-version: ['numpy<2.0', 'numpy>=2.0']
python-version: ['3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11', '3.12']

# Skip CI if 'skip ci' is contained in latest commit message
if: "!contains(github.event.head_commit.message, 'skip ci')"
Expand All @@ -33,15 +33,17 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install "${{ matrix.numpy-version }}"
pip install -e .
pip install -e .[dev]
pip install ray
python -c 'import setuptools;print(f"Using setuptools version: {setuptools.__version__}")'
- name: Test with pytest
run: |
python setup.py test
pytest
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
flags: unittests
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@

# prolog taken nearly verbatim from https://github.com/spatialaudio/nbsphinx/blob/98005a9d6b331b7d6d14221539154df69f7ae51a/doc/conf.py#L38
nbsphinx_prolog = r"""
{% set docname = 'docs/' + env.doc2path(env.docname, base=None) %}
{% set docname = 'docs/' + env.doc2path(env.docname, base=None) | string() %}
.. raw:: html
Expand Down
2 changes: 1 addition & 1 deletion reciprocalspaceship/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.2
1.0.3
11 changes: 9 additions & 2 deletions reciprocalspaceship/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
# Version number for reciprocalspaceship
def getVersionNumber():
import pkg_resources
version = None
try:
from setuptools.version import metadata

version = metadata.version("reciprocalspaceship")
except ImportError:
from setuptools.version import pkg_resources

version = pkg_resources.require("reciprocalspaceship")[0].version

version = pkg_resources.require("reciprocalspaceship")[0].version
return version


Expand Down
4 changes: 1 addition & 3 deletions reciprocalspaceship/io/crystfel.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,9 +487,7 @@ def read_crystfel(
The type of byte-encoding (optional, 'utf-8').
columns : list (optional)
Optionally specify the columns of the output by a list of strings.
The default list is:
[ "H", "K", "L", "I", "SigI", "BATCH", "s1x", "s1y", "s1z", "ewald_offset",
"angular_ewald_offset", "XDET", "YDET" ]
The default list is: [ "H", "K", "L", "I", "SigI", "BATCH", "s1x", "s1y", "s1z", "ewald_offset", "angular_ewald_offset", "XDET", "YDET" ]
See `rs.io.crystfel.StreamLoader().available_column_names` for a list of available
column names and *Notes* for a description of the returned columns
parallel : bool (optional)
Expand Down

0 comments on commit cbf30c1

Please sign in to comment.