nbdevAuto 0.0.130__tar.gz → 0.3.26__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nbdevAuto
3
- Version: 0.0.130
3
+ Version: 0.3.26
4
4
  Summary: automating nbdev
5
5
  Home-page: https://github.com/bthek1/nbdevAuto
6
6
  Author: Benedict Thekkel
@@ -23,23 +23,7 @@ Provides-Extra: dev
23
23
 
24
24
  # Nbdev Automation Library
25
25
 
26
- <!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->
27
-
28
- This file will become your README and also the index of your
29
- documentation.
30
-
31
- ## Install
32
-
33
- ``` sh
34
- pip install nbdevAuto
35
- ```
36
26
 
37
- ## How to use
38
-
39
- Fill me in please! Don’t forget code examples:
40
-
41
- ``` python
42
- 1+1
43
- ```
27
+ <!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->
44
28
 
45
- 2
29
+ Automation Library to help with using nbdev
@@ -0,0 +1,6 @@
1
+ # Nbdev Automation Library
2
+
3
+
4
+ <!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->
5
+
6
+ Automation Library to help with using nbdev
@@ -0,0 +1 @@
1
+ __version__ = "0.3.26"
@@ -5,15 +5,17 @@ d = { 'settings': { 'branch': 'main',
5
5
  'doc_host': 'https://bthek1.github.io',
6
6
  'git_url': 'https://github.com/bthek1/nbdevAuto',
7
7
  'lib_path': 'nbdevAuto'},
8
- 'syms': { 'nbdevAuto.automate': { 'nbdevAuto.automate.create_cfast': ('automate.html#create_cfast', 'nbdevAuto/automate.py'),
8
+ 'syms': { 'nbdevAuto.automate': { 'nbdevAuto.automate.create_env': ('automate.html#create_env', 'nbdevAuto/automate.py'),
9
9
  'nbdevAuto.automate.everything': ('automate.html#everything', 'nbdevAuto/automate.py'),
10
10
  'nbdevAuto.automate.gacp': ('automate.html#gacp', 'nbdevAuto/automate.py'),
11
+ 'nbdevAuto.automate.hello': ('automate.html#hello', 'nbdevAuto/automate.py'),
11
12
  'nbdevAuto.automate.help_output': ('automate.html#help_output', 'nbdevAuto/automate.py'),
12
13
  'nbdevAuto.automate.prep': ('automate.html#prep', 'nbdevAuto/automate.py'),
13
14
  'nbdevAuto.automate.reinstall': ('automate.html#reinstall', 'nbdevAuto/automate.py'),
14
15
  'nbdevAuto.automate.release': ('automate.html#release', 'nbdevAuto/automate.py'),
15
16
  'nbdevAuto.automate.release_git': ('automate.html#release_git', 'nbdevAuto/automate.py'),
16
17
  'nbdevAuto.automate.release_pypi': ('automate.html#release_pypi', 'nbdevAuto/automate.py'),
18
+ 'nbdevAuto.automate.status': ('automate.html#status', 'nbdevAuto/automate.py'),
17
19
  'nbdevAuto.automate.update': ('automate.html#update', 'nbdevAuto/automate.py'),
18
20
  'nbdevAuto.automate.upload': ('automate.html#upload', 'nbdevAuto/automate.py')},
19
21
  'nbdevAuto.core': {'nbdevAuto.core.foo': ('core.html#foo', 'nbdevAuto/core.py')},
@@ -1,15 +1,20 @@
1
1
  # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/01_Automate.ipynb.
2
2
 
3
3
  # %% auto 0
4
- __all__ = ['prep', 'gacp', 'upload', 'reinstall', 'update', 'release_git', 'release_pypi', 'release', 'help_output', 'everything',
5
- 'create_cfast']
4
+ __all__ = ['prep', 'gacp', 'status', 'upload', 'reinstall', 'update', 'release_git', 'release_pypi', 'release', 'help_output',
5
+ 'everything', 'create_env', 'hello']
6
6
 
7
7
  # %% ../nbs/01_Automate.ipynb 6
8
- def prep(part:int = 2):
8
+ from fastcore.script import *
9
+
10
+ @call_parse
11
+ def prep(
12
+ p:int = 2, # Increment Part
13
+ ):
9
14
  "Export, test, and clean notebooks, and render README if needed"
10
- import nbdev.release
11
- nbdev.release.nbdev_bump_version(part)
12
- import nbdev.test, nbdev.clean, nbdev.quarto
15
+
16
+ import nbdev.test, nbdev.clean, nbdev.quarto, nbdev.release
17
+ nbdev.release.nbdev_bump_version(p)
13
18
 
14
19
  nbdev.quarto.nbdev_export.__wrapped__()
15
20
  print(f'### nbdev_export finished ###')
@@ -26,86 +31,107 @@ def prep(part:int = 2):
26
31
  print(f'### nbdev_readme finished ###')
27
32
 
28
33
  # %% ../nbs/01_Automate.ipynb 7
34
+ @call_parse
29
35
  def gacp(
30
- comment:str="update"
36
+ m:str = '', # Commit message
31
37
  ):
32
38
  "git add, commit and push to github"
39
+
33
40
  import subprocess
34
41
  subprocess.run(["git", "add", "."])
35
42
  print(f'### git added ###')
36
- status = subprocess.check_output(["git", "status", "-s"])
43
+ status = subprocess.check_output(["git", "status", "-s"]).decode('utf-8')
37
44
  print(f'### git status: "{status}" ###')
38
- subprocess.run(["git", "commit", "-m", f'"{status}"'])
39
- print(f'### git commited ###')
45
+
46
+ if m != '':
47
+ subprocess.run(["git", "commit", "-m", f'{m}'])
48
+ print(f'### git commited "{m}"###')
49
+ else:
50
+ subprocess.run(["git", "commit", "-m", f'{status}'])
51
+ print(f'### git commited status ###')
40
52
  subprocess.run(["git", "push"])
41
53
  print(f'### git pushed ###')
42
54
 
43
55
  # %% ../nbs/01_Automate.ipynb 8
44
- def upload():
45
- "prep, then gacp"
46
- prep()
47
- gacp()
56
+ def status():
57
+ "git status"
58
+ import subprocess
59
+ subprocess.run(["git", "status"])
48
60
 
49
61
  # %% ../nbs/01_Automate.ipynb 9
62
+ @call_parse
63
+ def upload(
64
+ m:str = '', # Commit message
65
+ p:int = 2, #Increment part
66
+ ):
67
+ "prep, then gacp"
68
+ prep(p)
69
+ gacp(m)
70
+
71
+ # %% ../nbs/01_Automate.ipynb 10
50
72
  def reinstall():
51
73
  "runs pip install -e ."
52
74
  import subprocess
53
75
  subprocess.run(["pip", "install", "-e", "."])
54
76
 
55
- # %% ../nbs/01_Automate.ipynb 10
77
+ # %% ../nbs/01_Automate.ipynb 11
56
78
  def update():
57
79
  "prep, then reinstall"
58
80
  prep()
59
81
  reinstall()
60
82
 
61
- # %% ../nbs/01_Automate.ipynb 12
83
+ # %% ../nbs/01_Automate.ipynb 13
62
84
  def release_git():
63
85
  "release to git"
64
86
  import nbdev.release
87
+ nbdev.release.nbdev_bump_version(1)
65
88
  nbdev.release.release_git()
66
89
 
67
- # %% ../nbs/01_Automate.ipynb 13
90
+ # %% ../nbs/01_Automate.ipynb 14
68
91
  def release_pypi():
69
92
  "release to pypi"
70
93
  import nbdev.release
71
94
  nbdev.release.release_pypi()
72
95
 
73
- # %% ../nbs/01_Automate.ipynb 14
96
+ # %% ../nbs/01_Automate.ipynb 15
74
97
  def release():
75
98
  "release to github and pip"
76
99
  release_git()
77
100
  release_pypi()
78
101
 
79
- # %% ../nbs/01_Automate.ipynb 16
102
+ # %% ../nbs/01_Automate.ipynb 18
80
103
  def help_output():
81
104
  "Show help for all console scripts"
82
105
  from fastcore.xtras import console_help
83
106
  console_help('nbdevAuto')
84
107
 
85
- # %% ../nbs/01_Automate.ipynb 18
108
+ # %% ../nbs/01_Automate.ipynb 20
86
109
  def everything():
87
110
  "prep, gacp, release, reinstall"
88
111
  upload()
89
112
  update()
90
113
  release()
91
114
 
92
- # %% ../nbs/01_Automate.ipynb 20
93
- def create_cfast():
94
- "create mamba env cfast"
115
+ # %% ../nbs/01_Automate.ipynb 22
116
+ @call_parse
117
+ def create_env(
118
+ n:str = 'fast', #Name of the environment
119
+ ):
120
+ "create conda env for AI"
95
121
  from pathlib import Path
96
- import subprocess
97
-
98
- file_path = Path("cfast.yml")
122
+ import subprocess
99
123
 
100
- if file_path.exists():
101
- print(f"The file {file_path} exists.")
102
-
103
-
104
- subprocess.run(["mamba", "env", "create", "-n", "cfast", "-f", "cfast.yml"])
105
-
106
- print(f'### cfast created ###')
107
- else:
108
- subprocess.run(["wget", "https://github.com/bthek1/FastAISetup/blob/main/cfast.yml"])
109
- subprocess.run(["mamba", "env", "create", "-n", "cfast", "-f", "cfast.yml"])
110
- print(f"The file {file_path} does not exist. Download it from github")
124
+ subprocess.run(["conda", "create", "-n", f"{n}", "python"])
125
+ subprocess.run(["conda", "init"])
126
+ subprocess.run(["conda", "activate", f"{n}"], shell=True)
127
+ # subprocess.run(["pip", "install", "fastai", "fastcore"])
128
+
129
+
130
+ # %% ../nbs/01_Automate.ipynb 23
131
+ def hello():
132
+ import argparse
133
+ parser = argparse.ArgumentParser(description='My CLI function.')
134
+ parser.add_argument('-n', '--name', type=str, help='Name of the environment', default='fast')
135
+ args = parser.parse_args()
111
136
 
137
+ print(f'Hello, {args.name}!')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nbdevAuto
3
- Version: 0.0.130
3
+ Version: 0.3.26
4
4
  Summary: automating nbdev
5
5
  Home-page: https://github.com/bthek1/nbdevAuto
6
6
  Author: Benedict Thekkel
@@ -23,23 +23,7 @@ Provides-Extra: dev
23
23
 
24
24
  # Nbdev Automation Library
25
25
 
26
- <!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->
27
-
28
- This file will become your README and also the index of your
29
- documentation.
30
-
31
- ## Install
32
-
33
- ``` sh
34
- pip install nbdevAuto
35
- ```
36
26
 
37
- ## How to use
38
-
39
- Fill me in please! Don’t forget code examples:
40
-
41
- ``` python
42
- 1+1
43
- ```
27
+ <!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->
44
28
 
45
- 2
29
+ Automation Library to help with using nbdev
@@ -1,13 +1,15 @@
1
1
  [console_scripts]
2
- create_cfast = nbdevAuto.automate:create_cfast
2
+ create_env = nbdevAuto.automate:create_env
3
3
  everything = nbdevAuto.automate:everything
4
4
  gacp = nbdevAuto.automate:gacp
5
5
  gitrelease = nbdevAuto.automate:release_git
6
6
  h = nbdevAuto.automate:help_output
7
+ hello = nbdevAuto.automate:hello
7
8
  piprelease = nbdevAuto.automate:release_pypi
8
9
  prep = nbdevAuto.automate:prep
9
10
  reinstall = nbdevAuto.automate:reinstall
10
11
  release = nbdevAuto.automate:release
12
+ status = nbdevAuto.automate:status
11
13
  update = nbdevAuto.automate:update
12
14
  upload = nbdevAuto.automate:upload
13
15
 
@@ -1,7 +1,7 @@
1
1
  [DEFAULT]
2
2
  repo = nbdevAuto
3
3
  lib_name = nbdevAuto
4
- version = 0.0.130
4
+ version = 0.3.26
5
5
  min_python = 3.7
6
6
  license = apache2
7
7
  black_formatting = False
@@ -38,6 +38,8 @@ dev_requirements =
38
38
  console_scripts =
39
39
  prep=nbdevAuto.automate:prep
40
40
  gacp=nbdevAuto.automate:gacp
41
+ status=nbdevAuto.automate:status
42
+
41
43
  upload=nbdevAuto.automate:upload
42
44
 
43
45
  reinstall=nbdevAuto.automate:reinstall
@@ -51,5 +53,6 @@ console_scripts =
51
53
 
52
54
  everything=nbdevAuto.automate:everything
53
55
 
54
- create_cfast=nbdevAuto.automate:create_cfast
56
+ create_env=nbdevAuto.automate:create_env
57
+ hello=nbdevAuto.automate:hello
55
58
 
@@ -1,22 +0,0 @@
1
- # Nbdev Automation Library
2
-
3
- <!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->
4
-
5
- This file will become your README and also the index of your
6
- documentation.
7
-
8
- ## Install
9
-
10
- ``` sh
11
- pip install nbdevAuto
12
- ```
13
-
14
- ## How to use
15
-
16
- Fill me in please! Don’t forget code examples:
17
-
18
- ``` python
19
- 1+1
20
- ```
21
-
22
- 2
@@ -1 +0,0 @@
1
- __version__ = "0.0.130"
File without changes
File without changes
File without changes
File without changes
File without changes