Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run copier update #19

Merged
merged 1 commit into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# Changes here will be overwritten by Copier
_commit: v1.3.3
_commit: v1.4.1
_src_path: gh:lincc-frameworks/python-project-template
author_email: [email protected]
author_name: LINCC Frameworks
create_example_module: false
custom_install: true
include_docs: true
include_notebooks: false
module_name: lsdb
mypy_type_checking: basic
package_name: lsdb
preferred_linter: pylint
project_license: BSD
project_name: lsdb
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/build-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ jobs:
run: |
sudo apt-get update
python -m pip install --upgrade pip
if [ -f docs/requirements.txt ]; then pip install -r docs/requirements.txt; fi
pip install .
pip install .[dev]
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Build docs
run: |
sphinx-build -T -E -b html -d docs/build/doctrees ./docs docs/build/html
sphinx-build -T -E -b html -d docs/build/doctrees ./docs docs/build/html
1 change: 0 additions & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,3 @@ jobs:

run: |
pylint -rn -sn --recursive=y ./src --rcfile=./src/.pylintrc

2 changes: 1 addition & 1 deletion .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ jobs:
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
password: ${{ secrets.PYPI_API_TOKEN }}
5 changes: 5 additions & 0 deletions .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# This workflow will run daily at 06:45.
# It will install Python dependencies and run tests with a variety of Python versions.
# See documentation for help debugging smoke test issues:
# https://lincc-ppt.readthedocs.io/en/latest/practices/ci_testing.html#version-culprit

name: Unit test smoke test

Expand Down Expand Up @@ -30,6 +32,9 @@ jobs:
pip install .
pip install .[dev]
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: List dependencies
run: |
pip list
- name: Run unit tests with pytest
run: |
python -m pytest tests
1 change: 0 additions & 1 deletion .github/workflows/type-checking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,3 @@ jobs:

run: |
mypy ./src ./tests --ignore-missing-imports

8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ repos:
# This hook should always pass. It will print a message if the local version
# is out of date.
- repo: https://github.com/lincc-frameworks/pre-commit-hooks
rev: v0.1
rev: v0.1.1
hooks:
- id: check-lincc-frameworks-template-version
name: Check template version
Expand Down Expand Up @@ -132,7 +132,7 @@ repos:
"-b", # Flag to select which builder to use
"html", # Use the HTML builder
"-d", # Flag for cached environment and doctrees
"docs/build/doctrees", # directory
"./docs/_build/doctrees", # directory
"./docs", # Source directory of documents
"docs/build/html", # Output directory for rendered documents.
]
"./_readthedocs", # Output directory for rendered documents.
]
25 changes: 25 additions & 0 deletions .prepare_project.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash

echo "Initializing local git repository"
{
gitversion=( $(git version | sed 's/^.* //;s/\./ /g') )
if let "${gitversion[0]}<2"; then
# manipulate directly
git init . && echo 'ref: refs/heads/main' >.git/HEAD
elif let "${gitversion[0]}==2 & ${gitversion[1]}<34"; then
# rename master to main
git init . && { git branch -m master main 2>/dev/null || true; };
else
# set the initial branch name to main
git init --initial-branch=main >/dev/null
fi
} > /dev/null

echo "Installing package and runtime dependencies in local environment"
pip install -e . > /dev/null

echo "Installing developer dependencies in local environment"
pip install -e .'[dev]' > /dev/null

echo "Installing pre-commit"
pre-commit install > /dev/null
4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2
Expand All @@ -19,4 +19,4 @@ python:
install:
- requirements: docs/requirements.txt
- method: pip
path: .
path: .
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ 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.
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10 changes: 6 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

import os
import sys
from importlib.metadata import version

import autoapi
from importlib.metadata import version

# Define path to the code to be documented **relative to where conf.py (this file) is kept**
sys.path.insert(0, os.path.abspath("../src/"))
Expand All @@ -31,11 +31,13 @@
extensions.append("autoapi.extension")

templates_path = []
exclude_patterns = ['_build', '**.ipynb_checkpoints']
exclude_patterns = ["_build", "**.ipynb_checkpoints"]

master_doc = "index" # This assumes that sphinx-build is called from the root directory
html_show_sourcelink = False # Remove 'view source code' from top of page (for html, not python)
add_module_names = False # Remove namespaces from class/method signatures
html_show_sourcelink = (
False # Remove 'view source code' from top of page (for html, not python)
)
add_module_names = False # Remove namespaces from class/method signatures

autoapi_type = "python"
autoapi_dirs = ["../src"]
Expand Down
4 changes: 2 additions & 2 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sphinx==6.1.3
sphinx_rtd_theme==1.2.0
sphinx-autoapi==2.0.1
sphinx-rtd-theme==1.2.0
sphinx-autoapi==2.0.1
12 changes: 10 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,23 @@ dev = [
"pytest",
"pytest-cov", # Used to report total code coverage
"sphinx==6.1.3", # Used to automatically generate documentation
"sphinx_rtd_theme==1.2.0", # Used to render documentation
"sphinx-rtd-theme==1.2.0", # Used to render documentation
"sphinx-autoapi==2.0.1", # Used to automatically generate api documentation
]
[build-system]
requires = [
"setuptools>=45", # Used to build and package the Python project
"setuptools>=62", # Used to build and package the Python project
"setuptools_scm>=6.2", # Gets release version from git. Makes it available programmatically
]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
write_to = "src/lsdb/_version.py"

[tool.pytest.ini_options]
testpaths = [
"tests",
]

[tool.setuptools.package-data]
lsdb = ["py.typed"]
Empty file added src/lsdb/py.typed
Empty file.