data-manipulation-utilities 0.0.4__py3-none-any.whl → 0.0.6__py3-none-any.whl

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.
@@ -0,0 +1,77 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # --------------------------
4
+ display_help()
5
+ {
6
+ echo "Script meant to:"
7
+ echo ""
8
+ echo "1. Check if version in pyproject.toml has been modified"
9
+ echo "2. If it has create new tag following version name"
10
+ echo "3. Push to remote "
11
+ }
12
+ # --------------------------
13
+ get_opts()
14
+ {
15
+ while getopts :hf: option; do
16
+ case "${option}" in
17
+ h)
18
+ display_help
19
+ exit 0
20
+ ;;
21
+ \?) echo "Invalid option: -${OPTARG}"
22
+ display_help
23
+ exit 1
24
+ ;;
25
+ :) echo "$0: Arguments needed"
26
+ display_help
27
+ exit 1
28
+ ;;
29
+ esac
30
+ done
31
+ }
32
+ # --------------------------
33
+ # Picks up version from pyproject.toml
34
+ get_version()
35
+ {
36
+ if [[ ! -f pyproject.toml ]];then
37
+ echo "Cannot find pyproject.toml"
38
+ exit 1
39
+ fi
40
+
41
+ VERSION_LINE=$(grep version pyproject.toml)
42
+
43
+ if [[ $? -ne 0 ]];then
44
+ ehco "Could not extract version from pyproject.toml"
45
+ exit 1
46
+ fi
47
+
48
+ if [[ "$VERSION_LINE" =~ .*([0-9]\.[0-9]\.[0-9]).* ]];then
49
+ VERSION=${BASH_REMATCH[1]}
50
+ echo "Using version: $VERSION"
51
+ return
52
+ fi
53
+
54
+ echo "Could not extract version from: $VERSION_LINE"
55
+ exit 1
56
+ }
57
+ # --------------------------
58
+ create_tag()
59
+ {
60
+ git tag -n | grep $VERSION
61
+
62
+ if [[ $? -eq 0 ]];then
63
+ echo "Version found among tags, not tagging"
64
+ return
65
+ fi
66
+
67
+ echo "Version $VERSION not found among tags, creating new tag"
68
+
69
+ git tag -a $VERSION
70
+ }
71
+ # --------------------------
72
+ get_opts "$@"
73
+
74
+ get_version
75
+ create_tag
76
+ git push -u origin HEAD
77
+ git push --tags
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: data_manipulation_utilities
3
- Version: 0.0.4
3
+ Version: 0.0.6
4
4
  Description-Content-Type: text/markdown
5
5
  Requires-Dist: zfit
6
6
  Requires-Dist: logzero
@@ -1,3 +1,4 @@
1
+ data_manipulation_utilities-0.0.6.data/scripts/publish,sha256=9DPzH1NcyuyXo6uHjQitIce192jugsoCCjRY7HR7mCg,1684
1
2
  dmu/arrays/utilities.py,sha256=PKoYyybPptA2aU-V3KLnJXBudWxTXu4x1uGdIMQ49HY,1722
2
3
  dmu/generic/utilities.py,sha256=0Xnq9t35wuebAqKxbyAiMk1ISB7IcXK4cFH25MT1fgw,1741
3
4
  dmu/logging/log_store.py,sha256=v0tiNz-6ktT_afD5DuvCZ8Nmr82JKQOPli8hgd28P1Q,3960
@@ -32,13 +33,14 @@ dmu_data/text/transform.txt,sha256=EX760da6Vkf-_EPxnQlC5hGSkfFhJCCGCD19NU-1Qto,4
32
33
  dmu_data/text/transform_set.toml,sha256=Jeh7BTz82idqvbOQJtl9-ur56mZkzDn5WtvmIb48LoE,150
33
34
  dmu_data/text/transform_set.txt,sha256=1KivMoP9LxPn9955QrRmOzjEqduEjhTetQ9MXykO5LY,46
34
35
  dmu_data/text/transform_trf.txt,sha256=zxBRTgcSmX7RdqfmWF88W1YqbyNHa4Ccruf1MmnYv2A,74
36
+ dmu_scripts/git/publish,sha256=9DPzH1NcyuyXo6uHjQitIce192jugsoCCjRY7HR7mCg,1684
35
37
  dmu_scripts/physics/check_truth.py,sha256=b1P_Pa9ef6VcFtyY6Y9KS9Om9L-QrCBjDKp4dqca0PQ,3964
