Skip to content

Commit a85a91d

Browse files
Lucas CamilloLucas Camillo
authored andcommitted
Bump to v0.1.14
1 parent 04155b7 commit a85a91d

22 files changed

+7689
-289
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ clocks/weights/
66
*.pt
77
*.json
88
pyaging_data/
9-
example_data/
109
testing.ipynb
1110
.ipynb_checkpoints/
1211
*.pyc

Makefile

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
.PHONY: lint format update build install update-clocks-notebooks update-all-clocks process-tutorials test test-tutorials docs version commit tag release
2+
3+
VERSION ?= v0.1.14
4+
COMMIT_MSG ?= "Bump to $(VERSION)"
5+
RELEASE_MSG ?= "Release $(VERSION)"
6+
7+
lint:
8+
@echo "Running ruff for linting..."
9+
ruff check pyaging --fix
10+
11+
format:
12+
@echo "Running ruff for code formatting..."
13+
ruff format pyaging
14+
15+
update:
16+
@echo "Running poetry update..."
17+
poetry update
18+
19+
build: lint format
20+
@echo "Building the package..."
21+
poetry build
22+
23+
install: build
24+
@echo "Installing the package..."
25+
poetry install
26+
27+
update-clocks-notebooks:
28+
@echo "Updating clocks and notebooks..."
29+
@cd clocks/notebooks && \
30+
total=$$(ls *.ipynb | wc -l) && \
31+
counter=1 && \
32+
for notebook in *.ipynb; do \
33+
if [ "$$notebook" = "template.ipynb" ]; then \
34+
echo "Skipping template.ipynb"; \
35+
continue; \
36+
fi; \
37+
echo "Processing clock notebook ($$counter/$$total): $$notebook"; \
38+
jupyter nbconvert --execute --inplace "$$notebook" || { echo "Error processing $$notebook"; exit 1; }; \
39+
counter=$$((counter+1)); \
40+
done && cd ../..
41+
42+
update-all-clocks:
43+
@echo "Running script to update all clocks..."
44+
@cd clocks && python3 update_all_clocks.py $(VERSION) || { echo "Updating clocks failed"; exit 1; } && cd ..
45+
@echo "Reminder: Upload all clocks and metadata to S3!"
46+
47+
process-tutorials:
48+
@echo "Processing tutorials..."
49+
@cd tutorials && \
50+
for notebook in *.ipynb; do \
51+
echo "Processing tutorial notebook: $$notebook"; \
52+
jupyter nbconvert --ExecutePreprocessor.timeout=600 --to notebook --execute --inplace "$$notebook" || { echo "Error processing $$notebook"; exit 1; }; \
53+
done && cd ..
54+
55+
test:
56+
@echo "Running gold standard tests..."
57+
poetry run pytest || { echo "Gold standard tests failed"; exit 1; }
58+
59+
test-tutorials:
60+
@echo "Running tutorial tests..."
61+
poetry run pytest --nbmake tutorials/ || { echo "Tutorial tests failed"; exit 1; }
62+
63+
docs:
64+
@echo "Building documentation..."
65+
cp tutorials/*.ipynb docs/source/tutorials
66+
cp clocks/notebooks/*.ipynb docs/source/clock_notebooks
67+
@cd docs && make html || { echo "Documentation build failed"; exit 1; }
68+
69+
version:
70+
@echo "Updating version in pyproject.toml to $(VERSION)..."
71+
sed -i '' "s/^version = \".*\"/version = \"$(patsubst v%,%,$(VERSION))\"/" pyproject.toml || { echo "Error updating version in pyproject.toml"; exit 1; }
72+
@echo "Updating version in pyaging/__init__.py to $(VERSION)..."
73+
sed -i '' "s/^__version__ = \".*\"/__version__ = \"$(patsubst v%,%,$(VERSION))\"/" pyaging/__init__.py || { echo "Error updating version in pyaging/__init__.py"; exit 1; }
74+
75+
commit:
76+
@echo "Committing and pushing changes..."
77+
git add .
78+
git commit -m $(COMMIT_MSG) || { echo "Git commit failed"; exit 1; }
79+
git push || { echo "Git push failed"; exit 1; }
80+
81+
tag:
82+
@echo "Creating and pushing tag $(VERSION)..."
83+
git tag -a "$(VERSION)" -m $(RELEASE_MSG)
84+
git push origin "$(VERSION)" || { echo "Git tag creation or push failed"; exit 1; }
85+
86+
release: version lint format update build install update-clocks-notebooks update-all-clocks process-tutorials test test-tutorials docs commit tag
87+
@echo "Release $(VERSION) completed successfully"

README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,4 @@ To cite `pyaging`, please use the following:
4646
url = {https://doi.org/10.1093/bioinformatics/btae200},
4747
eprint = {https://academic.oup.com/bioinformatics/advance-article-pdf/doi/10.1093/bioinformatics/btae200/57218155/btae200.pdf},
4848
}
49-
```
50-
51-
## 📝 To-Do List
52-
53-
- [ ] Add SymphonyAge
54-
49+
```

0 commit comments

Comments
 (0)