Skip to content

move module to src directory #384

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

Merged
merged 1 commit into from
Nov 27, 2020
Merged

move module to src directory #384

merged 1 commit into from
Nov 27, 2020

Conversation

jkowalleck
Copy link
Contributor

@jkowalleck jkowalleck commented Nov 27, 2020

moved sources to folder src.
as stated here: #383 (comment)

this was done, to have the src folder be the place for ALL actual code regarding this project.
it is planned (via #385) to add SCSS generators for the shipped resources/ folder's static files. to make the generator resources clearly visible as code, they will be places in the new src folder alongside with the actual shipped python package pytest_html.

moving to a src folder layout allso allows more generator resources(for the JS?) or side-packages be placed in there.
it clearly distinguishes sources, tests, docs and al the other files/folders.

proposed file/folder layout:

root
  |-- src
  |   |-- pytest_html
  |   |   |-- resources
  |   |   |   '-- *.css
  |   |   |-- __init__.py
  |   |   '--  some_module.py
  |   '-- layout
  |       '-- css
  |           '-- *.scss 
  |-- testing
  |   '-- some_test.py
  |-- README.rst
  '-- setup.py

This was referenced Nov 27, 2020
@ssbarnea ssbarnea changed the title move sources to src dir move module to src directory Nov 27, 2020
@ssbarnea ssbarnea added the enhancement This issue/PR relates to a feature request. label Nov 27, 2020
@ssbarnea ssbarnea merged commit 3f63686 into pytest-dev:master Nov 27, 2020
@jkowalleck jkowalleck deleted the move_sources_to_src branch November 27, 2020 15:18
@gnikonorov
Copy link
Member

Why did we need to move things into a src directory again? I think we should update the PR description so people know why this change happened @jkowalleck @ssbarnea.

Also why do we have a 'pytest-html' folder inside 'src'? why can't we remove the 'pytest-html' folder?

@ssbarnea
Copy link
Member

@gnikonorov I do not have time to explain it now (or to find the backing blog posts), but have a look at https://github.com/pytest-dev/pytest/tree/master/src -- Is not that I would find everything that pytest did as ideal, but the repository layout was one of the good ones for sure.

Think as src as the place where modules should stay, most of the time is a single module. It is future proof and also integrates very well with other tools/IDEs.

@jkowalleck
Copy link
Contributor Author

jkowalleck commented Nov 27, 2020

@gnikonorov, I updated the PRs description in a way the decision gets more context.
do you have suggestions how to improve the decision docs?

@gnikonorov
Copy link
Member

@gnikonorov I do not have time to explain it now (or to find the backing blog posts), but have a look at https://github.com/pytest-dev/pytest/tree/master/src -- Is not that I would find everything that pytest did as ideal, but the repository layout was one of the good ones for sure.

Think as src as the place where modules should stay, most of the time is a single module. It is future proof and also integrates very well with other tools/IDEs.

Thank you for clarifying, @ssbarnea

@gnikonorov updated the PRs description in a way the decision gets more context.
do you have suggestions how to improve the decision docs?

I think that's perfect, thank you for taking the time to write it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This issue/PR relates to a feature request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants