pipen-cli-init 1.1.1__tar.gz → 1.1.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. pipen_cli_init-1.1.3/.codesandbox/Dockerfile +6 -0
  2. pipen_cli_init-1.1.3/.github/workflows/build.yml +24 -0
  3. pipen_cli_init-1.1.3/.gitignore +111 -0
  4. pipen_cli_init-1.1.3/PKG-INFO +77 -0
  5. pipen_cli_init-1.1.3/README.md +66 -0
  6. pipen_cli_init-1.1.3/example-pipeline/.copier-answers.yml +9 -0
  7. pipen_cli_init-1.1.3/example-pipeline/README.md +17 -0
  8. pipen_cli_init-1.1.3/example-pipeline/example/main.py +13 -0
  9. pipen_cli_init-1.1.3/example-pipeline/example/processes.py +21 -0
  10. pipen_cli_init-1.1.3/example-pipeline/package-lock.json +6 -0
  11. pipen_cli_init-1.1.3/example-pipeline/pyproject.toml +30 -0
  12. pipen_cli_init-1.1.3/example-pipeline/uv.lock +1903 -0
  13. pipen_cli_init-1.1.3/logo.png +0 -0
  14. {pipen_cli_init-1.1.1 → pipen_cli_init-1.1.3}/pipen_cli_init/__init__.py +1 -1
  15. {pipen_cli_init-1.1.1 → pipen_cli_init-1.1.3}/pipen_cli_init/template/README.md.jinja +3 -3
  16. pipen_cli_init-1.1.3/pipen_cli_init/template/pyproject.toml.jinja +32 -0
  17. pipen_cli_init-1.1.3/pipen_cli_init/template/{{pipeline_name}}/__init__.py +0 -0
  18. pipen_cli_init-1.1.3/pipen_cli_init/template/{{pipeline_name}}/__main__.py +4 -0
  19. pipen_cli_init-1.1.3/pipen_cli_init/template/{{pipeline_name}}/scripts/ExampleProcess.sh +3 -0
  20. pipen_cli_init-1.1.3/pipen_cli_init/template/{{pipeline_name}}/{% if report %}reports{% endif %}/ExampleProcess.svelte +11 -0
  21. pipen_cli_init-1.1.3/pyproject.toml +35 -0
  22. pipen_cli_init-1.1.3/setup.py +16 -0
  23. pipen_cli_init-1.1.3/uv.lock +1744 -0
  24. pipen_cli_init-1.1.1/PKG-INFO +0 -18
  25. pipen_cli_init-1.1.1/pipen_cli_init/template/pyproject.toml.jinja +0 -33
  26. pipen_cli_init-1.1.1/pyproject.toml +0 -29
  27. pipen_cli_init-1.1.1/setup.py +0 -38
  28. {pipen_cli_init-1.1.1/pipen_cli_init/template/{{pipeline_name}} → pipen_cli_init-1.1.3/example-pipeline/example}/__init__.py +0 -0
  29. {pipen_cli_init-1.1.1/pipen_cli_init/template/{{pipeline_name}} → pipen_cli_init-1.1.3/example-pipeline/example}/__main__.py +0 -0
  30. {pipen_cli_init-1.1.1/pipen_cli_init/template/{{pipeline_name}}/{% if report %}reports{% endif %} → pipen_cli_init-1.1.3/example-pipeline/example/reports}/ExampleProcess.svelte +0 -0
  31. {pipen_cli_init-1.1.1/pipen_cli_init/template/{{pipeline_name}} → pipen_cli_init-1.1.3/example-pipeline/example}/scripts/ExampleProcess.sh +0 -0
  32. {pipen_cli_init-1.1.1 → pipen_cli_init-1.1.3}/pipen_cli_init/template/.copier-answers.yml.jinja +0 -0
  33. {pipen_cli_init-1.1.1 → pipen_cli_init-1.1.3}/pipen_cli_init/template/copier.yml +0 -0
  34. {pipen_cli_init-1.1.1 → pipen_cli_init-1.1.3}/pipen_cli_init/template/{{pipeline_name}}/main.py.jinja +0 -0
  35. {pipen_cli_init-1.1.1 → pipen_cli_init-1.1.3}/pipen_cli_init/template/{{pipeline_name}}/processes.py.jinja +0 -0
