Skip to content

Commit c506c7a

Browse files
committed
More work on the migration to mig/lib/ for code, bin/ for scripts and tools
and `sbin/` for services. Added symlinks in `bin/` and `sbin/` to most scripts, tools and services pending migration. We want to gradually replace those links by migrating the source to the new location and cleaning them up in the process as described in the included README files. Synced all active `__init__.py` files for consistency and working links. Tweaked `addheader.py` helper to avoid exceeding our 80-char line length limit.
1 parent d73b414 commit c506c7a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+274
-86
lines changed

bin/README

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
1-
= Intro =
2-
We are moving various scripts and tools into a more logical location and will
3-
as a start just link to the existing paths in this folder so that one can use
4-
them as
1+
= Modernization and Clean Up =
2+
We are cleaning up and moving various scripts and tools into a more logical
3+
location and will as a start just link to the existing paths in this folder so
4+
that one can use them as
55
/path/to/bin/X
66
Long term we will likely move them there instead and perhaps only preserve
77
symlinks to still support the original paths for a while.
88

9-
Some scripts and tools may still expect certain relative paths to e.g. the MiGserver.conf file but you can always override it with something like:
10-
MIG_CONF=/path/to/my/MiGserver.conf ./bin/searchusers.py
9+
Some scripts and tools may still expect certain relative paths to e.g. the
10+
MiGserver.conf file but you can always override it with something like:
11+
MIG_CONF=/path/to/my/MiGserver.conf /path/to/bin/searchusers.py
12+
13+
The clean up also means that any code placed here MUST comply with the project
14+
style guides, be lint clean, documented and have decent unit test coverage.
15+
16+
You may want to use autopep8, pylint, flake8, ruff or 'make lint' targets once
17+
available to help verify.
18+
The black code formatter and isort may also come in handy. To apply them on
19+
the code in $TARGET file please run:
20+
black --line-length=80 $TARGET
21+
isort --line-length=80 -m=HANGING_INDENT $TARGET
22+
in that order on code files to preserve our existing hanging indent imports
23+
instead of the exotic black import style with parentheses.

bin/addheader.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@
1919
# GNU General Public License for more details.
2020
#
2121
# You should have received a copy of the GNU General Public License
22-
# along with this program; if not, write to the Free Software
23-
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
24-
# USA.
22+
# along with this program; if not, write to the Free Software Foundation,
23+
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2524
#
2625
# --- END_HEADER ---
2726
#
@@ -92,9 +91,8 @@
9291
# GNU General Public License for more details.
9392
#
9493
# You should have received a copy of the GNU General Public License
95-
# along with this program; if not, write to the Free Software
96-
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
97-
# USA."""
94+
# along with this program; if not, write to the Free Software Foundation,
95+
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA."""
9896

9997

10098
def check_header(path, var_dict, preamble_lines=100):

bin/checkcloud.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../mig/server/checkcloud.py

bin/checktwofactor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../mig/server/checktwofactor.py

bin/chkenabled.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../mig/server/chkenabled.py

bin/cleansessions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../mig/server/cleansessions.py

bin/createresource.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../mig/server/createresource.py

bin/createuser.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../mig/server/createuser.py

bin/deleteuser.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../mig/server/deleteuser.py

bin/editgdpuser.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../mig/server/editgdpuser.py

0 commit comments

Comments
 (0)