Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
Python Binary Wheel Package
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ASTRON Templates
Python Binary Wheel Package
Merge requests
!10
Add pre commit improve tox setup
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Merged
Add pre commit improve tox setup
add-pre-commit-improve-tox-setup-2
into
main
Overview
57
Commits
36
Pipelines
21
Changes
1
Merged
Corné Lukken
requested to merge
add-pre-commit-improve-tox-setup-2
into
main
4 months ago
Overview
23
Commits
36
Pipelines
21
Changes
1
0
0
Merge request reports
Viewing commit
840430c4
Prev
Next
Show latest version
1 file
+
30
−
0
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
840430c4
add setup.sh
· 840430c4
Hannes Feldt
authored
4 months ago
{{cookiecutter.project_slug}}/setup.sh
0 → 100755
+
30
−
0
View file @ 840430c4
Edit in single-file editor
Open in Web IDE
#! /usr/bin/env bash
#
# Copyright (C) 2023 ASTRON (Netherlands Institute for Radio Astronomy)
# SPDX-License-Identifier: Apache-2.0
#
# This file's directory is used to determine the station control directory
# location.
if
[
-z
${
BASH_SOURCE
}
]
;
then
BASH_SOURCE
=
${
(%)
:-
%x
}
fi
ABSOLUTE_PATH
=
$(
realpath
$(
dirname
${
BASH_SOURCE
}
))
# Create a virtual environment directory if it doesn't exist
VENV_DIR
=
"
${
ABSOLUTE_PATH
}
/.venv"
if
[
!
-d
"
$VENV_DIR
"
]
;
then
echo
"Creating virtual environment..."
python3
-m
venv
"
$VENV_DIR
"
fi
# Activate the virtual environment
source
"
$VENV_DIR
/bin/activate"
python
-m
pip
install
pre-commit
python
-m
pip
install
"tox>=4.21.0"
# Install git pre-commit pre-push hook
if
[
!
-f
"
${
ABSOLUTE_PATH
}
/.git/hooks/pre-push.legacy"
]
;
then
source
"
${
ABSOLUTE_PATH
}
/bin/install-hooks/pre-commit.sh"
fi
Loading