Skip to content

Commit

Permalink
Merge pull request #1 from israelmcmc/PR128
Browse files Browse the repository at this point in the history
I only checked FullDetectorResponse.py because all the other commits are for synchronize my fork  and I am ok with that
  • Loading branch information
GallegoSav authored Jul 24, 2024
2 parents 2d7db9a + 2782114 commit 7c92176
Show file tree
Hide file tree
Showing 124 changed files with 16,446 additions and 51,478 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: docs

on: [push, pull_request, workflow_dispatch]

permissions:
contents: write

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
sudo apt install pandoc
pip install sphinx sphinx_rtd_theme nbsphinx mock
- name: Sphinx build
run: |
make -C docs html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html
force_orphan: true

32 changes: 32 additions & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: unit_tests

on: [push, pull_request]

jobs:
tests:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install
run: |
python -m pip install --upgrade pip
pip install .
- name: Tests
run: |
pip install pytest pytest-cov
pytest tests --junitxml=junit/test-results.xml --cov=cosipy --cov-report=xml --cov-report=html
- name: Codecov
uses: codecov/[email protected]
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,7 @@ dmypy.json
.pyre/

# Tempoerary files
*~
*~

# OS
.DS_store
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Changelog

## Version 0.3.0

Under development.

Developers: please keep track of notable changes here.

-

## Version 0.2.x

Version 0.2.0 is the first released version of the "new" cosipy. It was reimplemented from scratch based on the "old" cosipy, now called "[cosipy classic](https://github.com/cositools/mirror-cosipy-classic)". It is the version used for [Data Challenge 2](https://github.com/cositools/cosi-data-challenge-2). Versions 0.2.x have bug fixes for version 0.2.0 but keep backward compatibility and do not add new features.
23 changes: 5 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,13 @@
# cosipy
The COSI high-level data analysis tools

## Installation from source
[![unit_tests](https://github.com/cositools/cosipy/actions/workflows/unit_tests.yml/badge.svg?branch=develop)](https://github.com/cositools/cosipy/actions/workflows/unit_tests.yml)
[![codecov](https://codecov.io/gh/cositools/cosipy/branch/develop/graph/badge.svg?token=FQGI2VG4OY)](https://codecov.io/gh/cositools/cosipy)

Meant for developers. Currently the only option.
The cosipy library is [COSI](https://cosi.ssl.berkeley.edu)'s high-level analysis software.

1. Clone the repository into your local machine
The main repository is hosted in https://github.com/cositools/cosipy

```
git clone [email protected]:cositools/cosipy.git
```
For the cosipy installation and usage instructions please refer to the main [cosipy documentation](https://cositools.github.io/cosipy/).

2. Move to the cosipy folder

```
cd cosipy
```

3. Create a new conda environment. Optional but highly encouranged.

4. Install it:

```
pip install -e .
```
20 changes: 20 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# When modifying the this file, please validate the new YAML using
# curl -X POST --data-binary @codecov.yml https://codecov.io/validate
# See
# https://docs.codecov.com/docs/commit-status
# https://docs.codecov.com/docs/codecovyml-reference

coverage:
status:
project: # How much the overall coverage can decrease
default:
target: auto # Uses coverage of current pull request base or parent commit
threshold: 10% # Leeway, allow it to decrease a little. Will be 0% in the long term
patch: # What percentage of the new lines need to be covered
default:
target: 100%
threshold: 50% # Leeway, allow not fully-covered contributuons. Will be 0% in the long term


comment:
hide_project_coverage: false # Show both overall and delta coverage
4 changes: 0 additions & 4 deletions cosipy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,10 @@
from .data_io import UnBinnedData
from .data_io import BinnedData
from .data_io import ReadTraTest
from .make_plots import MakePlots

from .threeml import COSILike
from .threeml import Band_Eflux

from .spacecraftfile import SpacecraftFile

from .ts_map import FastTSMap

#from .coordinates import attitude
#from .coordinates import spacecraft_frame
2 changes: 1 addition & 1 deletion cosipy/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.2a1"
__version__ = "0.3.0.dev0"
1 change: 0 additions & 1 deletion cosipy/config/__init__.py

This file was deleted.

173 changes: 0 additions & 173 deletions cosipy/config/configurator.py

This file was deleted.

4 changes: 0 additions & 4 deletions cosipy/coordinates/__init__.py

This file was deleted.

Loading

0 comments on commit 7c92176

Please sign in to comment.