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. #129

Merged
merged 3 commits into from
Sep 6, 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
4 changes: 3 additions & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Changes here will be overwritten by Copier
_commit: v1.3.4
_commit: v1.4.2
_src_path: gh:lincc-frameworks/python-project-template
author_email: lincc-frameworks-team@lists.lsst.org
author_name: LINCC Frameworks
create_example_module: false
custom_install: true
include_benchmarks: false
include_docs: true
include_notebooks: true
mypy_type_checking: basic
package_name: hipscat_import
Expand Down
6 changes: 3 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ If it fixes an open issue, please link to the issue here. If this PR closes an i


## Code Quality
- [ ] I have read the [Contribution Guide](https://lincc-ppt.readthedocs.io/en/latest/source/contributing.html)
- [ ] I have read the Contribution Guide
- [ ] My code follows the code style of this project
- [ ] My code builds (or compiles) cleanly without any errors or warnings
- [ ] My code contains relevant comments and necessary documentation
Expand All @@ -50,8 +50,8 @@ If it fixes an open issue, please link to the issue here. If this PR closes an i
- [ ] Any updated docstrings use the [NumPy docstring format](https://numpydoc.readthedocs.io/en/latest/format.html)

### Build/CI Change Checklist
- [ ] If required or optional dependencies have changed (including version numbers), I have updated the [README](https://github.com/lincc-frameworks/python-project-template/blob/main/README.md) to reflect this
- [ ] If this is a new CI setup, I have added the associated badge to the [README](https://github.com/lincc-frameworks/python-project-template/blob/main/README.md)
- [ ] If required or optional dependencies have changed (including version numbers), I have updated the README to reflect this
- [ ] If this is a new CI setup, I have added the associated badge to the README

<!-- ### Version Change Checklist [For Future Use] -->

Expand Down
3 changes: 1 addition & 2 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: Install notebook requirements
run: |
sudo apt-get install pandoc
Expand Down
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
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,6 @@ dask-worker-space/

# tmp directory
tmp/

# Mac OS
.DS_Store
2 changes: 1 addition & 1 deletion .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
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
3 changes: 1 addition & 2 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
sphinx==6.1.3
sphinx_rtd_theme==1.2.0
sphinx-rtd-theme==1.2.0
sphinx-autoapi==2.0.1
nbsphinx
ipykernel
ipython
jupytext
jupyter
Expand Down
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ dev = [
"pytest-cov",
"pytest-timeout",
"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
"mypy", # Used for static type checking of files
# if you add dependencies here while experimenting in a notebook and you
Expand All @@ -53,7 +53,7 @@ dev = [

[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"
Expand All @@ -69,6 +69,9 @@ timeout = 1
markers = [
"dask: mark tests as having a dask client runtime dependency",
]
testpaths = [
"tests",
]

[tool.coverage.report]
omit = [
Expand Down