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

Py311 #80

Merged
merged 95 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
81e589f
initial commit of spectra preview sonification
jaymedina Oct 11, 2022
e2bb7a5
.
jaymedina Oct 12, 2022
9ed0116
major edit on sonify_preview function, defines amplitude based on are…
scfleming Oct 12, 2022
8fa6db0
.
jaymedina Oct 12, 2022
78e8805
connecting classes
jaymedina Oct 12, 2022
2c01180
updating play() with layered pitches that are delayed at different times
jaymedina Oct 12, 2022
4ef0c86
multiplying amplitude by factor to increase vol
jaymedina Oct 12, 2022
b982c88
some updates to duration and delay periods
jaymedina Oct 12, 2022
cb7bca3
Constraint added to keep tremolo values at or below 15
jaymedina Oct 13, 2022
95f2af5
added some todo items to preview_play
jaymedina Oct 13, 2022
3810d61
Adding a "tremolo factor" which will multiply all tremolo vals by 10
jaymedina Oct 13, 2022
6bbcd07
modulating amplitudes with inverse log; playing notes separately;
jaymedina Oct 14, 2022
792f6ce
snapshots notebook
jaymedina Oct 14, 2022
15ae515
replacing std with the std error of a linear regression fit
jaymedina Oct 14, 2022
f9bdd12
normalizing amplitudes with the max amp for more comfortable hearing …
jaymedina Oct 14, 2022
7d567fb
changing default lfo to 1.0
jaymedina Oct 14, 2022
72d800b
minor changes
jaymedina Oct 14, 2022
4f2e4cd
initial attempt at increasing amplitude for non-oscillating behavior.…
jaymedina Oct 14, 2022
0a59077
adding verbose and plotting keyword args to sonify_preview
jaymedina Oct 14, 2022
911703c
only left channel sounding bug fixed
srisund Nov 30, 2022
55cfda4
Real spectra demo notebook added
srisund Dec 1, 2022
c41c9c0
WIP: flipped colors in plots to match wavelength order, added two mod…
scfleming Dec 15, 2022
836f458
updating .gitignore with new generated directory miles_stellar_spectra
jaymedina Dec 16, 2022
b69b2f0
adding requests and notebook as dependencies of astronify. pinning re…
jaymedina Dec 16, 2022
5bf6b63
intermediate checkin
scfleming Sep 13, 2024
b080e8f
after merge
scfleming Sep 13, 2024
95f5d6e
removing thinkx, numpy 2.0 fix, updating versions of libraries used i…
scfleming Sep 13, 2024
c3c19ac
fixing documentation format error
scfleming Sep 13, 2024
f162357
adding new requireemnts in RTD yaml
scfleming Dec 6, 2024
005732a
fixing RTD yaml
scfleming Dec 6, 2024
0e831b1
fixing RTD yaml
scfleming Dec 6, 2024
720747c
fixing RTD yaml
scfleming Dec 6, 2024
97e001f
fixing RTD yaml
scfleming Dec 6, 2024
f4bdf96
fixing RTD yaml
scfleming Dec 6, 2024
6fcf883
fixing RTD yaml
scfleming Dec 6, 2024
2108c45
fixing RTD yaml
scfleming Dec 6, 2024
345455a
fixing RTD yaml
scfleming Dec 6, 2024
d14897b
fixing RTD yaml
scfleming Dec 6, 2024
25f6a4e
adding requirements file for RTD
scfleming Dec 6, 2024
0f8c1c2
adding requirements file for RTD
scfleming Dec 6, 2024
74da113
adding requirements file for RTD
scfleming Dec 6, 2024
aa268a8
adding requirements file for RTD
scfleming Dec 6, 2024
d3888f6
adding requirements file for RTD
scfleming Dec 6, 2024
09d32aa
adding requirements file for RTD
scfleming Dec 6, 2024
43a7585
adding requirements file for RTD
scfleming Dec 6, 2024
ad3d922
adding requirements file for RTD
scfleming Dec 6, 2024
11ee493
building RTD using Python 3.11 since the package is only good up to t…
scfleming Dec 6, 2024
7f33813
updated tox.ini file that works locally in Python 3.11 at least
scfleming Dec 6, 2024
ea4d968
adding helpful hints for problems installing pyo dependencies, fixed …
scfleming Jan 15, 2025
e81b16d
specifying <3.12 in setup.cfg, removing Python 3.12 from tox for what…
scfleming Jan 15, 2025
00bca20
adding extra installation tips, fixes #74 and fixes #77
scfleming Jan 15, 2025
5084ff8
Adds citation information and ASCL badge to top-level README
scfleming Jan 15, 2025
0dae887
first attempt at updating CI
scfleming Jan 15, 2025
777e885
first attempt at updating CI
scfleming Jan 15, 2025
0b2ff1f
removing comments from yml
scfleming Jan 15, 2025
4fa4da2
Adding hash for Action workflow and update if needed, from PR #78
scfleming Jan 15, 2025
ee52abc
fixing typos as found by contributor in #75
scfleming Jan 15, 2025
95d6e33
updates to use dev wheels instead of source, from #73
scfleming Jan 15, 2025
33f84e8
adding this branch to list to run CI on push
scfleming Jan 15, 2025
8f8a7fd
fixing CI by specifying Python versions correctly
scfleming Jan 15, 2025
6a5d26a
fixed imcompatible test of numpy 2.1.x with Python 3.9.x
scfleming Jan 15, 2025
2a01451
pre-installing pyo dependencies with apt-get
scfleming Jan 15, 2025
e1938c7
removes unmaintained pytest-openfiles in favor of pytest -W argument,…
scfleming Jan 15, 2025
1d48eed
fixing the allowed-failure tests by pre-installing the pyo dependencies
scfleming Jan 15, 2025
de4b53a
working on some code style fixes
scfleming Jan 15, 2025
1569966
updates for code styling, marking style check to continue on error
scfleming Jan 15, 2025
2731f24
undoing mistake in CI yml
scfleming Jan 15, 2025
7dab1ed
removing lynting from flake8, start at switch to black
scfleming Jan 15, 2025
2c097b3
removing the CI tests with oldest deps since they never find runners,…
scfleming Jan 15, 2025
ba18ab0
big round of black lynting
scfleming Jan 16, 2025
2ad1da0
iterating on lynting
scfleming Jan 16, 2025
4430c8d
more lynt iterating
scfleming Jan 16, 2025
d308938
lynting iteration
scfleming Jan 16, 2025
a79ef4a
lynting iteration
scfleming Jan 16, 2025
0282c6f
lynting series.py
scfleming Jan 16, 2025
0e1397f
lynting series.py
scfleming Jan 16, 2025
87139b7
more lynting
scfleming Jan 16, 2025
c008d9a
lynt iterating
scfleming Jan 16, 2025
00c0f72
another round of lynting
scfleming Jan 16, 2025
e39226e
almost last round of lynting
scfleming Jan 16, 2025
1006608
last lynting
scfleming Jan 16, 2025
79a6aa3
adding Pey-Lian as a contributing author
scfleming Jan 16, 2025
b4883e2
adding CODEOWNERS file so merges into main require approval from at l…
scfleming Jan 16, 2025
e589c78
splitting developer documentation from main doc, adding some links to…
scfleming Jan 16, 2025
3800b43
trying to fix links
scfleming Jan 16, 2025
34b37fb
trying to fix links
scfleming Jan 16, 2025
b359932
adding better tip of how to build docs locally with sphinx directly
scfleming Jan 16, 2025
40a5b70
adding some work-in-progress dev steps, adding __version__, updating …
scfleming Jan 16, 2025
89603bb
Preparing release 0.11
scfleming Jan 31, 2025
70aa31a
Preparing release 0.11
scfleming Jan 31, 2025
f8bf669
Preparing release 0.11
scfleming Jan 31, 2025
2e8bdf7
Merge branch 'main' into py311
scfleming Jan 31, 2025
33edb99
fixing conflict merge issues
scfleming Jan 31, 2025
e81f6cf
fixing conflict merge issues
scfleming Jan 31, 2025
0c96a8b
another round of fixing conflict merge issues
scfleming Jan 31, 2025
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
8 changes: 8 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This is a comment.
# Each line is a file pattern followed by one or more owners.

# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# these owners will be requested for
# review when someone opens a pull request.
* @ceb8 @scfleming
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions" # See documentation for possible values
directory: ".github/workflows" # Location of package manifests
schedule:
interval: "monthly"
groups:
actions:
patterns:
- "*"
10 changes: 10 additions & 0 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Lint

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: psf/black@stable
119 changes: 92 additions & 27 deletions .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ on:
push:
branches:
- main
- py311
Copy link
Collaborator

Choose a reason for hiding this comment

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

You'll probably want to pull this line out unless you are planning to use this prabg long term.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes good call, we should remove, let me try to do so locally and push again?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm in an all-day class, so I can do at end of day. Or if you have the time and are willing to do so, feel free to kill that line directly? Or we can also take it out as part of the newer PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

To keep things simple, I will remove this as part of that separate PR, along with the other items?

Copy link
Collaborator

Choose a reason for hiding this comment

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

sounds good

tags:
pull_request:
branches:
- main

jobs:
tests:
Expand All @@ -16,47 +19,106 @@ jobs:
matrix:
include:

- name: Python 3.8.13 with minimal dependencies
os: ubuntu-latest
python: 3.8.13
toxenv: py38-test
- name: Python 3.9.xx with minimal dependencies
os: ubuntu-latest
python: 3.9.21
toxenv: py39-test

