Giter VIP home page Giter VIP logo

nem-per-feina's Introduction

banner

stars forks watchers translation translation

Nem per feina

Nem per feina is an open source project promoted by GeeksCat association for Hactoberfest 2020 event.

Show your support by 🌟 the project!!

The project

The objective of this hackathon is to launch a job portal website where tech community can find curated job opportunities from local companies.

We forked the open source project django-job-portal (See demo 1, demo 2) and use it as a baseline.

Deployment

Kubernetes deployment

To deploy to a k8s cluster see the k8s manifests

Contributing

Nem per feina is a collaborative effort where everybody is more than welcome to contribute, no experience is required!

Have a look at CONTRIBUTING.md file that describes the process to submit a contribution, and come say hi πŸ‘‹πŸ‘‹ to GeeksCat slack where most contributors hang out.

Tech stack

Setup backend development environment

Dockerized environment

If you wish to use a dockerized development environment, you can easily do so by following these steps:

  1. Add .env file:

    cp .env.dev.sample .env

  2. Start local development environment:

    make start

    Or, if you wish to run in detached mode:

    make serve

  3. Execute tests:

    make test

  4. To see all available options:

    make help

Development with docker dev environment

Once the environment is up and running, you can modify the project files and the Django auto-reload will pick up your changes in the container.

To stop the dockerized development environment use:

CTRL+C or make stop if you run in detached mode.

Executing database migrations

The app container runs database migrations at every startup, so simply restart the app server with

make restart c=app

Changing requirements file

If during development you need to change the requirements.txt file you'll also have to rebuild the container:

  1. Build images again with make buildor make build c=app// or c=test

  2. Stop and remove your environment with make restart. Even though continers are removed, your database volume will be preserved.

Recreate database

If you want to recreate the database:

  1. Delete everything including volumes with make purge

  2. Restart everything with make up (or make server for detached mode)

Local environment

Install

  1. Create a virtual environment

    virtualenv venv

    Or

    python3.8 -m venv venv

  2. Activate it

    source venv/bin/activate

  3. Install the packages in the virtual env:

    pip install -r requirements.txt

  4. Add .env file.

    cp .env.dev.sample .env

Run

1.With the venv activate it, execute:

`python manage.py collectstatic`

Note : Collect static is not necessary when debug is True (in dev mode)

  1. Create initial database:

    python manage.py migrate

  2. Load demo data (optional):

    python manage.py loaddata demo

  3. Run server:

    python manage.py runserver 0.0.0.0:8000

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Xavi TorellΓ³

πŸ’¬ πŸ’» πŸ“– πŸ“‹ πŸ€” πŸš‡ πŸ§‘β€πŸ« πŸ“† πŸ‘€

Jordi Bagot Soler

πŸ’¬ πŸ’» πŸ“– πŸ“‹ πŸ€” πŸš‡ πŸ§‘β€πŸ« πŸ“† πŸ‘€

Francesc ArpΓ­ Roca

πŸ’¬ πŸ› πŸ’» πŸ“– πŸ“‹ πŸ€” πŸ§‘β€πŸ« πŸ“† πŸ‘€

David Asensio CaΓ±as

πŸ’¬ πŸ› πŸ’» 🎨 πŸ“– πŸ“‹ πŸ€” πŸ§‘β€πŸ« πŸ‘€

Victor

πŸ’» πŸ“– πŸ“‹ πŸ€” πŸ‘€

dbf

πŸ’» πŸ‘€

Ytturi

πŸ’» πŸ€” πŸš‡ πŸ‘€

Didac Guillen

πŸ’» πŸš‡

xdiume

πŸ’»

Xavier Marquès

πŸ’»

Manuel Castellin

πŸ’» πŸš‡ πŸ‘€

Oriol Piera

πŸ’»

Franc Rodriguez

πŸš‡

dani herrera

πŸ’»

Marc Casamitjana Montseny

πŸ’»

lluisd

πŸ’»

Eudald Dachs

πŸ’»

Eric Massip

πŸ’» πŸš‡

This project follows the all-contributors specification. Contributions of any kind welcome!

nem-per-feina's People

Contributors

