Skip to content

Commit 0733ee8

Browse files
authored
Merge pull request #140 from nuest/feature/add-changelog
2 parents 2bc15e7 + 0889760 commit 0733ee8

File tree

7 files changed

+204
-19
lines changed

7 files changed

+204
-19
lines changed

CHANGELOG.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Changelog
2+
3+
## [Unreleased]
4+
5+
### Added
6+
7+
- ...
8+
9+
### Changed
10+
11+
- ...
12+
13+
### Fixed
14+
15+
- ...
16+
17+
### Deprecated
18+
19+
- ...
20+
21+
### Removed
22+
23+
- ...
24+
25+
### Security
26+
27+
- ...
28+
29+
## [0.1.0] - 2025-04-16
30+
31+
### Added
32+
33+
- Changelog
34+
35+
### Changed
36+
37+
- None.
38+
39+
### Fixed
40+
41+
- None.
42+
43+
### Deprecated
44+
45+
- None.
46+
47+
### Removed
48+
49+
- None.
50+
51+
### Security
52+
53+
- None.

CONTRIBUTING.md

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# Contributing to CONTRIBUTING.md
2+
3+
First off, thanks for taking the time to contribute! ❤️
4+
5+
All types of contributions are encouraged and valued.
6+
See this document for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution.
7+
It will make it a lot easier for us maintainers and smooth out the experience for all involved.
8+
The community looks forward to your contributions. 🎉
9+
10+
> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
11+
>
12+
> - Star the project
13+
> - Share it on social media
14+
> - Refer this project in your project's README
15+
> - Mention the project in your work/research
16+
17+
## Code of Conduct
18+
19+
This code of conduct applies to on-topic development channels of the project.
20+
This includes but is not limited to: bug trackers, development repositories, mailing lists/discussion forums, and any other communication method for development of software.
21+
Off-topic channels are subject to their own rules and guidelines.
22+
23+
**Standards of Communication**: We expect all users to stay on-topic while using development channels. We will not accept the following: stalking and witchhunting, arguments/off-topic debates, ad hominems, attempts to flame or otherwise derail communication, troll feeding.
24+
25+
Above everything: **Be kind.**
26+
27+
By participating, you are expected to uphold this code. Please report unacceptable behavior
28+
29+
30+
## I Have a Question
31+
32+
Before you ask a question, it is best to search for existing [Issues](/issues) that might help you.
33+
In case you have found a suitable issue and still need clarification, you can write your question in this issue.
34+
35+
If you then still feel the need to ask a question and need clarification, we recommend the following:
36+
37+
- Open an [Issue](/issues/new).
38+
- Provide as much context as you can about what you're running into.
39+
- Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant.
40+
41+
We will then take care of the issue as soon as possible.
42+
43+
## I Want To Contribute
44+
45+
**Legal Notice**: When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license.
46+
47+
### Reporting Bugs
48+
49+
A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report.
50+
51+
Please report security related issues, vulnerabilities or bugs including sensitive information _not_ to the issue tracker, or elsewhere in public.
52+
Instead sensitive bugs must be sent by email to [[email protected]](mailto:[email protected]) (S/MIME encryption possible).
53+
54+
We use GitHub issues to track bugs and errors. If you run into an issue with the project:
55+
56+
- Open an [Issue](/issues/new).
57+
- Explain the behavior you would expect and the actual behavior.
58+
- Please provide as much context as possible and describe the _reproduction steps_ that someone else can follow to recreate the issue on their own.
59+
60+
### Suggesting Enhancements
61+
62+
Please do!
63+
64+
Enhancement suggestions are tracked as [GitHub issues](/issues).
65+
66+
- Use a **clear and descriptive title** for the issue to identify the suggestion.
67+
- Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
68+
- **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you.
69+
- You may want to **include screenshots and animated GIFs** which help you demonstrate the steps or point out the part which the suggestion is related to. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux.
70+
- **Explain why this enhancement would be useful** to most CONTRIBUTING.md users. You may also want to point out the other projects that solved it better and which could serve as inspiration.
71+
72+
### Your First Code Contribution
73+
74+
Please open an issue before starting to work on code.
75+
We would like to help you get started!
76+
77+
Here is the gist of it:
78+
79+
- We use a fork & pull development model.
80+
- We use branch names that group and identify the code in the branch, e.g., `feature/the-feature_worked-on` for features, or `bugfix/123` to identify an issue that needs to be fixed.
81+
82+
## Styleguides
83+
84+
### Commit Messages
85+
86+
- Use present tense ("Add feature" not "Added feature").
87+
- Try to make context-aware commit messages. For example, "Fix typo in README" is better than "Fix typo".
88+
- Collect related changes in one commit. For example, "Fix typo in README and add more examples" is better than "Fix typo in README" and "Add more examples".
89+
90+
## Pull requests
91+
92+
### Open a pull request
93+
94+
- Fork the repository and create your branch from `main`.
95+
- Describe all your changes in the `CHANGELOG.md` file in the "[Unreleased]" section.
96+
- Bump the version in `optimap/__init__.py` according to [Semantic Versioning](https://semver.org/).
97+
- Make sure your code is in line with the code formatter and passes all tests.
98+
- Add closing statements to the first comment of the pull request, e.g., `closes #11 #22 #33` to relate the PR to all issues it closes.
99+
100+
### Review a pull request
101+
102+
- All new features should be covered by unit tests
103+
- All tests should pass
104+
105+
## Attribution
106+
107+
This guide is based on the <https://contributing.md> and the [anticode code of conduct](https://jamesoswald.dev/posts/anticode/).

README.md

Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -236,23 +236,6 @@ docker-compose run web python manage.py createsuperuser
236236

237237
This will run the same process as above but within the Docker environment. Ensure the container is running and accessible before executing this command
238238

239-
## Block Emails/Domains
240-
241-
### What It Does
242-
243-
- Blocks specific emails and entire domains from registering.
244-
- Prevents login attempts from blocked users.
245-
- Admin can delete users and instantly block their email/domain.
246-
247-
### How to Use in Django Admin
248-
249-
1. **Manually Add Blocked Emails/Domains**
250-
- Go to `/admin/`
251-
- Add emails in **Blocked Emails** or domains in **Blocked Domains**.
252-
2. **Block Users via Admin Action**
253-
- Go to `/admin/auth/user/`
254-
- Select users → Choose **"Delete user and block email/domain"** → Click **Go**.
255-
256239
### Run tests
257240

258241
See <https://docs.djangoproject.com/en/4.1/topics/testing/overview/> for testing Django apps.
@@ -310,6 +293,19 @@ See also documentation at <https://code.visualstudio.com/docs/python/tutorial-dj
310293

311294
- If you get a message during login that there is an issue with the CSRF token, e.g. `WARNING:django.security.csrf:Forbidden (CSRF token from POST incorrect.): /loginres/` in the log and also i nthe UI, then switch to using `localhost:8000` as the domain, not the localhost IP used in the examples in this README file.
312295

296+
## Contributing
297+
298+
_All contributions are welcome!_
299+
We appreciate any feedback, suggestions, or code contributions to improve the project.
300+
Please follow the [contribution guidelines](CONTRIBUTING.md) for more details.
301+
302+
## Changelog
303+
304+
We operate a [changelog](CHANGELOG.md) to keep track of changes and updates to the project.
305+
The changelog follows the [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) format and is versioned according to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
306+
307+
The version is managed in `optimap/__init__.py`.
308+
313309
### Design colours and logos
314310

315311
Optimeta colour = _primary colour_: #158F9B
@@ -324,7 +320,26 @@ The **logos** and favicon are in the repository in the folder [`publications/sta
324320

325321
## Deploy
326322

327-
Deploy using docker-compose or see [`fly.io.md`](fly.io.md) for notes on deploying to Fly.io.
323+
Deploy using `docker-compose` or see [`fly.io.md`](fly.io.md) for notes on deploying to Fly.io.
324+
325+
## Operation
326+
327+
### Block Emails/Domains
328+
329+
#### What It Does
330+
331+
- Blocks specific emails and entire domains from registering.
332+
- Prevents login attempts from blocked users.
333+
- Admin can delete users and instantly block their email/domain.
334+
335+
#### How to Use in Django Admin
336+
337+
1. **Manually Add Blocked Emails/Domains**
338+
- Go to `/admin/`
339+
- Add emails in **Blocked Emails** or domains in **Blocked Domains**.
340+
2. **Block Users via Admin Action**
341+
- Go to `/admin/auth/user/`
342+
- Select users → Choose **"Delete user and block email/domain"** → Click **Go**.
328343

329344
## License
330345

optimap/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
__version__ = "0.1.0"
2+
VERSION = __version__

optimap/context_processors.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import optimap
2+
3+
def get_version(request):
4+
"""
5+
Return package version as listed in `__version__` in `init.py`.
6+
"""
7+
return {"optimap_version": optimap.__version__}

optimap/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@
226226
'django.contrib.auth.context_processors.auth',
227227
'django.contrib.messages.context_processors.messages',
228228
'optimap.urls.site',
229+
'optimap.context_processors.get_version',
229230
],
230231
},
231232
},

publications/templates/footer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="footer-copyright text-center text-white py-3">
33
<p class="mb-0 list-unstyled">
44
<span class="px-3">&copy;&nbsp;2023&nbsp;<a class="text-white" title="OPTIMETA project website" href="https://projects.tib.eu/optimeta">OPTIMETA project</a> &amp; <a class="text-white" title="KOMET project website" href="https://projects.tib.eu/komet">KOMET project</a></span>
5-
<a class="px-3 text-white" title="Link to source code project" href="https://github.com/GeoinformationSystems/optimap">Code</a>
5+
<a class="px-3 text-white" title="Link to source code project" href="https://github.com/GeoinformationSystems/optimap">Code</a>&nbsp;(v{{ optimap_version }})
66
<a class="px-3 text-white" title="Privace information / Imprint" href="{% url 'optimap:privacy' %}">Privacy / Imprint / Contact</a>
77
<a class="px-3 text-white" title="API browser" href="{% url 'optimap:data' %}">API</a>
88
<span class="px-3">Publication data license: <a class="text-white" title="Publication metadata license" href='https://creativecommons.org/publicdomain/zero/1.0/'>CC-0</a></span>

0 commit comments

Comments
 (0)