Skip to content

Commit

Permalink
Copier update and better readme links. (#60)
Browse files Browse the repository at this point in the history
* Better readme links.

* Copier update
  • Loading branch information
delucchi-cmu authored Nov 6, 2023
1 parent d9e03f7 commit b44d539
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 42 deletions.
3 changes: 2 additions & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: v1.4.3
_commit: v1.4.4
_src_path: gh:lincc-frameworks/python-project-template
author_email: [email protected]
author_name: LINCC Frameworks
Expand All @@ -13,5 +13,6 @@ package_name: lsdb
preferred_linter: pylint
project_license: BSD
project_name: lsdb
project_organization: astronomy-commons
use_gitlfs: none
use_isort: true
4 changes: 2 additions & 2 deletions .github/workflows/asv-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
run: |
sudo apt-get update
python -m pip install --upgrade pip
pip install asv==0.5.1 virtualenv tabulate
pip install asv==0.6.1 virtualenv tabulate
- name: Configure git
run: |
Expand All @@ -86,7 +86,7 @@ jobs:
fi
- name: Run ASV for the main branch
run: asv run ALL --skip-existing
run: asv run ALL --skip-existing --verbose

- name: Submit new results to the "benchmarks" branch
uses: JamesIves/github-pages-deploy-action@v4
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/asv-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ name: Run benchmarks nightly job
on:
schedule:
- cron: 45 6 * * *

workflow_dispatch:

env:
PYTHON_VERSION: "3.10"
WORKING_DIR: ${{ github.workspace }}/benchmarks
Expand Down Expand Up @@ -43,7 +44,7 @@ jobs:
run: |
sudo apt-get update
python -m pip install --upgrade pip
pip install asv==0.5.1 virtualenv
pip install asv==0.6.1 virtualenv
- name: Create ASV machine config file
run: asv machine --machine gh-runner --yes
Expand All @@ -67,8 +68,8 @@ jobs:
if [ -f $HASH_FILE ]; then
PREV_HASH=$(cat $HASH_FILE)
asv continuous $PREV_HASH $CURRENT_HASH || true
asv compare $PREV_HASH $CURRENT_HASH --sort ratio
asv continuous $PREV_HASH $CURRENT_HASH --verbose || true
asv compare $PREV_HASH $CURRENT_HASH --sort ratio --verbose
fi
echo $CURRENT_HASH > $HASH_FILE
Expand Down
42 changes: 18 additions & 24 deletions .github/workflows/asv-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
run: |
sudo apt-get update
python -m pip install --upgrade pip
pip install asv==0.5.1 virtualenv tabulate lf-asv-formatter
pip install asv==0.6.1 virtualenv tabulate lf-asv-formatter
- name: Get current job logs URL
uses: Tiryoh/gha-jobid-action@v0
Expand All @@ -77,31 +77,25 @@ jobs:
run: |
git remote add upstream https://github.com/${{ github.repository }}.git
git fetch upstream
asv continuous upstream/main HEAD || true
asv compare upstream/main HEAD --sort ratio | tee output
python -m lf_asv_formatter
asv continuous upstream/main HEAD --verbose || true
asv compare upstream/main HEAD --sort ratio --verbose | tee output
python -m lf_asv_formatter --asv_version "$(echo asv --version)"
printf "\n\nClick [here]($STEP_URL) to view all benchmarks." >> output
env:
STEP_URL: "${{ steps.jobs.outputs.html_url }}#step:8:1"

- name: Publish comment to PR
uses: actions/github-script@v6
- name: Find benchmarks comment
uses: peter-evans/find-comment@v2
id: find-comment
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require('fs');
const path = require('path');
const workingDir = process.env.WORKING_DIR;
try {
process.chdir(workingDir);
const comment = fs.readFileSync('output', 'utf-8');
const { data } = await github.rest.issues.createComment({
...context.repo,
issue_number: context.issue.number,
body: comment,
});
console.log('Comment published:', data.html_url);
} catch (err) {
console.error(err);
}
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: view all benchmarks

- name: Create or update benchmarks comment
uses: peter-evans/create-or-update-comment@v3
with:
comment-id: ${{ steps.find-comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body-path: ${{ env.WORKING_DIR }}/output
edit-mode: replace
1 change: 1 addition & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ jobs:
run: |
pylint -rn -sn --recursive=y ./src --rcfile=./src/.pylintrc
pylint -rn -sn --recursive=y ./tests --rcfile=./tests/.pylintrc
pylint -rn -sn --recursive=y ./benchmarks --rcfile=./tests/.pylintrc
10 changes: 4 additions & 6 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
# For more information see: https://github.com/pypa/gh-action-pypi-publish#trusted-publishing

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
Expand All @@ -19,7 +19,8 @@ jobs:
deploy:

runs-on: ubuntu-latest

permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- name: Set up Python
Expand All @@ -33,7 +34,4 @@ jobs:
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
uses: pypa/gh-action-pypi-publish@release/v1
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@

[![Template](https://img.shields.io/badge/Template-LINCC%20Frameworks%20Python%20Project%20Template-brightgreen)](https://lincc-ppt.readthedocs.io/en/latest/)

[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/astronomy-commons/lsdb)](https://pypi.org/project/lsdb/)
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/astronomy-commons/lsdb/testing-and-coverage.yml)
[![Read the Docs](https://img.shields.io/readthedocs/lsdb)](https://lsdb.readthedocs.io/en/latest/)
[![PyPI](https://img.shields.io/pypi/v/lsdb?color=blue&logo=pypi&logoColor=white)](https://pypi.org/project/lsdb/)
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/astronomy-commons/lsdb/smoke-test.yml)](https://github.com/astronomy-commons/lsdb/actions/workflows/smoke-test.yml)
[![codecov](https://codecov.io/gh/astronomy-commons/lsdb/branch/main/graph/badge.svg)](https://codecov.io/gh/astronomy-commons/lsdb)
[![Read the Docs](https://img.shields.io/readthedocs/lsdb)](https://lsdb.readthedocs.io/)
[![benchmarks](https://img.shields.io/github/actions/workflow/status/astronomy-commons/lsdb/asv-main.yml?label=benchmarks)](https://astronomy-commons.github.io/lsdb/)

## LSDB - Large Survey DataBase

Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Notes:
that a set of tests will be run prior to completing a local commit. For more
information, see the Python Project Template documentation on
`pre-commit <https://lincc-ppt.readthedocs.io/en/latest/practices/precommit.html>`_.
3) Install ``pandoc`` allows you to verify that automatic rendering of Jupyter notebooks
3) Installing ``pandoc`` allows you to verify that automatic rendering of Jupyter notebooks
into documentation for ReadTheDocs works as expected. For more information, see
the Python Project Template documentation on
`Sphinx and Python Notebooks <https://lincc-ppt.readthedocs.io/en/latest/practices/sphinx.html#python-notebooks>`_.
Expand Down
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,13 @@ dev = [
"ipython", # Also used in building notebooks into Sphinx
"matplotlib", # Used in sample notebook intro_notebook.ipynb
"numpy", # Used in sample notebook intro_notebook.ipynb
"asv==0.5.1", # Used to compute performance benchmarks
"asv==0.6.1", # Used to compute performance benchmarks
]

[metadata]
long_description = { file = "README.md" }
url = "https://github.com/astronomy-commons/lsdb"

[build-system]
requires = [
"setuptools>=62", # Used to build and package the Python project
Expand Down

0 comments on commit b44d539

Please sign in to comment.