diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml deleted file mode 100644 index 6e655eb..0000000 --- a/.github/workflows/build_check.yml +++ /dev/null @@ -1,199 +0,0 @@ -name: Build and Check - -on: - push: - branches: - - main - pull_request: - -env: - CONDA_ENV_NAME: clevar - -jobs: - code-vers-valid: - name: Version Validation - runs-on: ubuntu-latest - if: github.event_name == 'pull_request' - steps: - # Get current version - - name: Check out the code - uses: actions/checkout@v4 - - name: Get version from current branch - id: current_version - run: | - CURRENT_VERSION="$(grep -oP '__version__ = "\K[^"]+' clevar/version.py)" - echo "CURRENT_VERSION=$CURRENT_VERSION" >> $GITHUB_ENV - # Get PR title to be updated with version - - name: Get PR title and clean version number from it - env: - TITLE: ${{ github.event.pull_request.title }} - run: | - NEW_TITLE="${TITLE% [version:*}" - echo "New title: $NEW_TITLE" - echo "NEW_TITLE=$NEW_TITLE" >> $GITHUB_ENV - - name: Get PR number - id: pr_number - run: | - # Fetch the pull request number from the GitHub context - PR_NUMBER=$(echo $GITHUB_REF | sed 's/refs\/pull\/\([0-9]*\)\/merge/\1/') - echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV - - name: Validate version format - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - if ! echo "$CURRENT_VERSION" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+$'; then - echo "Invalid version format: $v" - echo "Removing version from PR title: $NEW_TITLE" - curl -s -X PATCH \ - -H "Authorization: token $GITHUB_TOKEN" \ - -H "Accept: application/vnd.github.v3+json" \ - -d "{\"title\":\"$NEW_TITLE\"}" \ - "https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUMBER" > /dev/null - exit 1 - fi - echo "Version format is ok" - - # Get main version - - name: Checkout the main branch to get its version - uses: actions/checkout@v4 - with: - ref: main - - name: Get version from main branch - id: main_version - run: | - if [[ "$(git show origin/main:clevar/version.py)" == *"__version__"* ]]; then - MAIN_VERSION="$(grep -oP '__version__ = "\K[^"]+' clevar/version.py)" - else - echo "No version found at main, assuming version 0.0.0" - MAIN_VERSION="0.0.0" - fi - echo "MAIN_VERSION=$MAIN_VERSION" >> $GITHUB_ENV - - # Compare - - name: Compare versions - run: | - IFS=. read -r C1 C2 C3 <<< "$CURRENT_VERSION" - IFS=. read -r M1 M2 M3 <<< "$MAIN_VERSION" - if [ "$C1" != "$M1" ]; then - GOAL="$((M1 + 1)).0.0" - if [ $C1 -lt $M1 ]; then - ERROR=" - Version number should increase: $CURRENT_VERSION<$MAIN_VERSION" - elif [ "$C1" != "$((M1 + 1))" ]; then - ERROR=" - Increment should be done by 1: $GOAL" - elif [ "$CURRENT_VERSION" != "$GOAL" ]; then - ERROR=" - When major version is increased, others should be zero: $GOAL" - fi - elif [ "$C2" != "$M2" ]; then - GOAL="$C1.$((M2 + 1)).0" - if [ $C2 -lt $M2 ]; then - ERROR=" - Version number should increase: $CURRENT_VERSION<$MAIN_VERSION" - elif [ "$C2" != "$((M2 + 1))" ]; then - ERROR=" - Increments should be done by 1: $GOAL" - elif [ "$CURRENT_VERSION" != "$GOAL" ]; then - ERROR=" - When middle version is increased, last number should be zero: $GOAL" - fi - elif [ "$C3" != "$M3" ]; then - GOAL="$C1.$C2.$((M3 + 1))" - if [ $C3 -lt $M3 ]; then - ERROR=" - Version number should increase: $CURRENT_VERSION<$MAIN_VERSION" - elif [ "$CURRENT_VERSION" != "$GOAL" ]; then - ERROR=" - Increments should be done by 1: $GOAL" - fi - else - ERROR=" - Version has not been updated!" - fi - echo "ERROR=$ERROR" >> $GITHUB_ENV - - # Add version number to PR title - - name: Make new title for PR - run: | - if [ "$(printf "%s\n%s" "$CURRENT_VERSION" "$MAIN_VERSION" | sort -V | tail -n 1)" == "$CURRENT_VERSION" ]; then - NEW_TITLE="${NEW_TITLE} [version:$CURRENT_VERSION]" - echo "New title: $NEW_TITLE" - echo "NEW_TITLE=$NEW_TITLE" >> $GITHUB_ENV - fi - - name: Update PR title - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - # Use the GitHub API to update the PR title - echo "Updating PR #$PR_NUMBER with new title: $NEW_TITLE" - curl -s -X PATCH \ - -H "Authorization: token $GITHUB_TOKEN" \ - -H "Accept: application/vnd.github.v3+json" \ - -d "{\"title\":\"$NEW_TITLE\"}" \ - "https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUMBER" > /dev/null - - - name: Check version update - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - if [ "$ERROR" != "" ]; then - echo "Check failed:" - echo "$ERROR" - exit 1 - fi - echo "[ok] Version increased changed!" - - format-valid: - name: Format validation - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.10" - - name: Install pre-commit - run: python -m pip install pre-commit - - name: Run pre-commit checks - run: pre-commit run --all-files --show-diff-on-failure - - doc-valid: - name: Documentation Validation - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: conda-incubator/setup-miniconda@v3 - with: - activate-environment: ${{ env.CONDA_ENV_NAME }} - environment-file: environment.yml - - uses: actions/cache@v4 - with: - path: ${{ env.CONDA }}/pkgs - key: ${{ runner.os }}-conda-${{ env.CONDA_ENV_NAME }} - - name: Install the package - shell: bash -l {0} - run: pip install . - - name: Run the docs - shell: bash -l {0} - run: make -C docs/ html - - main-valid: - name: Code Validation - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: conda-incubator/setup-miniconda@v3 - with: - activate-environment: ${{ env.CONDA_ENV_NAME }} - environment-file: environment.yml - - uses: actions/cache@v4 - with: - path: ${{ env.CONDA }}/pkgs - key: ${{ runner.os }}-conda-${{ env.CONDA_ENV_NAME }} - - name: Install the package - shell: bash -l {0} - run: pip install . - - name: Run the unit tests - shell: bash -l {0} - run: pytest tests/ --cov=clevar/ - env: - DISPLAY: test - - name: Coveralls - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - pip install coveralls - coveralls --service=github diff --git a/.github/workflows/joss_paper.yml b/.github/workflows/joss_paper.yml new file mode 100644 index 0000000..998f1d3 --- /dev/null +++ b/.github/workflows/joss_paper.yml @@ -0,0 +1,26 @@ +name: Draft PDF +on: + pull_request: + #workflow_dispatch: + +jobs: + paper: + runs-on: ubuntu-latest + name: Paper Draft + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build draft PDF + uses: openjournals/openjournals-draft-action@master + with: + journal: joss + # This should be the path to the paper within your repo. + paper-path: paper/paper.md + - name: Upload + uses: actions/upload-artifact@v4 + with: + name: paper + # This is the output path where Pandoc will write the compiled + # PDF. Note, this should be the same directory as the input + # paper.md + path: paper/paper.pdf diff --git a/paper/paper.bib b/paper/paper.bib new file mode 100644 index 0000000..a80d47b --- /dev/null +++ b/paper/paper.bib @@ -0,0 +1,91 @@ +%%%% Aguena %%%%%%%%%% +@ARTICLE{2026OJAp....955863A, + author = {{Aguena}, M. and {Aiola}, S. and {Allam}, S. and {Andrade-Oliveira}, F. and {Bacon}, D. and {Bahcall}, N. and {Battaglia}, N. and {Battistelli}, E.~S. and {Bocquet}, S. and {Bolliet}, B. and {Bond}, J.~R. and {Brooks}, D. and {Calabrese}, E. and {Carretero}, J. and {Choi}, S.~K. and {da Costa}, L.~N. and {Costanzi}, M. and {Coulton}, W. and {Davis}, T.~M. and {Desai}, S. and {Devlin}, M.~J. and {Dicker}, S. and {Doel}, P. and {Duivenvoorden}, A.~J. and {Dunkley}, J. and {Ferraro}, S. and {Flaugher}, B. and {Frieman}, J. and {Gallardo}, P.~A. and {Gatti}, M. and {Gaztanaga}, E. and {Gill}, A.~S. and {Golec}, J.~E. and {Gruen}, D. and {Gruendl}, R.~A. and {Halpern}, M. and {Hasselfield}, M. and {Hill}, J.~C. and {Hilton}, M. and {Hincks}, A.~D. and {Hinton}, S.~R. and {Hollowood}, D.~L. and {Honscheid}, K. and {Hubmayr}, J. and {Huffenberger}, K.~M. and {Hughes}, J.~P. and {James}, D.~J. and {Klein}, M. and {Knowles}, K. and {Koopman}, B.~J. and {Kosowsky}, A. and {Lahav}, O. and {Lee}, E. and {Lin}, Y. and {Lokken}, M. and {Madhavacheril}, M.~S. and {Malag{\'o}n}, A.~A. Plazas and {Marrewijk}, J. v. and {Marshall}, J.~L. and {McMahon}, J. and {Mena-Fern{\'a}ndez}, J. and {Miquel}, R. and {Miyatake}, H. and {Mohr}, J.~J. and {Moodley}, K. and {Mroczkowski}, T. and {Naess}, S. and {Nati}, F. and {Nicola}, A. and {Niemack}, M.~D. and {Ogando}, R.~L.~C. and {Oguri}, M. and {Orlowski-Scherer}, J. and {Page}, L.~A. and {Partridge}, B. and {da Silva Pereira}, M.~E. and {Porredon}, A. and {Qu}, F.~J. and {Ragavan}, D.~C. and {Guachalla}, B. Ried and {Romer}, A.~K. and {Rosell}, A. Carnero and {Rykoff}, E.~S. and {Samuroff}, S. and {Sanchez}, E. and {Sevilla-Noarbe}, I. and {Sierra}, C. and {Sif{\'o}n}, C. and {Smith}, M. and {Staggs}, S.~T. and {Suchyta}, E. and {Swanson}, M.~E.~C. and {Tucker}, D.~L. and {Vargas}, C. and {Vavagiakis}, E.~M. and {De Vicente}, J. and {Weaverdyck}, N. and {Weller}, J. and {Wollack}, E.~J. and {Zubeldia}, I.}, + title = "{The Atacama Cosmology Telescope: DR6 Sunyaev-Zel'dovich Selected Galaxy Clusters Catalog}", + journal = {The Open Journal of Astrophysics}, + keywords = {Cosmology and Nongalactic Astrophysics}, + year = 2026, + month = jan, + volume = {9}, + pages = {55863}, + doi = {10.33232/001c.155863}, +archivePrefix = {arXiv}, + eprint = {2507.21459}, + primaryClass = {astro-ph.CO}, + adsurl = {https://ui.adsabs.harvard.edu/abs/2026OJAp....955863A}, +} +@ARTICLE{2023arXiv230906593A, + author = {{Aguena}, M. and {Alves}, O. and {Annis}, J. and {Bacon}, D. and {Bocquet}, S. and {Brooks}, D. and {Carnero Rosell}, A. and {Chang}, C. and {Costanzi}, M. and {Coviello}, C. and {da Costa}, L.~N. and {Davis}, T.~M. and {De Vicente}, J. and {Diehl}, H.~T. and {Doel}, P. and {Esteves}, J. and {Everett}, S. and {Ferrero}, I. and {Fert{\'e}}, A. and {Friedel}, D. and {Frieman}, J. and {Gatti}, M. and {Giannini}, G. and {Gruen}, D. and {Gruendl}, R.~A. and {Gutierrez}, G. and {Herner}, K. and {Hinton}, S.~R. and {Hollowood}, D.~L. and {Honscheid}, K. and {James}, D.~J. and {Jeltema}, T. and {Kirby}, M. and {Kuehn}, K. and {Lahav}, O. and {Li}, P. and {Marshall}, J.~L. and {McClintock}, T. and {Mellor}, D. and {Mena-Fern{\'a}ndez}, J. and {Miquel}, R. and {O'Donnell}, J. and {Palmese}, A. and {Paterno}, M. and {Pereira}, M.~E.~S. and {Pieres}, A. and {Plazas Malag{\'o}n}, A.~A. and {Rodriguez-Monroy}, M. and {Romer}, A.~K. and {Roodman}, A. and {Sanchez}, E. and {Schubnell}, M. and {Sevilla-Noarbe}, I. and {Shin}, T. and {Smith}, M. and {Suchyta}, E. and {Swanson}, M.~E.~C. and {Tarle}, G. and {Weller}, J. and {Wiseman}, P. and {Wu}, H.-Y. and {Zhang}, Y. and {Zhou}, C.}, + title = "{Building an Efficient Cluster Cosmology Software Package for Modeling Cluster Counts and Lensing}", + journal = {arXiv e-prints}, + keywords = {Astrophysics - Cosmology and Nongalactic Astrophysics, Astrophysics - Instrumentation and Methods for Astrophysics}, + year = 2023, + month = sep, + eid = {arXiv:2309.06593}, + pages = {arXiv:2309.06593}, + doi = {10.48550/arXiv.2309.06593}, +archivePrefix = {arXiv}, + eprint = {2309.06593}, + primaryClass = {astro-ph.CO}, + adsurl = {https://ui.adsabs.harvard.edu/abs/2023arXiv230906593A}, +} +@ARTICLE{2021MNRAS.508.6092A, + author = {{Aguena}, M. and {Avestruz}, C. and {Combet}, C. and {Fu}, S. and {Herbonnet}, R. and {Malz}, A.~I. and {Penna-Lima}, M. and {Ricci}, M. and {Vitenti}, S.~D.~P. and {Baumont}, L. and {Fan}, H. and {Fong}, M. and {Ho}, M. and {Kirby}, M. and {Payerne}, C. and {Boutigny}, D. and {Lee}, B. and {Liu}, B. and {McClintock}, T. and {Miyatake}, H. and {Sif{\'o}n}, C. and {von der Linden}, A. and {Wu}, H. and {Yoon}, M. and {LSST Dark Energy Science Collaboration}}, + title = "{CLMM: a LSST-DESC cluster weak lensing mass modeling library for cosmology}", + journal = {\mnras}, + keywords = {gravitational lensing: weak, software: public release, galaxies: clusters: general, Astrophysics - Cosmology and Nongalactic Astrophysics, Astrophysics - Instrumentation and Methods for Astrophysics}, + year = 2021, + month = dec, + volume = {508}, + number = {4}, + pages = {6092-6110}, + doi = {10.1093/mnras/stab2764}, +archivePrefix = {arXiv}, + eprint = {2107.10857}, + primaryClass = {astro-ph.CO}, + adsurl = {https://ui.adsabs.harvard.edu/abs/2021MNRAS.508.6092A}, +} +@ARTICLE{2021MNRAS.502.4435A, + author = {{Aguena}, M. and {Benoist}, C. and {da Costa}, L.~N. and {Ogando}, R.~L.~C. and {Gschwend}, J. and {Sampaio-Santos}, H.~B. and {Lima}, M. and {Maia}, M.~A.~G. and {Allam}, S. and {Avila}, S. and {Bacon}, D. and {Bertin}, E. and {Bhargava}, S. and {Brooks}, D. and {Carnero Rosell}, A. and {Carrasco Kind}, M. and {Carretero}, J. and {Costanzi}, M. and {De Vicente}, J. and {Desai}, S. and {Diehl}, H.~T. and {Doel}, P. and {Everett}, S. and {Evrard}, A.~E. and {Ferrero}, I. and {Fert{\'e}}, A. and {Flaugher}, B. and {Fosalba}, P. and {Frieman}, J. and {Garc{\'\i}a-Bellido}, J. and {Giles}, P. and {Gruendl}, R.~A. and {Gutierrez}, G. and {Hinton}, S.~R. and {Hollowood}, D.~L. and {Honscheid}, K. and {James}, D.~J. and {Jeltema}, T. and {Kuehn}, K. and {Kuropatkin}, N. and {Lahav}, O. and {Melchior}, P. and {Miquel}, R. and {Morgan}, R. and {Palmese}, A. and {Paz-Chinch{\'o}n}, F. and {Plazas}, A.~A. and {Romer}, A.~K. and {Sanchez}, E. and {Santiago}, B. and {Schubnell}, M. and {Serrano}, S. and {Sevilla-Noarbe}, I. and {Smith}, M. and {Soares-Santos}, M. and {Suchyta}, E. and {Tarle}, G. and {To}, C. and {Tucker}, D.~L. and {Wilkinson}, R.~D.}, + title = "{The WaZP galaxy cluster sample of the dark energy survey year 1}", + journal = {\mnras}, + keywords = {methods: data analysis, surveys, galaxies: clusters: general, galaxies: distances and redshifts, Astrophysics - Cosmology and Nongalactic Astrophysics}, + year = 2021, + month = apr, + volume = {502}, + number = {3}, + pages = {4435-4456}, + doi = {10.1093/mnras/stab264}, +archivePrefix = {arXiv}, + eprint = {2008.08711}, + primaryClass = {astro-ph.CO}, + adsurl = {https://ui.adsabs.harvard.edu/abs/2021MNRAS.502.4435A}, +} +@ARTICLE{2018PhRvD..98l3529A, + author = {{Aguena}, Michel and {Lima}, Marcos}, + title = "{Effects of completeness and purity on cluster dark energy constraints}", + journal = {\prd}, + keywords = {Astrophysics - Cosmology and Nongalactic Astrophysics}, + year = 2018, + month = dec, + volume = {98}, + number = {12}, + eid = {123529}, + pages = {123529}, + doi = {10.1103/PhysRevD.98.123529}, +archivePrefix = {arXiv}, + eprint = {1611.05468}, + primaryClass = {astro-ph.CO}, + adsurl = {https://ui.adsabs.harvard.edu/abs/2018PhRvD..98l3529A}, +} +@software{2015ascl.soft12009A, + author = {{Aguena}, Michel and {Busti}, Vinicius C. and {Camacho}, Hugo and {Sasdelli}, Michele and {Ishida}, Emille E.~O. and {Vilalta}, Ricardo and {Trindade}, Arlindo M.~M. and {Gieseke}, Fabien and {de Souza}, Rafael S. and {Fantaye}, Yabebal T. and {Mazzali}, Paolo A.}, + title = "{DRACULA: Dimensionality Reduction And Clustering for Unsupervised Learning in Astronomy}", + howpublished = {Astrophysics Source Code Library, record ascl:1512.009}, + year = 2015, + month = dec, + eid = {ascl:1512.009}, +archivePrefix = {ascl}, + eprint = {1512.009}, + adsurl = {https://ui.adsabs.harvard.edu/abs/2015ascl.soft12009A}, +} diff --git a/paper/paper.md b/paper/paper.md new file mode 100644 index 0000000..6b84c1e --- /dev/null +++ b/paper/paper.md @@ -0,0 +1,41 @@ +--- +title: 'Gala: A Python package for galactic dynamics' +tags: + - Python + - astronomy + - galaxy clusters + - cosmology + - LSST-DESC +authors: + - name: Michel Aguena + orcid: 0000-0001-5679-6747 + affiliation: [1, 2] +affiliations: + - name: INAF - Osservatorio Astronomico di Trieste, Italy + index: 1 + - name: Laboratorio Interinstitucional de e-Astronomia, Brazil + index: 2 +date: 01 August 2026 +bibliography: paper.bib + +--- + +# Summary + + +# Statement of need + +# State of the field + +# Software design + +# Research impact statement + +# AI usage disclosure + +No generative AI tools were used in the development of this software, the writing +of this manuscript, or the preparation of supporting materials. + +# Acknowledgements + +# References