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

Store complete remote url in state file #316

Merged
merged 18 commits into from
Oct 2, 2024

Conversation

pchakraborty
Copy link
Collaborator

@pchakraborty pchakraborty commented Sep 30, 2024

  • Full path of remote url is now stored in the state file
  • Logic to decorate local path based on input comp style is moved to a separate function
  • Added pytests for Registry and MepoComponent. pytest is now a dev dependency in pyproject.toml
  • Removed MepoState dependence of git.py
  • Fixed mepo completion

@pchakraborty pchakraborty requested a review from a team as a code owner September 30, 2024 21:22
@pchakraborty pchakraborty added the Skip Changelog Skips the Changelog Enforcer label Sep 30, 2024
The state file (state.json) stores the relative local path to each repo. However, during reading of the state, MepoState converts it to an absolute path, and every instantiation of GitRepository uses an absolute local path. So we don't need to call get_root_dir() from GitRepository
@pchakraborty pchakraborty merged commit 159862a into develop Oct 2, 2024
15 checks passed
@pchakraborty pchakraborty deleted the feature/pchakrab/remote-abspath branch October 2, 2024 12:12
pchakraborty added a commit that referenced this pull request Oct 2, 2024
* Added ability to print version info (#309)

* Add brew tap installation instructions (#302)

* Add brew tap installation instructions

* Add update-state to readme

* Added ability to print version info

* Updated Changelog

* Testing mepo version against the last release version number

* Removing lock files

We really shouldn't need to version control lock files. Reusing already existing virtualenv
Generating production lockfile: /home/pchakrab/workspace/code/mepo/develop/requirements.lock
Generating dev lockfile: /home/pchakrab/workspace/code/mepo/develop/requirements-dev.lock
Installing dependencies
Found existing installation: mepo 2.0.0
Uninstalling mepo-2.0.0:
  Successfully uninstalled mepo-2.0.0
Looking in indexes: https://pypi.org/simple/
Obtaining file:///. (from -r /home/pchakrab/tmp/tmpatm5q2yh (line 1))
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Checking if build backend supports build_editable: started
  Checking if build backend supports build_editable: finished with status 'done'
  Getting requirements to build editable: started
  Getting requirements to build editable: finished with status 'done'
  Installing backend dependencies: started
  Installing backend dependencies: finished with status 'done'
  Preparing editable metadata (pyproject.toml): started
  Preparing editable metadata (pyproject.toml): finished with status 'done'
Building wheels for collected packages: mepo
  Building editable for mepo (pyproject.toml): started
  Building editable for mepo (pyproject.toml): finished with status 'done'
  Created wheel for mepo: filename=mepo-2.0.0-py3-none-any.whl size=11085 sha256=758e0b5ae11be1d887f2598e6c04fc09648e00a736ffbe8ae47fbad802e2978f
  Stored in directory: /home/pchakrab/tmp/pip-ephem-wheel-cache-5f1wnqzn/wheels/97/54/f5/d849319cdfa096e074df352654ee2e7c919da8951f090690c6
Successfully built mepo
Installing collected packages: mepo
Successfully installed mepo-2.0.0
Done! will generate them from

* Removing lock files

Merging the changes from main brought in the lock files again

* Using rye for Python and package management

* Minor cleanup of workflows

---------

Co-authored-by: Matt Thompson <[email protected]>

* Add spack install instructions (#310)

* Update README (#315)

* Store complete remote url in state file (#316)

* Added pytest as a dev dependency to pyproject.toml

Now we can run tests via 'rye test'

* Store full remote path of every repo in state file

* Moved logic to apply style to local path to a separate function

* Remote URL is not relative anymore

* Added pytests for Registry and MepoComponent classes

* Running 'rye test' to run all tests

* Generate default __eq__() method in MepoComponent to (rich) compare two instances of this class

* Updated test_component for the case when remote is an https url instead of ssh

* Switched to https protocol

* bug fix

* Remote was of a different repo. Fixed now.

* Removed MepoState dependence of git.py

The state file (state.json) stores the relative local path to each repo. However, during reading of the state, MepoState converts it to an absolute path, and every instantiation of GitRepository uses an absolute local path. So we don't need to call get_root_dir() from GitRepository

* Added explicit init of MepoComponent

* update-state writes compelete remote url

* Removed unnecessary, and wrong, check for local path

* Bumped the minor version number

* Moved pytest from being a dependency to a dev-dependency. Fixed test that checks for version

* Completion working now

---------

Co-authored-by: Matt Thompson <[email protected]>
pchakraborty added a commit that referenced this pull request Oct 2, 2024
* Added ability to print version info (#309)

* Add brew tap installation instructions (#302)

* Add brew tap installation instructions

* Add update-state to readme

* Added ability to print version info

* Updated Changelog

* Testing mepo version against the last release version number

* Removing lock files

We really shouldn't need to version control lock files. Reusing already existing virtualenv
Generating production lockfile: /home/pchakrab/workspace/code/mepo/develop/requirements.lock
Generating dev lockfile: /home/pchakrab/workspace/code/mepo/develop/requirements-dev.lock
Installing dependencies
Found existing installation: mepo 2.0.0
Uninstalling mepo-2.0.0:
  Successfully uninstalled mepo-2.0.0
Looking in indexes: https://pypi.org/simple/
Obtaining file:///. (from -r /home/pchakrab/tmp/tmpatm5q2yh (line 1))
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Checking if build backend supports build_editable: started
  Checking if build backend supports build_editable: finished with status 'done'
  Getting requirements to build editable: started
  Getting requirements to build editable: finished with status 'done'
  Installing backend dependencies: started
  Installing backend dependencies: finished with status 'done'
  Preparing editable metadata (pyproject.toml): started
  Preparing editable metadata (pyproject.toml): finished with status 'done'
Building wheels for collected packages: mepo
  Building editable for mepo (pyproject.toml): started
  Building editable for mepo (pyproject.toml): finished with status 'done'
  Created wheel for mepo: filename=mepo-2.0.0-py3-none-any.whl size=11085 sha256=758e0b5ae11be1d887f2598e6c04fc09648e00a736ffbe8ae47fbad802e2978f
  Stored in directory: /home/pchakrab/tmp/pip-ephem-wheel-cache-5f1wnqzn/wheels/97/54/f5/d849319cdfa096e074df352654ee2e7c919da8951f090690c6
Successfully built mepo
Installing collected packages: mepo
Successfully installed mepo-2.0.0
Done! will generate them from

* Removing lock files

Merging the changes from main brought in the lock files again

* Using rye for Python and package management

* Minor cleanup of workflows

---------

Co-authored-by: Matt Thompson <[email protected]>

* Add spack install instructions (#310)

* Update README (#315)

* Store complete remote url in state file (#316)

* Added pytest as a dev dependency to pyproject.toml

Now we can run tests via 'rye test'

* Store full remote path of every repo in state file

* Moved logic to apply style to local path to a separate function

* Remote URL is not relative anymore

* Added pytests for Registry and MepoComponent classes

* Running 'rye test' to run all tests

* Generate default __eq__() method in MepoComponent to (rich) compare two instances of this class

* Updated test_component for the case when remote is an https url instead of ssh

* Switched to https protocol

* bug fix

* Remote was of a different repo. Fixed now.

* Removed MepoState dependence of git.py

The state file (state.json) stores the relative local path to each repo. However, during reading of the state, MepoState converts it to an absolute path, and every instantiation of GitRepository uses an absolute local path. So we don't need to call get_root_dir() from GitRepository

* Added explicit init of MepoComponent

* update-state writes compelete remote url

* Removed unnecessary, and wrong, check for local path

* Bumped the minor version number

* Moved pytest from being a dependency to a dev-dependency. Fixed test that checks for version

* Completion working now

---------

Co-authored-by: Matt Thompson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog Skips the Changelog Enforcer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants