Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Changelog

## [Unreleased]

### Added

- ...

### Changed

- ...

### Fixed

- ...

### Deprecated

- ...

### Removed

- ...

### Security

- ...

## [0.1.0] - 2025-04-16

### Added

- Changelog

### Changed

- None.

### Fixed

- None.

### Deprecated

- None.

### Removed

- None.

### Security

- None.
107 changes: 107 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# Contributing to CONTRIBUTING.md

First off, thanks for taking the time to contribute! ❤️

All types of contributions are encouraged and valued.
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.
It will make it a lot easier for us maintainers and smooth out the experience for all involved.
The community looks forward to your contributions. 🎉

> 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:
>
> - Star the project
> - Share it on social media
> - Refer this project in your project's README
> - Mention the project in your work/research

## Code of Conduct

This code of conduct applies to on-topic development channels of the project.
This includes but is not limited to: bug trackers, development repositories, mailing lists/discussion forums, and any other communication method for development of software.
Off-topic channels are subject to their own rules and guidelines.

**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.

Above everything: **Be kind.**

By participating, you are expected to uphold this code. Please report unacceptable behavior
to [[email protected]](mailto:[email protected]).

## I Have a Question

Before you ask a question, it is best to search for existing [Issues](/issues) that might help you.
In case you have found a suitable issue and still need clarification, you can write your question in this issue.

If you then still feel the need to ask a question and need clarification, we recommend the following:

- Open an [Issue](/issues/new).
- Provide as much context as you can about what you're running into.
- Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant.

We will then take care of the issue as soon as possible.

## I Want To Contribute

**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.

### Reporting Bugs

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.

Please report security related issues, vulnerabilities or bugs including sensitive information _not_ to the issue tracker, or elsewhere in public.
Instead sensitive bugs must be sent by email to [[email protected]](mailto:[email protected]) (S/MIME encryption possible).

We use GitHub issues to track bugs and errors. If you run into an issue with the project:

- Open an [Issue](/issues/new).
- Explain the behavior you would expect and the actual behavior.
- Please provide as much context as possible and describe the _reproduction steps_ that someone else can follow to recreate the issue on their own.

### Suggesting Enhancements

Please do!

Enhancement suggestions are tracked as [GitHub issues](/issues).

- Use a **clear and descriptive title** for the issue to identify the suggestion.
- Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
- **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.
- 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.
- **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.

### Your First Code Contribution

Please open an issue before starting to work on code.
We would like to help you get started!

Here is the gist of it:

- We use a fork & pull development model.
- 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.

## Styleguides

### Commit Messages

- Use present tense ("Add feature" not "Added feature").
- Try to make context-aware commit messages. For example, "Fix typo in README" is better than "Fix typo".
- 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".

## Pull requests

### Open a pull request

- Fork the repository and create your branch from `main`.
- Describe all your changes in the `CHANGELOG.md` file in the "[Unreleased]" section.
- Bump the version in `optimap/__init__.py` according to [Semantic Versioning](https://semver.org/).
- Make sure your code is in line with the code formatter and passes all tests.
- 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.

### Review a pull request

- All new features should be covered by unit tests
- All tests should pass

## Attribution

This guide is based on the <https://contributing.md> and the [anticode code of conduct](https://jamesoswald.dev/posts/anticode/).
51 changes: 33 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,23 +236,6 @@ docker-compose run web python manage.py createsuperuser

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

## Block Emails/Domains

### What It Does

- Blocks specific emails and entire domains from registering.
- Prevents login attempts from blocked users.
- Admin can delete users and instantly block their email/domain.

### How to Use in Django Admin

1. **Manually Add Blocked Emails/Domains**
- Go to `/admin/`
- Add emails in **Blocked Emails** or domains in **Blocked Domains**.
2. **Block Users via Admin Action**
- Go to `/admin/auth/user/`
- Select users → Choose **"Delete user and block email/domain"** → Click **Go**.

### Run tests

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

- 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.

## Contributing

_All contributions are welcome!_
We appreciate any feedback, suggestions, or code contributions to improve the project.
Please follow the [contribution guidelines](CONTRIBUTING.md) for more details.

## Changelog

We operate a [changelog](CHANGELOG.md) to keep track of changes and updates to the project.
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).

The version is managed in `optimap/__init__.py`.

### Design colours and logos

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

## Deploy

Deploy using docker-compose or see [`fly.io.md`](fly.io.md) for notes on deploying to Fly.io.
Deploy using `docker-compose` or see [`fly.io.md`](fly.io.md) for notes on deploying to Fly.io.

## Operation

### Block Emails/Domains

#### What It Does

- Blocks specific emails and entire domains from registering.
- Prevents login attempts from blocked users.
- Admin can delete users and instantly block their email/domain.

#### How to Use in Django Admin

1. **Manually Add Blocked Emails/Domains**
- Go to `/admin/`
- Add emails in **Blocked Emails** or domains in **Blocked Domains**.
2. **Block Users via Admin Action**
- Go to `/admin/auth/user/`
- Select users → Choose **"Delete user and block email/domain"** → Click **Go**.

## License

Expand Down
2 changes: 2 additions & 0 deletions optimap/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__version__ = "0.1.0"
VERSION = __version__
7 changes: 7 additions & 0 deletions optimap/context_processors.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import optimap

def get_version(request):
"""
Return package version as listed in `__version__` in `init.py`.
"""
return {"optimap_version": optimap.__version__}
1 change: 1 addition & 0 deletions optimap/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'optimap.urls.site',
'optimap.context_processors.get_version',
],
},
},
Expand Down
2 changes: 1 addition & 1 deletion publications/templates/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="footer-copyright text-center text-white py-3">
<p class="mb-0 list-unstyled">
<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>
<a class="px-3 text-white" title="Link to source code project" href="https://github.com/GeoinformationSystems/optimap">Code</a>
<a class="px-3 text-white" title="Link to source code project" href="https://github.com/GeoinformationSystems/optimap">Code</a>&nbsp;(v{{ optimap_version }})
<a class="px-3 text-white" title="Privace information / Imprint" href="{% url 'optimap:privacy' %}">Privacy / Imprint / Contact</a>
<a class="px-3 text-white" title="API browser" href="{% url 'optimap:data' %}">API</a>
<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>
Expand Down
Loading