-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Lucas Camillo
authored and
Lucas Camillo
committed
Dec 26, 2024
1 parent
10d6752
commit bfb1036
Showing
11 changed files
with
1,294 additions
and
940 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,22 @@ | ||
<<<<<<< HEAD | ||
pyaing/clocks | ||
pyaging_data/ | ||
example_data/ | ||
testing.ipynb | ||
======= | ||
pyaging/clocks/ | ||
clocks/weights/ | ||
*.pt | ||
*.json | ||
pyaging_data/ | ||
example_data/ | ||
testing.ipynb | ||
pyaging_manuscript.ipynb | ||
.ipynb_checkpoints/ | ||
*.pyc | ||
.DS_Store | ||
pyaging.egg-info/ | ||
update_pipeline_steps.txt | ||
update_package.sh | ||
dist/ | ||
build/ | ||
docs/_build | ||
docs/_templates | ||
*.RData | ||
>>>>>>> fd1440b (first commit) | ||
.ruff_cache/ | ||
.pytest_cache/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
repos: | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.1.11 | ||
hooks: | ||
- id: ruff | ||
args: [ --fix, --ignore=E501,E722,B904,E902 ] | ||
stages: [manual] | ||
- id: ruff-format | ||
stages: [manual] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ | |
from . import predict as pred | ||
from . import preprocess as pp | ||
|
||
__version__ = "0.1.11" | ||
__version__ = "0.1.12" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "pyaging" | ||
version = "v0.1.11" | ||
version = "v0.1.12" | ||
description = "A Python-based compendium of GPU-optimized aging clocks." | ||
authors = ["Lucas Paulo de Lima Camillo <[email protected]>"] | ||
license = "BSD" | ||
|
@@ -11,12 +11,14 @@ homepage = "https://github.com/rsinghlab/pyaging" | |
repository = "https://github.com/rsinghlab/pyaging" | ||
|
||
[tool.poetry.dependencies] | ||
python = ">=3.9,<3.12" | ||
python = ">=3.9,<3.13" | ||
scikit-learn = "^1.3.2" | ||
pandas = "^2.1.3" | ||
torch = "^2.1.1" | ||
numpy = "^1.26.2" | ||
pandas = ">=2.2.0" | ||
torch = ">=2.2.0" | ||
numpy = ">=2.0.0" | ||
anndata = "^0.10.3" | ||
ipykernel = "^6.29.0" | ||
pybigwig = "^0.3.23" | ||
|
||
[tool.poetry.dev-dependencies] | ||
sphinx = "^7.1.2" | ||
|
@@ -28,12 +30,11 @@ sphinx-issues = "^3.0.1" | |
sphinx-design = "^0.5.0" | ||
scanpydoc = "^0.10.0" | ||
myst-parser = "^2.0.0" | ||
ipykernel = "^5.1.0" | ||
nbsphinx = "^0.8.11" | ||
pygments = "^2.6.1" | ||
pytest = "^7.2.0" | ||
nbmake = "^1.4.6" | ||
pyBigWig = {version = "^0.3.22", optional = true} | ||
pyBigWig = {version = "^0.3.23", optional = true} | ||
|
||
[tool.poetry.scripts] | ||
pyaging = "pyaging:main" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,155 @@ | ||
#!/bin/bash | ||
|
||
# Define the new version and commit/release messages | ||
new_version="v0.1.12" # Replace with the actual version number | ||
commit_message="Bump to $new_version" # Replace with the actual commit message | ||
release_message="Release $new_version" # Replace with the actual release message | ||
|
||
# Update version in pyproject.toml | ||
echo "Updating version in pyproject.toml to $new_version..." | ||
sed -i '' "s/^version = \".*\"/version = \"$new_version\"/" pyproject.toml | ||
if [ $? -ne 0 ]; then | ||
echo "Error updating version in pyproject.toml" | ||
exit 1 | ||
fi | ||
|
||
# Update version in __init__.py | ||
echo "Updating version in __init__.py to $new_version..." | ||
sed -i '' "s/__version__ = \".*\"/__version__ = \"${new_version#v}\"/" pyaging/__init__.py | ||
if [ $? -ne 0 ]; then | ||
echo "Error updating version in __init__.py" | ||
exit 1 | ||
fi | ||
|
||
# Run ruff for linting | ||
echo "Running ruff for linting..." | ||
ruff check pyaging --fix | ||
|
||
# Run black for code formatting | ||
echo "Running ruff for code formatting..." | ||
ruff format pyaging | ||
if [ $? -ne 0 ]; then | ||
echo "ruff formatting failed" | ||
exit 1 | ||
fi | ||
|
||
# Run poetry update | ||
echo "Running poetry update..." | ||
poetry update | ||
if [ $? -ne 0 ]; then | ||
echo "Poetry update failed" | ||
exit 1 | ||
fi | ||
|
||
# Build the package | ||
echo "Building the package..." | ||
poetry build | ||
if [ $? -ne 0 ]; then | ||
echo "Poetry build failed" | ||
exit 1 | ||
fi | ||
|
||
# Install the package | ||
echo "Installing the package..." | ||
poetry install | ||
if [ $? -ne 0 ]; then | ||
echo "Poetry install failed" | ||
exit 1 | ||
fi | ||
|
||
# Update clocks and notebooks in the 'clocks/notebooks' directory | ||
#echo "Updating clocks and notebooks..." | ||
#cd clocks/notebooks | ||
#total=$(ls *.ipynb | wc -l) | ||
#counter=1 | ||
#for notebook in *.ipynb; do | ||
# # Skip the file if it is 'template.ipynb' | ||
# if [ "$notebook" = "template.ipynb" ]; then | ||
# echo "Skipping template.ipynb" | ||
# continue | ||
# fi | ||
# | ||
# echo "Processing clock notebook ($counter/$total): $notebook" | ||
# #jupyter nbconvert --to notebook --execute "$notebook" #Change | ||
# jupyter nbconvert --execute --inplace "$notebook" # Execute in place | ||
# if [ $? -ne 0 ]; then | ||
# echo "Error processing $notebook" | ||
# exit 1 | ||
# fi | ||
# let counter=counter+1 | ||
#done | ||
#cd ../.. | ||
|
||
# Run the script to update all clocks | ||
#echo "Running script to update all clocks..." | ||
#cd clocks | ||
#python3 update_all_clocks.py $new_version | ||
#if [ $? -ne 0 ]; then | ||
# echo "Updating clocks failed" | ||
# exit 1 | ||
#fi | ||
#cd .. | ||
#echo "Reminder: Upload all clocks and metadata to S3!" | ||
|
||
# Process tutorials | ||
#echo "Processing tutorials..." | ||
#cd tutorials | ||
#for notebook in *.ipynb; do | ||
# echo "Processing tutorial notebook: $notebook" | ||
# jupyter nbconvert --ExecutePreprocessor.timeout=600 --to notebook --execute --inplace "$notebook" | ||
#done | ||
#cd .. | ||
|
||
# Run gold standard tests | ||
echo "Running gold standard tests..." | ||
poetry run pytest | ||
if [ $? -ne 0 ]; then | ||
echo "Gold standard tests failed" | ||
exit 1 | ||
fi | ||
|
||
# Run tutorial tests | ||
echo "Running tutorial tests..." | ||
poetry run pytest --nbmake tutorials/ | ||
if [ $? -ne 0 ]; then | ||
echo "Tutorial tests failed" | ||
exit 1 | ||
fi | ||
|
||
# Build documentation | ||
echo "Building documentation..." | ||
cp tutorials/*.ipynb docs/source/tutorials | ||
cp clocks/notebooks/*.ipynb docs/source/clock_notebooks | ||
cd docs | ||
make html | ||
if [ $? -ne 0 ]; then | ||
echo "Documentation build failed" | ||
exit 1 | ||
fi | ||
cd .. | ||
|
||
# Commit and push changes | ||
echo "Committing and pushing changes..." | ||
git add . | ||
git commit -m "$commit_message" | ||
if [ $? -ne 0 ]; then | ||
echo "Git commit failed" | ||
exit 1 | ||
fi | ||
|
||
git push | ||
if [ $? -ne 0 ]; then | ||
echo "Git push failed" | ||
exit 1 | ||
fi | ||
|
||
# Create and push tag | ||
echo "Creating and pushing tag $new_version..." | ||
git tag -a "$new_version" -m "$release_message" | ||
git push origin "$new_version" | ||
if [ $? -ne 0 ]; then | ||
echo "Git tag creation or push failed" | ||
exit 1 | ||
fi | ||
|
||
echo "Version update pipeline completed successfully." |