Giter Club home page Giter Club logo

Comments (8)

TomGeorge1234 avatar TomGeorge1234 commented on August 21, 2024 1

I can't quite tell the difference between this and what I put in the first one. But looks good to me, I agree

from ratinabox.

mehulrastogi avatar mehulrastogi commented on August 21, 2024

I guess there are many ways to structure the python packages as there is not strict rule that python does follow. But I do particularly like the following article and a stack over flow answer:-

According to which we can structure the project in the following way :-

├── README.md
├── LICENSE.md
├── demos
├── dist
├── figures
└── ratinabox  
    ├── __init__.py
    ├── Environments
    │   ├── __init__.py
    │   ├── Environment.py
    │   ├── SubEnvironment.py
    │   └── contribs
    ├── Agents
    │   ├── __init__.py
    │   ├── Agent.py
    │   ├── SubAgent.py
    │   └── contribs
    ├── Neurons
    │   ├── __init__.py
    │   ├── Neurons.py
    │   ├── PlaceCells.py
    │   ├── GridCells.py
    │   ├── ...
    │   └── contribs
    ├── data
    └── utils.py
└── .gitignore

What do you think?

from ratinabox.

mehulrastogi avatar mehulrastogi commented on August 21, 2024

I guess there are many ways to structure the python packages as there is not strict rule that python does follow. But I do particularly like the following article and a stack over flow answer:-

* https://stackoverflow.com/a/19871661

* https://dev.to/codemouse92/dead-simple-python-project-structure-and-imports-38c6

According to which we can structure the project in the following way :-

├── README.md
├── LICENSE.md
├── demos
├── dist
├── figures
└── ratinabox  
    ├── __init__.py
    ├── Environments
    │   ├── __init__.py
    │   ├── Environment.py
    │   ├── SubEnvironment.py
    │   └── contribs
    ├── Agents
    │   ├── __init__.py
    │   ├── Agent.py
    │   ├── SubAgent.py
    │   └── contribs
    ├── Neurons
    │   ├── __init__.py
    │   ├── Neurons.py
    │   ├── PlaceCells.py
    │   ├── GridCells.py
    │   ├── ...
    │   └── contribs
    ├── data
    └── utils.py
└── .gitignore

What do you think?

The top level can also have the requirements.py , setup.py, ...

from ratinabox.

TomGeorge1234 avatar TomGeorge1234 commented on August 21, 2024

Closing and continuing discussion on PR #58

from ratinabox.

TomGeorge1234 avatar TomGeorge1234 commented on August 21, 2024

Just linking this to #64 re changing module names to lower-case to avoid import problems.

from ratinabox.

TomGeorge1234 avatar TomGeorge1234 commented on August 21, 2024

This could be backwards compatible if in each __init__ we import cells and list them in __all__ = PlaceCells, GridCells,...

from ratinabox.

TomGeorge1234 avatar TomGeorge1234 commented on August 21, 2024

Updated design:

├── README.md
├── LICENSE.md
├── .gitignore
├── demos
├── dist
├── figures
└── ratinabox  
    ├── __init__.py
    ├── ends
    │   ├── __init__.py
    │   ├── Environment.py
    │   ├── SubEnvironment.py
    │   └── contribs
    ├── agents
    │   ├── __init__.py
    │   ├── Agent.py
    │   ├── SubAgent.py
    │   └── contribs
    ├── neurons
    │   ├── __init__.py
    │   ├── Neurons.py
    │   ├── PlaceCells.py
    │   ├── GridCells.py
    │   ├── ...
    │   └── contribs
    ├── data
    └── utils.py

from ratinabox.

TomGeorge1234 avatar TomGeorge1234 commented on August 21, 2024

closing this for now

from ratinabox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.