36
38
  dmu_scripts/rfile/compare_root_files.py,sha256=T8lDnQxsRNMr37x1Y7YvWD8ySHrJOWZki7ZQynxXX9Q,9540
37
39
  dmu_scripts/rfile/print_trees.py,sha256=Ze4Ccl_iUldl4eVEDVnYBoe4amqBT1fSBR1zN5WSztk,941
38
40
  dmu_scripts/ssh/coned.py,sha256=lhilYNHWRCGxC-jtyJ3LQ4oUgWW33B2l1tYCcyHHsR0,4858
39
41
  dmu_scripts/text/transform_text.py,sha256=9akj1LB0HAyopOvkLjNOJiptZw5XoOQLe17SlcrGMD0,1456
40
- data_manipulation_utilities-0.0.4.dist-info/METADATA,sha256=KdnERW9iQpDf8vz-m7-VWKgMPHrK5L2NEhfTkWRKtys,19299
41
- data_manipulation_utilities-0.0.4.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
42
- data_manipulation_utilities-0.0.4.dist-info/entry_points.txt,sha256=1TIZDed651KuOH-DgaN5AoBdirKmrKE_oM1b6b7zTUU,270
43
- data_manipulation_utilities-0.0.4.dist-info/top_level.txt,sha256=n_x5J6uWtSqy9mRImKtdA2V2NJNyU8Kn3u8DTOKJix0,25
44
- data_manipulation_utilities-0.0.4.dist-info/RECORD,,
42
+ data_manipulation_utilities-0.0.6.dist-info/METADATA,sha256=t5uc_pnOn1_UBjs2HCrpiNY5Kg4saETW4BsbdVOAvQo,19299
43
+ data_manipulation_utilities-0.0.6.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
44
+ data_manipulation_utilities-0.0.6.dist-info/entry_points.txt,sha256=1TIZDed651KuOH-DgaN5AoBdirKmrKE_oM1b6b7zTUU,270
45
+ data_manipulation_utilities-0.0.6.dist-info/top_level.txt,sha256=n_x5J6uWtSqy9mRImKtdA2V2NJNyU8Kn3u8DTOKJix0,25
46
+ data_manipulation_utilities-0.0.6.dist-info/RECORD,,
@@ -0,0 +1,77 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # --------------------------
4
+ display_help()
5
+ {
6
+ echo "Script meant to:"
7
+ echo ""
8
+ echo "1. Check if version in pyproject.toml has been modified"
9
+ echo "2. If it has create new tag following version name"
10
+ echo "3. Push to remote "
11
+ }
12
+ # --------------------------
13
+ get_opts()
14
+ {
15
+ while getopts :hf: option; do
16
+ case "${option}" in
17
+ h)
18
+ display_help
19
+ exit 0
20
+ ;;
21
+ \?) echo "Invalid option: -${OPTARG}"
22
+ display_help
23
+ exit 1
24
+ ;;
25
+ :) echo "$0: Arguments needed"
26
+ display_help
27
+ exit 1
28
+ ;;
29
+ esac
30
+ done
31
+ }
32
+ # --------------------------
33
+ # Picks up version from pyproject.toml
34
+ get_version()
35
+ {
36
+ if [[ ! -f pyproject.toml ]];then
37
+ echo "Cannot find pyproject.toml"
38
+ exit 1
39
+ fi
40
+
41
+ VERSION_LINE=$(grep version pyproject.toml)
42
+
43
+ if [[ $? -ne 0 ]];then
44
+ ehco "Could not extract version from pyproject.toml"
45
+ exit 1
46
+ fi
47
+
48
+ if [[ "$VERSION_LINE" =~ .*([0-9]\.[0-9]\.[0-9]).* ]];then
49
+ VERSION=${BASH_REMATCH[1]}
50
+ echo "Using version: $VERSION"
51
+ return
52
+ fi
53
+
54
+ echo "Could not extract version from: $VERSION_LINE"
55
+ exit 1
56
+ }
57
+ # --------------------------
58
+ create_tag()
59
+ {
60
+ git tag -n | grep $VERSION
61
+
62
+ if [[ $? -eq 0 ]];then
63
+ echo "Version found among tags, not tagging"
64
+ return
65
+ fi
66
+
67
+ echo "Version $VERSION not found among tags, creating new tag"
68
+
69
+ git tag -a $VERSION
70
+ }
71
+ # --------------------------
72
+ get_opts "$@"
73
+
74
+ get_version
75
+ create_tag
76
+ git push -u origin HEAD
77
+ git push --tags