Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #1701: Events page displays year for events scheduled to start or end at a future year #1714

Closed

Conversation

alvindera97
Copy link
Contributor

This is the PR replacing #1713. The functional tests have been removed and logical/functional concerns have been replicated with unit tests that don't require selenium to run.

This is basically because of the CI Pipeline which makes no provision for installing selenium's web driver required by selenium to run the [headless] functional tests.

There is something that I would like to note:
— When I was running the unit tests, I found out that Django was somehow caching the results of the tests and so the subsequent test results I was getting were rather untrustworthy.

• I was able to get around this by adding a tearDown() method to the relevant unit test class. This tearDown() method basically clears the cache at the end of each test (cache.clear()) suggested here

Please feel free to ask any questions. This is basically my first shot at contributing to open source software.

@alvindera97 alvindera97 changed the title Issue #1701: Calendar events now shows the year for events which are not in the current year Issue #1701: Calendar events now shows the year for events which are scheduled to start or end at a future year Dec 27, 2020
@alvindera97 alvindera97 changed the title Issue #1701: Calendar events now shows the year for events which are scheduled to start or end at a future year Issue #1701: Events page displays year for events scheduled to start or end at a future year Dec 28, 2020
@alvindera97 alvindera97 marked this pull request as draft January 6, 2021 15:10
@alvindera97 alvindera97 marked this pull request as ready for review January 6, 2021 15:11
@alvindera97 alvindera97 marked this pull request as draft January 6, 2021 15:11
@alvindera97
Copy link
Contributor Author

Good day @ewdurbin. Please could you review my pull request? Thank you.

@alvindera97 alvindera97 marked this pull request as ready for review January 6, 2021 15:16
.gitignore Outdated Show resolved Hide resolved
Passed variables to the time_tag template [time_tag.html] that checks if an event was scheduled to start or end with the current year.
More events are created to test particular scenarios of events especially events set to start or end at a future year.
…t Year

The time tag now displays the year when an event will occur. This is only for events that have been scheduled to start or end in at a future year. The accompanying functional tests have also been included.
All test data concerning the provision of data to serve the functional tests have been moved to the functional test.
As it improves readability.
All other test data at test_views.py was reset
to accommodate for the reduction in number of test data instances.
Since the current CI at the main branch does not support selenium [web driver] operations, the functional test which depends on selenium to run has been removed.
@alvindera97 alvindera97 force-pushed the change-functional-test-to-unit-test branch 2 times, most recently from 77b59ed to 1a3df45 Compare April 9, 2022 22:07
@alvindera97 alvindera97 force-pushed the change-functional-test-to-unit-test branch from 1a3df45 to 0ed1e92 Compare April 9, 2022 22:09
alvindera97 and others added 9 commits January 1, 2023 00:44
* Fixed Issue#2190Now the Homepage code sample doesn't have syntax error

* Another minor typo in the next line

Co-authored-by: Eshaan <eshaan@pop-os.localdomain>
…hon#2233)

* ignore Makefile .state folder

* add test and docker_shell command to Makefile

* Add command to create pycon vouchers for sponsors

* Update sponsors/management/commands/create_pycon_vouchers_for_sponsors.py

* Update sponsors/management/commands/create_pycon_vouchers_for_sponsors.py

Co-authored-by: Ee Durbin <ewdurbin@gmail.com>
dependabot bot and others added 25 commits June 20, 2024 19:55
Bumps [django-sitetree](https://github.com/idlesign/django-sitetree) from 1.17.0 to 1.18.0.
- [Changelog](https://github.com/idlesign/django-sitetree/blob/master/CHANGELOG)
- [Commits](idlesign/django-sitetree@v1.17.0...v1.18.0)

---
updated-dependencies:
- dependency-name: django-sitetree
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [lxml](https://github.com/lxml/lxml) from 4.9.2 to 5.2.2.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](lxml/lxml@lxml-4.9.2...lxml-5.2.2)

---
updated-dependencies:
- dependency-name: lxml
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Passed variables to the time_tag template [time_tag.html] that checks if an event was scheduled to start or end with the current year.
More events are created to test particular scenarios of events especially events set to start or end at a future year.
…t Year

The time tag now displays the year when an event will occur. This is only for events that have been scheduled to start or end in at a future year. The accompanying functional tests have also been included.
All test data concerning the provision of data to serve the functional tests have been moved to the functional test.
As it improves readability.
All other test data at test_views.py was reset
to accommodate for the reduction in number of test data instances.
Since the current CI at the main branch does not support selenium [web driver] operations, the functional test which depends on selenium to run has been removed.
Passed variables to the time_tag template [time_tag.html] that checks if an event was scheduled to start or end with the current year.
More events are created to test particular scenarios of events especially events set to start or end at a future year.
…t Year

The time tag now displays the year when an event will occur. This is only for events that have been scheduled to start or end in at a future year. The accompanying functional tests have also been included.
All test data concerning the provision of data to serve the functional tests have been moved to the functional test.
As it improves readability.
All other test data at test_views.py was reset
to accommodate for the reduction in number of test data instances.
Since the current CI at the main branch does not support selenium [web driver] operations, the functional test which depends on selenium to run has been removed.
…t Year

The time tag now displays the year when an event will occur. This is only for events that have been scheduled to start or end in at a future year. The accompanying functional tests have also been included.
All test data concerning the provision of data to serve the functional tests have been moved to the functional test.
As it improves readability.
All other test data at test_views.py was reset
to accommodate for the reduction in number of test data instances.
Since the current CI at the main branch does not support selenium [web driver] operations, the functional test which depends on selenium to run has been removed.
…ndera97/pythondotorg into successfully_rebased_cfttut
@alvindera97
Copy link
Contributor Author

Hi everyone 👋🏾

A very warm greeting to you all and I would like to use this opportunity to say a big thank you for keeping Python's website functional all these years! It's been a very long time since I last worked on this pull request (essentially 4 years now).. I've been able to merge/rebase all updates since that time and confirmed that the tests pass and the feature still works.

Just as a footnote, this PR resolves #1701.

Thank you for you time and I hope a favourable response :). If there's anyone who would be free to take a look at what changes have been made and how they impact the source code, please feel free to leave comments and I will be able to respond to / hopefully address your comment.

Best regards.

@alvindera97
Copy link
Contributor Author

I'm currently working on making a cleaner version of this pull request... I'll most probably move it to another PR, however I'll mention this pull request.

@alvindera97
Copy link
Contributor Author

I've set up the new pull request replacing this one here: #2500... I will now be closing this pull request.

@alvindera97 alvindera97 closed this Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.