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

Improved Config Feature #62

Closed
6 tasks done
andabak opened this issue Dec 23, 2022 · 2 comments · Fixed by #198 or #205
Closed
6 tasks done

Improved Config Feature #62

andabak opened this issue Dec 23, 2022 · 2 comments · Fixed by #198 or #205
Assignees
Labels
enhancement New feature or request

Comments

@andabak
Copy link
Collaborator

andabak commented Dec 23, 2022

Overview (What and Why)

Currently no swanky commands can be invoked outside of a swanky project folder.
For some commands that doesn't make sense and they should be available globally.
Since the check consist only of looking for the swanky.config.json in current folder, the config should be moved to the OS level config folder, and if needed combined with the local one. (also check the ancestor folders)
Additionally, keys and addresses can be stored in the .env file so that too should be checked
Lastly, a default account should be set, so it doesn't need to be passed every time.

Plus:

How

  • Implement a base class to handle config checks and logic
  • Store part of the config to the OS level config dir
  • Read the global, local (including ancestor dirs), and .env file and merge them
  • Add a default account feature
  • Limit dev account interaction

Definition of Done

{Write definition of done, how to verify}

  • Above features are implemented and merged

Open Issues and Blockers

@andabak andabak changed the title Test feature Improved Config Feature Dec 23, 2022
@andabak andabak added the enhancement New feature or request label Dec 23, 2022
@codespool codespool moved this from 💡 New/Idea to 📋 Backlog (Commited) in Swanky Suite (legacy - moved to swankyhub) Jan 9, 2023
@codespool
Copy link
Collaborator

also support .env file, add precedence, local env -> swanky config -> global swanky config

@codespool
Copy link
Collaborator

Base class feature is already implemented in #71
What's left is to update the commands to use it.

@codespool codespool moved this from 📋 Backlog (Commited) to 🏁 Ready to Start in Swanky Suite (legacy - moved to swankyhub) Apr 14, 2023
@codespool codespool moved this from 🏁 Ready to Start to 💡 New/Idea in Swanky Suite (legacy - moved to swankyhub) Jul 5, 2023
@codespool codespool moved this from 💡 New/Idea to Proposed by Astar in Swanky Suite (legacy - moved to swankyhub) Jul 5, 2023
@prxgr4mm3r prxgr4mm3r linked a pull request Jan 31, 2024 that will close this issue
@vsofiya vsofiya moved this from Proposed by Astar to 🛠 Ready for review in Treasury Proposal Roadmap - ink!DevHub 1.0 Feb 20, 2024
@pmikolajczyk41 pmikolajczyk41 moved this from 🛠 Ready for review to 👀 In review in Treasury Proposal Roadmap - ink!DevHub 1.0 Feb 22, 2024
@pmikolajczyk41 pmikolajczyk41 moved this from 👀 In review to Accepted in Treasury Proposal Roadmap - ink!DevHub 1.0 Feb 22, 2024
ipapandinas added a commit that referenced this issue Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment