Skip to content

Commit

Permalink
Some additional boilerplate work, implemented very basic test.
Browse files Browse the repository at this point in the history
  • Loading branch information
drewoldag committed Feb 26, 2024
1 parent 8362040 commit c1a0a24
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 8 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ are a few todo items that you should take care of. Unfortunately the RAIL projec
template can not do these for you, otherwise it would :)

### Immediate actions
- In your repository settings:
- Grant the `LSSTDESC/rail_admin` group administrator access
- Grant the `LSSTDESC/photo-z` group maintainer access
- ~~In your repository settings:~~
- ~~Grant the `LSSTDESC/rail_admin` group administrator access~~
- ~~Grant the `LSSTDESC/photo-z` group maintainer access~~
- Configure Codecov for the repository
- Go here, https://github.com/apps/codecov, click the "Configure" button
- Log in to PyPI.org and configure Trusted Publishing following these instructions https://docs.pypi.org/trusted-publishers/creating-a-project-through-oidc/
- ~~Log in to PyPI.org and configure Trusted Publishing following these instructions https://docs.pypi.org/trusted-publishers/creating-a-project-through-oidc/~~
- Create a Personal Access Token (PAT) to automatically add issues to the RAIL project tracker
- Follow these instruction to create a PAT: https://github.com/actions/add-to-project#creating-a-pat-and-adding-it-to-your-repository
- Save your new PAT as a repository secret named `ADD_TO_PROJECT_PAT`

### Before including in Rail-hub
- Make sure your `main` branch is protected
- Update this README
- Create an example notebook
- Run `pylint` on your code
- ~~Create an example notebook~~
- ~~Run `pylint` on your code~~
- Remove this TODO list once all items are completed


Expand Down
18 changes: 18 additions & 0 deletions examples/LePhare_demo.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# This is a placeholder notebook"
]
}
],
"metadata": {
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import qp
# import qp
from rail.estimation.estimator import CatEstimator

class LephareEstimator(CatEstimator):
Expand Down
4 changes: 3 additions & 1 deletion src/rail/lephare/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
from rail.estimation.lephare import *
from rail.estimation.algos.lephare import *

from ._version import __version__
12 changes: 12 additions & 0 deletions tests/lephare/test_algos.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from rail.estimation.algos.lephare import LephareEstimator

def test_basic_estimator_stage_creation():

lephare_dict = {}

estimation_stage = LephareEstimator.make_stage(
name="lephare_estimation",
**lephare_dict
)

assert estimation_stage.name == 'LephareEstimator'

0 comments on commit c1a0a24

Please sign in to comment.