Compare commits

...

6 Commits

Author SHA1 Message Date
8662972fe5 Bump version number
All checks were successful
ydeng/renamebycsv/pipeline/head This commit looks good
2023-04-21 11:30:33 -05:00
a566813c56 Restructured code slightly
All checks were successful
ydeng/renamebycsv/pipeline/head This commit looks good
2023-04-21 11:27:27 -05:00
7bb56ac14d Reduced build 'environment.yml' version specificity
All checks were successful
ydeng/renamebycsv/pipeline/head This commit looks good
2023-04-21 11:25:22 -05:00
e95f5b5ac9 Added test installation and archiving stages to 'Jenkinsfile'
All checks were successful
ydeng/renamebycsv/pipeline/head This commit looks good
2023-04-21 11:23:56 -05:00
efe4855297 Merge branch 'develop' of https://git.reslate.systems/ydeng/renamebycsv into develop 2023-04-21 11:22:23 -05:00
1eebfd9717 Change image to debian
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2023-04-06 09:51:29 -05:00
4 changed files with 33 additions and 15 deletions

23
Jenkinsfile vendored
View File

@ -1,10 +1,15 @@
pipeline {
agent any
stages {
stage("clean") {
steps {
sh 'rm -rf ./dist/*'
}
}
stage("install") {
steps {
sh 'conda env update --file environment.yml'
sh 'echo "conda activate renamebycsv" >> ~/.bashrc'
sh 'mamba env update --file environment.yml'
sh 'echo "mamba activate renamebycsv" >> ~/.bashrc'
}
}
stage("build") {
@ -12,9 +17,19 @@ pipeline {
sh "python -m build"
}
}
stage("publish") {
stage("test") {
steps {
sh "pip install dist/*.whl"
}
}
stage("archive") {
steps {
archiveArtifacts artifacts: 'dist/*.tar.gz, dist/*.whl'
}
}
stage("publish package") {
when {
branch '**/master'
branch '**/main'
}
steps {
withCredentials([usernamePassword(credentialsId: 'rs-git-package-registry-ydeng', passwordVariable: 'PASS', usernameVariable: 'USER')]) {

View File

@ -3,9 +3,8 @@ channels:
- anaconda
- conda-forge
dependencies:
- build=0.7.0
- pytest=7.2.2
- python=3.11.3
- setuptools=67.6.1
- twine=4.0.2
- cryptography=38.0.4
- build=0.7
- pytest=7.2
- python=3.11
- setuptools=67.6
- twine=4.0

View File

@ -70,6 +70,13 @@ def rename(
logging.info("No file names were modified.")
def run(args):
candidates = find_all_candidates(args.input_dir, args.regex, args.recursive)
rename(
args.csv, candidates, args.current, args.become, args.dry, args.keep_extension
)
def main():
program_name = "renamebycsv"
argparser = argparse.ArgumentParser(
@ -135,10 +142,7 @@ def main():
format="[%(filename)s %(asctime)s - %(levelname)s] %(message)s",
level=args.verbosity.upper(),
)
candidates = find_all_candidates(args.input_dir, args.regex, args.recursive)
rename(
args.csv, candidates, args.current, args.become, args.dry, args.keep_extension
)
run(args)
if __name__ == "__main__":

View File

@ -1,6 +1,6 @@
[metadata]
name = renamebycsv
version = 0.0.1
version = 0.0.2
[options]
packages = renamebycsv