@@ -0,0 +1,6 @@
1
+ FROM python:3.10.12
2
+
3
+ RUN apt-get update && apt-get install -y npm fish && \
4
+ pip install poetry && \
5
+ poetry config virtualenvs.create false && \
6
+ chsh -s /usr/bin/fish
@@ -0,0 +1,24 @@
1
+ name: Build and Deploy
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+
7
+ deploy:
8
+ runs-on: ubuntu-latest
9
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
10
+ strategy:
11
+ matrix:
12
+ python-version: [3.12]
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - name: Install uv
16
+ uses: astral-sh/setup-uv@v8.0.0
17
+ with:
18
+ python-version: ${{ matrix.python-version }}
19
+ enable-cache: true
20
+ - name: Build and publish to PyPI
21
+ run: |
22
+ uv build
23
+ uv publish --username ${{ secrets.PYPI_USER }} --password ${{ secrets.PYPI_PASSWORD }}
24
+ if: success()
@@ -0,0 +1,111 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ env/
12
+ build/
13
+ develop-eggs/
14
+ dist/
15
+ downloads/
16
+ eggs/
17
+ .eggs/
18
+ lib/
19
+ lib64/
20
+ parts/
21
+ sdist/
22
+ var/
23
+ *.egg-info/
24
+ .installed.cfg
25
+ *.egg
26
+
27
+ # PyInstaller
28
+ # Usually these files are written by a python script from a template
29
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
30
+ *.manifest
31
+ *.spec
32
+
33
+ # Installer logs
34
+ pip-log.txt
35
+ pip-delete-this-directory.txt
36
+
37
+ # Unit test / coverage reports
38
+ htmlcov/
39
+ .tox/
40
+ .coverage
41
+ .coverage.*
42
+ .cache
43
+ nosetests.xml
44
+ coverage.xml
45
+ .coverage.xml
46
+ cov.xml
47
+ *,cover
48
+ .hypothesis/
49
+
50
+ # Translations
51
+ *.mo
52
+ *.pot
53
+
54
+ # Django stuff:
55
+ *.log
56
+ local_settings.py
57
+
58
+ # Flask stuff:
59
+ instance/
60
+ .webassets-cache
61
+
62
+ # Scrapy stuff:
63
+ .scrapy
64
+
65
+ # Sphinx documentation
66
+ docs/_build/
67
+
68
+ # PyBuilder
69
+ target/
70
+
71
+ # IPython Notebook
72
+ .ipynb_checkpoints
73
+
74
+ # pyenv
75
+ .python-version
76
+
77
+ # celery beat schedule file
78
+ celerybeat-schedule
79
+
80
+ # dotenv
81
+ .env
82
+
83
+ # virtualenv
84
+ venv/
85
+ ENV/
86
+
87
+ # Spyder project settings
88
+ .spyderproject
89
+
90
+ # Rope project settings
91
+ .ropeproject
92
+
93
+ workdir/
94
+ node_modules/
95
+ _book/
96
+ .vscode
97
+ export/
98
+ *.svg
99
+ *.dot
100
+ *.queue.txt
101
+ site/
102
+
103
+ # backup files
104
+ *.bak
105
+
106
+ .history/
107
+ .xqute/
108
+ .pipen/
109
+ t-*.ipynb
110
+ *-output/
111
+ *_results/
@@ -0,0 +1,77 @@
1
+ Metadata-Version: 2.5
2
+ Name: pipen-cli-init
3
+ Version: 1.1.3
4
+ Summary: A pipen cli plugin to create a pipen project (pipeline)
5
+ Author-email: pwwang <pwwang@pwwang.com>
6
+ License: MIT
7
+ Requires-Python: >=3.9
8
+ Requires-Dist: copier>=9
9
+ Requires-Dist: pipen>=1.1
10
+ Description-Content-Type: text/markdown
11
+
12
+ <p align="center">
13
+ <img width="220px" src="logo.png" />
14
+ </p>
15
+ <p align="center">
16
+ A
17
+ <a href="https://github.com/pwwang/pipen" target="_blank">pipen</a>
18
+ cli plugin to create a pipen project (pipeline)
19
+ </p>
20
+
21
+ <hr />
22
+
23
+ ## Installation
24
+
25
+ ```shell
26
+ pip install -U pipen-cli-init
27
+ ```
28
+
29
+ ## Enablig/Disabling the plugin
30
+
31
+ Installing this plugin will enable it, and uninstalling will disable it.
32
+
33
+ ## Usage
34
+
35
+ ```shell
36
+ ❯ pipen init --help
37
+ Usage: pipen init [-h] [dir]
38
+
39
+ Initialize a pipen project (pipeline)
40
+
41
+ Optional Arguments:
42
+ -h, --help show help message and exit
43
+
44
+ Positional Arguments:
45
+ dir The directory to create the project in [default: ./]
46
+ ```
47
+
48
+ ## Example
49
+
50
+ ```shell
51
+ > cd example-pipeline/
52
+ > pipen init
53
+ > # answer the questions
54
+ > # after the project is created, install the dependencies
55
+ > uv sync
56
+ > # run the pipeline
57
+ > uv run python -m <pipeline_name>
58
+ > # or if you choose console_script to be True
59
+ > uv run <pipeline_name>
60
+ ```
61
+
62
+ If you want to publish the pipeline:
63
+
64
+ ```shell
65
+ uv build
66
+ uv publish
67
+ ```
68
+
69
+ Then you can install it and run the pipeline globally:
70
+
71
+ ```shell
72
+ > python -m <pipeline_name>
73
+ > # or if you choose console_script to be True
74
+ > <pipeline_name>
75
+ ```
76
+
77
+ [1]: https://github.com/pwwang/pipen
@@ -0,0 +1,66 @@
1
+ <p align="center">
2
+ <img width="220px" src="logo.png" />
3
+ </p>
4
+ <p align="center">
5
+ A
6
+ <a href="https://github.com/pwwang/pipen" target="_blank">pipen</a>
7
+ cli plugin to create a pipen project (pipeline)
8
+ </p>
9
+
10
+ <hr />
11
+
12
+ ## Installation
13
+
14
+ ```shell
15
+ pip install -U pipen-cli-init
16
+ ```
17
+
18
+ ## Enablig/Disabling the plugin
19
+
20
+ Installing this plugin will enable it, and uninstalling will disable it.
21
+
22
+ ## Usage
23
+
24
+ ```shell
25
+ ❯ pipen init --help
26
+ Usage: pipen init [-h] [dir]
27
+
28
+ Initialize a pipen project (pipeline)
29
+
30
+ Optional Arguments:
31
+ -h, --help show help message and exit
32
+
33
+ Positional Arguments:
34
+ dir The directory to create the project in [default: ./]
35
+ ```
36
+
37
+ ## Example
38
+
39
+ ```shell
40
+ > cd example-pipeline/
41
+ > pipen init
42
+ > # answer the questions
43
+ > # after the project is created, install the dependencies
44
+ > uv sync
45
+ > # run the pipeline
46
+ > uv run python -m <pipeline_name>
47
+ > # or if you choose console_script to be True
48
+ > uv run <pipeline_name>
49
+ ```
50
+
51
+ If you want to publish the pipeline:
52
+
53
+ ```shell
54
+ uv build
55
+ uv publish
56
+ ```
57
+
58
+ Then you can install it and run the pipeline globally:
59
+
60
+ ```shell
61
+ > python -m <pipeline_name>
62
+ > # or if you choose console_script to be True
63
+ > <pipeline_name>
64
+ ```
65
+
66
+ [1]: https://github.com/pwwang/pipen
@@ -0,0 +1,9 @@
1
+ # Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2
+ _src_path: /workspace/pipen_cli_init/template
3
+ author: Author
4
+ author_email: author@example.com
5
+ console_script: true
6
+ pipeline_desc: An awesome pipeline
7
+ pipeline_name: example
8
+ report: true
9
+
@@ -0,0 +1,17 @@
1
+ # example
2
+
3
+ ## Installation
4
+
5
+ ```bash
6
+ $ cd example/
7
+ $ uv sync
8
+ ```
9
+
10
+ ## Usage
11
+
12
+ ```bash
13
+ $ uv run python -m example
14
+
15
+ # If console_script is True
16
+ $ uv run example
17
+ ```
@@ -0,0 +1,13 @@
1
+ from pipen import Pipen
2
+
3
+ from .processes import ExampleProcess
4
+
5
+
6
+ class Pipeline(Pipen):
7
+ name = "example"
8
+ desc = "An awesome pipeline"
9
+ starts = ExampleProcess
10
+
11
+
12
+ def main():
13
+ Pipeline().run()
@@ -0,0 +1,21 @@
1
+ """Define processes for the pipeline"""
2
+
3
+ from pipen import Proc
4
+
5
+
6
+ # Define your processes here
7
+ class ExampleProcess(Proc):
8
+ """Example process
9
+
10
+ Input:
11
+ invar: Input variables
12
+
13
+ Output:
14
+ outfile: Output file
15
+ """
16
+ input = "invar:var"
17
+ output = "outfile:file:output.txt"
18
+ script = "file://scripts/ExampleProcess.sh"
19
+ plugin_opts = {
20
+ "report": "file://reports/ExampleProcess.svelte",
21
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "example-pipeline",
3
+ "lockfileVersion": 3,
4
+ "requires": true,
5
+ "packages": {}
6
+ }
@@ -0,0 +1,30 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "example"
7
+ version = "0.0.1"
8
+ description = "An awesome pipeline"
9
+ authors = [
10
+ {name = "Author", email = "author@example.com"},
11
+ ]
12
+ license = {text = "MIT"}
13
+ readme = "README.md"
14
+ requires-python = ">=3.9"
15
+ dependencies = [
16
+ "pipen>=1.1",
17
+ "pipen-filters>=1.1",
18
+ "pipen-verbose>=1.1",
19
+ "pipen-args>=1.2",
20
+ "pipen-report>=1.2",
21
+ ]
22
+
23
+ [project.scripts]
24
+ example = "example.main:main"
25
+
26
+
27
+ [tool.black]
28
+ line-length = 88
29
+ target-version = ['py39', 'py310', 'py311', 'py312']
30
+ include = '\.pyi?$'