cherylhughey avatar dguillen12 avatar francescarpi avatar francrodriguez avatar fullonic avatar jbagot avatar manjurulhoque avatar mcastellin avatar mcmontseny avatar oriolpiera avatar todoyel avatar victormartingarcia avatar weblate avatar wolframtheta avatar xavitorello avatar xdiume avatar ytturi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

nem-per-feina's Issues

Integrate Social Auth

Will be great if we can integrate social auth for the sign-up / sing-in

Some interesting providers to evaluate:

  • github
  • linkedin
  • google
  • apple

Check messages to translate

Is your feature request related to a problem? Please describe.
After this issue #11 we'll have the translation system configurated, but we need to check if some texts or messages need to be translated.

Describe the solution you'd like
Use gettext for translate all api messages.
Not translate the templates because it will disappear.

Describe alternatives you've considered
Nope

Additional context
Nope

Job Salary: should be a range?

Background

The job vacancies has a "Salary" field:

class Job(models.Model):
    # ...
    salary = models.IntegerField(default=0, blank=True)

Screenshot:

Job screenshot with salary field

Issue

Usually, companies post vacancies without salary or with a salary range:

Vacancies screenshot with salary range

And applicants search offers for a minimum annual salary:

Sample searching for a minimum annual salary

Potential approaches

Solution 1

Do nothing. This info can be included on Job Description field.

be free to vote with πŸ‘Ž

Solution 2

Change salary by a salary range (annual_salary_max and annual_salary_min or external package like inclusive-django-range-fields). Also, maybe allow null on values.

be free to vote with πŸ‘

Other alternative solutions.

please, be free to post your own as a new comment.

[Employer] Allow delete old job offers

Is your feature request related to a problem? Please describe.
At the moment there is available a delete button but it's not working.

Describe the solution you'd like
Connect the button to the backend and delete the selected job offer from the database.

Additional context
Employer dashboard page.

Create k8s manifests backend

Is your feature request related to a problem? Please describe.
No.

Describe the solution you'd like
Create the manifests to deploy the app to the kubernetes cluster. If we decide to use helm, create the helm chart instead.

Describe alternatives you've considered
Depending if use helm or not

Additional context
We need to deploy the app to a kubernetes cluster. To deploy to k8s we need manifests or we need to use helm. And these files will be used in the CD to deploy the app automatically.

Implement typing test

Is your feature request related to a problem? Please describe.
We are lacking a typing test

Describe the solution you'd like
Implement a test using mypy

Describe alternatives you've considered
A good approach will be that the test will pass as long as the newly modified files pass mypy.
We can achieve this by selecting the files that have been modified on a later date than when we implement this issue.
Git always keeps the file creation/modify date, so we can make use of it.

We may want to implement a small (bash) script to collect the files that we want to test or adapt this test (at least for now).

Additional context
Consider using annotations and typing in all files. Also consider using the TYPE_CHECKING from typing to import types only used in annotations:

from __future__ import annotations
from typing import List, TYPE_CHECKING

if TYPE_CHECKING:
  from this.project import CustomType

def check_this_method(foo: List[CustomType]) -> int:
    return len(foo)

Mypy documentation: https://mypy.readthedocs.io/en/stable/
Basically:

  • Mypy will check all files (checking the imports as well) to see if we are using type annotations
  • Mypy will check the typing for all the objects, parameters, return values...

Use a proper DB

Now the app is using sqlite. We have to change it for a proper DB, like PostgreSQL for example.
I recommend to use a docker container with the DB.
This task can be related with the Dockerize app task

[Employer] Allow undo "filled" position

Is your feature request related to a problem? Please describe.
The employer doesn't have a way to undo a "filled" position. Sometimes can happen that a selected candidate step back at the last moment. In this kind of scenario would be nice have a "unfilled" button, so the employer can make the offer available again without the need to create a new one.

Describe the solution you'd like
Would be nice, once the employer select the current "filled" button, the button change to "unfilled" or "republish" and when clicked again provide the functionality mention above.

Additional context
Employer dashboard page

Add -r requirements-test.txt

Is your feature request related to a problem? Please describe.
Add -r requirements-test.txt

