forked from flaport/sax
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Floris Laporte
committed
Feb 2, 2022
1 parent
5d9953c
commit f56ad35
Showing
82 changed files
with
15,565 additions
and
2,375 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[bumpversion] | ||
current_version = 0.6.0 | ||
commit = True | ||
tag = True | ||
tag_name = {new_version} | ||
|
||
[bumpversion:file:setup.cfg] | ||
|
||
[bumpversion:file:settings.ini] | ||
|
||
[bumpversion:file:environment.yml] | ||
|
||
[bumpversion:file:nbs/99_init.ipynb] | ||
|
||
[bumpversion:file:sax/__init__.py] |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
repos: | ||
- repo: local | ||
hooks: | ||
- id: nbdev_clean_nbs | ||
name: nbdev_clean_nbs | ||
entry: nbdev_clean_nbs | ||
language: python | ||
pass_filenames: false | ||
additional_dependencies: | ||
- nbdev | ||
- repo: local | ||
hooks: | ||
- id: nbstripout | ||
name: nbstripout | ||
entry: nbstripout | ||
language: python | ||
pass_filenames: true | ||
types: [jupyter] | ||
- repo: local | ||
hooks: | ||
- id: nbdev_diff_nbs | ||
name: nbdev_diff_nbs | ||
entry: bash -c 'if [ ! -z "$(nbdev_diff_nbs)" ]; then nbdev_build_lib; fi' | ||
language: python | ||
pass_filenames: false | ||
additional_dependencies: | ||
- nbdev |
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,52 @@ | ||
# How to contribute | ||
|
||
## How to get started | ||
|
||
Before anything else, please install the git hooks that run automatic scripts during | ||
each commit and merge to strip the notebooks of superfluous metadata (and avoid merge | ||
conflicts). After cloning the repository, run the following commands inside the sax | ||
conda environment: | ||
|
||
``` | ||
nbdev_install_git_hooks | ||
pre-commit install | ||
``` | ||
|
||
## Did you find a bug? | ||
|
||
- Ensure the bug was not already reported by searching on GitHub under Issues. | ||
- If you're unable to find an open issue addressing the problem, open a new one. Be sure | ||
to include a title and clear description, as much relevant information as possible, and | ||
a code sample or an executable test case demonstrating the expected behavior that is not | ||
occurring. | ||
- Be sure to add the complete error messages. | ||
|
||
#### Did you write a patch that fixes a bug? | ||
|
||
- Open a new GitHub pull request with the patch. | ||
- Ensure that your PR includes a test that fails without your patch, and pass with it. | ||
- Ensure the PR description clearly describes the problem and solution. Include the | ||
relevant issue number if applicable. | ||
|
||
## PR submission guidelines | ||
|
||
- Keep each PR focused. While it's more convenient, do not combine several unrelated | ||
fixes together. Create as many branches as needing to keep each PR focused. | ||
- Do not mix style changes/fixes with "functional" changes. It's very difficult to | ||
review such PRs and it most likely get rejected. | ||
- Do not add/remove vertical whitespace. Preserve the original style of the file you | ||
edit as much as you can. | ||
- Do not turn an already submitted PR into your development playground. If after you | ||
submitted PR, you discovered that more work is needed - close the PR, do the required | ||
work and then submit a new PR. Otherwise each of your commits requires attention from | ||
maintainers of the project. | ||
- If, however, you submitted a PR and received a request for changes, you should proceed | ||
with commits inside that PR, so that the maintainer can see the incremental fixes and | ||
won't need to review the whole PR again. In the exception case where you realize it'll | ||
take many many commits to complete the requests, then it's probably best to close the | ||
PR, do the work and then submit it again. Use common sense where you'd choose one way | ||
over another. | ||
|
||
## Do you want to contribute to the documentation? | ||
|
||
- Docs are automatically created from the notebooks in the nbs folder. |
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,17 @@ | ||
FROM condaforge/mambaforge:4.11.0-0 | ||
|
||
COPY environment.yml /environment.yml | ||
RUN mamba env update -n base -f /environment.yml | ||
RUN conda run -n base python -m ipykernel install --user --name base --display-name base | ||
RUN rm -rf /environment.yml | ||
|
||
COPY docs/nbdev_showdoc.patch /nbdev_showdoc.patch | ||
RUN patch -R $(python -c "from nbdev import showdoc; print(showdoc.__file__)") < /nbdev_showdoc.patch | ||
RUN rm -rf /nbdev_showdoc.patch | ||
|
||
ADD . /sax | ||
RUN pip install /sax | ||
RUN rm -rf /sax | ||
|
||
RUN conda create -n sax --clone base | ||
RUN conda run -n sax python -m ipykernel install --user --name sax --display-name sax |
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 |
---|---|---|
@@ -0,0 +1,67 @@ | ||
.ONESHELL: | ||
SHELL := /bin/bash | ||
SRC = $(wildcard nbs/*.ipynb) | ||
|
||
all: sax docs | ||
|
||
.SILENT: docker | ||
docker: | ||
sed -i "s/^[ ]*-[ ]\bsax\b.*//g" environment.yml | ||
sed -i "s/\$${RPYPI_USER}/${RPYPI_USER}/g" environment.yml | ||
sed -i "s/\$${RPYPI_TOKEN}/${RPYPI_TOKEN}/g" environment.yml | ||
-docker build . -t sax | ||
git checkout -- environment.yml | ||
|
||
sax: $(SRC) | ||
nbdev_build_lib | ||
|
||
lib: | ||
nbdev_build_lib | ||
|
||
sync: | ||
nbdev_update_lib | ||
|
||
serve: | ||
cd docs && bundle exec jekyll serve | ||
|
||
.PHONY: docs | ||
docs: | ||
jupyter nbconvert --execute --inplace index.ipynb | ||
nbdev_build_docs | ||
|
||
run: | ||
find . -name "*.ipynb" | grep -v ipynb_checkpoints | xargs -I {} papermill {} {} | ||
|
||
test: | ||
nbdev_test_nbs | ||
|
||
release: pypi conda_release | ||
nbdev_bump_version | ||
|
||
conda_release: | ||
fastrelease_conda_package | ||
|
||
pypi: dist | ||
twine upload --repository pypi dist/* | ||
|
||
dist: clean | ||
python -m build --sdist --wheel | ||
|
||
clean: | ||
nbdev_clean_nbs | ||
find . -name "*.ipynb" | xargs nbstripout | ||
find . -name "dist" | xargs rm -rf | ||
find . -name "build" | xargs rm -rf | ||
find . -name "builds" | xargs rm -rf | ||
find . -name "__pycache__" | xargs rm -rf | ||
find . -name "*.so" | xargs rm -rf | ||
find . -name "*.egg-info" | xargs rm -rf | ||
find . -name ".ipynb_checkpoints" | xargs rm -rf | ||
find . -name ".pytest_cache" | xargs rm -rf | ||
|
||
reset: | ||
rm -rf sax | ||
rm -rf docs | ||
git checkout -- docs | ||
nbdev_build_lib | ||
make clean |
Oops, something went wrong.