-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from winter-telescope/initial-setup
Initial setup
- Loading branch information
Showing
22 changed files
with
36,461 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# .github/workflows/ci.yml | ||
name: CI Workflow | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checkout the code from the repository | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
# Set up Python environment | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.12 | ||
|
||
# Install Poetry | ||
- name: Install Poetry | ||
run: | | ||
pip install poetry | ||
# Install dependencies using Poetry | ||
- name: Install dependencies | ||
run: | | ||
poetry install | ||
# Lint the code using pylint | ||
- name: Lint with pylint | ||
run: | | ||
poetry run pylint src | ||
# Run Ruff for fast linting | ||
- name: Run Ruff | ||
run: | | ||
poetry run ruff . | ||
# Format code with Black | ||
- name: Format with Black | ||
run: | | ||
poetry run black --check . | ||
# Run tests with pytest | ||
- name: Run tests | ||
run: | | ||
poetry run pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,9 @@ __pycache__/ | |
*.py[cod] | ||
*$py.class | ||
|
||
# Mac files | ||
.DS_Store | ||
|
||
# C extensions | ||
*.so | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
repos: | ||
# Pre-commit hooks for basic checks | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
|
||
- repo: local | ||
hooks: | ||
- id: black | ||
name: black | ||
description: Run black to format code | ||
entry: black # or should it be poetry run black | ||
language: python | ||
types: [python] | ||
|
||
|
||
# Pylint as a local hook | ||
- repo: local | ||
hooks: | ||
- id: pylint | ||
name: pylint [full] | ||
entry: pylint | ||
language: system | ||
types: [python] | ||
args: | ||
[ | ||
"--exit-zero" | ||
] | ||
verbose: true | ||
|
||
# Ruff for linting and formatting | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.6.4 | ||
hooks: | ||
- id: ruff | ||
- id: ruff-format | ||
|
||
# Poetry check as a local hook | ||
- repo: local | ||
hooks: | ||
- id: poetry-check | ||
name: poetry-check | ||
description: run poetry check to validate config | ||
entry: poetry check | ||
language: python | ||
pass_filenames: false | ||
files: ^pyproject.toml$ | ||
language_version: python3.12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[MASTER] | ||
ignore=venv,docs | ||
|
||
[MESSAGES CONTROL] | ||
disable=C0114,C0115,C0116 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,20 @@ | ||
# image-daemon | ||
image handling daemon for focus | ||
|
||
|
||
## Installation | ||
set up a new conda environment: `conda create -n image-daemon python=3.12` | ||
|
||
then clone the repository: | ||
|
||
```shell | ||
git clone [email protected]:winter-telescope/image-daemon.git | ||
cd image-daemon | ||
``` | ||
|
||
this project uses poetry to manage the packages. Set it up this way: | ||
|
||
```shell | ||
conda install poetry -c conda-forge` | ||
poetry install | ||
``` |
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = source | ||
BUILDDIR = build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@ECHO OFF | ||
|
||
pushd %~dp0 | ||
|
||
REM Command file for Sphinx documentation | ||
|
||
if "%SPHINXBUILD%" == "" ( | ||
set SPHINXBUILD=sphinx-build | ||
) | ||
set SOURCEDIR=source | ||
set BUILDDIR=build | ||
|
||
%SPHINXBUILD% >NUL 2>NUL | ||
if errorlevel 9009 ( | ||
echo. | ||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx | ||
echo.installed, then set the SPHINXBUILD environment variable to point | ||
echo.to the full path of the 'sphinx-build' executable. Alternatively you | ||
echo.may add the Sphinx directory to PATH. | ||
echo. | ||
echo.If you don't have Sphinx installed, grab it from | ||
echo.https://www.sphinx-doc.org/ | ||
exit /b 1 | ||
) | ||
|
||
if "%1" == "" goto help | ||
|
||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
goto end | ||
|
||
:help | ||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
|
||
:end | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import os | ||
import sys | ||
|
||
sys.path.insert(0, os.path.abspath("../src")) | ||
|
||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# For the full list of built-in configuration values, see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
# -- Project information ----------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||
|
||
project = "image-daemon" | ||
copyright = "2024, Nate Lourie" | ||
author = "Nate Lourie" | ||
release = "0.0.0" | ||
|
||
# -- General configuration --------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | ||
|
||
extensions = [ | ||
"sphinx.ext.autodoc", | ||
] | ||
templates_path = ["_templates"] | ||
exclude_patterns = [] | ||
|
||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output | ||
|
||
html_theme = "sphinx_rtd_theme" | ||
html_static_path = ["_static"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
image\_daemon package | ||
===================== | ||
|
||
Subpackages | ||
----------- | ||
|
||
.. toctree:: | ||
:maxdepth: 4 | ||
|
||
image_daemon.utils | ||
|
||
Submodules | ||
---------- | ||
|
||
image\_daemon.paths module | ||
-------------------------- | ||
|
||
.. automodule:: image_daemon.paths | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: image_daemon | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
image\_daemon.utils package | ||
=========================== | ||
|
||
Submodules | ||
---------- | ||
|
||
image\_daemon.utils.winter\_image module | ||
---------------------------------------- | ||
|
||
.. automodule:: image_daemon.utils.winter_image | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: image_daemon.utils | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
.. image-daemon documentation master file, created by | ||
sphinx-quickstart on Tue Sep 10 15:07:09 2024. | ||
You can adapt this file completely to your liking, but it should at least | ||
contain the root `toctree` directive. | ||
Welcome to image-daemon's documentation! | ||
======================================== | ||
|
||
.. toctree:: | ||
:maxdepth: 4 | ||
:caption: Contents: | ||
|
||
modules | ||
|
||
|
||
|
||
Indices and tables | ||
================== | ||
|
||
* :ref:`genindex` | ||
* :ref:`modindex` | ||
* :ref:`search` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
src | ||
=== | ||
|
||
.. toctree:: | ||
:maxdepth: 4 | ||
|
||
image_daemon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: my_project_env | ||
channels: | ||
- defaults | ||
- conda-forge | ||
dependencies: | ||
- python=3.12 | ||
- numpy <2 | ||
- pandas | ||
- pip | ||
- pip: | ||
- -e . # Install your package in editable mode | ||
- pytest | ||
- black | ||
- pylint | ||
- ruff | ||
- pyro5 | ||
- slack_sdk |
Oops, something went wrong.