Describe the solution you'd like
A clear and concise description of what you want to happen.

Base settings are not loaded

Checklist

  • I have verified that that issue exists against the master branch.
  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • This is not a usage question. (Those should be directed to the Slack instead.)
  • I have reduced the issue to the simplest possible case.

Describe the bug

Django server doesn't start as expected by default if DJANGO_SETTINGS_MODULE is not defined. Base jobs.settings does not resolve with any settings, it's empty.

To make it work:
DJANGO_SETTINGS_MODULE=jobs.settings.development python manage.py runserver

To Reproduce
Steps to reproduce the behavior:

  1. try to run the server withou overriding with python manage.py runserver
  2. an error will be raised due there are no settiings are defined

Expected behavior
Server should start with default settings

Define requirements for each new change / PR

Basically define CONTRIBUTING guidelines and ISSUE/PR templates.

Think about

  • Summaryze what provides
  • Validate it providing tests
  • Add an screenshot if it can simplify the understanding of what provides

Create docker-compose backend

Is your feature request related to a problem? Please describe.
It's not a problem

Describe the solution you'd like
We want a docker-compose to be able to run this project easily. The Dockerfile is already in the project

Configure redis

Is your feature request related to a problem? Please describe.
django constance can use redis to cache the constant's values. At the moment we have not configure it in the project.

Describe the solution you'd like
Update the settings adding redis configuration as a cache.
We will need to add this package:
https://github.com/jazzband/django-redis

Describe alternatives you've considered
After that, create a new issue for arch & CI. They need to dockerize it .

Additional context
Nope

Improve environment variables in settings

Is your feature request related to a problem? Please describe.
At the moment we have three environment variables:

  • DEBUG
  • APF_ELASTIC_HOST_NAME
  • APF_ELASTIC_HOST_PORT

It haves different pattern names. Also, the elastic search variables does not use environ.

Describe the solution you'd like

  • Change DEBUG variable name to APF_DEBUG
  • Change ES variables for using environ
  • Crear env.samplefile
  • Update documentation notifying DEBUG needs to be True in development environment (for statics serve)

Describe alternatives you've considered
No

Additional context
No needed

Secrets management backend

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
The secrets have to be stored somewhere. And these secrets have to be deployed in a k8s secrets using de CD.

Describe alternatives you've considered
I used SOPS to encrypt secrets and be able to add this encrypted file in the repo. Then the CD hace to be smart enough to decrypt and add them to a k8s secret

Additional context

Add contribution guidelines in CONTRIBUTING

Is your feature request related to a problem?
Nope

Describe the solution you'd like
Some hints and guidelines show be integrated into our README file

Describe alternatives you've considered

Additional context

"Apply-Contact" sub process

Backgrounds

  • The process to "apply" for a job and the process to "Contact" an applicant looks weak:
    • People who are applying can't send the cv, neither a presentation letter. Just can click on 'Apply' button and do nothing.
    • The "contact" button on the companies side do nothing. Digging into code you don't found models to support conducting the candidate selection process.

Issue

  • The "Apply-Contact" shortcomings can result in a loss of credibility of the system.

Contact button on company side screenshot

Potential approaches

Solution 1

Do nothing. It's enough at this stage.

be free to vote with πŸ‘Ž

Solution 2

Remove "apply-contact" process from the app. Forward to an external candidate selection process (url)

be free to vote with πŸ‘

Other alternative solutions.

please, be free to post your own as a new comment.

More screenshots

Apply for this job screenshot

Provide multilanguage support

Internationalization (i18n) should be provided.

At least we should support locales (and formats) for:

  • Catalan
  • Spanish
  • English

Class User: the binary gender field

Backgrounds

Currently, the app has a model User with a Gender field like this:

GENDER_CHOICES = (
    ('male', 'Male'),
    ('female', 'Female'))

class User(AbstractUser):
    # ...
    gender = models.CharField(max_length=10, # ...

Screenshot

Just a screenshot where Gender appears with the two values

Issue

The Gender property value, on app, is constrained to a binary gender.

Potential approaches

Solution 1

Do nothing. It's right.

be free to vote with πŸ‘Ž

Solution 2

Add a third option: "non binary" gender.

be free to vote with πŸ‘

Solution 3

Remove this field, it does not achieve anything.

be free to vote with πŸš€

Solution 4

Allow edit the gender to write a free text. Like Google does:

be free to vote with πŸŽ‰

google screenshot allow to edit sex and write your own

Other alternative solutions.

please, be free to post your own as a new comment.

Add django-constance

Is your feature request related to a problem? Please describe.
We need a system for manage constants in our project. We could use settings.py, but it not allow to change the values in execution time. We should may to change this values from the admin site.

Describe the solution you'd like
The possible solution is to use django-constance that allow us to define some constants in the settings.py and change values in execution time. Also it allows to use redis for cache.

https://github.com/jazzband/django-constance

Describe alternatives you've considered
No alternatives at the moment

Additional context
No additional context at the moment

Register models in the admin site

At the moment, no model is registered in the admin site. This is useful for debug and to have more details for the administrators.

Notifications plugins

Notifications should be standardized defining plugins.

It will contribute to #2 make it more hackable, and will simplify the possibility to support new channels without added complexity

Think about the possibility to

  • provide SMTP notification plugin
  • provide Telegram notification plugin
  • provide Twitter notification plugin
  • provide WebHooks

Dockerize backend

The env should be standardized.

A base Docker image should be created

Ideal to be reused for local testing, CI and deployment

Some ideas to go further

  • prepare a docker composition
  • turn it k8s-deployable
  • provide Helm Chart

Check elasticsearch

Now we have a dependency of elastic search. And there is a document: /jobsapp/document.py that implements some login in elasticsearch but is commented. Would be nice to check if it's needed, what is doing and if we have to keep it or not. If we don't have to keep it, we have to remove the dependency.

Add python-black and configure linter

Is your feature request related to a problem? Please describe.
We have not any linter and it's important to follow PEP8. For this reason, it's important add any linter.

Describe the solution you'd like
Add python-black in requirements, documentate and explay to team how to use it.
Also configure any linter (flake8 or pylint)

Describe alternatives you've considered
Nope

Additional context
Nope

Changes on README

We need changes on README file to better communicate:

What is this project: A django application for managing job postings. Forked from django-job-portal repository
Screenshots
How to run it: How to run it on dev (local) environment. How to run it on production environment.
How to contribute: Link to CONTRIBUTE file. Explaining this is a collaborative effort promoted by GeeksCat association for Hacktoberfest 2020 edition

Identify if a job offer permits remote working

Backgrounds

At this stage, there is not a checkbox to indicate if a job vacancies is a remote job.

Issue

Nowadays, many people need to know if a job is remote. People can apply to a job in another city or country if it's a remote job or just work remotely because it offers a more flexible lifestyle.

95682136-f58be580-0be3-11eb-8dd3-39da63273941

Potential approaches

Solution 1

Do nothing. This info can be included on Job Description field.

be free to vote with πŸ‘Ž

Solution 2

Add "Is remote" on Jobs as a new field:

be free to vote with πŸ‘

class Job(models.Model):
    # ...
    is_remoting = models.BooleanField("Is remoting", default=False, )

Other alternative solutions.

please, be free to post your own as a new comment.

More screenshots

image

Make it hackable!

Will be great to study which changes can be performed to make it more hackable :)

Some ideas

  • expose a REST API
  • provide a GraphQL API
  • use open standards
  • define a plugins system
    • i.e notifications plugins for some popular channels (web, smtp, telegram, twitter, ...)

Provide CI backend

CI should be provided

Base goals:

  • Pass tests in an standardized environment
  • Β Each PR should be asserted before merge it
  • Some performance indicators should be analyzed

Add functional tests

Is your feature request related to a problem? Please describe.
At the moment does not exist any test.

Describe the solution you'd like
The first step could be add functional tests on the current flow. Maybe is not necessary on django views, only test the apis. Because the views will desapear.

Describe alternatives you've considered
Nope

Additional context

Add poetry and clean dependencies

Now we are using requirements.txt would be nice to use poetry to manage the dependencies. And also we should check if all the dependencies in the requirements.txt are needed and update the versions