- name: Python 3.9.xx with all optional dependencies
os: ubuntu-latest
python: 3.9.21
toxenv: py39-test-alldeps
toxargs: -v --develop
toxposargs: -W error::ResourceWarning

- name: Python 3.9.xx with numpy 1.24 and full coverage
os: ubuntu-latest
python: 3.9.21
toxenv: py39-test-alldeps-numpy124-cov

- name: Python 3.8.13 with all optional dependencies
- name: Python 3.10.xx with minimal dependencies
os: ubuntu-latest
python: 3.8.13
toxenv: py38-test-alldeps
toxargs: -v --develop
toxposargs: --open-files

# - name: Python 3.9.0 with all optional dependencies (Windows)
# os: windows-latest
# python: 3.9.0
# toxenv: py38-test-alldeps

# - name: Python 3.8.13 with all optional dependencies (MacOS X)
# os: macos-latest
# python: 3.8.13
# toxenv: py38-test-alldeps
python: 3.10.16
toxenv: py310-test

- name: Python 3.10.xx with all optional dependencies
os: ubuntu-latest
python: 3.10.16
toxenv: py310-test-alldeps
toxargs: -v --develop
toxposargs: -W error::ResourceWarning

- name: Python 3.10.xx with numpy 1.24 and full coverage
os: ubuntu-latest
python: 3.10.16
toxenv: py310-test-alldeps-numpy124-cov

- name: Python 3.10.xx with numpy 2.10 and full coverage
os: ubuntu-latest
python: 3.10.16
toxenv: py310-test-alldeps-numpy210-cov

- name: Python 3.11.xx with minimal dependencies
os: ubuntu-latest
python: 3.11.11
toxenv: py311-test

- name: Python 3.11.xx with all optional dependencies
os: ubuntu-latest
python: 3.11.11
toxenv: py311-test-alldeps
toxargs: -v --develop
toxposargs: -W error::ResourceWarning

- name: Python 3.11.xx with numpy 1.24 and full coverage
os: ubuntu-latest
python: 3.11.11
toxenv: py311-test-alldeps-numpy124-cov

- name: Python 3.11.xx with numpy 2.10 and full coverage
os: ubuntu-latest
python: 3.11.11
toxenv: py311-test-alldeps-numpy210-cov

- name: Python 3.12.xx with minimal dependencies
os: ubuntu-latest
python: 3.12.8
toxenv: py312-test

- name: Python 3.12.xx with all optional dependencies
os: ubuntu-latest
python: 3.12.8
toxenv: py312-test-alldeps
toxargs: -v --develop
toxposargs: -W error::ResourceWarning

- name: Python 3.12.xx with numpy 2.10 and full coverage
os: ubuntu-latest
python: 3.12.8
toxenv: py312-test-alldeps-numpy210-cov

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: ${{ matrix.python }}
- name: Install language-pack-de and tzdata
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get install language-pack-de tzdata
- name: Install pyo dependencies
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get install portaudio19-dev libsndfile1-dev libportmidi-dev liblo-dev
- name: Install Python dependencies
run: python -m pip install --upgrade tox codecov sphinx_rtd_theme
- name: Run tests
run: tox ${{ matrix.toxargs }} -e ${{ matrix.toxenv }} -- ${{ matrix.toxposargs }}
- name: Upload coverage to codecov
if: ${{ contains(matrix.toxenv,'-cov') }}
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
with:
file: ./coverage.xml

Expand All @@ -68,23 +130,26 @@ jobs:
matrix:
include:

- name: Code style checks
- name: (Allowed Failure) Python 3.11 with dev version of key dependencies
os: ubuntu-latest
python: 3.x
toxenv: codestyle
python: 3.11
toxenv: py311-test-devdeps

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: ${{ matrix.python }}
- name: Install language-pack-de and tzdata
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get install language-pack-de tzdata
- name: Install pyo dependencies
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get install portaudio19-dev libsndfile1-dev libportmidi-dev liblo-dev
- name: Install Python dependencies
run: python -m pip install --upgrade tox codecov sphinx_rtd_theme
- name: Run tests
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ __pycache__
*.c

# Other generated files
notebooks/miles_stellar_spectra
*/version.py
*/cython_version.py
htmlcov
Expand Down
14 changes: 11 additions & 3 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
version: 2

build:
image: latest
os: "ubuntu-24.04"
tools:
python: "3.11"
apt_packages:
- portaudio19-dev
- libsndfile1-dev
- libportmidi-dev
- liblo-dev

python:
version: 3.7
install:
- method: pip
path: .
extra_requirements:
- docs
- all
- requirements: docs/requirements.txt

formats: []
sphinx:
configuration: docs/conf.py
7 changes: 5 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
0.2 (unreleased)
0.11 (2025-01-31)
----------------

- No changes yet
- Fixes installation via pypi, confirmed to work with modern Python
(e.g., 3.11, 3.12), updated installation instructions and tips,
infrastructure improvements in CI, fixes automated documentation
builds, added __version__.

0.1 (2020-11-25)
----------------
Expand Down
20 changes: 20 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
cff-version: 1.1.0
message: "Please cite the following works when using this software: https://ui.adsabs.harvard.edu/abs/2024ascl.soft08005B"
authors:
- family-names: Brasseur
given-names: C. E.
- family-names: Fleming
given-names: S.
- family-names: Kotler
given-names: J.
- family-names: Meredith
given-names: K.
title: "Astronify: Astronomical data sonification"
version: 0.11
date-released: 2025-01-31
identifiers:
- type: "ascl-id"
value: "2408.005"
- type: "bibcode"
value: "2024ascl.soft08005B"
abstract: "Astronify contains tools for sonifying astronomical data, specifically data series. Data series sonification takes a data table and maps one column to time, and one column to pitch. This technique is commonly used to sonify light curves, where observation time is scaled to listening time and flux is mapped to pitch. While Astronify’s sonification uses the columns “time” and “flux” by default, any two columns can be supplied and a sonification created."
104 changes: 104 additions & 0 deletions DEVELOPER_DOC.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
Developer Documentation
-----------------------

This documentation is intended for code maintainers and developers as a guide, especially when preparing to merge and release a new version of the code.

Installation
^^^^^^^^^^^^

.. code-block:: bash

$ git clone https://github.com/spacetelescope/astronify.git
$ cd astronify
$ pip install .

For active development, install in develop mode

.. code-block:: bash

$ pip install -e .


Testing
^^^^^^^
Testing is run with `tox <https://tox.readthedocs.io>`_ (``pip install tox``).
Tests can be found in ``tests/`` sub-directories.

.. code-block:: bash

$ tox -e test

Tests can also be run directly with pytest:

.. code-block:: bash

$ pip install -e .[test]
$ pytest


Documentation
^^^^^^^^^^^^^

Documentation files are found in ``docs/``.

We build the documentation with `tox <https://tox.readthedocs.io>`_ (``pip install tox``):

.. code-block:: bash

$ tox -e build_docs

You can also build the documentation with Sphinx directly using:

.. code-block:: bash

$ cd docs
$ sphinx-build -M html . _build/

The built docs will be in ``docs/_build/html/``, to view them go to ``file://</path/to/astronify/repo/>docs/_build/html/index.html`` in the browser of your choice.


Release Protocol
^^^^^^^^^^^^^^^^

TO-BE-FINALIZED

- Update the ``ci_workflows.yml`` under ``.github/workflows/`` to
remove any inactive branches and add your new development branch,
under the ``push`` section towards the top of the file.

- Update the __init__.py file under the "astronify/" folder to update
the __version__ variable to match the upcoming release version. This
should be specified as a string.

- Update the version information and release date in the CITATION.cff
file, located in the top-level directory to match the upcoming release version.

- Update the "CHANGES.rst" file to add the new version, release date,
and summary of what's changing in this version.

- Make a final commit to the branch, doing things like double checking
Python versions, release dates, spell check documentation files,
etc. Commit the final release with:

.. code-block:: bash

$ git commit -m "Preparing release <version>"

- Tag the commit with the version, using the "v' in front of the tag,
even if the version in the __init__.py file does not.

.. code-block:: bash

$ git tag -a v<version> -m "Release version <version>"

- Make sure the `build` package is up-to-date:

.. code-block:: bash

$ python -m build --sdist --outdir dist .

- Twine upload.

.. code-block:: bash

twine upload dist/<my_package*.tar.gz>
Loading