-
Notifications
You must be signed in to change notification settings - Fork 12
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
285 enhancement csv upload admin portal #287
Conversation
Fixed it 👍 |
|
def sample_data_as_list(sample_data_raw): | ||
""" | ||
Retrieve a locally saved sample of the population to use for this test and parse it to a list | ||
Return: List |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you're adding a function signature and being explicit about the return value, and you please use the python typing in this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
I will include this later on, when I am sure what data structures is best suited for this function
# # Start and ending ip range | ||
# start_ip = data.iloc[:,0] | ||
# end_ip = data.iloc[:,1] | ||
# Create network from these |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary to create an IP Network? We store IPranges in the database, and while a network can resemble an IP range that has a start and end IP, they're not necessarily the same thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the moment, the saving interface function works with IP networks.
The reasoning behind this was so that we could easily have a list with a simple dimensions.
This posed a problem before, so I can this fundamental part around by allowing ip ranges.
@roald-teunissen can you share some of the error messages you see? Use the backticks to share somethign like so:
|
Hi @mrchrisadams, as promised I've uploaded my work so you can pick it up from here. Before you start with this, it is important to understand that the link to the uploading page can normally be shown to admin users. If you use the make commands I've created, you will not have direct access as an admin. This is why I have temporarily placed the button in the list that will always be shown. Please make sure to put this "start_csv_import_button" back into the |
Thanks @roald-teunissen - and thanks the heads up on the |
Closing this in favour of #296 |
Hi @mrchrisadams, as you can see in the files, I've been working on reading a csv file and validating it.
For now I'm stuck on something really simple and I don't know what I'm doing wrong.
It can't find the function validate_csv_file, even though I have declared it.