lephare 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lephare-0.1.1/.clang-format +3 -0
- lephare-0.1.1/.copier-answers.yml +25 -0
- lephare-0.1.1/.git_archival.txt +4 -0
- lephare-0.1.1/.gitattributes +24 -0
- lephare-0.1.1/.github/ISSUE_TEMPLATE/0-general_issue.md +8 -0
- lephare-0.1.1/.github/ISSUE_TEMPLATE/1-bug_report.md +17 -0
- lephare-0.1.1/.github/ISSUE_TEMPLATE/2-feature_request.md +18 -0
- lephare-0.1.1/.github/dependabot.yml +10 -0
- lephare-0.1.1/.github/pull_request_template.md +63 -0
- lephare-0.1.1/.github/workflows/compile-cpp.yml +32 -0
- lephare-0.1.1/.github/workflows/pre-commit-ci.yml +36 -0
- lephare-0.1.1/.github/workflows/publish-to-pypi.yml +147 -0
- lephare-0.1.1/.github/workflows/smoke-test.yml +82 -0
- lephare-0.1.1/.github/workflows/testing-and-coverage.yml +40 -0
- lephare-0.1.1/.gitignore +158 -0
- lephare-0.1.1/.gitmodules +3 -0
- lephare-0.1.1/.pre-commit-config.yaml +107 -0
- lephare-0.1.1/.readthedocs.yml +22 -0
- lephare-0.1.1/.setup_dev.sh +42 -0
- lephare-0.1.1/CMakeLists.txt +115 -0
- lephare-0.1.1/LICENSE +21 -0
- lephare-0.1.1/PKG-INFO +106 -0
- lephare-0.1.1/README.md +51 -0
- lephare-0.1.1/docs/Makefile +31 -0
- lephare-0.1.1/docs/conf.py +80 -0
- lephare-0.1.1/docs/doxygen/Doxyfile +2581 -0
- lephare-0.1.1/docs/index.rst +52 -0
- lephare-0.1.1/docs/notebooks/Building_list_of_onesources.ipynb +263 -0
- lephare-0.1.1/docs/notebooks/Data_retrieval.ipynb +155 -0
- lephare-0.1.1/docs/notebooks/Example_of_usage_of_magSvc.ipynb +123 -0
- lephare-0.1.1/docs/notebooks/README.md +1 -0
- lephare-0.1.1/docs/notebooks/Testing_fit_of_one_object_of_the_catalogue.ipynb +919 -0
- lephare-0.1.1/docs/notebooks/example_full_run.ipynb +592 -0
- lephare-0.1.1/docs/notebooks/examples.ipynb +427 -0
- lephare-0.1.1/docs/notebooks/intro.ipynb +128 -0
- lephare-0.1.1/docs/notebooks.rst +11 -0
- lephare-0.1.1/docs/requirements.txt +12 -0
- lephare-0.1.1/examples/color.py +405 -0
- lephare-0.1.1/examples/figuresLPP.py +1383 -0
- lephare-0.1.1/examples/figuresLPZ.py +1148 -0
- lephare-0.1.1/examples/spec.py +301 -0
- lephare-0.1.1/pyproject.toml +119 -0
- lephare-0.1.1/setup.cfg +4 -0
- lephare-0.1.1/setup.py +102 -0
- lephare-0.1.1/src/lephare/__init__.py +30 -0
- lephare-0.1.1/src/lephare/_flt.py +25 -0
- lephare-0.1.1/src/lephare/_pdf.py +26 -0
- lephare-0.1.1/src/lephare/_photoz.py +76 -0
- lephare-0.1.1/src/lephare/_spec.py +198 -0
- lephare-0.1.1/src/lephare/_utils.py +50 -0
- lephare-0.1.1/src/lephare/_version.py +16 -0
- lephare-0.1.1/src/lephare/data_manager.py +77 -0
- lephare-0.1.1/src/lephare/data_retrieval.py +301 -0
- lephare-0.1.1/src/lephare/filter.py +73 -0
- lephare-0.1.1/src/lephare/filterSvc.py +218 -0
- lephare-0.1.1/src/lephare/magSvc.py +50 -0
- lephare-0.1.1/src/lephare/mag_gal.py +103 -0
- lephare-0.1.1/src/lephare/runner.py +156 -0
- lephare-0.1.1/src/lephare/sedtolib.py +91 -0
- lephare-0.1.1/src/lephare/zphota.py +143 -0
- lephare-0.1.1/src/lephare.egg-info/PKG-INFO +106 -0
- lephare-0.1.1/src/lephare.egg-info/SOURCES.txt +114 -0
- lephare-0.1.1/src/lephare.egg-info/dependency_links.txt +1 -0
- lephare-0.1.1/src/lephare.egg-info/not-zip-safe +1 -0
- lephare-0.1.1/src/lephare.egg-info/requires.txt +17 -0
- lephare-0.1.1/src/lephare.egg-info/top_level.txt +2 -0
- lephare-0.1.1/src/lib/Makefile +134 -0
- lephare-0.1.1/src/lib/PDF.cpp +423 -0
- lephare-0.1.1/src/lib/PDF.h +86 -0
- lephare-0.1.1/src/lib/SED.cpp +2073 -0
- lephare-0.1.1/src/lib/SED.h +299 -0
- lephare-0.1.1/src/lib/SEDLib.cpp +243 -0
- lephare-0.1.1/src/lib/SEDLib.h +342 -0
- lephare-0.1.1/src/lib/_bindings.cc +433 -0
- lephare-0.1.1/src/lib/cosmology.cpp +185 -0
- lephare-0.1.1/src/lib/cosmology.h +53 -0
- lephare-0.1.1/src/lib/ext.cpp +76 -0
- lephare-0.1.1/src/lib/ext.h +47 -0
- lephare-0.1.1/src/lib/ext_curv.cpp +348 -0
- lephare-0.1.1/src/lib/filter.cpp +137 -0
- lephare-0.1.1/src/lib/filter_extinc.cpp +377 -0
- lephare-0.1.1/src/lib/flt.cpp +639 -0
- lephare-0.1.1/src/lib/flt.h +200 -0
- lephare-0.1.1/src/lib/globals.cpp +134 -0
- lephare-0.1.1/src/lib/globals.h +80 -0
- lephare-0.1.1/src/lib/keyword.cpp +305 -0
- lephare-0.1.1/src/lib/keyword.h +101 -0
- lephare-0.1.1/src/lib/mag.cpp +907 -0
- lephare-0.1.1/src/lib/mag.h +133 -0
- lephare-0.1.1/src/lib/mag_gal.cpp +158 -0
- lephare-0.1.1/src/lib/oneElLambda.cpp +36 -0
- lephare-0.1.1/src/lib/oneElLambda.h +48 -0
- lephare-0.1.1/src/lib/onesource.cpp +2300 -0
- lephare-0.1.1/src/lib/onesource.h +230 -0
- lephare-0.1.1/src/lib/opa.cpp +64 -0
- lephare-0.1.1/src/lib/opa.h +38 -0
- lephare-0.1.1/src/lib/photoz_lib.cpp +1701 -0
- lephare-0.1.1/src/lib/photoz_lib.h +102 -0
- lephare-0.1.1/src/lib/sedtolib.cpp +98 -0
- lephare-0.1.1/src/lib/zphota.cpp +132 -0
- lephare-0.1.1/tests/conftest.py +24 -0
- lephare-0.1.1/tests/data/calzetti.dat +1981 -0
- lephare-0.1.1/tests/data/examples/COSMOS.para +210 -0
- lephare-0.1.1/tests/data/filt/subaru/IB527.pb +995 -0
- lephare-0.1.1/tests/data/sed/WDgd71.sed.ext +3066 -0
- lephare-0.1.1/tests/data/sed/o5v.sed.ext +4860 -0
- lephare-0.1.1/tests/data/tau10.out +1199 -0
- lephare-0.1.1/tests/data/test_data_registry.txt +2 -0
- lephare-0.1.1/tests/data/test_file_names.list +2 -0
- lephare-0.1.1/tests/lephare/test_cosmology.py +60 -0
- lephare-0.1.1/tests/lephare/test_dataRetrieval.py +132 -0
- lephare-0.1.1/tests/lephare/test_globals.py +16 -0
- lephare-0.1.1/tests/lephare/test_keyword.py +100 -0
- lephare-0.1.1/tests/lephare/test_oneElLambda.py +44 -0
- lephare-0.1.1/tests/lephare/test_onesource.py +32 -0
- lephare-0.1.1/tests/lephare/test_sed.py +76 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Changes here will be overwritten by Copier
|
|
2
|
+
_commit: v2.0.1
|
|
3
|
+
_src_path: gh:lincc-frameworks/python-project-template
|
|
4
|
+
author_email: johann.cohentanugi@gmail.com
|
|
5
|
+
author_name: Johann Cohen-Tanugi
|
|
6
|
+
create_example_module: false
|
|
7
|
+
custom_install: true
|
|
8
|
+
enforce_style:
|
|
9
|
+
- ruff_lint
|
|
10
|
+
- ruff_format
|
|
11
|
+
failure_notification:
|
|
12
|
+
- slack
|
|
13
|
+
include_benchmarks: false
|
|
14
|
+
include_docs: true
|
|
15
|
+
include_notebooks: true
|
|
16
|
+
mypy_type_checking: none
|
|
17
|
+
package_name: lephare
|
|
18
|
+
project_license: MIT
|
|
19
|
+
project_name: lephare
|
|
20
|
+
project_organization: lincc-frameworks
|
|
21
|
+
python_versions:
|
|
22
|
+
- '3.9'
|
|
23
|
+
- '3.10'
|
|
24
|
+
- '3.11'
|
|
25
|
+
- '3.12'
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# For explanation of this file and uses see
|
|
2
|
+
# https://git-scm.com/docs/gitattributes
|
|
3
|
+
# https://developer.lsst.io/git/git-lfs.html#using-git-lfs-enabled-repositories
|
|
4
|
+
# https://lincc-ppt.readthedocs.io/en/latest/practices/git-lfs.html
|
|
5
|
+
#
|
|
6
|
+
# Used by https://github.com/lsst/afwdata.git
|
|
7
|
+
# *.boost filter=lfs diff=lfs merge=lfs -text
|
|
8
|
+
# *.dat filter=lfs diff=lfs merge=lfs -text
|
|
9
|
+
# *.fits filter=lfs diff=lfs merge=lfs -text
|
|
10
|
+
# *.gz filter=lfs diff=lfs merge=lfs -text
|
|
11
|
+
#
|
|
12
|
+
# apache parquet files
|
|
13
|
+
# *.parq filter=lfs diff=lfs merge=lfs -text
|
|
14
|
+
#
|
|
15
|
+
# sqlite files
|
|
16
|
+
# *.sqlite3 filter=lfs diff=lfs merge=lfs -text
|
|
17
|
+
#
|
|
18
|
+
# gzip files
|
|
19
|
+
# *.gz filter=lfs diff=lfs merge=lfs -text
|
|
20
|
+
#
|
|
21
|
+
# png image files
|
|
22
|
+
# *.png filter=lfs diff=lfs merge=lfs -text
|
|
23
|
+
|
|
24
|
+
.git_archival.txt export-subst
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Tell us about a problem to fix
|
|
4
|
+
title: 'Short description'
|
|
5
|
+
labels: 'bug'
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
**Bug report**
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
**Before submitting**
|
|
13
|
+
Please check the following:
|
|
14
|
+
|
|
15
|
+
- [ ] I have described the situation in which the bug arose, including what code was executed, information about my environment, and any applicable data others will need to reproduce the problem.
|
|
16
|
+
- [ ] I have included available evidence of the unexpected behavior (including error messages, screenshots, and/or plots) as well as a descriprion of what I expected instead.
|
|
17
|
+
- [ ] If I have a solution in mind, I have provided an explanation and/or pseudocode and/or task list.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an idea for this project
|
|
4
|
+
title: 'Short description'
|
|
5
|
+
labels: 'enhancement'
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Feature request**
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
**Before submitting**
|
|
14
|
+
Please check the following:
|
|
15
|
+
|
|
16
|
+
- [ ] I have described the purpose of the suggested change, specifying what I need the enhancement to accomplish, i.e. what problem it solves.
|
|
17
|
+
- [ ] I have included any relevant links, screenshots, environment information, and data relevant to implementing the requested feature, as well as pseudocode for how I want to access the new functionality.
|
|
18
|
+
- [ ] If I have ideas for how the new feature could be implemented, I have provided explanations and/or pseudocode and/or task lists for the steps.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Thank you for your contribution to the repo :)
|
|
3
|
+
|
|
4
|
+
Pull Request (PR) Instructions:
|
|
5
|
+
Provide a general summary of your changes in the Title above. Fill out each section of the template, and replace the space with an `x` in all the boxes that apply. If you're unsure about any of these, don't hesitate to ask. We're here to help! Once you are satisfied with the pull request, click the "Create pull request" button to submit it for review.
|
|
6
|
+
|
|
7
|
+
Before submitting this PR, please ensure that your input and responses are entered in the designated space provided below each section to keep all project-related information organized and easily accessible.
|
|
8
|
+
|
|
9
|
+
How to link to a PR:
|
|
10
|
+
https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue
|
|
11
|
+
-->
|
|
12
|
+
|
|
13
|
+
## Change Description
|
|
14
|
+
<!---
|
|
15
|
+
Describe your changes in detail. In your description, you should answer questions like "Why is this change required? What problem does it solve?".
|
|
16
|
+
|
|
17
|
+
If it fixes an open issue, please link to the issue here. If this PR closes an issue, put the word 'closes' before the issue link to auto-close the issue when the PR is merged.
|
|
18
|
+
-->
|
|
19
|
+
- [ ] My PR includes a link to the issue that I am addressing
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## Solution Description
|
|
24
|
+
<!-- Please explain the technical solution that I have provided and how it addresses the issue or feature being implemented -->
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## Code Quality
|
|
29
|
+
- [ ] I have read the Contribution Guide
|
|
30
|
+
- [ ] My code follows the code style of this project
|
|
31
|
+
- [ ] My code builds (or compiles) cleanly without any errors or warnings
|
|
32
|
+
- [ ] My code contains relevant comments and necessary documentation
|
|
33
|
+
|
|
34
|
+
## Project-Specific Pull Request Checklists
|
|
35
|
+
<!--- Please only use the checklist that apply to your change type(s) -->
|
|
36
|
+
|
|
37
|
+
### Bug Fix Checklist
|
|
38
|
+
- [ ] My fix includes a new test that breaks as a result of the bug (if possible)
|
|
39
|
+
- [ ] My change includes a breaking change
|
|
40
|
+
- [ ] My change includes backwards compatibility and deprecation warnings (if possible)
|
|
41
|
+
|
|
42
|
+
### New Feature Checklist
|
|
43
|
+
- [ ] I have added or updated the docstrings associated with my feature using the [NumPy docstring format](https://numpydoc.readthedocs.io/en/latest/format.html)
|
|
44
|
+
- [ ] I have updated the tutorial to highlight my new feature (if appropriate)
|
|
45
|
+
- [ ] I have added unit/End-to-End (E2E) test cases to cover my new feature
|
|
46
|
+
- [ ] My change includes a breaking change
|
|
47
|
+
- [ ] My change includes backwards compatibility and deprecation warnings (if possible)
|
|
48
|
+
|
|
49
|
+
### Documentation Change Checklist
|
|
50
|
+
- [ ] Any updated docstrings use the [NumPy docstring format](https://numpydoc.readthedocs.io/en/latest/format.html)
|
|
51
|
+
|
|
52
|
+
### Build/CI Change Checklist
|
|
53
|
+
- [ ] If required or optional dependencies have changed (including version numbers), I have updated the README to reflect this
|
|
54
|
+
- [ ] If this is a new CI setup, I have added the associated badge to the README
|
|
55
|
+
|
|
56
|
+
<!-- ### Version Change Checklist [For Future Use] -->
|
|
57
|
+
|
|
58
|
+
### Other Change Checklist
|
|
59
|
+
- [ ] Any new or updated docstrings use the [NumPy docstring format](https://numpydoc.readthedocs.io/en/latest/format.html).
|
|
60
|
+
- [ ] I have updated the tutorial to highlight my new feature (if appropriate)
|
|
61
|
+
- [ ] I have added unit/End-to-End (E2E) test cases to cover any changes
|
|
62
|
+
- [ ] My change includes a breaking change
|
|
63
|
+
- [ ] My change includes backwards compatibility and deprecation warnings (if possible)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: C/C++ CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
push:
|
|
6
|
+
branches: [ "main" ]
|
|
7
|
+
pull_request:
|
|
8
|
+
branches: [ "main" ]
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
name: Build C++
|
|
13
|
+
runs-on: ${{ matrix.os }}
|
|
14
|
+
strategy:
|
|
15
|
+
matrix:
|
|
16
|
+
os: [ubuntu-latest, macos-latest, macos-14]
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
with:
|
|
21
|
+
submodules: resursive
|
|
22
|
+
|
|
23
|
+
- uses: maxim-lobanov/setup-xcode@v1
|
|
24
|
+
if: matrix.os == 'macos-14'
|
|
25
|
+
with:
|
|
26
|
+
xcode-version: '15.1'
|
|
27
|
+
|
|
28
|
+
- name: make
|
|
29
|
+
run: |
|
|
30
|
+
cd src/lib
|
|
31
|
+
make
|
|
32
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# This workflow runs pre-commit hooks on pushes and pull requests to main
|
|
2
|
+
# to enforce coding style. To ensure correct configuration, please refer to:
|
|
3
|
+
# https://lincc-ppt.readthedocs.io/en/latest/practices/ci_precommit.html
|
|
4
|
+
name: Run pre-commit hooks
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: [ main ]
|
|
9
|
+
pull_request:
|
|
10
|
+
branches: [ main ]
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
pre-commit-ci:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
with:
|
|
18
|
+
fetch-depth: 0
|
|
19
|
+
submodules: recursive
|
|
20
|
+
- name: Set up Python
|
|
21
|
+
uses: actions/setup-python@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: '3.10'
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: |
|
|
26
|
+
sudo apt-get update
|
|
27
|
+
python -m pip install --upgrade pip
|
|
28
|
+
pip install .[dev]
|
|
29
|
+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
30
|
+
- uses: pre-commit/action@v3.0.1
|
|
31
|
+
with:
|
|
32
|
+
extra_args: --all-files --verbose
|
|
33
|
+
env:
|
|
34
|
+
SKIP: "check-lincc-frameworks-template-version,no-commit-to-branch,check-added-large-files,validate-pyproject,sphinx-build,pytest-check"
|
|
35
|
+
- uses: pre-commit-ci/lite-action@v1.0.2
|
|
36
|
+
if: failure() && github.event_name == 'pull_request' && github.event.pull_request.draft == false
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# This workflow will upload a Python Package using Twine when a release is created
|
|
2
|
+
# For more information see: https://github.com/pypa/gh-action-pypi-publish#trusted-publishing
|
|
3
|
+
|
|
4
|
+
# This workflow uses actions that are not certified by GitHub.
|
|
5
|
+
# They are provided by a third-party and are governed by
|
|
6
|
+
# separate terms of service, privacy policy, and support
|
|
7
|
+
# documentation.
|
|
8
|
+
|
|
9
|
+
name: Upload Python Package
|
|
10
|
+
|
|
11
|
+
on:
|
|
12
|
+
workflow_dispatch:
|
|
13
|
+
release:
|
|
14
|
+
types: [published]
|
|
15
|
+
|
|
16
|
+
permissions:
|
|
17
|
+
contents: read
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
build_wheels:
|
|
21
|
+
name: Build wheels on ${{ matrix.os }}-${{ matrix.python_version}}
|
|
22
|
+
runs-on: ${{ matrix.os }}
|
|
23
|
+
strategy:
|
|
24
|
+
matrix:
|
|
25
|
+
include:
|
|
26
|
+
|
|
27
|
+
# Linux 64 bit manylinux2014
|
|
28
|
+
- os: ubuntu-latest
|
|
29
|
+
python: 39
|
|
30
|
+
platform_id: manylinux_x86_64
|
|
31
|
+
manylinux_image: manylinux2014
|
|
32
|
+
python_version: "3.9"
|
|
33
|
+
- os: ubuntu-latest
|
|
34
|
+
python: 310
|
|
35
|
+
platform_id: manylinux_x86_64
|
|
36
|
+
manylinux_image: manylinux2014
|
|
37
|
+
python_version: "3.10"
|
|
38
|
+
- os: ubuntu-latest
|
|
39
|
+
python: 311
|
|
40
|
+
platform_id: manylinux_x86_64
|
|
41
|
+
manylinux_image: manylinux2014
|
|
42
|
+
python_version: "3.11"
|
|
43
|
+
- os: ubuntu-latest
|
|
44
|
+
python: 312
|
|
45
|
+
platform_id: manylinux_x86_64
|
|
46
|
+
manylinux_image: manylinux2014
|
|
47
|
+
python_version: "3.12"
|
|
48
|
+
|
|
49
|
+
# MacOS x86_64
|
|
50
|
+
- os: macos-latest
|
|
51
|
+
python: 39
|
|
52
|
+
platform_id: macosx_x86_64
|
|
53
|
+
python_version: "3.9"
|
|
54
|
+
- os: macos-latest
|
|
55
|
+
python: 310
|
|
56
|
+
platform_id: macosx_x86_64
|
|
57
|
+
python_version: "3.10"
|
|
58
|
+
- os: macos-latest
|
|
59
|
+
python: 311
|
|
60
|
+
platform_id: macosx_x86_64
|
|
61
|
+
python_version: "3.11"
|
|
62
|
+
- os: macos-latest
|
|
63
|
+
python: 312
|
|
64
|
+
platform_id: macosx_x86_64
|
|
65
|
+
python_version: "3.12"
|
|
66
|
+
|
|
67
|
+
# MacOS arm64
|
|
68
|
+
- os: macos-14
|
|
69
|
+
python: 39
|
|
70
|
+
platform_id: macosx_arm64
|
|
71
|
+
python_version: "3.9"
|
|
72
|
+
- os: macos-14
|
|
73
|
+
python: 310
|
|
74
|
+
platform_id: macosx_arm64
|
|
75
|
+
python_version: "3.10"
|
|
76
|
+
- os: macos-14
|
|
77
|
+
python: 311
|
|
78
|
+
platform_id: macosx_arm64
|
|
79
|
+
python_version: "3.11"
|
|
80
|
+
- os: macos-14
|
|
81
|
+
python: 312
|
|
82
|
+
platform_id: macosx_arm64
|
|
83
|
+
python_version: "3.12"
|
|
84
|
+
|
|
85
|
+
steps:
|
|
86
|
+
- name: Checkout LePhare
|
|
87
|
+
uses: actions/checkout@v4
|
|
88
|
+
with:
|
|
89
|
+
submodules: recursive
|
|
90
|
+
|
|
91
|
+
- name: Build wheels
|
|
92
|
+
uses: pypa/cibuildwheel@v2.17.0
|
|
93
|
+
env:
|
|
94
|
+
# CIBW_ARCHS_MACOS: auto universal2
|
|
95
|
+
CIBW_BEFORE_ALL_MACOS: brew install llvm libomp
|
|
96
|
+
CIBW_ENVIRONMENT_MACOS: PYTHON_VERSION_REQUIRED=${{ matrix.python_version}} MACOSX_DEPLOYMENT_TARGET="10.15" PATH="$(brew --prefix llvm)/bin:$PATH" CFLAGS="-I /usr/local/include -I/usr/local/opt/llvm/include" CXXFLAGS="-I /usr/local/include -I/usr/local/opt/llvm/include -I/opt/homebrew/opt/libomp/include -I/opt/homebrew/opt/llvm/include -I/usr/local/opt/libomp/include" LDFLAGS="-L/usr/local/opt/libomp/lib -L/opt/homebrew/opt/libomp/lib -L /usr/local/lib -L/usr/local/opt/llvm/lib"
|
|
97
|
+
CIBW_ENVIRONMENT_LINUX: PYTHON_VERSION_REQUIRED=${{ matrix.python_version}}
|
|
98
|
+
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
|
|
99
|
+
CIBW_ARCHS: all
|
|
100
|
+
CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux_image }}
|
|
101
|
+
CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.manylinux_image }}
|
|
102
|
+
CIBW_BUILD_VERBOSITY: 3
|
|
103
|
+
|
|
104
|
+
- name: Upload wheels
|
|
105
|
+
uses: actions/upload-artifact@v4
|
|
106
|
+
with:
|
|
107
|
+
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
|
|
108
|
+
path: wheelhouse/*.whl
|
|
109
|
+
|
|
110
|
+
build_sdist:
|
|
111
|
+
name: Make SDist
|
|
112
|
+
runs-on: ubuntu-latest
|
|
113
|
+
steps:
|
|
114
|
+
- uses: actions/checkout@v4
|
|
115
|
+
with:
|
|
116
|
+
fetch-depth: 0 # Optional, use if you use setuptools_scm
|
|
117
|
+
submodules: true # Optional, use if you have submodules
|
|
118
|
+
|
|
119
|
+
- name: Build SDist
|
|
120
|
+
run: pipx run build --sdist
|
|
121
|
+
|
|
122
|
+
- name: Upload SDist
|
|
123
|
+
uses: actions/upload-artifact@v4
|
|
124
|
+
with:
|
|
125
|
+
name: cibw-sdist
|
|
126
|
+
path: dist/*.tar.gz
|
|
127
|
+
|
|
128
|
+
upload_pypi:
|
|
129
|
+
name: Upload to pypi
|
|
130
|
+
needs: [build_wheels, build_sdist]
|
|
131
|
+
runs-on: ubuntu-latest
|
|
132
|
+
environment:
|
|
133
|
+
name: pypi
|
|
134
|
+
permissions:
|
|
135
|
+
id-token: write
|
|
136
|
+
|
|
137
|
+
steps:
|
|
138
|
+
- name: Download distribution files
|
|
139
|
+
uses: actions/download-artifact@v4
|
|
140
|
+
with:
|
|
141
|
+
# unpacks all CIBW artifacts into dist/
|
|
142
|
+
pattern: cibw-*
|
|
143
|
+
path: dist
|
|
144
|
+
merge-multiple: true
|
|
145
|
+
|
|
146
|
+
- name: Upload to PyPI
|
|
147
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# This workflow will run daily at 06:45.
|
|
2
|
+
# It will install Python dependencies and run tests with a variety of Python versions.
|
|
3
|
+
# See documentation for help debugging smoke test issues:
|
|
4
|
+
# https://lincc-ppt.readthedocs.io/en/latest/practices/ci_testing.html#version-culprit
|
|
5
|
+
|
|
6
|
+
name: Unit test smoke test
|
|
7
|
+
|
|
8
|
+
on:
|
|
9
|
+
|
|
10
|
+
# Runs this workflow automatically
|
|
11
|
+
schedule:
|
|
12
|
+
- cron: 45 6 * * *
|
|
13
|
+
|
|
14
|
+
# Allows you to run this workflow manually from the Actions tab
|
|
15
|
+
workflow_dispatch:
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
build:
|
|
19
|
+
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
strategy:
|
|
22
|
+
matrix:
|
|
23
|
+
python-version: ['3.9', '3.10', '3.11', '3.12']
|
|
24
|
+
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v4
|
|
27
|
+
with:
|
|
28
|
+
submodules: recursive
|
|
29
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
30
|
+
uses: actions/setup-python@v5
|
|
31
|
+
with:
|
|
32
|
+
python-version: ${{ matrix.python-version }}
|
|
33
|
+
- name: Install dependencies
|
|
34
|
+
run: |
|
|
35
|
+
sudo apt-get update
|
|
36
|
+
python -m pip install --upgrade pip
|
|
37
|
+
pip install -e .[dev]
|
|
38
|
+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
39
|
+
- name: List dependencies
|
|
40
|
+
run: |
|
|
41
|
+
pip list
|
|
42
|
+
- name: Run unit tests with pytest
|
|
43
|
+
run: |
|
|
44
|
+
python -m pytest tests
|
|
45
|
+
- name: Send status to Slack app
|
|
46
|
+
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
|
|
47
|
+
id: slack
|
|
48
|
+
uses: slackapi/slack-github-action@v1
|
|
49
|
+
with:
|
|
50
|
+
# For posting a rich message using Block Kit
|
|
51
|
+
payload: |
|
|
52
|
+
{
|
|
53
|
+
"blocks": [
|
|
54
|
+
{
|
|
55
|
+
"type": "header",
|
|
56
|
+
"text": {
|
|
57
|
+
"type": "plain_text",
|
|
58
|
+
"text": "${{ github.repository }}"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"type": "section",
|
|
63
|
+
"text": {
|
|
64
|
+
"type": "mrkdwn",
|
|
65
|
+
"text": "GitHub Action build result: *${{ job.status }}* :${{ job.status }}:"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"type": "divider"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"type": "section",
|
|
73
|
+
"text": {
|
|
74
|
+
"type": "mrkdwn",
|
|
75
|
+
"text": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
env:
|
|
81
|
+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
|
82
|
+
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# This workflow will install Python dependencies, run tests and report code coverage with a variety of Python versions
|
|
2
|
+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
|
3
|
+
|
|
4
|
+
name: Unit test and code coverage
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: [ main ]
|
|
9
|
+
pull_request:
|
|
10
|
+
branches: [ main ]
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
strategy:
|
|
17
|
+
matrix:
|
|
18
|
+
python-version: ['3.9', '3.10', '3.11', '3.12']
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
with:
|
|
23
|
+
submodules: recursive
|
|
24
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
25
|
+
uses: actions/setup-python@v5
|
|
26
|
+
with:
|
|
27
|
+
python-version: ${{ matrix.python-version }}
|
|
28
|
+
- name: Install dependencies
|
|
29
|
+
run: |
|
|
30
|
+
sudo apt-get update
|
|
31
|
+
python -m pip install --upgrade pip
|
|
32
|
+
pip install -e .[dev]
|
|
33
|
+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
34
|
+
- name: Run unit tests with pytest
|
|
35
|
+
run: |
|
|
36
|
+
python -m pytest tests --cov=lephare --cov-report=xml
|
|
37
|
+
- name: Upload coverage report to codecov
|
|
38
|
+
uses: codecov/codecov-action@v4
|
|
39
|
+
with:
|
|
40
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
lephare-0.1.1/.gitignore
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
*.o
|
|
9
|
+
src/lib/mag_gal
|
|
10
|
+
src/lib/filter
|
|
11
|
+
src/lib/filter_extinc
|
|
12
|
+
src/lib/sedtolib
|
|
13
|
+
src/lib/zphota
|
|
14
|
+
src/lib/lephare_lib.a
|
|
15
|
+
/bin
|
|
16
|
+
|
|
17
|
+
# Distribution / packaging
|
|
18
|
+
.Python
|
|
19
|
+
build/
|
|
20
|
+
develop-eggs/
|
|
21
|
+
dist/
|
|
22
|
+
downloads/
|
|
23
|
+
eggs/
|
|
24
|
+
.eggs/
|
|
25
|
+
lib64/
|
|
26
|
+
parts/
|
|
27
|
+
sdist/
|
|
28
|
+
var/
|
|
29
|
+
wheels/
|
|
30
|
+
pip-wheel-metadata/
|
|
31
|
+
share/python-wheels/
|
|
32
|
+
*.egg-info/
|
|
33
|
+
.installed.cfg
|
|
34
|
+
*.egg
|
|
35
|
+
MANIFEST
|
|
36
|
+
_version.py
|
|
37
|
+
|
|
38
|
+
# PyInstaller
|
|
39
|
+
# Usually these files are written by a python script from a template
|
|
40
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
41
|
+
*.manifest
|
|
42
|
+
*.spec
|
|
43
|
+
|
|
44
|
+
# Installer logs
|
|
45
|
+
pip-log.txt
|
|
46
|
+
pip-delete-this-directory.txt
|
|
47
|
+
|
|
48
|
+
# Unit test / coverage reports
|
|
49
|
+
htmlcov/
|
|
50
|
+
.tox/
|
|
51
|
+
.nox/
|
|
52
|
+
.coverage
|
|
53
|
+
.coverage.*
|
|
54
|
+
.cache
|
|
55
|
+
nosetests.xml
|
|
56
|
+
coverage.xml
|
|
57
|
+
*.cover
|
|
58
|
+
*.py,cover
|
|
59
|
+
.hypothesis/
|
|
60
|
+
.pytest_cache/
|
|
61
|
+
|
|
62
|
+
# Translations
|
|
63
|
+
*.mo
|
|
64
|
+
*.pot
|
|
65
|
+
|
|
66
|
+
# Django stuff:
|
|
67
|
+
*.log
|
|
68
|
+
local_settings.py
|
|
69
|
+
db.sqlite3
|
|
70
|
+
db.sqlite3-journal
|
|
71
|
+
|
|
72
|
+
# Flask stuff:
|
|
73
|
+
instance/
|
|
74
|
+
.webassets-cache
|
|
75
|
+
|
|
76
|
+
# Scrapy stuff:
|
|
77
|
+
.scrapy
|
|
78
|
+
|
|
79
|
+
# Sphinx documentation
|
|
80
|
+
docs/_build/
|
|
81
|
+
docs/doxygen_output/
|
|
82
|
+
_readthedocs/
|
|
83
|
+
|
|
84
|
+
# PyBuilder
|
|
85
|
+
target/
|
|
86
|
+
|
|
87
|
+
# Jupyter Notebook
|
|
88
|
+
.ipynb_checkpoints
|
|
89
|
+
|
|
90
|
+
# IPython
|
|
91
|
+
profile_default/
|
|
92
|
+
ipython_config.py
|
|
93
|
+
|
|
94
|
+
# pyenv
|
|
95
|
+
.python-version
|
|
96
|
+
|
|
97
|
+
# pipenv
|
|
98
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
99
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
100
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
101
|
+
# install all needed dependencies.
|
|
102
|
+
#Pipfile.lock
|
|
103
|
+
|
|
104
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
105
|
+
__pypackages__/
|
|
106
|
+
|
|
107
|
+
# Celery stuff
|
|
108
|
+
celerybeat-schedule
|
|
109
|
+
celerybeat.pid
|
|
110
|
+
|
|
111
|
+
# SageMath parsed files
|
|
112
|
+
*.sage.py
|
|
113
|
+
|
|
114
|
+
# Environments
|
|
115
|
+
.env
|
|
116
|
+
.venv
|
|
117
|
+
env/
|
|
118
|
+
venv/
|
|
119
|
+
ENV/
|
|
120
|
+
env.bak/
|
|
121
|
+
venv.bak/
|
|
122
|
+
|
|
123
|
+
# Spyder project settings
|
|
124
|
+
.spyderproject
|
|
125
|
+
.spyproject
|
|
126
|
+
|
|
127
|
+
# Rope project settings
|
|
128
|
+
.ropeproject
|
|
129
|
+
|
|
130
|
+
# mkdocs documentation
|
|
131
|
+
/site
|
|
132
|
+
|
|
133
|
+
# mypy
|
|
134
|
+
.mypy_cache/
|
|
135
|
+
.dmypy.json
|
|
136
|
+
dmypy.json
|
|
137
|
+
|
|
138
|
+
# Pyre type checker
|
|
139
|
+
.pyre/
|
|
140
|
+
|
|
141
|
+
# vscode
|
|
142
|
+
.vscode/
|
|
143
|
+
|
|
144
|
+
# dask
|
|
145
|
+
dask-worker-space/
|
|
146
|
+
|
|
147
|
+
# tmp directory
|
|
148
|
+
tmp/
|
|
149
|
+
|
|
150
|
+
# Mac OS
|
|
151
|
+
.DS_Store
|
|
152
|
+
|
|
153
|
+
# Airspeed Velocity performance results
|
|
154
|
+
_results/
|
|
155
|
+
_html/
|
|
156
|
+
|
|
157
|
+
# Project initialization script
|
|
158
|
+
.initialize_new_project.sh
|