Skip to content

Commit 0df8489

Browse files
authored
ENH: add extra files to project structure (#96)
1 parent a80cb77 commit 0df8489

File tree

6 files changed

+160
-6
lines changed

6 files changed

+160
-6
lines changed

doc/source/guidelines/test_practices.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,8 @@ Testing Framework
284284
For consistency, PyAnsys tools and libraries should use either the `unittest
285285
<https://docs.python.org/3/library/unittest.html>`_ or `pytest
286286
<https://docs.pytest.org/>`_ frameworks for unit testing. As described in
287-
:ref:`Required Files for a PyAnsys Project`, unit tests should be placed in the ``tests``
288-
directory in the library's root directory::
287+
:ref:`Required Files`, unit tests should be placed in the ``tests`` directory in
288+
the library's root directory::
289289

290290
tests/
291291
test_basic.py
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Changelog
2+
3+
4+
## <pyproduct-library> <version X.Y.Z> - <Release Date YYYY-MM-DD>
5+
6+
### Bugs Fixed
7+
8+
* Brief description of the bug. Link to the associated issue and pull request.
9+
* ...
10+
11+
### New Features
12+
13+
* Brief description of the feature. Link to the associated issue and pull request.
14+
* ...
15+
16+
### Doc Improvements
17+
18+
* Brief description of the improvement. Link to the associated issue and pull request.
19+
* ...
20+
21+
### Contributors
22+
23+
* <Name of the contributor> - <Email of the contributor>
24+
* ...
25+
26+
27+
## <pyproduct-library> <version X.Y.Z> - <Release Date YYYY-MM-DD>
28+
29+
...
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our
7+
project and our community a harassment-free experience for everyone,
8+
regardless of age, body size, disability, ethnicity, sex
9+
characteristics, gender identity and expression, level of experience,
10+
education, socio-economic status, nationality, personal appearance,
11+
race, religion, or sexual identity and orientation.
12+
13+
## Our Standards
14+
15+
Examples of behavior that contributes to creating a positive environment
16+
include:
17+
18+
* Using welcoming and inclusive language
19+
* Being respectful of differing viewpoints and experiences
20+
* Gracefully accepting constructive criticism
21+
* Focusing on what is best for the community
22+
* Showing empathy towards other community members
23+
24+
Examples of unacceptable behavior by participants include:
25+
26+
* The use of sexualized language or imagery and unwelcome sexual
27+
attention or advances
28+
* Trolling, insulting/derogatory comments, and personal or political attacks
29+
* Public or private harassment
30+
* Publishing others' private information, such as a physical or electronic
31+
address, without explicit permission
32+
* Other conduct which could reasonably be considered inappropriate in a
33+
professional setting
34+
35+
## Our Responsibilities
36+
37+
Project maintainers are responsible for clarifying the standards of acceptable
38+
behavior and are expected to take appropriate and fair corrective action in
39+
response to any instances of unacceptable behavior.
40+
41+
Project maintainers have the right and responsibility to remove, edit, or reject
42+
comments, commits, code, wiki edits, issues, and other contributions that are
43+
not aligned to this Code of Conduct, or to ban temporarily or permanently any
44+
contributor for other behaviors that they deem inappropriate, threatening,
45+
offensive, or harmful.
46+
47+
## Scope
48+
49+
This Code of Conduct applies both within project spaces and in public spaces
50+
when an individual is representing the project or its community. Examples of
51+
representing a project or community include using an official project e-mail
52+
address, posting via an official social media account, or acting as an appointed
53+
representative at an online or offline event. Representation of a project may be
54+
further defined and clarified by project maintainers.
55+
56+
## Attribution
57+
58+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
59+
version 1.4, available at
60+
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
61+
62+
[homepage]: https://www.contributor-covenant.org
63+
64+
For answers to common questions about this code of conduct, see
65+
https://www.contributor-covenant.org/faq
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Contributing
2+
3+
Please, refer to the [PyAnsys Developer's Guide] for contributing to this project.
4+
5+
[PyAnsys Developer's Guide]: https://dev.docs.pyansys.com/index.html
6+
7+
<!-- Additional information for your project goes below this line -->

doc/source/packaging/diag/pyproduct_library_structure_diag.rst

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,26 @@
4646
label="tests", shape="folder"
4747
]
4848

49-
readme [
50-
label="README.rst", shape="file"
49+
changelog [
50+
label="CHANGELOG.md", shape="file"
51+
]
52+
53+
code_of_conduct [
54+
label="CODE_OF_CONDUCT.md", shape="file"
55+
]
56+
57+
contributing [
58+
label="CONTRIBUTING.md", shape="file"
5159
]
5260

5361
license [
5462
label="LICENSE", shape="file"
5563
]
5664

65+
readme [
66+
label="README.rst", shape="file"
67+
]
68+
5769
pyproject [
5870
label="pyproject.toml", shape="file"
5971
]
@@ -67,6 +79,9 @@
6779
pyproduct_library -> src;
6880
pyproduct_library -> tests;
6981
pyproduct_library -> license;
82+
pyproduct_library -> changelog;
83+
pyproduct_library -> code_of_conduct;
84+
pyproduct_library -> contributing;
7085
pyproduct_library -> readme;
7186
pyproduct_library -> pyproject;
7287
pyproduct_library -> setup;

doc/source/packaging/structure.rst

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ sub-packages, while a Python Library is a collection of Python packages. Figure
9797
.. include:: diag/python_library_diag.rst
9898

9999

100-
Required Files for a PyAnsys Project
101-
====================================
100+
Required Files
101+
==============
102102

103103
The structure of any PyAnsys library contains these files and directories:
104104

@@ -199,6 +199,44 @@ This is the preferred way of naming directories and files inside the
199199
``tests/`` directory.
200200

201201

202+
The ``CHANGELOG.md`` file
203+
-------------------------
204+
205+
This file is used to collect the new features, fixed bugs, documentation
206+
improvements and new contributors. It allows to have a quick-view on the latest
207+
enhancements to the project.
208+
209+
.. literalinclude:: code/changelog_file.md
210+
:language: markdown
211+
212+
213+
The ``CODE_OF_CONDUCT.md`` file
214+
-------------------------------
215+
216+
This file is used to specify how users, developers and maintainers should behave
217+
while working in the project. PyAnsys projects usually adopt the ``Contributor
218+
Covenant Code of Conduct``, which is very popular across open-source projects.
219+
220+
.. literalinclude:: code/code_of_conduct_file.md
221+
:language: markdown
222+
223+
224+
The ``CONTRIBUTING.md`` file
225+
----------------------------
226+
This file is used as a quick entry-point for developers wiling to contribute to
227+
the project. It usually provides references to:
228+
229+
- Where the source code of the project is hosted.
230+
- Which steps need to be followed to install the software in "development" mode.
231+
- Additional ways of contributing to the source code.
232+
233+
Ideally, the ``CONTRIBUTING.md`` file for a PyAnsys project should be pointing
234+
towards the `PyAnsys Developer's Guide <https://dev.docs.pyansys.com/index.html>`_.
235+
236+
.. literalinclude:: code/contributing_file.md
237+
:language: markdown
238+
239+
202240
The ``LICENSE`` File
203241
--------------------
204242

0 commit comments

Comments
 (0)