Skip to content

Commit 9f41516

Browse files
authored
Merge pull request #208 from NLeSC/jspaaks-patch-3
Update project_setup.md
2 parents 61ff1b6 + aced93f commit 9f41516

1 file changed

Lines changed: 19 additions & 21 deletions

File tree

{{cookiecutter.project_name}}/project_setup.md

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@ control](https://guide.esciencecenter.nl/#/best_practices/version_control)! We r
1717
cd {{ cookiecutter.project_name }}
1818
git init
1919
git add --all
20-
git commit
20+
git commit -m "first commit"
21+
git branch -M main
22+
git remote add origin {{ cookiecutter.repository }}
23+
# on github, create {{ cookiecutter.repository }} as an empty repository
24+
git push --set-upstream origin main
2125
```
2226

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-
2627
## Python versions
2728

2829
This repository is set up with Python versions:
@@ -43,11 +44,12 @@ to use one or the other, as project requirements differ. For advice on what to u
4344
of the
4445
guide](https://guide.esciencecenter.nl/#/best_practices/language_guides/python?id=dependencies-and-package-management).
4546

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

4850
## Packaging/One command install
4951

50-
You can distribute your code using pipy or conda. Again, the project template does not enforce the use of either one.
52+
You can distribute your code using PyPI.
5153
[The guide](https://guide.esciencecenter.nl/#/best_practices/language_guides/python?id=building-and-packaging-code) can
5254
help you decide which tool to use for packaging.
5355

@@ -58,26 +60,22 @@ help you decide which tool to use for packaging.
5860
- Example tests that you should replace with your own meaningful tests (file: `test_my_module.py`)
5961
- The testing framework used is [PyTest](https://pytest.org)
6062
- [PyTest introduction](http://pythontesting.net/framework/pytest/pytest-introduction/)
61-
- PyTest can be installed with `pip3 install --editable .[dev]`
63+
- PyTest is listed as a development dependency, and can thus be installed with `pip3 install --editable .[dev]`
6264
- Tests can be run with `pytest`
6365
- 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)
66+
- The project uses [GitHub action workflows](https://docs.github.com/en/actions) to automatically run tests on GitHub infrastructure against multiple Python versions
67+
- Workflows can be found in [`.github/workflows`](.github/workflows/)
6668
- [Relevant section in the guide](https://guide.esciencecenter.nl/#/best_practices/language_guides/python?id=testing)
6769

6870
## Documentation
6971

70-
- Documentation should be put in the `docs` folder. The contents have been generated using `sphinx-quickstart` (Sphinx version 1.6.5).
72+
- Documentation should be put in the [`docs/`](docs/) directory. The contents have been generated using `sphinx-quickstart` (Sphinx version 1.6.5).
7173
- We recommend writing the documentation using Restructured Text (reST) and Google style docstrings.
7274
- [Restructured Text (reST) and Sphinx CheatSheet](http://openalea.gforge.inria.fr/doc/openalea/doc/_build/html/source/sphinx/rest_syntax.html)
7375
- [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).
76+
- The documentation is set up with the ReadTheDocs Sphinx theme.
77+
- Check out its [configuration options](https://sphinx-rtd-theme.readthedocs.io/en/latest/).
78+
- To generate HTML documentation, run `make html` in the `docs/` folder.
8179
- To put the documentation on [ReadTheDocs](https://readthedocs.org), log in to your ReadTheDocs account, and import
8280
the repository (under 'My Projects').
8381
- Include the link to the documentation in your project's [README.md](README.md).
@@ -93,11 +91,11 @@ help you decide which tool to use for packaging.
9391
## Continuous code quality
9492

9593
- [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
94+
- Sonarcloud must be configured for the analysis to work
9795
1. go to [Sonarcloud](https://sonarcloud.io/projects/create)
9896
2. login with your GitHub account
99-
3. add organization or reuse existing
100-
4. setup repository
97+
3. add organization or reuse existing one
98+
4. set up repository
10199
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
102100
- The analysis will be run by [GitHub Action workflow](.github/workflows/quality.yml)
103101
- 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 +132,7 @@ save it as a secret called `PYPI_TOKEN` on [Settings page]({{cookiecutter.reposi
134132
- It only makes sense to do this once there is something to cite (e.g., a software release with a DOI).
135133
- Follow the [making software citable](https://guide.esciencecenter.nl/#/citable_software/making_software_citable) section in the guide.
136134

137-
## CODE\_OF\_CONDUCT.md
135+
## CODE_OF_CONDUCT.md
138136

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

0 commit comments

Comments
 (0)