Remove django's views and templates

Is your feature request related to a problem? Please describe.
If the UX team will create a new frontend project (react or vue), the django's views and templates could be deleted.

Describe the solution you'd like
Delete unnecessary views, urls and templates.

Describe alternatives you've considered
Check if exists some functional tests also need to be removed.

Additional context
Nope

Prepare envs

Define and provide our environments to host the anem-per-feina service

Some ideas

  • Create a k8s cluster
  • Study how to manage the DB
  • Β Define backups policy and related stuff
  • Β Env optimizations, deal with static content, ...
  • Β Study which envs are needed (prod, int, dev, ...)
  • Β In line with #5, permit temporal branch-based envs

Remove sqlite database from repo

Is your feature request related to a problem? Please describe.
A sample sqlite database is committed in the repo.

Describe the solution you'd like

  • Delete it
  • Add initial fixtures in json format
  • Update readme explain how import this fixture
  • Modify settings allowing multiple databases getting from environment variables.

Describe alternatives you've considered
Nope

Additional context
Nope

Improve employee profile

Right now there is only the name and gender information.
It would be nice to have fields like:

  • CV
  • Past jobs
  • Personal web urls: social networks (linkedin, twitter,...) , git profile page, personal page, etc...
  • etc...

Remove str2bool settings function and use from stdlib

Is your feature request related to a problem? Please describe.
In settings.py are the str2bool function. Is not necessary because exists a similar function in stdlib.

Describe the solution you'd like

Take a look the follow example:

from distutils.util import strtobool

DEBUG = strtobool(os.environ.get('APF_DEBUG', False))  # returns 0 or 1

Describe alternatives you've considered
Nope

Additional context
Nope

Basic improvements

The project needs basic improvements before start the other tickets.

Not to use final urls

image

It's better to use reverse_lazy

**Replace some "unicode" by "str"

image

Check if inheritances are being used correctly

For example in this case, to check if it's better to use "form_valid".

image

Check settings

Check the default settings. For example, DEBUG must be False by default. Use os.environ.get

image

Implement tests

It should be a must! :)

Think about

  • functional tests
  • e2e tests

Provide model fields info

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
Provide verbose_name and help_text to all field models for a better experience in admin site.
Also provide Meta information to Model classes.

Describe alternatives you've considered
To leave it as is waiting for models to change. But waiting for this to happen this information can be useful.

Additional context
This is an example.

from django.utils.translation import ugettext as _
class Job(models.Model):
    ...
    salary = models.IntegerField(default=0, blank=True, verbose_name=_('Salary'),
        help_text=_('Maximum salary for this job.'))

    class Meta:
        verbose_name = _('Job')
        verbose_name_plural = _('Jobs')

Note the use of _() but it may be not applied if another translation system is used.

Upgrade to Python 3.9

Is your feature request related to a problem? Please describe.

@mcastellin tried to deploy anem-per-feina on a python3.9 env, but some of their dependencies are currently supported for 3.9. More info #48 (comment)

Describe the solution you'd like

Upgrade to 3.9 once all dependencies support 3.9

Describe alternatives you've considered
Wait for the community to populate their upgrades :)

Enable edit offer

In the employer dashboard you cannot edit the offer. When you click the EDIT button nothing happens

django-constance need to be added in the requirements.txt

Checklist

  • [X ] I have verified that that issue exists against the master branch.
  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • This is not a usage question. (Those should be directed to the Slack instead.)
  • I have reduced the issue to the simplest possible case.

Describe the bug
The django-constance has been added, but the package it's missing in the requirements.txt

Specify the team with the correct label
Add a label in the issue, selecting the correct team that this issue belongs to.

To Reproduce
Steps to reproduce the behavior:

  1. Execute manage.py runserver

The project does not start because the constance package is missing.

Expected behavior
The project need to warm up correctly.

Branding process

A new service without a brand it's like a bbq without meal :)

At least a logo, an slogan, an style manual / core design scheme should be provided.

The original brand that we propose is anem per feina. It could be changed if needed ;)

Some ideas

  • voting with all the HBF participants
  • voting also with all GeeksCAT members

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.