Skip to content

Commit

Permalink
Merge pull request #2 from austinlucaslake/dev
Browse files Browse the repository at this point in the history
merge to add template issues
  • Loading branch information
austinlucaslake authored Dec 17, 2023
2 parents e3997b2 + b8417cb commit b960ac3
Show file tree
Hide file tree
Showing 20 changed files with 1,097 additions and 546 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI

on:
push:
branches: main
pull_request: {}

permissions:
contents: read

jobs:
integration:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: sh -l {0}
strategy:
fail-fast: true
matrix:
os: ubuntu-latest
compilier: [gcc, clang]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: clang-format
uses: RafikFarhad/clang-format-github-action@v3
with:
sources: "src/**/*.h,src/**/*.c,test/**/*.c,src/**/*.hpp,src/**/*.cpp,test/**/*.cpp"
- name: clang-tidy
uses: asarium/clang-tidy-action@v1
- name: uncrustify
uses: coleaeason/actions-uncrustify@v1
- name: cppcheck
uses: deep5050/cppcheck-action@main
- name: include-what-you-use
uses: EmilGedda/include-what-you-use-action@v1
- name: Install compiler
id: install_compiler
uses: rlalik/setup-cpp-compiler@master
with:
compiler: ${{ matrix.compilier }}
- name: Setup CMake
uses: jwlawson/[email protected]
- name: Run CMake
uses: johelegp/modern-cmake-buildsystem@v1
env:
CC: ${{ steps.install_compiler.outputs.cc }}
CXX: ${{ steps.install_compiler.outputs.cxx }}
with:
generate-options: "--preset=test"
23 changes: 23 additions & 0 deletions .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: 'Stale'

on:
schedule:
- cron: '0 0 * * *'

permissions:
issues: write
pull-requests: write

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
with:
stale-issue-message: 'This issue is now stale because it has been open for two weeks with no activity. Remove the stale label or comment or this will be closed in a week.'
close-issue-message: 'This issue was closed because there has been no activity in the past week.'
stale-pr-message: 'This pull request is now stale because it has been open for two weeks with no activity. Remove the stale label or comment or this will be closed in a week.'
close-pr-message: 'This pull request was closed because there has been no activity in the past week.'
days-before-stale: 14
days-before-close: 7
days-before-pr-close: -1
133 changes: 5 additions & 128 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,129 +1,6 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
src/CMakeUserPresets.json
defaults.cfg
main.plist
src/test_data/
src/sample_data/
14 changes: 14 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
fail_fast: false
repos:
- repo: https://github.com/pocc/pre-commit-hooks
rev: master
hooks:
- id: clang-format
args: ["--style=Google", "-i"]
- id: clang-tidy
- id: oclint
- id: uncrustify
args: ["--replace", "--no-backup"]
- id: cppcheck
- id: cpplint
- id: include-what-you-use
44 changes: 44 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Apache-2.0 License
# Copyright (c) 2023 Austin Lake <[email protected]>
#
# Main CMake Project file
cmake_minimum_required(VERSION 3.23.5 FATAL_ERROR)

cmake_policy(SET CMP0063 NEW)
cmake_policy(SET CMP0091 NEW)
project(
astrosight
VERSION 0.1.0
LANGUAGES CXX
DESCRIPTION "Image processing application for astrophotography.")

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)

set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)
set(CMAKE_SKIP_BUILD_RPATH FALSE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install)
set(CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR} ${CMAKE_MODULE_PATH})
set(CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR} ${CMAKE_PREFIX_PATH})

option(BUILD_TESTING "Build tests" FALSE)
option(BUILD_SHARED_LIBS "Build shared libraries" FALSE)
option(BUILD_WITH_MT "Build libraries as MultiThreaded DLL (Windows Only)" FALSE)

add_compile_options(
"-O3" "-Wall" "-Wpedantic" "-Wextra"
)

include(CTest)
include(GNUInstallDirs)
include(CMakePackageConfigHelpers)
include(InstallRequiredSystemLibraries)
include(GenerateExportHeader)

add_subdirectory(src)
add_subdirectory(test)
3 changes: 2 additions & 1 deletion LICENSE-APACHE → LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -186,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [2023] [Austin Lake]
Copyright 2023 Austin Lake

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
21 changes: 0 additions & 21 deletions LICENSE-MIT

This file was deleted.

29 changes: 23 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
# astrophotography
# astrosight

Image processing library for astrophotography
---------------------------------------------

## Depenecies
1. Rawpy
2. Numpy
3. PyTorch
---

[![Latest Release][release-badge]][[release-url]]
[![License][license-badge]](LICENSE)
[![CI Status][ci-badge]][ci-url]

[release-badge]: https://img.shields.io/github/v/release/austinlucaslake/astrosight
[release-url]: https://github.com/austinlucaslake/astrosight/releases/latest
[license-badge]: https://img.shields.io/github/license/austinlucaslake/astrosight
[ci-badge]: https://github.com/austinlucaslake/astrosight/actions/workflows/ci.yaml/badge.svg
[ci-url]: https://github.com/austinlucaslake/astrosight/actions

---

## Build

Assuming `Conan` is installed, you may build this project as follows:
`conan build . -b=missing`

It can then be run using by executing the following script from the project's root directory:
`./build/Release/main`

43 changes: 43 additions & 0 deletions conanfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
from conan import ConanFile
from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps, cmake_layout

required_conan_version = ">=2.0"

class Astrosight(ConanFile):
name = "astrosight"
version = "0.1.0"
license = "Apache-2.0"
author = "Austin Lake ([email protected])"
url = "https://github.com/austinlucaslake/astrosight"
description = "Image processing application for astrophotography."
topics = ("astrophotography", "image processing")
settings = "arch", "compiler", "build_type", "os"
exports_sources = "CMakeLists.txt", "src/*", "include/*"

def requirements(self):
self.requires("argparse/3.0")
self.requires("libraw/0.21.1")
self.requires("opencv/4.8.1")
self.requires("qt/6.6.0")
self.requires("freetype/2.13.2", override=True)

def build_requirements(self):
self.tool_requires("cmake/[>3.23.5]")
self.test_requires("cppcheck/2.12.1")
self.test_requires("uncrustify/0.78.0")

def generate(self):
toolchain = CMakeToolchain(self)
toolchain.generate()
dependancies = CMakeDeps(self)
dependancies.check_components_exist = True
dependancies.generate()

def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
# cmake.test()

def layout(self):
cmake_layout(self, src_folder="src", build_folder="build")
14 changes: 0 additions & 14 deletions environment.yml

This file was deleted.

Loading

0 comments on commit b960ac3

Please sign in to comment.