Skip to content

Commit

Permalink
Merge pull request #26 from Cristina-Tobias/refactor-for-readability
Browse files Browse the repository at this point in the history
Refactor for readability
  • Loading branch information
Cristina-Tobias committed Mar 26, 2023
2 parents 9eb1d45 + 846d714 commit c483dde
Show file tree
Hide file tree
Showing 14 changed files with 717 additions and 676 deletions.
15 changes: 15 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# TODO

## Urgent TODOs
- Clustering.py (lowercase stuff).
- Refactor for maintainability & Clean Code.

## CI/CD
- Pre commit hooks
- Liting
- Unit testing
- Integration testing / e2e testing

## Management
- Versioning
- Docs
288 changes: 0 additions & 288 deletions clustintime/Visualization.py

This file was deleted.

Empty file added clustintime/__init__.py
Empty file.
15 changes: 1 addition & 14 deletions clustintime/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, env=

def versions_from_parentdir(parentdir_prefix, root, verbose):
"""Try to determine the version from the parent directory name.
Source tarballs conventionally unpack into a directory that includes both
the project name and a version string. We will also support searching up
two directory levels for an appropriately named parent directory
Expand Down Expand Up @@ -232,7 +231,6 @@ def git_versions_from_keywords(keywords, tag_prefix, verbose):
@register_vcs_handler("git", "pieces_from_vcs")
def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command):
"""Get version from 'git describe' in the root of the source tree.
This only gets called if the git-archive 'subst' keywords were *not*
expanded, and _version.py hasn't already been rewritten with a short
version string, meaning we're inside a checked out source tree.
Expand Down Expand Up @@ -337,10 +335,8 @@ def plus_or_dot(pieces):

def render_pep440(pieces):
"""Build up version string, with post-release "local version identifier".
Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you
get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty
Exceptions:
1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty]
"""
Expand All @@ -361,7 +357,6 @@ def render_pep440(pieces):

def render_pep440_pre(pieces):
"""TAG[.post.devDISTANCE] -- No -dirty.
Exceptions:
1: no tags. 0.post.devDISTANCE
"""
Expand All @@ -377,11 +372,9 @@ def render_pep440_pre(pieces):

def render_pep440_post(pieces):
"""TAG[.postDISTANCE[.dev0]+gHEX] .
The ".dev0" means dirty. Note that .dev0 sorts backwards
(a dirty tree will appear "older" than the corresponding clean one),
but you shouldn't be releasing software with -dirty anyways.
Exceptions:
1: no tags. 0.postDISTANCE[.dev0]
"""
Expand All @@ -404,9 +397,7 @@ def render_pep440_post(pieces):

def render_pep440_old(pieces):
"""TAG[.postDISTANCE[.dev0]] .
The ".dev0" means dirty.
Eexceptions:
1: no tags. 0.postDISTANCE[.dev0]
"""
Expand All @@ -426,9 +417,7 @@ def render_pep440_old(pieces):

def render_git_describe(pieces):
"""TAG[-DISTANCE-gHEX][-dirty].
Like 'git describe --tags --dirty --always'.
Exceptions:
1: no tags. HEX[-dirty] (note: no 'g' prefix)
"""
Expand All @@ -446,10 +435,8 @@ def render_git_describe(pieces):

def render_git_describe_long(pieces):
"""TAG-DISTANCE-gHEX[-dirty].
Like 'git describe --tags --dirty --always -long'.
The distance/hash is unconditional.
Exceptions:
1: no tags. HEX[-dirty] (note: no 'g' prefix)
"""
Expand Down Expand Up @@ -551,4 +538,4 @@ def get_versions():
"dirty": None,
"error": "unable to compute version",
"date": None,
}
}

0 comments on commit c483dde

Please sign in to comment.