From 9490bf22ac1768c12b8668fa75857fa532d6514e Mon Sep 17 00:00:00 2001 From: Brian Cherinka Date: Wed, 18 Jun 2025 11:47:40 -0400 Subject: [PATCH 1/3] build changes; tag and version bump (#113) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * updating changelog * Bump version: 4.0.9dev → 4.0.9 * fixing pkg build; moving data copy to new file for setup * removing six as a dependency * fixing actions * Bump version: 4.0.9 → 4.0.10dev --- .bumpversion.cfg | 2 +- .github/workflows/build.yml | 1 + .github/workflows/release.yml | 1 + .github/workflows/sphinxbuild.yml | 2 +- CHANGELOG.rst | 5 +++-- README.md | 6 +++--- bin/copy_data.py | 8 ++++++++ python/tree/tree.py | 3 +-- setup.cfg | 2 +- setup.py | 4 ---- 10 files changed, 20 insertions(+), 14 deletions(-) create mode 100644 bin/copy_data.py diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 6c5ca0d..6746f51 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 4.0.9dev +current_version = 4.0.10dev commit = True tag = False tag_name = {new_version} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0ddedfe..cd5cbd8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,6 +20,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip + python bin/copy_data.py pip install .[dev] - name: Lint with flake8 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 55f5b9e..8906938 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,6 +42,7 @@ jobs: - name: Build package run: | + python bin/copy_data.py python -m build - name: Publish to PyPI diff --git a/.github/workflows/sphinxbuild.yml b/.github/workflows/sphinxbuild.yml index f9e4aa0..d564cf7 100644 --- a/.github/workflows/sphinxbuild.yml +++ b/.github/workflows/sphinxbuild.yml @@ -27,4 +27,4 @@ jobs: # The command used to build your documentation. build-command: make html # optional, default is make html # Pre-build command - pre-build-command: "apt-get update -y && apt-get install -y gcc && pip install .[docs]" + pre-build-command: "apt-get update -y && apt-get install -y gcc && python bin/copy_data.py && pip install .[docs]" diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 80f15b9..3b0fb2c 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,11 +6,12 @@ Change Log This document records the main changes to the tree code. -4.0.9 (unreleased) +4.0.9 (06-18-2025) ------------------ - Updating paths for DR19: apogee, astra, vacs, etc +- Basic project maintenance -4.0.8 (04-16-2024) +4.0.8 (04-16-2025) ------------------ - Removed use of deprecated `distutils` - Updated github actions diff --git a/README.md b/README.md index 78fde0d..a95a18e 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,12 @@ To install tree for development locally: ``` git clone https://github.com/sdss/tree cd tree +python bin/copy_data.py pip install -e ".[dev,docs]" ``` +`python bin/copy_data.py` must be run ahead of any package install or builds with `python -m build` to ensure the config files are properly in place. + ### Install at Utah To install at Utah for use with modules, @@ -71,6 +74,3 @@ New tag names follow the Python semantic versioning syntax, i.e. `X.Y.Z`. - GitHub: https://github.com/sdss/tree - Documentation: https://sdss-tree.readthedocs.org - Issues: https://github.com/sdss/tree/issues - - - diff --git a/bin/copy_data.py b/bin/copy_data.py new file mode 100644 index 0000000..6e3e376 --- /dev/null +++ b/bin/copy_data.py @@ -0,0 +1,8 @@ +# !usr/bin/env python +# -*- coding: utf-8 -*- +# + +import shutil + +# Copy data files into the python/tree/data directory +tmp = shutil.copytree('data', 'python/tree/data', dirs_exist_ok=True) diff --git a/python/tree/tree.py b/python/tree/tree.py index 60ea580..a2e39a0 100644 --- a/python/tree/tree.py +++ b/python/tree/tree.py @@ -15,7 +15,6 @@ import glob import re from collections import OrderedDict -import six import json import datetime from tree import log, config as cfg_params @@ -220,7 +219,7 @@ def _check_config(self, config=None): # check initial argument cfgname = (config or self.config_name) cfgname = 'sdsswork' if cfgname is None else cfgname - assert isinstance(cfgname, six.string_types), 'config name must be a string' + assert isinstance(cfgname, str), 'config name must be a string' cfgname = cfgname.lower() config_name = cfgname if cfgname.endswith('.cfg') else '{0}.cfg'.format(cfgname) diff --git a/setup.cfg b/setup.cfg index 4099c0d..967ab3c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = sdss-tree -version = 4.0.9dev +version = 4.0.10dev author = Brian Cherinka author_email = bcherinka@stsci.edu description = Control and setup of SDSS tree environment and modules diff --git a/setup.py b/setup.py index 34205c4..0e91a80 100644 --- a/setup.py +++ b/setup.py @@ -4,11 +4,7 @@ # -import shutil from setuptools import setup -# Copy data files into the python/tree/data directory -tmp = shutil.copytree('data', 'python/tree/data', dirs_exist_ok=True) - setup() From ec42f889fa6f8cb542ea36219c3605cb9b9fd95f Mon Sep 17 00:00:00 2001 From: Joel Brownstein Date: Thu, 10 Jul 2025 10:35:24 -0600 Subject: [PATCH 2/3] fix vac3/4 (#114) * fix vac3/4 * fix dr19 date --------- Co-authored-by: Joel Brownstein --- data/dr19.cfg | 12 ++++++------ data/ipl3.cfg | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/data/dr19.cfg b/data/dr19.cfg index 85c63a8..3454989 100644 --- a/data/dr19.cfg +++ b/data/dr19.cfg @@ -8,7 +8,7 @@ name = dr19 current = True base = dr18 phase = 5 -release_date = 2025-07-11 +release_date = 2025-07-10 # # # @@ -245,13 +245,13 @@ multiplex = $ALLSPEC/{vers}/multiplex-{release}-{vers}.fits # VAC paths for DR19 # # SDSS-V VAC 0003 -StarFlow_summary = $MWM_STARFLOW/StarFlow_summary_{vers}.fits -StarFlow_age_posterior = $MWM_STARFLOW/StarFlow_age_posterior {vers}.fits -StarFlow_mass_posterior = $MWM_STARFLOW/StarFlow_mass_posterior{vers}.fits +StarFlow_summary = $MWM_STARFLOW/{vers}/StarFlow_summary_{vers}.fits +StarFlow_age_posterior = $MWM_STARFLOW/{vers}/StarFlow_age_posterior_{vers}.fits +StarFlow_mass_posterior = $MWM_STARFLOW/{vers}/StarFlow_mass_posterior_{vers}.fits # # SDSS-V VAC 0004 -DL1_spec_eROSITA_eRASS1 = $DL1_SDSS_EROSITA/DL1_spec_SDSSV_IPL3_eROSITA_eRASS1.fits -DL1_spec_eROSITA_eRASS1_allepoch = $DL1_SDSS_EROSITA/DL1_spec_SDSSV_IPL3_eROSITA_eRASS1.fits +DL1_spec_eROSITA_eRASS1 = $DL1_SDSS_EROSITA/{vers}/DL1_spec_SDSSV_eROSITA_eRASS1-{vers}.fits +DL1_spec_eROSITA_eRASS1_allepoch = $DL1_SDSS_EROSITA/{vers}/DL1_spec_SDSSV_eROSITA_eRASS1_allepoch-{vers}.fits # # SDSS-V VAC 0006 allVisit_MADGICS = $APMADGICS/{vers}/outdir_wu_{star_prior_type}/allVisit_MADGICS_{vers}_{star_prior_type}.fits diff --git a/data/ipl3.cfg b/data/ipl3.cfg index bfe7585..c89e291 100644 --- a/data/ipl3.cfg +++ b/data/ipl3.cfg @@ -276,13 +276,13 @@ multiplex = $ALLSPEC/{vers}/multiplex-{release}-{vers}.fits # VAC paths for IPL3 # # SDSS-V VAC 0003 -StarFlow_summary = $MWM_STARFLOW/StarFlow_summary_{vers}.fits -StarFlow_age_posterior = $MWM_STARFLOW/StarFlow_age_posterior {vers}.fits -StarFlow_mass_posterior = $MWM_STARFLOW/StarFlow_mass_posterior{vers}.fits +StarFlow_summary = $MWM_STARFLOW/{vers}/StarFlow_summary_{vers}.fits +StarFlow_age_posterior = $MWM_STARFLOW/{vers}/StarFlow_age_posterior_{vers}.fits +StarFlow_mass_posterior = $MWM_STARFLOW/{vers}/StarFlow_mass_posterior_{vers}.fits # # SDSS-V VAC 0004 -DL1_spec_eROSITA_eRASS1 = $DL1_SDSS_EROSITA/DL1_spec_SDSSV_IPL3_eROSITA_eRASS1.fits -DL1_spec_eROSITA_eRASS1_allepoch = $DL1_SDSS_EROSITA/DL1_spec_SDSSV_IPL3_eROSITA_eRASS1.fits +DL1_spec_eROSITA_eRASS1 = $DL1_SDSS_EROSITA/{vers}/DL1_spec_SDSSV_eROSITA_eRASS1-{vers}.fits +DL1_spec_eROSITA_eRASS1_allepoch = $DL1_SDSS_EROSITA/{vers}/DL1_spec_SDSSV_eROSITA_eRASS1_allepoch-{vers}.fits # # SDSS-V VAC 0006 allVisit_MADGICS = $APMADGICS/{vers}/outdir_wu_{star_prior_type}/allVisit_MADGICS_{vers}_{star_prior_type}.fits From 457ca06afde9fc0a9052af4694e5dacebf52e2c5 Mon Sep 17 00:00:00 2001 From: Joel Brownstein Date: Thu, 10 Jul 2025 10:50:24 -0600 Subject: [PATCH 3/3] Dr19 small changes (#115) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix dr19 date * Bump version to 4.0.10 --------- Co-authored-by: Joel Brownstein Co-authored-by: José Sánchez-Gallego Co-authored-by: johndonor3 --- .bumpversion.cfg | 2 +- CHANGELOG.rst | 5 +++++ setup.cfg | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 6746f51..6562c3f 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 4.0.10dev +current_version = 4.0.10 commit = True tag = False tag_name = {new_version} diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 3b0fb2c..6b1e16e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,11 @@ Change Log This document records the main changes to the tree code. +4.0.10 (07-10-2025) +------------------ +- Updating paths for DR19: vacs +- Fix DR19 Release Date for public access + 4.0.9 (06-18-2025) ------------------ - Updating paths for DR19: apogee, astra, vacs, etc diff --git a/setup.cfg b/setup.cfg index 967ab3c..5c41e0f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = sdss-tree -version = 4.0.10dev +version = 4.0.10 author = Brian Cherinka author_email = bcherinka@stsci.edu description = Control and setup of SDSS tree environment and modules