question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Refactor project structure

See original GitHub issue

Previously, features specific to a command were kept in the command folder. As the application grow, features started to be shared across multiple commands.

Suggested project structure:

protostar
  - commands
      - build_command.py
      - ...
  - shared                      # keep it small — increases coupling
      - constants.py        # e.g. link to the protostar repository
      - protostar_exception.py
  - features                    # contains only packages not modules
      - cli
      - starknet_gateway
      - starknet_compiler
      - testing
      - ...
   - protostar_cli.py
   - composition_root.py
   - start.py
  • commands can import from shared, features and other commands
  • features can import from shared other features

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
kasperski95commented, Jul 29, 2022

Generally I would prefer to not adapt structure from a frontend framework

@MaksymilianDemitraszek You already do https://react-file-structure.surge.sh/

0reactions
kasperski95commented, Oct 12, 2022

It seems we use Screaming Architecture. Closing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

project structure - Is it simply Cleaning or Refactoring?
The refactorings Fowler describes are logical cleanups, where, for example, functions with more than one responsibility are reworked and divided ...
Read more >
How to refactor a folder to a new project with the right ...
1º. Create the new Project \ Folder structure in the new solution (or project) and move the files manually to their respective folders....
Read more >
What is Refactoring (Code Refactoring)? - TechTarget
The refactoring process features many small changes to a program's source code. One approach to refactoring, for example, is to improve the structure...
Read more >
Copy and Move Refactorings | IntelliJ IDEA Documentation
The Move refactoring lets you move packages and classes between the source roots of a project, class members to other classes and inner...
Read more >
Lab: Refactoring Code
1 Set Up Your Project · 2 Refactoring 1: Project Layout · 3 Refactoring 2: Repackaging the Code · 4 Refactoring 3: Improving...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found