Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate sync to CP2K SVN #4

Closed
dev-zero opened this issue Jun 22, 2018 · 1 comment
Closed

Automate sync to CP2K SVN #4

dev-zero opened this issue Jun 22, 2018 · 1 comment

Comments

@dev-zero
Copy link
Contributor

dev-zero commented Jun 22, 2018

The setup on a worker which is going to fetch Git commits in a bunch and pushes them to CP2K SVN could look as follows if we do not want to replicate the complete history from DBCSR in SVN anymore.

Initial setup:

svn co https://svn.code.sf.net/p/cp2k/code/trunk/cp2k/exts/dbcsr /tmp/dbcsr-sync
cd /tmp/dbcsr-sync
git init
git remote add origin https://github.com/cp2k/dbcsr.git
git fetch origin
git checkout -b master --track origin/master

# make sure .git is never added
echo '.git' >> .svnignore

The task runner would then have to do something along the lines:

cd /tmp/dbcsr-sync

git rev-parse HEAD
curr_hash=$(git rev-parse HEAD)
git pull --rebase

# adding new files is easy, simply force-add everything
svn add --force .
# removing files is a bit trickier
svn status | sed -e '/^!/!d' -e 's/^!//' | xargs svn rm

curr_hash=$(git rev-parse HEAD)

commit_msg=$(mktemp)
echo "Updating DBCSR from git @{$curr_hash}" > "${commit_msg}"
git log "${prev_hash}..${curr_hash}" >> "${commit_msg}"
svn commit --file "${commit_msg}"
rm "${commit_msg}"

This would result in squashed commits.

Other options/variations:

  • replicate individual commits via git-svn or custom scripts
  • do not pull from master (which is supposed to be stable) but yet another sync-to-CP2K branch
@alazzaro alazzaro added the postpone Postpone the issue label Jul 10, 2018
@dev-zero
Copy link
Contributor Author

dev-zero commented Aug 8, 2018

since we are moving CP2K to Git sooner than anticipated, we can close this bug

@dev-zero dev-zero closed this as completed Aug 8, 2018
@alazzaro alazzaro removed the postpone Postpone the issue label Nov 17, 2018
shoshijak added a commit to shoshijak/dbcsr that referenced this issue Jan 21, 2019
# This is the 1st commit message:

libcusmm/predict/genpars: minifix

# This is the commit message cp2k#2:

libcusmm/predict_train: refactor and simplify

- Don't create subfolders, just do all in one
- Separate generalization evaluation from global evaluation
- Make plotting y_scaled an option
- More print messages in tune_and_train
- Replace log syntax
- For eval prefitted model mode : make it write results to original subfolder
- Move from absl-py to optparse

# This is the commit message cp2k#3:

libcusmm/predict/genpars: add option to investigate only 'medium'

# This is the commit message cp2k#4:

libcusmm/predict: add option for scaling

- Add option to scale with respect to the maximum performance
over all algorithms
shoshijak added a commit to shoshijak/dbcsr that referenced this issue Jan 21, 2019
# This is the 1st commit message:

libcusmm/predict/genpars: minifix

# This is the commit message cp2k#2:

libcusmm/predict_train: refactor and simplify

- Don't create subfolders, just do all in one
- Separate generalization evaluation from global evaluation
- Make plotting y_scaled an option
- More print messages in tune_and_train
- Replace log syntax
- For eval prefitted model mode : make it write results to original subfolder
- Move from absl-py to optparse

# This is the commit message cp2k#3:

libcusmm/predict/genpars: add option to investigate only 'medium'

# This is the commit message cp2k#4:

libcusmm/predict: add option for scaling

- Add option to scale with respect to the maximum performance
over all algorithms
shoshijak added a commit to shoshijak/dbcsr that referenced this issue Jan 21, 2019
# This is the 1st commit message:

libcusmm/predict/genpars: minifix

# This is the commit message cp2k#2:

libcusmm/predict_train: refactor and simplify

- Don't create subfolders, just do all in one
- Separate generalization evaluation from global evaluation
- Make plotting y_scaled an option
- More print messages in tune_and_train
- Replace log syntax
- For eval prefitted model mode : make it write results to original subfolder
- Move from absl-py to optparse

# This is the commit message cp2k#3:

libcusmm/predict/genpars: add option to investigate only 'medium'

# This is the commit message cp2k#4:

libcusmm/predict: add option for scaling

- Add option to scale with respect to the maximum performance
over all algorithms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants