Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Jan 2, 2024
0 parents commit c92f89c
Show file tree
Hide file tree
Showing 30 changed files with 3,987 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
on:
push:
tags:
- '*'

name: Create Release

jobs:
build:
name: Build wheels
runs-on: ubuntu-latest

strategy:
matrix:
python-version: ['3.12']

permissions:
contents: write
id-token: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Create release
uses: softprops/action-gh-release@v1
with:
name: lvmtools ${{ github.ref_name }}

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel build
- name: Build wheels
run: |
pyproject-build -w
- name: Build source
run: |
pyproject-build -s
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
52 changes: 52 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Test

on:
push:
paths-ignore:
- 'docs/**'
pull_request:
paths-ignore:
- 'docs/**'

jobs:
build:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Install dependencies
run: |
pip install --upgrade wheel pip setuptools
pip install .
- name: Lint with ruff
run: |
pip install ruff
ruff check src/ tests/
- name: Lint with black
run: |
pip install black
black --check src/
- name: Test with pytest
run: |
pip install pytest pytest-mock pytest-asyncio pytest-cov
pytest
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
117 changes: 117 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

*.DS_Store

# C extensions
*.so
*.o
*.a

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# 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/
.coverage*
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/
docs/sphinx/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# dotenv
.env

# virtualenv
.venv
venv/
ENV/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/

.vscode

.pytest_cache

# Vim temporary files
*~
*.swp
*.swo

pyrightconfig.json
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Changelog
38 changes: 38 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This is a comment.
# Each line is a file pattern followed by one or more owners.

# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# @global-owner1 and @global-owner2 will be requested for
# review when someone opens a pull request.
* @sdss
* [email protected]

# Order is important; the last matching pattern takes the most
# precedence. When someone opens a pull request that only
# modifies JS files, only @js-owner and not the global
# owner(s) will be requested for a review.
*.js @js-owner

# You can also use email addresses if you prefer. They'll be
# used to look up users just like we do for commit author
# emails.
*.go [email protected]

# In this example, @doctocat owns any files in the build/logs
# directory at the root of the repository and any of its
# subdirectories.
/build/logs/ @doctocat

# The `docs/*` pattern will match files like
# `docs/getting-started.md` but not further nested files like
# `docs/build-app/troubleshooting.md`.
docs/* [email protected]

# In this example, @octocat owns any file in an apps directory
# anywhere in your repository.
apps/ @octocat

# In this example, @doctocat owns any file in the `/docs`
# directory in the root of your repository.
/docs/ @doctocat
29 changes: 29 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
BSD 3-Clause License

Copyright (c) 2017, SDSS
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# lvmtools

![Versions](https://img.shields.io/badge/python->3.10-blue)
[![Documentation Status](https://readthedocs.org/projects/lvmtools/badge/?version=latest)](https://lvmtools.readthedocs.io/en/latest/)
[![Test](https://github.com/sdss/lvmtools/actions/workflows/test.yml/badge.svg)](https://github.com/sdss/lvmtools/actions/workflows/test.yml)
[![codecov](https://codecov.io/gh/sdss/lvmtools/branch/main/graph/badge.svg)](https://codecov.io/gh/sdss/lvmtools)

LVM tools and utilities

**Documentation:** https://lvmtools.readthedocs.io/en/latest/index.html
2 changes: 2 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github_checks:
annotations: false
20 changes: 20 additions & 0 deletions docs/sphinx/Makefile
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.
SPHINXOPTS =
SPHINXBUILD = python -msphinx
SPHINXPROJ = BMO
SOURCEDIR = .
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)
43 changes: 43 additions & 0 deletions docs/sphinx/_static/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/* This is the custom CSS for alabaster. The theme does not allow for it to be set differently. */

.red {
color: red;
}

.green {
color: green;
}

.pink {
color: pink;
}

.orange {
color: orange;
}

.purple {
color: purple;
}

a.reference > em {
font-style: normal !important;
}

a.reference > code {
font-weight: inherit !important;
color: inherit;
background-color: inherit;
}

ul, ol {
margin: 0px 0 0px 30px;
}

a.reference {
border-bottom: 0px;
}

td.field-body > ul > li > em {
font-style: normal !important;
}
Binary file added docs/sphinx/_static/favicon.ico
Binary file not shown.
Binary file added docs/sphinx/_static/favicon_sdssv.ico
Binary file not shown.
Binary file added docs/sphinx/_static/lvm_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/sphinx/_static/lvm_logo_gort.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/sphinx/_static/sdss_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/sphinx/_static/sdssv_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/sphinx/_static/sdssv_logo_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions docs/sphinx/_templates/sidebar/navigation.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<div class="sidebar-tree">
{{ toctree(
collapse=False,
titles_only=False,
maxdepth=2,
includehidden=True,
) }}
</div>
4 changes: 4 additions & 0 deletions docs/sphinx/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(lvmtools-changelog)=

```{include} ../../CHANGELOG.md
```
Loading

0 comments on commit c92f89c

Please sign in to comment.