Skip to content

Commit

Permalink
addressed final comments in #184
Browse files Browse the repository at this point in the history
fixed bug in git code when no remote is called 'origin'
  • Loading branch information
SamRWest committed Feb 15, 2024
1 parent fdb19a8 commit 83ec9c7
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ benchmarks/
docs/_build/
docs/api/
.coverage
/out.txt
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ python -m pip install --upgrade build
python -m pip install --upgrade twine
rm -rf dist
python -m build
python -m twine upload dist/*```
python -m twine upload dist/*
```


## Contributing
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["setuptools>=61.0.0", "wheel"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
packages = ["xl2times", "utils"]
packages = ["xl2times"]

[project]
name = "xl2times"
Expand Down
3 changes: 2 additions & 1 deletion utils/dd_to_csv.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import argparse
import sys
from collections import defaultdict
import json
import os
Expand Down Expand Up @@ -229,4 +230,4 @@ def main(arg_list: None | list[str] = None):


if __name__ == "__main__":
main()
main(sys.argv[1:])
6 changes: 4 additions & 2 deletions utils/run_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def run_benchmark(
sys.exit(5)
else:
# If debug option is set, run as a function call to allow stepping with a debugger.
from utils.dd_to_csv import main
from dd_to_csv import main

main([dd_folder, csv_folder])

Expand Down Expand Up @@ -259,7 +259,9 @@ def run_all_benchmarks(
# The rest of this script checks regressions against main
# so skip it if we're already on main
repo = git.Repo(".") # pyright: ignore
origin = repo.remotes.origin
origin = (
repo.remotes.origin if "origin" in repo.remotes else repo.remotes[0]
) # don't assume remote is called 'origin'
origin.fetch("main")
if "main" not in repo.heads:
repo.create_head("main", origin.refs.main).set_tracking_branch(origin.refs.main)
Expand Down

0 comments on commit 83ec9c7

Please sign in to comment.