Skip to content

Commit

Permalink
Merge pull request #160 from astronomy-commons/delucchi/copier
Browse files Browse the repository at this point in the history
Update copier version and better readme links.
  • Loading branch information
delucchi-cmu authored Nov 6, 2023
2 parents 2ea3300 + ec85353 commit 8a22c03
Show file tree
Hide file tree
Showing 9 changed files with 45 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: lincc-frameworks-team@lists.lsst.org
author_name: LINCC Frameworks
Expand All @@ -13,5 +13,6 @@ package_name: hipscat
preferred_linter: pylint
project_license: BSD
project_name: hipscat
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
2 changes: 1 addition & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +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
2 changes: 2 additions & 0 deletions .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
name: Unit test smoke test

on:

# Runs this workflow automatically
schedule:
- cron: 45 6 * * *
# Allows you to run this workflow manually from the Actions tab
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,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/hipscat)
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/astronomy-commons/hipscat/testing-and-coverage.yml)
![Read the Docs](https://img.shields.io/readthedocs/hipscat)
[![PyPI](https://img.shields.io/pypi/v/hipscat?color=blue&logo=pypi&logoColor=white)](https://pypi.org/project/hipscat/)
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/astronomy-commons/hipscat/smoke-test.yml)](https://github.com/astronomy-commons/hipscat/actions/workflows/smoke-test.yml)
[![codecov](https://codecov.io/gh/astronomy-commons/hipscat/branch/main/graph/badge.svg)](https://codecov.io/gh/astronomy-commons/hipscat)
[![Read the Docs](https://img.shields.io/readthedocs/hipscat)](https://hipscat.readthedocs.io/)
[![benchmarks](https://img.shields.io/github/actions/workflow/status/astronomy-commons/hipscat/asv-main.yml?label=benchmarks)](https://astronomy-commons.github.io/hipscat/)

## Hierarchical Progressive Survey Catalog

Expand Down
7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ dependencies = [
[project.optional-dependencies]
dev = [
"adlfs", # abfs filesytem support
"asv==0.5.1", # Used to compute performance benchmarks
"asv==0.6.1", # Used to compute performance benchmarks
"ipykernel", # Support for Jupyter notebooks
"ipython", # Also used in building notebooks into Sphinx
"matplotlib", # Used in sample notebook intro_notebook.ipynb
Expand All @@ -49,6 +49,11 @@ dev = [
"sphinx-autoapi", # Used to automatically generate api documentation
"sphinx-rtd-theme" # Used to render documentation
]

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

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

0 comments on commit 8a22c03

Please sign in to comment.