-
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 #2 from austinlucaslake/dev
merge to add template issues
- Loading branch information
Showing
20 changed files
with
1,097 additions
and
546 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,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" |
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,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 |
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,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/ |
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,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 |
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,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) |
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
This file was deleted.
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 |
---|---|---|
@@ -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` | ||
|
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,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") |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.