Skip to content

Commit 4d72917

Browse files
authored
Update project_setup.md
1 parent 93780c7 commit 4d72917

1 file changed

Lines changed: 17 additions & 20 deletions

File tree

{{cookiecutter.project_name}}/project_setup.md

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ control](https://guide.esciencecenter.nl/#/best_practices/version_control)! We r
1616
```shell
1717
cd {{ cookiecutter.project_name }}
1818
git init
19-
git add --all
20-
git commit
19+
git add .
20+
git commit -m "first commit"
21+
git branch -M main
22+
git remote add origin {{ cookiecutter.repository }}
23+
git push --set-upstream origin main
2124
```
2225

23-
To put your code on github, follow [this
24-
tutorial](https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/).
25-
2626
## Python versions
2727

2828
This repository is set up with Python versions:
@@ -43,7 +43,8 @@ to use one or the other, as project requirements differ. For advice on what to u
4343
of the
4444
guide](https://guide.esciencecenter.nl/#/best_practices/language_guides/python?id=dependencies-and-package-management).
4545

46-
- Dependencies should be added to `setup.py` in the `install\_requires` list.
46+
- Runtime dependencies should be added to `setup.cfg` in the `install_requires` list under `[options]`.
47+
- Development dependencies should be added to `setup.cfg` in the list under `[options.extras_require]`.
4748

4849
## Packaging/One command install
4950

@@ -58,26 +59,22 @@ help you decide which tool to use for packaging.
5859
- Example tests that you should replace with your own meaningful tests (file: `test_my_module.py`)
5960
- The testing framework used is [PyTest](https://pytest.org)
6061
- [PyTest introduction](http://pythontesting.net/framework/pytest/pytest-introduction/)
61-
- PyTest can be installed with `pip3 install --editable .[dev]`
62+
- PyTest is listed as a development dependency, and can thus be installed with `pip3 install --editable .[dev]`
6263
- Tests can be run with `pytest`
6364
- This is configured in `setup.cfg`
64-
- Use [GitHub action workflow](https://docs.github.com/en/actions) to automatically run tests on GitHub infrastructure against multiple Python versions
65-
- Workflow can be found in [`.github/workflows/build.yml`](.github/workflows/build.yml)
65+
- Uses [GitHub action workflows](https://docs.github.com/en/actions) to automatically run tests on GitHub infrastructure against multiple Python versions
66+
- Workflows can be found in [`.github/workflows`](.github/workflows/)
6667
- [Relevant section in the guide](https://guide.esciencecenter.nl/#/best_practices/language_guides/python?id=testing)
6768

6869
## Documentation
6970

70-
- Documentation should be put in the `docs` folder. The contents have been generated using `sphinx-quickstart` (Sphinx version 1.6.5).
71+
- Documentation should be put in the `docs/` directory. The contents have been generated using `sphinx-quickstart` (Sphinx version 1.6.5).
7172
- We recommend writing the documentation using Restructured Text (reST) and Google style docstrings.
7273
- [Restructured Text (reST) and Sphinx CheatSheet](http://openalea.gforge.inria.fr/doc/openalea/doc/_build/html/source/sphinx/rest_syntax.html)
7374
- [Google style docstring examples](http://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html).
74-
- The documentation is set up with the Read the Docs Sphinx Theme.
75-
- Check out the [configuration options](https://sphinx-rtd-theme.readthedocs.io/en/latest/).
76-
- To generate html documentation run `python setup.py build_sphinx`
77-
- This is configured in `setup.cfg`
78-
- Alternatively, run `make html` in the `docs` folder.
79-
- The `docs/_templates` directory contains an (empty) `.gitignore` file, to be able to add it to the repository. This
80-
file can be safely removed (or you can just leave it there).
75+
- The documentation is set up with the ReadTheDocs Sphinx theme.
76+
- Check out its [configuration options](https://sphinx-rtd-theme.readthedocs.io/en/latest/).
77+
- To generate HTML documentation, run `make html` in the `docs/` folder.
8178
- To put the documentation on [ReadTheDocs](https://readthedocs.org), log in to your ReadTheDocs account, and import
8279
the repository (under 'My Projects').
8380
- Include the link to the documentation in your project's [README.md](README.md).
@@ -93,11 +90,11 @@ help you decide which tool to use for packaging.
9390
## Continuous code quality
9491

9592
- [Sonarcloud](https://sonarcloud.io/) is used to perform quality analysis and code coverage report on each push
96-
- The GitHub organization and repository must be added Sonarcloud for analysis to work
93+
- Sonarcloud must be configured for the analysis to work
9794
1. go to [Sonarcloud](https://sonarcloud.io/projects/create)
9895
2. login with your GitHub account
9996
3. add organization or reuse existing
100-
4. setup repository
97+
4. set up repository
10198
5. go to [new code definition administration page](https://sonarcloud.io/project/new_code?id={{ cookiecutter.github_organization }}_{{ cookiecutter.project_name }}) and select `Number of days` option
10299
- The analysis will be run by [GitHub Action workflow](.github/workflows/quality.yml)
103100
- To be able to run the analysis, a token must be created at [Sonarcloud account](https://sonarcloud.io/account/security/) and this token must be added as `SONAR_TOKEN` to [secrets on GitHub](https://github.com/{{ cookiecutter.github_organization }}/{{ cookiecutter.project_name }}/settings/secrets/actions)
@@ -134,7 +131,7 @@ save it as a secret called `PYPI_TOKEN` on [Settings page]({{cookiecutter.reposi
134131
- It only makes sense to do this once there is something to cite (e.g., a software release with a DOI).
135132
- Follow the [making software citable](https://guide.esciencecenter.nl/#/citable_software/making_software_citable) section in the guide.
136133

137-
## CODE\_OF\_CONDUCT.md
134+
## CODE_OF_CONDUCT.md
138135

139136
- Information about how to behave professionally
140137
- [Relevant section in the guide](https://guide.esciencecenter.nl/#/best_practices/documentation?id=code-of-conduct)

0 commit comments

Comments
 (0)